Information Technology Reference
In-Depth Information
More specically, in CHARME unknowns (called logical variables) and linear
constraints on them are allowed. The language supports use of Prolog-like terms,
arrays and sequences of logical variables and a number of features (like demons
and the element primitive, an equivalent of INDOMAIN ) adopted from the CHIP
language. Also, it provides a nondeterministic or statement and iterations over
nite domains, arrays and sequences of logical variables.
The C like syntax creates an impression that CHARME supports impera-
tive programming. However, from the paper it is not clear whether it is actually
the case. If it is, then it is not clear how the logical variables, constraints and
nondeterministic statements interact with the usual features of the underlying
imperative language. In particular, the use of logical variables outside of con-
straints, the impact of backtracking on the assignment statements and the status
of choice points created within procedure bodies is not explained (probably due
to space limitations). CHARME does provide bidirectional connection with C.
2LP was designed for linear programming applications. In 2LP unknowns
(called continuous variables) are global. They vary over the real interval [0
)
and can be either simple ones or arrays. The only way these variables can be
modied is by imposing linear constraints on them. Constraints can also appear
in conditions. This leads to a conditional way of adding them to the store.
Whenever a constraint is added to the store, its feasibility w.r.t. the old
constraints is tested by means of an internal simplex-based algorithm. This al-
gorithm maintains the current feasible region, which is a polyhedron, together
with a witness point which is a distinguished vertex.
The continuous variables can appear outside of the constraints as arguments
of any procedure whose signature has a continuous variable, and as arguments to
some predeclared functions like wp that returns the value of a witness point. In
the latter case when a continuous variable is passed as a parameter, the witness
point value is used.
2LP provides the nondeterministic statements analogous to the ORELSE and
SOME statements of
;
+
1
Alma-0
and a limited form for the FORALL statement. Auto-
matic backtracking over assignment and combination of continuous and custom-
ary variables in compound variables is not supported.
8 Conclusions and Future Work
In this paper we discussed the programming language
that integrates the
imperative and logic programming paradigm and illustrated the resulting pro-
gramming style by a number of examples.
Alma-0
is based on rst-order logic in
the sense that it provides a computational interpretation for the standard connec-
tives, so negation, disjunction and conjunction, and for various forms of quan-
tication. In fact, many rst-order formulas and their extensions by bounded
quantiers, sorts (i.e., types), and arrays, can be interpreted and executed as
Alma-0
Alma-0
programs. The precise logical nature of this computational interpreta-
tion of rst-order logic was worked out in [1].
 
Search WWH ::




Custom Search