@appendix Translations from Dec-10 Prolog
@sf
@settabs 2 @columns
@sp 1
@<@r[Dec-10 Prolog]@\@r[LM-Prolog]@cr
@sp 1
@<consult(F)@\(load F)@cr
@<reconsult(F)@\(load F)@cr
@<read(X)@\(read X)@cr
@<write(X)@\(format t ``~a~%'' X)@cr
@<writeq(X)@\(format t ``~s~%'' X)@cr
@<print(X)@\(print X)@cr
@<nl@\(tyo #\return)@cr
@<display(X)@\(format t ``~n'' X)@cr
@<ttynl@\(tyo #\return t)@cr
@<ttyflush@\(true)@cr
@<(*)ttyget0(N)@\(tyi N t)@cr
@<(*)ttyget(N)@\(prove-once (repeat) (tyi N t) (not-= N #/@ ))@cr
@<(*)ttyskip(N)@\(prove-once (repeat) (tyi N t))@cr
@<(*)ttyput(N)@\(tyo N t)@cr
@<(*)get0(N)@\(tyi N)@cr
@<(*)get(N)@\(prove-once (repeat) (tyi N) (not-= N #/@ ))@cr
@<(*)skip(N)@\(prove-once (repeat) (tyi N))@cr
@<(*)put(N)@\(tyo N)@cr
@<tab(N)@\(format t ``~vx'' N)@cr
@<Z is X@\(lisp-value Z X :dont-invoke)@cr
@<X+Y@\(+ X Y)  @ii[;These are defined in arithmetic contexts.]@cr
@<X-Y@\(- X Y)@cr
@<X*Y@\(* X Y)@cr
@<X/Y@\(// X Y)@cr
@<X mod Y@\(\ X Y)@cr
@<XY@\(logand X Y)@cr
@<XY@\(logior X Y)@cr
@<\X@\(lognot X)@cr
@<X@BllY@\(lsh X Y)@cr
@<X@BggY@\(lsh X (- Y))@cr
@<(*)!(X)@\(\ X #o1000000)@cr
@<(*)$(X)@\(- (\ (+ X #o400000) #o1000000) #o400000)@cr
@<P,Q@\(and P Q)@cr
@<P;Q@\(or P Q)@cr
@<true@\(true)@cr
@<X=Y@\(= X Y)@cr
@<length(L,N)@\(length N L)@cr
@<!@\(cut)@cr
@<\+(P)@\(cannot-prove P)@cr
@<P1Q1;P2Q2 ...@\(cases ((prove-once P1) Q1) ((prove-once P2) Q2) ...)@cr
@<repeat@\(repeat)@cr
@<fail@\(fail)@cr
@<X=:=Y@\(lisp-predicate (= 'X 'Y) :dont-invoke)@cr
@<X=\=Y@\(lisp-predicate ( 'X 'Y) :dont-invoke)@cr
@<X==Y@\(identical X Y)@cr
@<X\==Y@\(not-identical X Y)@cr
@<var(X)@\(variable X)@cr
@<nonvar(X)@\(not-variable X)@cr
@<atom(X)@\(symbol X)@cr
@<atomic(X)@\(atomic X)@cr
@<integer(X)@\(number X)@cr
@<(*)functor(T,F,N)@\(and (= T (F . U)) (length N U))@cr
@<arg(I,T,X)@\(nth X I T)@cr
@<X=..Y@\(= X Y)@cr
@<(*)name(X,L)@\(exploden L X)@cr
@<call(X)@\(call X)@cr
@<assert(Clause)@\(assert Clause)@cr
@<asserta(Clause)@\(asserta Clause)@cr
@<assertz(Clause)@\(assertz Clause)@cr
@<clause(Head,Body)@\(clause (Head . Body))@cr
@<retract(Clause)@\(retract Clause)@cr
@<listing(P)@\(print-definition P)@cr
@<listing@\(bag-of ? ? (print-definition ?))@cr
@<setof(X,P,S)@\(quantified-set-of S Q X P)@cr
@<@\@ @ii[;where @l(Q) is universally quantified variables in P]@cr
@<bagof(X,P,S)@\(quantified-bag-of S Q X P)@cr
@<@\@ @ii[;where @l(Q) is universally quantified variables in P]@cr
@<compare(Op,T1,T2)@\(compare Op T1 T2)@cr
@<abolish(N,A)@\(retract-all N)@cr
@<(*)current_predicate(N,F)@\(predicator N)@cr
@<compile(Files)@\(map compile-file Files)@cr
@<incore(Goal)@\(call Goal)@cr
@sp 1

@rm

@DECsystemX Prolog predicates marked with (*) above may be machine dependent.

Most @DECsystemX Prolog predicates that are omitted from this table
are purely environmental and simply do not map well to the Lisp Machine.

Debugging facilities are described in @ref[debug].

Input-output is performed on streams on the Lisp Machine. There are no
equivalent objects in @DECsystemX Prolog. Predicates for
this are described in @ref[io].  The predicate @l[open-file], for
example, subsumes @l[see, seeing, seen, tell, telling], and @l[told]
of @DECsystemX Prolog.

LM-Prolog's predicate @l[sort] takes an extra argument, a predicate
defining the ordering.

``Public'' declarations are not supported. The ZetaLisp package
facility is a more structured way of maintaining multiple name spaces.

Support for defining definite clause grammars is built into @DECsystemX Prolog
[Pereira and Warren 1980].
The syntax of the grammar rules is quite different from @DECsystemX Prolog
and the translator does not translate @DECsystemX Prolog grammar rules to
LM-Prolog's.
The grammar kit includes a facilities for obtaining a dynamic backtracking
graphical trace of the parse.
See the documentation in @ref[gram] and in [Kahn 1983b] for more details.