578 research outputs found
The generation of concurrent code for declarative languages
PhD ThesisThis thesis presents an approach to the implementation of declarative languages
on a simple, general purpose concurrent architecture. The safe exploitation of
the available concurrency is managed by relatively sophisticated code generation
techniques to transform programs into an intermediate concurrent machine
code. Compilation techniques are discussed for 1'-HYBRID, a strongly typed
applicative language, and for 'c-HYBRID, a concurrent, nondeterministic logic
language.
An approach is presented for 1'- HYBRID whereby the style of programming
influences the concurrency utilised when a program executes. Code transformation
techniques are presented which generalise tail-recursion optimisation,
allowing many recursive functions to be modelled by perpetual processes. A
scheme is also presented to allow parallelism to be increased by the use of local
declarations, and constrained by the use of special forms of identity function.
In order to preserve determinism in the language, a novel fault handling
mechanism is used, whereby exceptions generated at run-time are treated as a
special class of values within the language.
A description is given of ,C-HYBRID, a dialect of the nondeterministic logic
language Concurrent Prolog. The language is embedded within the applicative
language 1'-HYBRID, yielding a combined applicative and logic programming
language. Various cross-calling techniques are described, including the use of
applicative scoping rules to allow local logical assertions.
A description is given of a polymorphic typechecking algorithm for logic
programs, which allows different instances of clauses to unify objects of different
types. The concept of a method is derived to allow unification Information to
be passed as an implicit argument to clauses which require it. In addition,
the typechecking algorithm permits higher-order objects such as functions to be
passed within arguments to clauses.
Using Concurrent Prolog's model of concurrency, techniques are described
which permit compilation of 'c-HYBRID programs to abstract machine code derived
from that used for the applicative language. The use of methods allows
polymorphic logic programs to execute without the need for run-time type information
in data structures.The Science and Engineering Research Council
Recommended from our members
A unifying approach for queries and updates in deductive databases
This dissertation presents a unifying approach to process (recursive) queries and updates in a deductive database. To improve query performance, a combined top-down and bottom-up evaluation method is used to compile rules into iterative programs that contain relational algebra operators. This method is based on the lemma resolution that retains previous results to guarantee termination.Due to locality in database processing, it is desirable to materialize frequently used queries against views of the database. Unfortunately, if updates are allowed, maintaining materialized view tables becomes a major problem. We propose to materialize views incrementally, as queries are being answered. Hence views in our approach are only partially materialized. For such views, we design algorithms to perform updates only when the underlying view tables are actually affected.We compare our approach to two conventional methods for dealing with views: total materialization and query-modification. The first method materializes the entire view when it is defined while the second recomputes the view on the fly without maintaining any physical view tables. We demonstrate that our approach is a compromise between these two methods and performs better than either one in many situations.It is also desirable to be able to update views just like updating base tables. However, view updates are inherently ambiguous and the semantics of update propagation on recursively defined views were not well understood in the past. Using dynamic logic programming and lemma resolution, we are able to define the semantics of recursive view updates. These are expressed in the form of update translators specified by the database administrator when the view is defined. To guarantee completeness, we identify a subset of safe update translators. We prove that this subset of translators always terminate and are complete
Inferring determinacy and mutual exclusion in logic programs using mode and type analysis.
We propose an analysis for detecting procedures and goals that are deterministic (i.e., that produce at most one solution at most once), or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic. The analysis takes advantage of the pruning operator in order to improve the detection of mutual exclusion and determinacy. It also supports arithmetic equations and disequations, as well as equations and disequations on terms, for which we give a complete satisfiability testing algorithm, w.r.t. available type information. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient
Compartmentalized Connection Graphs for Concurrent Logic Programming II : Parallelism, Indexing and Unification
This report continues to document the development of a logic programming paradigm with implicit control, based in a compartmentalized connection graph theorem prover. Whilst the research has as it main goal the development of a language in which programs can be written with much less explicit control than PROLOG and its existing successors, a secondary goal is to exploit the immense parallelism inherent in the connection graph.
The focus of this paper is the documentation of the extent of the parallelism inherent in the proof procedure. We characterize six different forms of parallelism These various forms of parallelism can be further classified into two classes: those associated with the performance of resolution steps, and those which are more concerned with unification.
Unification is thus also a major topic of this report. In the first report of this series unification was identified as a major source of the cost of executing a logic program, or of proving a theorem. It turns out that deferring unification is the one of the best ways of dealing with it: hashing to perform it, and indexing to avoid it.
Indexing and hashing, therefore, is the third topic covered in this report
A framework for incremental learning of logic programs
AbstractIn this paper, a framework for incremental learning is proposed. The predicates already learned are used as background knowledge in learning new predicates in this framework. The programs learned in this way have nice modular structure with conceptually separate components. This modularity gives the advantages of portability, reliability and efficient compilation and execution.Starting with a simple idea of Miyano et al. [21,22] for identifying classes of programs which satisfy the condition that all the terms occurring SLD-derivations starting with a query are no bigger than the terms in the initial query, we identify a reasonably big class of polynomial time learnable logic programs. These programs can be learned from a given sequence of examples and a logic program defining the already known predicates. Our class properly contains the class of innermost simple programs of [32] and the class of hereditary programs of [21,22]. Standard programs for gcd, multiplication, quick-sort, reverse and merge are a few examples of programs that can be handled by our results but not by the earlier results of [21,22, 32]
- …