public final class CompiledVar extends AbstractVar
| Modifier and Type | Field and Description |
|---|---|
static int |
ANONYMOUS_VAR_CODE |
protected int |
clauseId |
protected int |
varId |
| Constructor and Description |
|---|
CompiledVar(int clauseId,
int varId) |
| Modifier and Type | Method and Description |
|---|---|
static CompiledVar |
anonymousVar(int clauseId)
Implementation note: At the moment an anonymous variable keeps the clause id of the clause defining it for traceability reasons (e.g., to facilitate debugging).
|
String |
getName() |
int |
hashCode() |
boolean |
isAnonymous() |
Term |
preCompile(Environment env) |
Term |
prepareForFrame(Environment env) |
Term |
prepareForQuery(Environment env) |
boolean |
termEquals(Term term)
Test if this object is equivalent to the term representation of the object sent as parameter
This is not testing for equality in a mathematical sense, for example:
'new Variable("_").equals(new Variable("_"))'
is false, since both the receiver and the arguments are anonymous variables, not the same variable.
|
void |
unify(Term term) |
accept, basicRead, equals, getVariableNames, hasFunctor, isGround, toEscapedString, toString, toStringarg, arity, asList, basicIsList, canUnify, changeVariablesNames, compile, compile, compile, compile, compileAndUnify, compileAndUnifyVars, getArgs, getNamedVariables, getNamedVariablesNames, getNonUnderscoreVariableNames, getNonUnderscoreVariables, getVariableNames, getVariables, hasFunctor, hasFunctor, hasFunctor, hasFunctor, hasVariable, isHilog, isList, listLength, prepareForFrame, prepareForQuery, read, read, replaceVariables, resolveBindings, termEquals, termExpansion, toEscapedString, toEscapedString, unifyAndBind, varBindingspublic static final int ANONYMOUS_VAR_CODE
protected final int clauseId
protected final int varId
public static CompiledVar anonymousVar(int clauseId)
clauseId - the clause id where this anonymous variable was declared.public boolean isAnonymous()
isAnonymous in class AbstractVarpublic String getName()
getName in class AbstractVarpublic boolean termEquals(Term term)
TermtermEquals in class Termpublic Term preCompile(Environment env)
preCompile in class Termpublic Term prepareForQuery(Environment env)
prepareForQuery in class Termpublic Term prepareForFrame(Environment env)
prepareForFrame in class TermCopyright © 2014. All rights reserved.