A Typechecker for a Set-Based Constraint Logic Programming Language

05/03/2022
by   Maximiliano Cristiá, et al.
0

log (read 'setlog') is a Constraint Logic Programming (CLP) language and satisfiability solver whose constraint domain is the theory of finite sets. Rooted in CLP and Prolog, log essentially provides an untyped language. As such it can accept formulas that make the solver to produce unwanted behaviors. Besides, log users may make mistakes in their programs that would normally be caught by a typechecker. In particular, log has been proposed as a prototyping language for B and Z specifications, which are typed formalisms. Then, without a type system for log there is a gap that users need to fill manually. Therefore, in this paper we define a type system and implement a typechecker for log. The type system is proved to be safe (sound) by adapting the functional programming formulation of type safety to the CLP context. We also show how types and CLP can be combined to provide stronger assurances on program correctness. Finally, we apply the type system, the typechecker and their combination with CLP to a real-world case study from the aeronautic domain.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/16/2021

{log}: Set Formulas as Programs

{log} is a programming language at the intersection of Constraint Logic ...
research
12/30/2021

An Automatically Verified Prototype of a Landing Gear System

In this paper we show how {log} (read `setlog'), a Constraint Logic Prog...
research
02/10/2021

Integrating Cardinality Constraints into Constraint Logic Programming with Sets

Formal reasoning about finite sets and cardinality is an important tool ...
research
07/09/2019

The Ad Types Problem

The Ad Types Problem (without gap rules) is a special case of the assign...
research
10/07/2018

A Minesweeper Solver Using Logic Inference, CSP and Sampling

Minesweeper as a puzzle video game and is proved that it is an NPC probl...
research
03/06/2012

Search Combinators

The ability to model search in a constraint solver can be an essential a...
research
09/02/2020

An Automatically Verified Prototype of the Tokeneer ID Station Specification

The Tokeneer project was an initiative set forth by the National Securit...

Please sign up or login with your details

Forgot password? Click here to reset