Logic programming with external procedures : an implementation

Detta är en avhandling från Linköping : Univ


This work aims at combining logic programs with functions written in other languages, such that the combination preserves the declarative semantics of the logic program. S-Unification, as defined by S. Bonnier and J. Maluszynski, provides a theoretical foundation for this.

- This thesis presents a definition and an implementation of a logic programming language, GAPLog, that uses S-unification to integrate Horn clauses with external functional procedures. The implementation is described as a scheme that translates GAPLog programs to Prolog. In particular, a call to an external function is transformed to a piece of Prolog code that will delay the call until all arguments are ground. The scheme produces reasonably efficient code if Prolog supports efficient coroutining. S-unification will cause no overhead if there are no function calls in the program.

- If the arguments are ground whenever a function call is reached in the execution process, then the dynamic check for groundness is unnecessary. To avoid the overhead caused by the groundness check a restriction of GAPLog is described, called Ground GAPLog, where the groundness of function calls is guaranteed. The restrictions are derived from the language Ground Prolog defined by F. Kluzniak. Many of the results for Ground Prolog also apply for Ground GAPLog. They indicate that Ground GAPLog is suitable for compilation to very efficient code.

  Denna avhandling är EVENTUELLT nedladdningsbar som PDF. Kolla denna länk för att se om den går att ladda ner.