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...
详细信息
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.
The basic ideas of nondeterministic programming are critically reconsidered to single out a proper attitude and programming style for languages allowing direct control of nondeterministic features. The proposed attitu...
详细信息
The basic ideas of nondeterministic programming are critically reconsidered to single out a proper attitude and programming style for languages allowing direct control of nondeterministic features. The proposed attitude aims at retaining the purity of the nondeterministic formulation of search processes on one level (the attempt level), deferring the coordination of problem solving efforts to another (the choice level). The feasibility of recognizing these two levels is discussed, stressing that the structure to be managed at the choice level is a tree of contexts. The leaves are computational environments, each holding an alternative under inspection, while the other nodes are associated with choice points. According to the proposed programming style, a generative function is associated with each choice point, which expresses the desired choice strategy. The main advantage of this approach is the localization of the search strategies: Each nonterminal node of the tree keeps track of the state of the computation as it was when the choice point was last interrogated, holding at the same time the strategy to coordinate the available alternatives. Examples are given in term of ND-Lisp, an extension of Lisp designed and implemented according to these guidelines.
This paper explores parallel nondeterministic programming as an extension to the C programming language;it provides constructs for specifying code containing ambiguous choice as introduced by McCarthy. A translator to...
详细信息
ISBN:
(纸本)9781450369800
This paper explores parallel nondeterministic programming as an extension to the C programming language;it provides constructs for specifying code containing ambiguous choice as introduced by McCarthy. A translator to plain C code was implemented as an extension to the ableC language specification. Translation involves a transformation to continuation passing style, providing lazy choice by storing continuation closures in a separate task buffer. This exploration considers various search evaluation approaches and their impact on correctness and performance. Multiple search drivers were implemented, including single-threaded depth-first search, a combined breadth- and depth-first approach, as well as two approaches to parallelism. Several benchmark applications were created using the extension, including n-Queens, SAT, and triangle peg solitaire. The simplest parallel search driver, using independent threads, showed the best performance in most cases, providing a significant speedup over the sequential versions. Adding task sharing between threads showed similar or slightly improved performance.
A software tool for programming real-time concurrent systems is described. It appears as a set of extensions of the Pascal language, and is adequate for multiprocessor systems without common storage (like networks of ...
详细信息
A software tool for programming real-time concurrent systems is described. It appears as a set of extensions of the Pascal language, and is adequate for multiprocessor systems without common storage (like networks of micros). Applications can be programmed as a set of related tasks that communicate and are synchronized by message exchanges. The scheme is based on Hoare's csp construct and incorporates a logical channel mechanism (called port ) for communication control. A nondeterministic control structure based on Dijkstra's guarded commands is also included, thus allowing selective reception. An implementation based on a compiler-interpreter combination is also described. This implementation generates extended symbolic P-code and runs on a conventional minicomputer.
An experiment is described that confirms the security of a well-studied class of cryptographic protocols (Dolev-Yao intruder model) can be verified by two-way nondeterministic pushdown automata (2NPDA). A nondetermini...
详细信息
An experiment is described that confirms the security of a well-studied class of cryptographic protocols (Dolev-Yao intruder model) can be verified by two-way nondeterministic pushdown automata (2NPDA). A nondeterministic pushdown program checks whether the intersection of a regular language (the protocol to verify) and a given Dyck language containing all canceling words is empty. If it is not, an intruder can reveal secret messages sent between trusted users. The verification is guaranteed to terminate in cubic time at most on a 2NPDA-simulator. The interpretive approach used in this experiment simplifies the verification, by separating the nondeterministic pushdown logic and program control, and makes it more predictable. We describe the interpretive approach and the known transformational solutions, and show they share interesting features. Also noteworthy is how abstract results from automata theory can solve practical problems by programming language means.
Backtracking is a powerful conceptual and practical programming language control structure. However, its application in general has been limited to global control over recursive programs. In this paper we explore the ...
详细信息
暂无评论