tarau.jinni
Class Copier
java.lang.Object
|
+--tarau.jinni.Term
|
+--tarau.jinni.Nonvar
|
+--tarau.jinni.SystemObject
|
+--tarau.jinni.Copier
- class Copier
- extends SystemObject
Term Copier agent. Has its own Variable dictionnary.
Uses a generic action propagator which recurses over Terms.
|
Field Summary |
(package private) static Const |
anAnswer
Extracts the free variables of a Term, using a
generic action/reaction mechanism which takes
care of recursing over its structure. |
private HashDict |
dict
|
|
Constructor Summary |
(package private) |
Copier()
creates a new Copier together with
its related HashDict for variables |
|
Method Summary |
(package private) Term |
action(Term place)
This action only defines what happens here (at this
place ). |
(package private) static java.util.Vector |
ConsToVector(Const Xs)
|
(package private) static java.util.Vector |
EnumerationToVector(java.util.Enumeration e)
Reifies an Enumeration as a Vector. |
(package private) Term |
getMyVars(Term that)
|
(package private) static Term |
toFun(Const c,
java.util.Enumeration e)
Converts a reified Enumeration to functor
based on name of Const c and args being the elements of
the Enumeration. |
(package private) static Fun |
VectorToFun(java.util.Vector V)
Represents a list [f,a1...,an] as f(a1,...,an) |
| Methods inherited from class tarau.jinni.Term |
charsToString,
copy,
exec,
exec,
fromString,
getKey,
isBuiltin,
isClause,
matches,
matching_copy,
numbervars,
pprint,
pprint,
reaction,
ref,
stringToChars,
toChars,
toClause,
token,
toObject,
toTerm,
toUnquoted,
undo,
unify,
varsOf |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
dict
private HashDict dict
anAnswer
static final Const anAnswer
- Extracts the free variables of a Term, using a
generic action/reaction mechanism which takes
care of recursing over its structure.
It can be speeded up through specialization.
Copier
Copier()
- creates a new Copier together with
its related HashDict for variables
action
Term action(Term place)
- This action only defines what happens here (at this
place ). Ageneric mechanism will be used to recurse
over Terms in a (truly:-)) OO style (well, looks more
like some Haskell stuff, but who cares).
- Overrides:
- action in class Term
EnumerationToVector
static java.util.Vector EnumerationToVector(java.util.Enumeration e)
- Reifies an Enumeration as a Vector.
Vector.elements can give back the enumeration if needed.
- See Also:
Copier
ConsToVector
static java.util.Vector ConsToVector(Const Xs)
toFun
static Term toFun(Const c,
java.util.Enumeration e)
- Converts a reified Enumeration to functor
based on name of Const c and args being the elements of
the Enumeration.
VectorToFun
static Fun VectorToFun(java.util.Vector V)
- Represents a list [f,a1...,an] as f(a1,...,an)
getMyVars
Term getMyVars(Term that)