Download Ciao Manual - The Ciao System

Transcript
422
The Ciao System
Usage: atom2term(Atom,Term)
− Description: Convert an atom into a term. Atom is an atom, but must have term
syntax. Term is a term resulting from parsing Atom char by char. The term is assumed
to be ground.
− The following properties should hold at call time:
Atom is currently a term which is not a free variable.
(term typing:nonvar/1)
Term is a free variable.
(term typing:var/1)
string2term/2:
PREDICATE
General properties: string2term(A,T)
− If the following properties should hold at call time:
term basic:A=[97]
then the following properties should hold upon exit:
term basic:T=a
(term basic:= /2)
string2term(A,T)
− If the following properties should hold at call time:
term basic:A=[49]
then the following properties should hold upon exit:
term basic:T=1
(term basic:= /2)
string2term(A,T)
− If the following properties should hold at call time:
term basic:A=[65]
then the following properties should hold upon exit:
term basic:T=A
(term basic:= /2)
string2term(A,T)
− If the following properties should hold at call time:
term basic:A=[102,40,97,41]
then the following properties should hold upon exit:
term basic:T=f(a)
(term basic:= /2)
string2term(A,T)
− If the following properties should hold at call time:
term basic:A=[102,47,50]
then the following properties should hold upon exit:
term basic:T=f/2
(term basic:= /2)
(term basic:= /2)
(term basic:= /2)
(term basic:= /2)
(term basic:= /2)
(term basic:= /2)
Usage: string2term(String,Term)
− Description: Same as atom2term/2 but first argument is a string (containing a term).
− The following properties should hold at call time:
String is currently a term which is not a free variable.
(term typing:nonvar/1)
Term is a free variable.
(term typing:var/1)