Research Project

Specialized, Fully Declarative Logic Programming Languages




Sponsorship

NSF Grant: IRI-9308970
1993-1997


Researchers

Stephen Murrell (co-principal investigator)
Jan Plaza (co-principal investigator)
Eric Gottlieb (graduate assistant)
George Holler (graduate assistant)
Sidong Liu (graduate assistant)


Introduction to Declarative Programming

The style of traditional programming is imperative: a program instructs the computer how to accomplish a task, for instance how to sort a list. On the other hand, logic programming opens a possibility of declarative programming, i.e. writing programs which just tell the computer what final state is desired, for instance that we want a list to be sorted adding a definition which explains what is meant by a sorted list. A logic program is written as a set of logical definitions (declarations, specifications.) The same program is interpreted by a computer as a set of imperative procedures. After composing the program in a declarative way, the programmer may wish to consider program's imperative meaning, and add control structures to improve the efficiency.


Logos

This research project was concerned with designing a logic programming system which could offer the programmer a wide expressive power and minimize the need for thinking about the procedural meaning of the program. It included the development of a theory and an experimental implementation.

The project resulted in creation of Logos -- an extendable, declarative logic programming language with equality constraints over an open universe of terms. The language has a fully declarative core that guarantees soundness and completeness for a useful and easily identifiable set of programs; answers returned by the programs outside this core will be sound but not necessarily complete. Logos (unlike Prolog) is based on solid mathematical foundations and its syntax and semantics adhere very strictly to the classical first-order logic. In its core, the language provides a form of negation related to classical negation, both universal and existential quantifiers, as well as logical input/output features of a new design. Arithmetic and certain meta-programing constructs, although not in the core, are also available. Besides logical connectives "or" and "and" whose components can be evaluated in any order, Logos also supports the familiar sequential connectives of Prolog represented by a comma and semicolon. The project has shown how Logos could be extended to handle multiple open and closed universes and metaprogramming constructs significantly more powerful than those known from Prolog.

The current experimental implementation Logos 1.0 is in a form of an interpreter. To assure portability, the interpreter is written in Common LISP.

The language was constructed in order to investigate how far the idea of declarative programming can be extended. Having measures of uncertainty attached to program rules turned out to be incompatible with the essential idea of the language - handling uncertainty by means of separate causal nets outside the language seems more appropriate.

Logos is an extendible language with a potential for extensions which could be applied in construction of distributed multi-component intelligent systems. We believe that the availabilty of a commercial product based on these ideas would have a desirable impact on the development of future intelligent systems.



Electronic Files

FILE BYTES DESCRIPTION
Documentation
readme.txt 2,930 quick explanation of what is what
manual.doc 35,840 introduction to Logos 1.0 (MS Word)
manual.txt 20,876 introduction to Logos 1.0 (text)
Sample Logos Programs
demo.l 6,927 self-running demo
tomandjerry.l 423 demo of basic capabilities
hanoi.l 6,927 towers of Hanoi
lists.l 6,927 append, reverse lists, etc
numbers.l 6,927 numbers and arithmetic with z, s(z), s(s(z)), etc.
family.l 6,927 family relationships
Logos Source Files in Common Lisp
init.lsp 3,771 load this first
l.lsp 755 auto-loader
main.lsp 8,730 read-execute-write loop
builtins.lsp 39,692 defines builtin operations (e.g. write)
disjoin.lsp 7,662 complex logic operations
guards.lsp 52,929 complex logic operations
parser.lsp 36,683 Logos parser
pp.lsp 13,075 pretty-printer
printer.lsp 17,558 Logos parser inverted
resolve.lsp 45,273 program solver
sortsf.lsp 12,385 complex logic operations
vars.lsp 1,638 global variables
preprocessor.lsp 58,397 pre-processor
utilities.lsp 13,994 utilities
Executables
macLogos10 (*) 2,043,648 Logos interpreter for Macintosh
Packages
logos10.sea (*) 1,337,244 Macintosh executable, documentation and programs
logos10src.sea (*) 94,244 source, documentation and programs (Macintosh)
logos10src.zip 88,244 source, documentation and programs (Windows)
logos10src.tar.gz 77,429 source, documentation and programs (Unix)

(*) Notice: If your Macintosh does not recognize this file as an "application program" it will not run.


Research Papers

logos.ps
Description of basic features of Logos -- a constraint logic programming languge which computes over an open universe of terms.
S. Murrell and J. A. Plaza, Declartive Programming in Logos, in: Intelligent Information Systems, Proceedings of the Workshop held in Deblin, Poland, Polish Academy of Sciences, ISBN 83-900820-6-3, 1996, pp. 188-202.

propositional.ps
This paper investigates the SLDNF-resolution at the level of propositional programs. (SLDNF is a procedure on which Prolog is based; also SLDNF is a standard reference point to which all the new logic programming procedures are compared.) The paper proves that logic programming with propositional programs (with negation), executed by the SLDNF-resolution, can be declarative. Several declarative interpretations of programs are given using classical, intuitionistic, intermediate and modal logics. The paper also shows that the three-valued fix-point and declarative semantics can be reduced to the conventional two-valued semantics.
J. A. Plaza, On the Propositional SLDNF Resolution, International Journal of Foundations of Computer Science, Vol. 7, No. 4, 1996, pp. 359-406.

algebraic.ps
This paper establishes a connection between standard techniques of foundations of logic programming and those of algebraic semantics for formal logical systems. The paper can be viewed as an invitation to explore this connection, and to look in one of these domains for counterparts of methods and results of the other domain.
J. A. Plaza, Logic Programming from the Perspective of Algebraic Semantics, Fundamenta Informaticae, vol. 28, no. 1-2, 1996, pp. 153-164.

lifting.ps
This paper introduces tools which subtly differ from standard tools of foundations of logic programming. It formulates a new version of the lifting property which unlike conventional versions has a clear non-technical meaning. The paper proves that if a resolution system fails to satisfy this lifting property, it must be 'absolutely incomplete': there is no notion of program completion and no logic to make inferences in, which could assure declarative programming. As the SLDNF-resolution is 'absolutely incomplete' for the class of normal programs (i.e. first order programs with negation), if declarative logic programming is sought, another resolution system is needed.
J. A. Plaza, Soundness and Completeness versus Lifting Property, in: J. Calmet, J. A. Campbell and J. Pfalzgraf (Eds.), Artificial Intelligence and Symbolic Mathematical Computation, Springer Verlag, LNCS vol. 1138, 1996, pp. 354-364.

equality.ps
This paper investigates the formal theory of equality determined by the omega-Herbrand universe and provides a complete axiomatization of this theory and prove that it is decidable. The algorithms presented in the paper involve especially designed canonical forms of equality constraints, which are suitable for implementation.
J. A. Plaza, True Equality Constraints over an Open Universe of Terms, in: Intelligent Information Systems, Proceedings of the Workshop held in Wigry, Poland, Polish Academy of Sciences, ISBN 83-900820-3-9, 1994, pp. 25-39.



bibliography.tex

A bibliography of relevant logic programming papers (LaTeX format).


Related Links

You can visit the home page of LPNMR -- a forum for exchange of information on logic programming and non-monotonic reasoning.


Go back to: