|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectua.gradsoft.termware.Term
ua.gradsoft.termware.AbstractComplexTerm
ua.gradsoft.termware.set.SetPatternTerm
public class SetPatternTerm
Set pattern: term for expression { $x: $Y }. unify ({ frs, snd }, S) is succesfull if frs is unified with some element of S, and snd is unified with rest of set.
| Field Summary |
|---|
| Fields inherited from class ua.gradsoft.termware.AbstractComplexTerm |
|---|
emptyFv_ |
| Method Summary | |
|---|---|
boolean |
boundEquals(Term t)
equality, when propositional variables are already bounded. |
boolean |
boundUnify(Term t,
Substitution s)
unification when we already have s
and when same propositional variables means same things |
PartialOrderingResult |
concreteOrder(Term x,
Substitution s)
compare for 'more concrete' relation. |
Term |
createSame(Term[] newBody)
create term, with same name but new body. |
static Term |
createSetPattern(Term frs,
Term snd)
return new set pattern. |
boolean |
emptyFv()
true, if term does not contains free propositional variables. |
boolean |
freeEquals(Term t)
Equality when all propositional variables are equal |
int |
getArity()
get arity of term. |
String |
getName()
get name of term. |
Object |
getNameIndex()
get name index in bounded symbol table or sust string, if name in symbol table does not exists. |
String |
getPatternName()
get name, for which we can forse unfication. |
Object |
getPatternNameIndex()
get index for pattern name. |
Term |
getSubtermAt(int i)
get i-th subterm. |
int |
maxFv()
get maximum index of free propositional variable in term |
int |
minFv()
get minimal index of free propositional variable in term. |
void |
print(PrintStream out)
print term on out |
void |
setSubtermAt(int i,
Term t)
set i-th subterm. |
void |
shiftFv(int newMin)
shift set of propositional variables to start from newMinFv |
Term |
subst(Substitution s)
receive new term, which is sibstution of current term and s |
boolean |
substInside(Substitution s)
apply substitution s to current term. |
Term |
termClone()
do 'deep-clone' of object. |
| Methods inherited from class ua.gradsoft.termware.AbstractComplexTerm |
|---|
clone, findSubtermIndexBoundEqualsTo, freeUnify, getBigDecimal, getBigInteger, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getJavaObject, getLong, getNumber, getPrimaryType0, getShort, getString, getTerm, getXIndex, isAtom, isBigDecimal, isBigInteger, isBoolean, isByte, isChar, isComplexTerm, isDouble, isFloat, isInt, isJavaObject, isLong, isNil, isNumber, isShort, isString, isX, normalizeFv, print, recheckEmptyFv, resetFV, termCompare |
| Methods inherited from class ua.gradsoft.termware.Term |
|---|
containsSubtermBoundEqualsTo, getAsBigDecimal, getAsBigInteger, getAsBoolean, getAsByte, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsJavaObject, getAsLong, getAsNumber, getAsShort, getAsString, getPrimaryType1, println, println |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Term createSetPattern(Term frs,
Term snd)
throws TermWareException
TermWareExceptionpublic final String getName()
AbstractComplexTerm
getName in class AbstractComplexTermpublic final Object getNameIndex()
AbstractComplexTerm
getNameIndex in class AbstractComplexTermpublic final String getPatternName()
AbstractComplexTerm
getPatternName in class AbstractComplexTermpublic final Object getPatternNameIndex()
AbstractComplexTerm
getPatternNameIndex in class AbstractComplexTermpublic final int getArity()
AbstractComplexTerm
getArity in class AbstractComplexTermpublic Term getSubtermAt(int i)
AbstractComplexTerm
getSubtermAt in class AbstractComplexTermi - - index of subterm to get.
i
public void setSubtermAt(int i,
Term t)
AbstractComplexTerm
setSubtermAt in class AbstractComplexTermi - - indext of subterm to set.t - - subterm to set.
public boolean boundUnify(Term t,
Substitution s)
throws TermWareException
Term s
and when same propositional variables means same things
boundUnify in class AbstractComplexTermTermWareException
public boolean substInside(Substitution s)
throws TermWareException
s to current term.
substInside in class AbstractComplexTermTermWareException
public Term subst(Substitution s)
throws TermWareException
AbstractComplexTerm s
subst in class AbstractComplexTermTermWareException
public boolean freeEquals(Term t)
throws TermWareException
freeEquals in class AbstractComplexTermt - - term to compare.
TermWareException
public boolean boundEquals(Term t)
throws TermWareException
Term
boundEquals in class AbstractComplexTermt - - term to compare.
TermWareException
public PartialOrderingResult concreteOrder(Term x,
Substitution s)
throws TermWareException
Term x.<(concrete)<(y) means, that for each substitution
of free variables sx exists substituion sy :
x[sx] = y[sy] . s store previously matched variables.
concreteOrder in class TermTermWareException
public Term termClone()
throws TermWareException
AbstractComplexTerm
termClone in class AbstractComplexTermTermWareExceptionpublic boolean emptyFv()
Term
emptyFv in class AbstractComplexTerm
public int minFv()
throws TermWareException
Term
minFv in class AbstractComplexTermTermWareException
public int maxFv()
throws TermWareException
Term
maxFv in class AbstractComplexTermTermWareException
public void shiftFv(int newMin)
throws TermWareException
AbstractComplexTerm newMinFv
shiftFv in class AbstractComplexTermnewMin - new minimal index of propositional variable in term
TermWareExceptionpublic void print(PrintStream out)
Term out
print in class Termout - - PrintStream, where to print term.
public Term createSame(Term[] newBody)
throws TermWareException
Term
createSame in class AbstractComplexTermTermWareException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||