103 research outputs found

    Improving PARMA Trailing

    Full text link
    Taylor introduced a variable binding scheme for logic variables in his PARMA system, that uses cycles of bindings rather than the linear chains of bindings used in the standard WAM representation. Both the HAL and dProlog languages make use of the PARMA representation in their Herbrand constraint solvers. Unfortunately, PARMA's trailing scheme is considerably more expensive in both time and space consumption. The aim of this paper is to present several techniques that lower the cost. First, we introduce a trailing analysis for HAL using the classic PARMA trailing scheme that detects and eliminates unnecessary trailings. The analysis, whose accuracy comes from HAL's determinism and mode declarations, has been integrated in the HAL compiler and is shown to produce space improvements as well as speed improvements. Second, we explain how to modify the classic PARMA trailing scheme to halve its trailing cost. This technique is illustrated and evaluated both in the context of dProlog and HAL. Finally, we explain the modifications needed by the trailing analysis in order to be combined with our modified PARMA trailing scheme. Empirical evidence shows that the combination is more effective than any of the techniques when used in isolation. To appear in Theory and Practice of Logic Programming.Comment: 36 pages, 7 figures, 8 table

    Finite domain constraint programming systems

    Get PDF
    Tutorial at CP'2002, Principles and Practice of Constraint Programming. Powerpoint slides.</p

    Incremental copying garbage collection for WAM-based Prolog systems

    Full text link
    The design and implementation of an incremental copying heap garbage collector for WAM-based Prolog systems is presented. Its heap layout consists of a number of equal-sized blocks. Other changes to the standard WAM allow these blocks to be garbage collected independently. The independent collection of heap blocks forms the basis of an incremental collecting algorithm which employs copying without marking (contrary to the more frequently used mark&copy or mark&slide algorithms in the context of Prolog). Compared to standard semi-space copying collectors, this approach to heap garbage collection lowers in many cases the memory usage and reduces pause times. The algorithm also allows for a wide variety of garbage collection policies including generational ones. The algorithm is implemented and evaluated in the context of hProlog.Comment: 33 pages, 22 figures, 5 tables. To appear in Theory and Practice of Logic Programming (TPLP

    TOR: modular search with hookable disjunction

    Get PDF
    Horn Clause Programs have a natural exhaustive depth-first procedural semantics. However, for many programs this semantics is ineffective. In order to compute useful solutions, one needs the ability to modify the search method that explores the alternative execution branches. Tor, a well-defined hook into Prolog disjunction, provides this ability. It is light-weight thanks to its library approach and efficient because it is based on program transformation. Tor is general enough to mimic search-modifying predicates like ECLiPSe's search/6. Moreover, Tor supports modular composition of search methods and other hooks. The Tor library is already provided and used as an add-on to SWI-Prolog.publisher: Elsevier articletitle: Tor: Modular search with hookable disjunction journaltitle: Science of Computer Programming articlelink: http://dx.doi.org/10.1016/j.scico.2013.05.008 content_type: article copyright: Copyright © 2013 Elsevier B.V. All rights reserved.status: publishe

    Towards structured state threading in prolog

    Get PDF
    It is very often the case that programs require passing, maintaining, and updating some notion of state. Prolog programs often implement such stateful computations by carrying this state in predicate arguments (or, alternatively, in the internal datábase). This often causes code obfuscation, complicates code reuse, introduces dependencies on the data model, and is prone to incorrect propagation of the state information among predicate calis. To partly solve these problems, we introduce contexts as a consistent mechanism for specifying implicit arguments and its threading in clause goals. We propose a notation and an interpretation for contexts, ranging from single goals to complete programs, give an intuitive semantics, and describe a translation into standard Prolog. We also discuss a particular light-weight implementation in Ciao Prolog, and we show the usefulness of our proposals on a series of examples and applications, including code directiy using contexts, DCGs, extended DCGs, logical loops and other custom control structures

    Data-parallel concurrent constraint programming.

    Get PDF
    by Bo-ming Tong.Thesis (M.Phil.)--Chinese University of Hong Kong, 1994.Includes bibliographical references (leaves 104-[110]).Chapter 1 --- Introduction --- p.1Chapter 1.1 --- Concurrent Constraint Programming --- p.2Chapter 1.2 --- Finite Domain Constraints --- p.3Chapter 2 --- The Firebird Language --- p.5Chapter 2.1 --- Finite Domain Constraints --- p.6Chapter 2.2 --- The Firebird Computation Model --- p.6Chapter 2.3 --- Miscellaneous Features --- p.7Chapter 2.4 --- Clause-Based N on determinism --- p.9Chapter 2.5 --- Programming Examples --- p.10Chapter 2.5.1 --- Magic Series --- p.10Chapter 2.5.2 --- Weak Queens --- p.14Chapter 3 --- Operational Semantics --- p.15Chapter 3.1 --- The Firebird Computation Model --- p.16Chapter 3.2 --- The Firebird Commit Law --- p.17Chapter 3.3 --- Derivation --- p.17Chapter 3.4 --- Correctness of Firebird Computation Model --- p.18Chapter 4 --- Exploitation of Data-Parallelism in Firebird --- p.24Chapter 4.1 --- An Illustrative Example --- p.25Chapter 4.2 --- Mapping Partitions to Processor Elements --- p.26Chapter 4.3 --- Masks --- p.27Chapter 4.4 --- Control Strategy --- p.27Chapter 4.4.1 --- A Control Strategy Suitable for Linear Equations --- p.28Chapter 5 --- Data-Parallel Abstract Machine --- p.30Chapter 5.1 --- Basic DPAM --- p.31Chapter 5.1.1 --- Hardware Requirements --- p.31Chapter 5.1.2 --- Procedure Calling Convention And Process Creation --- p.32Chapter 5.1.3 --- Memory Model --- p.34Chapter 5.1.4 --- Registers --- p.41Chapter 5.1.5 --- Process Management --- p.41Chapter 5.1.6 --- Unification --- p.49Chapter 5.1.7 --- Variable Table --- p.49Chapter 5.2 --- DPAM with Backtracking --- p.50Chapter 5.2.1 --- Choice Point --- p.52Chapter 5.2.2 --- Trailing --- p.52Chapter 5.2.3 --- Recovering the Process Queues --- p.57Chapter 6 --- Implementation --- p.58Chapter 6.1 --- The DECmpp Massively Parallel Computer --- p.58Chapter 6.2 --- Implementation Overview --- p.59Chapter 6.3 --- Constraints --- p.60Chapter 6.3.1 --- Breaking Down Equality Constraints --- p.61Chapter 6.3.2 --- Processing the Constraint 'As Is' --- p.62Chapter 6.4 --- The Wide-Tag Architecture --- p.63Chapter 6.5 --- Register Window --- p.64Chapter 6.6 --- Dereferencing --- p.65Chapter 6.7 --- Output --- p.66Chapter 6.7.1 --- Collecting the Solutions --- p.66Chapter 6.7.2 --- Decoding the solution --- p.68Chapter 7 --- Performance --- p.69Chapter 7.1 --- Uniprocessor Performance --- p.71Chapter 7.2 --- Solitary Mode --- p.73Chapter 7.3 --- Bit Vectors of Domain Variables --- p.75Chapter 7.4 --- Heap Consumption of the Heap Frame Scheme --- p.77Chapter 7.5 --- Eager Nondeterministic Derivation vs Lazy Nondeterministic Deriva- tion --- p.78Chapter 7.6 --- Priority Scheduling --- p.79Chapter 7.7 --- Execution Profile --- p.80Chapter 7.8 --- Effect of the Number of Processor Elements on Performance --- p.82Chapter 7.9 --- Change of the Degree of Parallelism During Execution --- p.84Chapter 8 --- Related Work --- p.88Chapter 8.1 --- Vectorization of Prolog --- p.89Chapter 8.2 --- Parallel Clause Matching --- p.90Chapter 8.3 --- Parallel Interpreter --- p.90Chapter 8.4 --- Bounded Quantifications --- p.91Chapter 8.5 --- SIMD MultiLog --- p.91Chapter 9 --- Conclusion --- p.93Chapter 9.1 --- Limitations --- p.94Chapter 9.1.1 --- Data-Parallel Firebird is Specialized --- p.94Chapter 9.1.2 --- Limitations of the Implementation Scheme --- p.95Chapter 9.2 --- Future Work --- p.95Chapter 9.2.1 --- Extending Firebird --- p.95Chapter 9.2.2 --- Improvements Specific to DECmpp --- p.99Chapter 9.2.3 --- Labeling --- p.100Chapter 9.2.4 --- Parallel Domain Consistency --- p.101Chapter 9.2.5 --- Branch and Bound Algorithm --- p.102Chapter 9.2.6 --- Other Possible Future Work --- p.102Bibliography --- p.10

    Call subsumption mechanisms for tabled logic programs

    Get PDF
    Estágio realizado na ... e orientado pelo Eng.ºDocumento confidencial. Não pode ser disponibilizado para consultaTese de mestrado integrado. Engenharia Informática e Computação. Faculdade de Engenharia. Universidade do Porto. 201

    Constraint propagation in Mozart

    Get PDF
    This thesis presents constraint propagation in Mozart which is based on computational agents called propagators. The thesis designs, implements, and evaluates propagator-based propagation engines. A propagation engine is split up in generic propagation services and domain specific domain solvers which are connected by a constraint programming interface. Propagators use filters to perform constraint propagation. The interface isolates filters from propagators such that they can be shared among various systems. This thesis presents the design and implementation of a finite integer set domainsolver for Mozart which reasons over bound and cardinality approximations of sets.The solver cooperates with a finite domain solver to improve its propagation and expressiveness. This thesis promotes constraints to first-class citizens and thus, provides extra control over constraints. Novel programming techniques taking advantage of the first-class status of constraints are developed and illustrated.Diese Dissertation beschreibt Constraint-Propagierung in Mozart, die auf Berechnungsagenten, Propagierer genannt, basiert. Die Dissertation entwirft, implementiert und evaluiert Propagierer-basierte Propagierungsmaschinen. Eine Propagierungsmaschine ist aufgeteilt in generische Propagierungsdienste und domänenspezifische Domänenlöser, die durch eine Schnittstelle zur Constraint-Programmierung miteinander verbunden sind. Propagierer benutzen Filter, um Constraints zu propagieren. Die Schnittstelle isoliert Filter von Propagierern, so dass Programmkodes von Filtern von verschiedenen Systemen genutzt werden können. Diese Dissertation präsentiert den Entwurf und die Implementierung eines Domänenlösers über endliche Mengen von ganzen Zahlen für Mozart, die über Mengen- und Kardinalitätsschranken approximiert werden. Dieser kooperiert mit einem Löser über endlichen Bereichen, um die Propagierung und die Ausdrucksfähigkeit zu verbessern. Diese Dissertation erhebt Constraints zu emanzipierten Datenstrukturen und stellt auf dieseWeise zusätzliche Steuerungsmöglichkeiten über Constraints zur Verfügung. Des Weiteren werden neuartige Programmiertechniken für emanzipierte Constraints entwickelt und demonstriert

    Constraint propagation in Mozart

    Get PDF
    This thesis presents constraint propagation in Mozart which is based on computational agents called propagators. The thesis designs, implements, and evaluates propagator-based propagation engines. A propagation engine is split up in generic propagation services and domain specific domain solvers which are connected by a constraint programming interface. Propagators use filters to perform constraint propagation. The interface isolates filters from propagators such that they can be shared among various systems. This thesis presents the design and implementation of a finite integer set domainsolver for Mozart which reasons over bound and cardinality approximations of sets.The solver cooperates with a finite domain solver to improve its propagation and expressiveness. This thesis promotes constraints to first-class citizens and thus, provides extra control over constraints. Novel programming techniques taking advantage of the first-class status of constraints are developed and illustrated.Diese Dissertation beschreibt Constraint-Propagierung in Mozart, die auf Berechnungsagenten, Propagierer genannt, basiert. Die Dissertation entwirft, implementiert und evaluiert Propagierer-basierte Propagierungsmaschinen. Eine Propagierungsmaschine ist aufgeteilt in generische Propagierungsdienste und domänenspezifische Domänenlöser, die durch eine Schnittstelle zur Constraint-Programmierung miteinander verbunden sind. Propagierer benutzen Filter, um Constraints zu propagieren. Die Schnittstelle isoliert Filter von Propagierern, so dass Programmkodes von Filtern von verschiedenen Systemen genutzt werden können. Diese Dissertation präsentiert den Entwurf und die Implementierung eines Domänenlösers über endliche Mengen von ganzen Zahlen für Mozart, die über Mengen- und Kardinalitätsschranken approximiert werden. Dieser kooperiert mit einem Löser über endlichen Bereichen, um die Propagierung und die Ausdrucksfähigkeit zu verbessern. Diese Dissertation erhebt Constraints zu emanzipierten Datenstrukturen und stellt auf dieseWeise zusätzliche Steuerungsmöglichkeiten über Constraints zur Verfügung. Des Weiteren werden neuartige Programmiertechniken für emanzipierte Constraints entwickelt und demonstriert
    corecore