Abstract
Prolog consists of the Horn Clause subset of predicate logic interpreted by a fixed (left to right, depth first) evaluation strategy and a number of non-logical primitive predicates. The most fundamental of these are ‘cut’ for control of execution, ‘assert’ and ‘retract’ for changing the database, and input-output. Whatever the desirability of these features for the logic programming languages of the future there is general agreement as to the need of these for Prolog as a practical programming language for today.
Despite their apparently simple definition there is considerable diversity in the details of the implementation of these primitives and some experiments to demonstrate this diversity are reported. We then suggest definitions that could be agreed and implemented by everyone.
Preview
Unable to display preview. Download preview PDF.
References
G. Smolke: Making Control and Data Flow in Logic Programs Explicit. 1984 ACM Functional Programming Conferences. p311–322.
D.H.D. Warren, L.M. Pereira, F.C.N. Pereira: PROLOG — The language and its implementation compared with Lisp. Proc. Symposium on Artificial Intelligence and Programming Languages, 1977. SIGPLAN Vol. 12 (8).
D.H.D. Warren: Sequential and Parallel Implementations of Prolog. Seminar at Imperial College 1986.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Moss, C. (1986). Cut & Paste — defining the impure primitives of Prolog. In: Shapiro, E. (eds) Third International Conference on Logic Programming. ICLP 1986. Lecture Notes in Computer Science, vol 225. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16492-8_118
Download citation
DOI: https://doi.org/10.1007/3-540-16492-8_118
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-16492-0
Online ISBN: 978-3-540-39831-8
eBook Packages: Springer Book Archive