JSetL is a Java library that endows Java with a number of facilities that are intended to support declarative and constraint (logic) programming. In this paper we show how JSetL can be used to support general forms of nondeterministic programming in an object-oriented framework. This is obtained by combining different but related facilities, such as logical variables, set data structures, unification, along with a constraint solver that allows the user to solve nondeterministic constraints as well as to define new constraints using the nondeterminism handling facilities provided by the solver itself. Thus, the user can define her/his own general nondeterministic procedures as new constraints, letting the constraint solver handle them. The proposed solutions are illustrated through a number of concrete Java programs using JSetL, including the implementation of simple Definite Clause Grammars.
|Appare nelle tipologie:||1.1 Articolo su rivista|