Changes between Version 12 and Version 13 of Symbolic Expressions


Ignore:
Timestamp:
02/13/10 16:48:25 (16 years ago)
Author:
Stephen Siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Symbolic Expressions

    v12 v13  
    6767 
    6868 
    69 In util wee need to export:
     69In util we need to export:
    7070* Rational /* infinite precision rational numbers */
    7171   * static Rational rational(int value);
     
    9393The 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.
    9494
     95Additional Interfaces:
     96* PrimitiveCExpressionIF
     97    * classes implementing this interface
     98       * ArrayRead
     99       * ArrayWrite
     100       * TupleRead
     101       * TupleWrite
     102       * SymbolicConstant
     103       * RelationalCExpression
     104       * EvaluatedFunction
     105
    95106Classes:
    96 
    97107 * CExpression implements SymbolicExpressionIF
    98108 * AndCExpression extends CExpression
    99109    * clauses: set of OrCExpression
    100110 * OrCExpression extends CExpression
    101     * clauses: set of SBasicExpression
     111    * clauses: set of BasicCExpression
    102112 * 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();
    112119 * PolynomialCExpression extends CExpression
    113120    * terms: set of MonomialCExpression
     
    117124 * RationalCExpression extends CExpression
    118125    * numerator, denominator: PolynomialCExpression
     126
     127Some 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
     132Big question: how to find command factors in denominator?
     133 
    119134
    120135=== CExpressionFactory ===