|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.irmrsc.rmrs.VariableEnvironment
inpro.irmrsc.rmrs.Formula
public class Formula
A RMRS formula, consisting of a hook, a stack of slots and a bag of relations, scope constraints and variable equalities.
RMRS formulas are usually built by by creating new ones from lexical predicate names or by loading them from xml-specifications. They can be combined with other formulas.
Field Summary | |
---|---|
private java.util.List<VariableIDPair> |
mEqs
Variable Equalities |
private Hook |
mHook
|
private java.util.List<Relation> |
mRels
|
private java.util.List<VariableIDPair> |
mScons
Scope Constraints |
private java.util.Deque<Hook> |
mSlots
|
Fields inherited from class inpro.irmrsc.rmrs.VariableEnvironment |
---|
mVariables |
Constructor Summary | |
---|---|
Formula()
default constructor, only used for xml loading |
|
Formula(Formula f)
|
|
Formula(java.lang.String lexname,
Variable.Type semtype)
make a simple new formula for a lexical object |
Method Summary | |
---|---|
void |
checkVariableEnvironmentConsistency()
warns if variable IDs in this expression are not defined in the underlying VariableEnvironment . |
boolean |
forwardCombine(Formula fo)
combines the given formula with this formula in a 'forward function composition' manner. |
java.util.List<SimpleAssertion> |
getNominalAssertions()
|
java.util.List<SimpleAssertion> |
getUnscopedPredicateLogic()
a first, unfinished implementation to extract unscoped predicate logic statements of this rmrs, i.e. to get rid of the predicate-argument factorisation |
java.util.Set<java.lang.Integer> |
getVariableIDs()
|
boolean |
isComplete()
|
boolean |
isReduced()
|
void |
parseXML(org.jdom.Element e)
initializes this rmrs formula object from XML element variable definition <rmrsincrement> |
void |
reduce()
applies all variable equalities by replacing the corresponding variable IDs. |
void |
renumber()
reassigns new IDs for all variables in this expression starting from 0 |
void |
renumber(int StartIndex)
reassigns new IDs for all variables in this expression starting from StartIndex |
void |
replaceVariableID(int oldID,
int newID)
replace all variables IDs matching a specifid old ID with a new ID |
private void |
rerenumber(int StartIndex)
|
void |
simpleAdd(Formula fo)
simply adds another formula to this formula without consuming a slot and equating variables |
java.lang.String |
toRMRSString()
|
java.lang.String |
toString()
|
java.lang.String |
toStringMultiLine()
|
java.lang.String |
toStringOneLine()
|
Methods inherited from class inpro.irmrsc.rmrs.VariableEnvironment |
---|
getMaxID, getVariableString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Hook mHook
private java.util.Deque<Hook> mSlots
private java.util.List<Relation> mRels
private java.util.List<VariableIDPair> mScons
private java.util.List<VariableIDPair> mEqs
Constructor Detail |
---|
public Formula(Formula f)
public Formula()
public Formula(java.lang.String lexname, Variable.Type semtype)
Method Detail |
---|
public void reduce()
public boolean isReduced()
public boolean isComplete()
public boolean forwardCombine(Formula fo)
reduce()
afterwards.
This combination is implemented as mutation. The argument formula is not changed.
public void simpleAdd(Formula fo)
public java.util.Set<java.lang.Integer> getVariableIDs()
getVariableIDs
in interface VariableIDsInterpretable
public void replaceVariableID(int oldID, int newID)
VariableIDsInterpretable
replaceVariableID
in interface VariableIDsInterpretable
public void checkVariableEnvironmentConsistency()
VariableEnvironment
.
checkVariableEnvironmentConsistency
in class VariableEnvironment
public void renumber(int StartIndex)
public void renumber()
private void rerenumber(int StartIndex)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringOneLine()
public java.lang.String toStringMultiLine()
public java.lang.String toRMRSString()
public java.util.List<SimpleAssertion> getUnscopedPredicateLogic()
public java.util.List<SimpleAssertion> getNominalAssertions()
public void parseXML(org.jdom.Element e)
<rmrsincrement>
e
- the element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |