|
Kernel Prolog with Fluent based Builtins | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--tarau.jinni.Term
|
+--tarau.jinni.Nonvar
|
+--tarau.jinni.Const
|
+--tarau.jinni.Fun
|
+--tarau.jinni.Clause
Datatype for a Prolog clause (H:-B) having a head H and a body b
| Field Summary | |
int |
begins_at
|
(package private) HashDict |
dict
Variable dictionary |
int |
ends_at
|
java.lang.String |
fname
File name and line where sources start and end (if applicable) |
(package private) boolean |
ground
Remembers if a clause is ground. |
| Fields inherited from class tarau.jinni.Fun |
args |
| Fields inherited from class tarau.jinni.Const |
aFail,
anEof,
aNil,
aNo,
aTrue,
aYes,
sym |
| Fields inherited from class tarau.jinni.Term |
CONST,
INT,
JAVA,
REAL,
VAR |
| Constructor Summary | |
Clause(java.lang.String s)
Constructs a clause by parsing its string representation. |
|
Clause(Term head,
Term body)
Builds a clause given ith head and its body |
|
| Method Summary | |
(package private) static Term |
appendConj(Term x,
Term y)
Concatenates 2 Conjunctions |
(package private) Clause |
ccopy()
Creates a copy of the clause with variables standardized apart, i.e. |
(package private) void |
checkIfGround()
Detects that a clause is ground (i.e. |
private java.lang.String |
Clause2String(Clause c)
Prints out a clause as Head:-Body |
static Clause |
clauseFromString(java.lang.String s)
Extracts a clause from its String representation. |
Clause |
cnumbervars(boolean replaceAnonymous)
Replaces varibles with nice looking upper case constants for printing purposes |
Term |
getBody()
Extracts the body of a clause |
(package private) Term |
getFirst()
Gets the leftmost (first) goal in the body of a clause, i.e. |
Term |
getHead()
Extracts the head of a clause (a Term). |
java.lang.String |
getKey()
Returns a key based on the principal functor of the head of the clause and its arity. |
(package private) Term |
getRest()
Gets all but the leftmost goal in the body of a clause, i.e. |
static Clause |
goalFromString(java.lang.String line)
|
(package private) boolean |
isClause()
|
java.lang.String |
pprint()
Pretty prints a clause after replacing ugly variable names |
java.lang.String |
pprint(boolean replaceAnonymous)
Pretty prints a clause after replacing ugly variable names |
(package private) boolean |
provenGround()
Checks if a Clause has been proven ground after beeing read in or created. |
void |
setFile(java.lang.String fname,
int begins_at,
int ends_at)
|
Clause |
toClause()
Clause to Term converter: the joy of strong typing:-) |
Clause |
toGoal()
Reads a goal as a clause containing a dummy header with all veriables in it |
Term |
toTerm()
Converts a clause to a term. |
(package private) Clause |
unfold_with_goal(Clause goal,
Trail trail)
|
(package private) Clause |
unfold(Clause that,
Trail trail)
Algebraic composition operation of 2 Clauses, doing the basic resolution step Jinni is based on. |
(package private) Clause |
unfoldedCopy(Clause that,
Trail trail)
|
| Methods inherited from class tarau.jinni.Fun |
bind_to,
funClone,
funToString,
getArg,
getArity,
getIntArg,
init,
initializedClone,
listify,
putArg,
reaction,
setArg,
show_args,
toBuiltin,
token,
toString,
unify_to,
unInitializedClone,
watchNull |
| Methods inherited from class tarau.jinni.Const |
eq,
name,
qname,
the,
toUnquoted |
| Methods inherited from class tarau.jinni.Term |
action,
charsToString,
copy,
exec,
exec,
fromString,
isBuiltin,
matches,
matching_copy,
numbervars,
ref,
stringToChars,
toChars,
toObject,
undo,
unify,
varsOf |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
HashDict dict
boolean ground
public java.lang.String fname
public int begins_at
public int ends_at
| Constructor Detail |
public Clause(Term head,
Term body)
public Clause(java.lang.String s)
| Method Detail |
public static Clause clauseFromString(java.lang.String s)
public Clause toGoal()
public static Clause goalFromString(java.lang.String line)
final void checkIfGround()
public void setFile(java.lang.String fname,
int begins_at,
int ends_at)
final boolean provenGround()
private java.lang.String Clause2String(Clause c)
public java.lang.String pprint()
public java.lang.String pprint(boolean replaceAnonymous)
public Clause toClause()
public Clause cnumbervars(boolean replaceAnonymous)
public Term toTerm()
final Clause ccopy()
public final Term getHead()
public final Term getBody()
final Term getFirst()
final Term getRest()
True,
Conj
static final Term appendConj(Term x,
Term y)
unfold(tarau.jinni.Clause, tarau.jinni.Trail)
Clause unfold(Clause that,
Trail trail)
Term#unify()
final Clause unfold_with_goal(Clause goal,
Trail trail)
Clause unfoldedCopy(Clause that,
Trail trail)
public java.lang.String getKey()
final boolean isClause()
|
Kernel Prolog with Fluent based Builtins | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||