
This paper presents a new operational semantics for logic programs with external procedures, introduced in [BM88]. A new resolution procedure S-SLD-resolution is defined, in which each step of computation is characterized by a goal and a set of equational constraints, whose satisfiability cannot be decided with the information at hand. This approach improves the completeness of the resulting system, since further computation may result in the information needed to solve some earlier unsolved constraints. We also state a sufficient condition to distinguish a class of programs where no unsolved constraints will remain at the end of computation.
In this abstract we describe a new version of the Flang system [3]. In this version we have implemented a modified cc(FD) scheme [2]. The main novelties are that constructive disjunction (ConDis) and the cardinality operator (CardOp) from
The paper introduces new language concepts for building modular and distributed Prolog programs. The language concepts are synthesized from the analysis of the language concept of Distributed Processes and in parts from the concepts of Object Oriented Programming, while Prolog serves also as an implementation language. In this concept, a Prolog program is solved by a number of communicating Prolog objects. Each object can have an own initial goal. Objects communicate by remote predicate calls. A remote predicate call results in an additional Prolog thread at the target object to prove the goal. Consequently, objects execute multiple Prolog programs in an interleaved manner. A general form of Prolog data base operations is proposed for communication of concurrently evaluating Prolog programs in the internal scope of an object. Non-determinism arising from concurrency is handled by help of an adapted form of the Guarded Commands concept of Dijkstra. A program under execution consists of concurrently acting nested objects while the description of the behaviour of objects is achieved in a modular way.
We extend Aït-Kaci ψ-term theory by constraining the type of arguments through an “assorted” signature. A new glb is defined, based on a “filtration” function which terminates under certain conditions. We obtain a lower lattice of “filters” with a type semantics. We introduce an equivalence relation among filters and obtain a lower lattice of “equi-filters” which has a more natural partial order and semantics. We define a constructive semantics of a Prolog extension to filters, adapted from Huet's explanation of Prolog as a polymorphic type inference system. Inference is represented by three filters, thus allowing meta-reasoning.
We present a constraint based language designed to support the parallel execution of sequential logic theories. Each sequential computation is embedded in a (coarse-grained) process. According to the concurrent constraint paradigm, the parallel execution of processes is performed by using constraints for inter-process communication and synchronization. The operational semantics of the language is modelled according to the true concurrency approach.
Delta Prolog is a concurrent logic programming language, which extends Prolog with AND-parallelism. Communication and synchronization between parallel processes is established by using special control structures: event goals. To relieve the programmer from inserting these structures at the correct program points, we propose a method for automatically generating them, departing from a Prolog program together with the top-level call pattern and indications of which goalexpressions should be executed in parallel. This method is based on the technique of abstract interpretation. The gathered abstract information allows to decide at which program points an event goal has to be generated and how it is composed. However, it turns out that only a limited class of programs can be transformed automatically. Problems impeding general automatic transformation are discussed.
This paper describes an extension to NU-Prolog which allows evaluable functions to be defined using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog implementation was not modified at all. However, the system is reasonably efficient and supports coroutining, optional lazy evaluation, higher order functions and parallel execution. Efficiency is gained in several ways. First, we use some new implementation techniques. Second, we exploit some of the unique features of NU-Prolog, though these features are not essential to the implementation. Third, the language is designed so that we can take advantage of implicit mode and determinism information. Although we have not concentrated on the semantics of the language, we believe that our language design decisions and implementation techniques will be useful in the next generation of combined functional and relational languages.
Lazy narrowing has been proposed as the operational model of functional logic languages. This paper presents a new abstract machine which implements lazy narrowing. The core of this machine consists of a conventional stack based architecture like the one used for imperative languages. Almost orthogonal extensions of this core implement the different concepts of functional logic languages. This simplifies the machine design to a great deal and reduces the instruction set which has been particularly designed to support the application of standard code generation techniques. By its orthogonality, it is achieved that unused features introduce only minimal overhead. As a result, when performing ground term reduction the machine enjoys the same characteristics as efficient graph reduction machines.
Program slicing is a useful technique for debugging, testing, and analyzing programs. A program slice consists of the parts of a program which (potentially) affect the values computed at some point of interest. With rare exceptions, program slices have hitherto been computed and defined in ad-hoc and language-specific ways. The principal contribution of this paper is to show that general and semantically well-founded notions of slicing and dependence can be derived in a simple, uniform way from term rewriting systems (TRSs). Our slicing technique is applicable to any language whose semantics is specified in TRS form. Moreover, we show that our method admits an efficient implementation.
We present a method to statically infer evaluation order information for data structures in typed lazy functional programs. Our goal is to determine in what order and to what extent variables and data structures are evaluated. This subsumes backwards data structure strictness analysis and can be used to optimize the implementation of suspensions (or “thunks”) in lazy languages. The order of evaluation of the variables in an expression is described by variable paths, which are sequences of variables. The evaluation order of a data structure is described by a context. This is the type of the data structure together with path sets describing the order of evaluation of its components. Thus for the type natlist:≔ Nil ¦ Cons nat natlist we record the order in which the nat and natlist fields of Cons are evaluated (if at all). To obtain a terminating analysis, only uniform contexts are allowed for recursively defined types such as natlist: all the recursive components (those of type natlist) must have the same description. Contexts seem to be natural tools for describing and reasoning with data structure strictness. In particular, one can characterize head strictness also in the absence of tail strictness. The main advantage of this work over previous work [2] [4] is the handling of data structures.
This paper presents Subsumption—oriented Push—Down Auto-mata (SPDA), a very general stack formalism used to describe forest (“AND- OR” tree) traversals. These automata may be used for parsing or the interpretation of logic programs. SPDA allow a Dynamic Programming execution which breaks computations into combinable, sharable and storable sub-computations. They provide computation sharing and operational completeness and solves some of the problems posed by the usual depth-first, left-to-right traversals (as implemented in PROLOG). We give an axiomatization of SPDA and two examples of their use: the evaluation of logic programs and parsing with Tree Adjoining Grammars. SPDA may also serve in other areas such as Constraint Logic Programming, Abstract Interpretations, or Contextual parsing.
This paper presents a technique for achieving a class of optimizations related to the reduction of checks within cycles. The technique uses both Program Transformation and Abstract Interpretation. After a first pass of an abstract interpreter which detects simple invariants, program transformation is used to build a hypothetical situation that simplifies some predicates that should be executed within the cycle. This transformation implements the heuristic hypothesis that once conditional tests hold they may continue doing so recursively. Specialized versions of predicates are generated to detect and exploit those cases in which the invariance may hold. Abstract interpretation is then used again to verify the truth of such hypotheses and confirm the proposed simplification. This allows optimizations that go beyond those possible with only one pass of the abstract interpreter over the original program, as is normally the case. It also allows selective program specialization using a standard abstract interpreter not specifically designed for this purpose, thus simplifying the design of this already complex module of the compiler. In the paper, a class of programs amenable to such optimization is presented, along with some examples and an evaluation of the proposed techniques in some application areas such as floundering detection and reducing run-time tests in automatic logic program parallelization. The analysis of the examples presented has been performed automatically by an implementation of the technique using existing abstract interpretation and program transformation tools.
PROFIT is a system and a programming language where Prolog is extended with concepts needed in compiler writing applications. The special facilities include a deterministic error-recovering form of definite clause grammars (DCGs), functions as conditional equations, and functional terms modelling inherited and synthesized attributes of attribute grammars. PROFIT supports a multi-paradigm method of writing compilers in a compact and natural way. Most notably PROFIT can be used to express one-pass compilation within the framework of logical one-pass attribute grammars, a proper superset of L-attributed grammars.
Gentle [Schröer 89] is a compiler description language in the tradition of two level grammars [Koster 71] and logic programming [Warren 80]. It provides a common declarative notation for high level description of analysis, transformation, and synthesis. Imperative constructs like global variables and dynamic arrays, needed for efficient compiler construction, are introduced as well. A tool has been implemented to check the wellformedness of Gentle descriptions, and to generate very fast (generation speed 260.000 lines per minute) very efficient compilers (compilation speed nearly 90.000 line per minute on Dec 3100 workstation). The language and a supporting tool were designed and implemented by F.W. Schröer in 1989.