2 research outputs found
Adding partial functions to Constraint Logic Programming with sets
Partial functions are common abstractions in formal specification notations such as Z, B and Alloy. Conversely, executable programming languages usually provide little or no support for them. In this paper we propose to add partial functions as a
primitive feature to a Constraint Logic Programming (CLP) language, namely {log}.
Although partial functions could be programmed on top of \setlog, providing them as first-class citizens adds valuable flexibility and generality to the form of set-theoretic formulas that the language can safely deal with. In particular, the
paper shows how the \setlog constraint solver is naturally extended in order to accommodate for the new primitive constraints dealing with partial functions.
Efficiency of the new version is empirically assessed by running a number of non-trivial set-theoretical goals involving partial functions, obtained from specifications written in Z
Automated Reasoning with Restricted Intensional Sets
Intensional sets, i.e., sets given by a property rather than by enumerating
elements, are widely recognized as a key feature to describe complex problems
(see, e.g., specification languages such as B and Z). Notwithstanding, very few
tools exist supporting high-level automated reasoning on general formulas
involving intensional sets. In this paper we present a decision procedure for a
first-order logic language offering both extensional and (a restricted form of)
intensional sets (RIS). RIS are introduced as first-class citizens of the
language and set-theoretical operators on RIS are dealt with as constraints.
Syntactic restrictions on RIS guarantee that the denoted sets are finite,
though unbounded. The language of RIS, called L_RIS , is parametric with
respect to any first-order theory X providing at least equality and a decision
procedure for X-formulas. In particular, we consider the instance of L_RIS when
X is the theory of hereditarily finite sets and binary relations. We also
present a working implementation of this instance as part of the {log} tool and
we show through a number of examples and two case studies that, although RIS
are a subclass of general intensional sets, they are still sufficiently
expressive as to encode and solve many interesting problems. Finally, an
extensive empirical evaluation provides evidence that the tool can be used in
practice