Changes between Version 11 and Version 12 of Symbolic Expressions


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Symbolic Expressions

    v11 v12  
    7979   * static int compare(Rational arg0, Rational arg1); /* +-0 */
    8080   * boolean isInteger();
    81    * Rational intValue();
     81   * BigInteger intValue();
    8282   * BigInteger numerator();
    8383   * BigInteger denominator();
     
    8888   * boolean is0();
    8989
    90    
     90== Implementation ==
    9191
     92Package cexpression will implement the interface defined above.
     93The 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.
    9294
     95Classes:
    9396
     97 * CExpression implements SymbolicExpressionIF
     98 * AndCExpression extends CExpression
     99    * clauses: set of OrCExpression
     100 * OrCExpression extends CExpression
     101    * clauses: set of SBasicExpression
     102 * 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
     112 * PolynomialCExpression extends CExpression
     113    * terms: set of MonomialCExpression
     114 * MonomialCExpression extends CExpression
     115    * coefficient: Rational
     116    * factors: set of pairs (PrimitiveCExpression, n), where n is a positive integer
     117 * RationalCExpression extends CExpression
     118    * numerator, denominator: PolynomialCExpression
    94119
     120=== CExpressionFactory ===
    95121
    96 == SExpression implements SymbolicExpressionIF ==
    97 
    98 This an implementation of the interface defined above.    The idea is to aggressively put every expression into a canonical form.
    99 
    100 a canonical-form based implementation of symbolic expression
    101 
    102  * SAndExpression extends SExpression
    103     * clauses: set of SOrExpression
    104  * SOrExpression extends SExpression
    105     * clauses: set of SBasicExpression
    106  * SBasicExpression extends SExpression
    107     * SRelationalExpression, or
    108     * SPrimitiveExpression, where SPrimitiveExpression has boolean type, or
    109     * !SPrimitiveExpression
    110  * SRelationalExpression extends SExpression
    111    * e>0, e>=0, e=0, e!=0, where e is an SPolynomialExpression
    112  * SPrimitiveExpression extends SExpression
    113    * X, where X is a symbolic constant
    114    * a[e], a is an SExpression of array type, e an SExpression of integer type
    115    * r.f, where r is an SExpression of tuple type and f is a nonnegative integer
    116  * SPolynomialExpression extends SExpression
    117     * terms: set of SMonomialExpression
    118  * SMonomialExpression extends SExpression
    119     * coefficient: Number
    120     * factors: set of pairs (SPrimitiveExpression, n), where n is a positive integer
    121  * SRationalExpression extends SExpression
    122     * numerator, denominator: SPolynomialExpression
    123 
    124 Numbers
    125 
    126 Infinite-precision rational number.
    127 
    128 == SExpressionFactory ==
    129 
    130  * SExpression symbolicConstant()
    131  * SAndExpression and(Collection<SOrExpression>)
    132  * SOrExpression or(Collection<SBasicExpression>)
     122 * CExpression symbolicConstant(...)
     123 * AndCExpression and(Collection<OrCExpression>)
     124 * OrCExpression or(Collection<BasicCExpression>)
    133125etc.
    134126
    135127
    136 == SExpressionUniverse implements SymbolicUniverseIF ==
     128=== CExpressionUniverse implements SymbolicUniverseIF ===
    137129
    138 uses SExpressionFactory
    139 
    140  * SExpression symbolicConstant()
    141  * SExpression and(SExpression,SExpression);
    142  * SExpression or(SExpression,SExpression);
    143 etc.
     130uses CExpressionFactory