Changes between Version 12 and Version 13 of Symbolic Expressions
- Timestamp:
- 02/13/10 16:48:25 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Symbolic Expressions
v12 v13 67 67 68 68 69 In util we eneed to export:69 In util we need to export: 70 70 * Rational /* infinite precision rational numbers */ 71 71 * static Rational rational(int value); … … 93 93 The idea is to aggressively put every expression into a canonical form. It assumes real arithmetic, so addition and multiplication are as in the real numbers. 94 94 95 Additional Interfaces: 96 * PrimitiveCExpressionIF 97 * classes implementing this interface 98 * ArrayRead 99 * ArrayWrite 100 * TupleRead 101 * TupleWrite 102 * SymbolicConstant 103 * RelationalCExpression 104 * EvaluatedFunction 105 95 106 Classes: 96 97 107 * CExpression implements SymbolicExpressionIF 98 108 * AndCExpression extends CExpression 99 109 * clauses: set of OrCExpression 100 110 * OrCExpression extends CExpression 101 * clauses: set of SBasicExpression111 * clauses: set of BasicCExpression 102 112 * BasicCExpression extends CExpression 103 * RelationalCExpression, or 104 * PrimitiveCExpression, where PrimitiveCExpression has boolean type, or 105 * !PrimitiveCExpression 106 * RelationalCExpression extends CExpression 107 * e>0, e>=0, e=0, e!=0, where e is a PolynomialCExpression 108 * PrimitiveCExpression extends CExpression 109 * X, where X is a symbolic constant 110 * a[e], a is a CExpression of array type, e a CExpression of integer type 111 * r.f, where r is an CExpression of tuple type and f is a nonnegative integer 113 * boolean not(); /* if true insert not here */ 114 * PrimitiveCExpressionIF primitiveExpression(); 115 * RelationalCExpression extends CExpression implements PrimitiveCExpressionIF 116 * enum RelationKind { GT0, EQ0 }; 117 * RelationKind kind(); 118 * PolynomialCExpression expression(); 112 119 * PolynomialCExpression extends CExpression 113 120 * terms: set of MonomialCExpression … … 117 124 * RationalCExpression extends CExpression 118 125 * numerator, denominator: PolynomialCExpression 126 127 Some facts which show how to put any expression into this canonical form: 128 * x>=y <=> !(y-x>0) 129 * x<y <=> y-x>0 130 * x<=y <=> !(x-y>0) 131 132 Big question: how to find command factors in denominator? 133 119 134 120 135 === CExpressionFactory ===
