public class CommutativeInfo extends DBInfo
Note: the current implementation contains some stub implementations!
Constructor and Description |
---|
CommutativeInfo(EquivalenceInfo eqInfo,
ClosureInfo clInfo,
java.util.List<Assrt> assrtList,
TrOutput output,
boolean dbg) |
Modifier and Type | Method and Description |
---|---|
static int |
compareNodes(ParseNode first,
ParseNode second) |
GenProofStepStmt |
createCommutativeStep(mmj.transforms.WorksheetInfo info,
mmj.transforms.GeneralizedStmt comProp,
ParseNode source,
ParseNode target)
Creates f(a, b) = f(b, a) statement.
|
protected void |
findCommutativeRules(Assrt assrt)
Filters commutative rules, like A + B = B + A
|
Assrt |
getComOp(mmj.transforms.GeneralizedStmt genStmt,
mmj.transforms.CommutativeInfo.CommRuleMap resMap) |
mmj.transforms.GeneralizedStmt |
getGenStmtForComNode(ParseNode node,
mmj.transforms.WorksheetInfo info)
This function searches generalized statement for node which is considered
to be the root of some commutative action
|
boolean |
isComOp(mmj.transforms.GeneralizedStmt genStmt,
mmj.transforms.WorksheetInfo info) |
public CommutativeInfo(EquivalenceInfo eqInfo, ClosureInfo clInfo, java.util.List<Assrt> assrtList, TrOutput output, boolean dbg)
protected void findCommutativeRules(Assrt assrt)
assrt
- the candidatepublic static int compareNodes(ParseNode first, ParseNode second)
first
- The one operandsecond
- The other operandpublic mmj.transforms.GeneralizedStmt getGenStmtForComNode(ParseNode node, mmj.transforms.WorksheetInfo info)
node
- the input nodeinfo
- the work sheet infopublic GenProofStepStmt createCommutativeStep(mmj.transforms.WorksheetInfo info, mmj.transforms.GeneralizedStmt comProp, ParseNode source, ParseNode target)
info
- the work sheet infocomProp
- the generalized associative statementsource
- the first node f(a, b)target
- the second node f(b, a)public boolean isComOp(mmj.transforms.GeneralizedStmt genStmt, mmj.transforms.WorksheetInfo info)
public Assrt getComOp(mmj.transforms.GeneralizedStmt genStmt, mmj.transforms.CommutativeInfo.CommRuleMap resMap)