|
|
|
last edited 12 years ago by test1 |
| 1 2 3 4 5 6 7 8 9 10 11 | ||
|
Editor: Bill Page
Time: 2008/07/26 05:59:52 GMT-7 |
||
| Note: avoid implicit conversion of string to symbol | ||
changed: -Commutative(n:Symbol):Category == with nil Commutative(n:String):Category == with nil changed: -CommutativeDomain(): Commutative(_*) with CommutativeDomain(): Commutative("*") with
Can the attribute commutative("*") be replaced with a category
definition like
spad)abbrev category COM Commutative Commutative(n:String):Category == with nil
Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/4589802368271964260-25px001.spad using
old system compiler.
COM abbreviates category Commutative
------------------------------------------------------------------------
initializing NRLIB COM for Commutative
compiling into NRLIB COM
;;; *** |Commutative| REDEFINED
Time: 0.01 SEC.
finalizing NRLIB COM
Processing Commutative for Browser database:
--->-->Commutative(constructor): Not documented!!!!
--->-->Commutative(): Missing Description
------------------------------------------------------------------------
Commutative is now explicitly exposed in frame initial
Commutative will be automatically loaded when needed from
/var/zope2/var/LatexWiki/COM.NRLIB/codespad)abbrev domain COMD CommutativeDomain CommutativeDomain(): Commutative("*") with coerce:%->OutputForm == add coerce(x)== x pretend OutputForm
Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/5314528024349234223-25px002.spad using
old system compiler.
COMD abbreviates domain CommutativeDomain
------------------------------------------------------------------------
initializing NRLIB COMD for CommutativeDomain
compiling into NRLIB COMD
compiling exported coerce : $ -> OutputForm
COMD;coerce;$Of;1 is replaced by x
Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |CommutativeDomain| REDEFINED
;;; *** |CommutativeDomain| REDEFINED
Time: 0 SEC.
Cumulative Statistics for Constructor CommutativeDomain
Time: 0 seconds
finalizing NRLIB COMD
Processing CommutativeDomain for Browser database:
--->-->CommutativeDomain((coerce ((OutputForm) %))): Not documented!!!!
--->-->CommutativeDomain(constructor): Not documented!!!!
--->-->CommutativeDomain(): Missing Description
------------------------------------------------------------------------
CommutativeDomain is now explicitly exposed in frame initial
CommutativeDomain will be automatically loaded when needed from
/var/zope2/var/LatexWiki/COMD.NRLIB/codeaxiomCommutativeDomain has Commutative("*")
| (1) |
axiomCommutativeDomain has Commutative("+")
| (2) |
That is amazing.
As demonstrated above, CommutativeDomain is just declared to be Commutative("*")
even though there is no exported operation *.
In fact, what is demonstrated here has nothing to do with the actual names of
operations exported by a domain, but just with the declaration that
CommutativeDomain is of category Commutative("*").
Since above the definition says Commutative(n:Symbol) there should be double
quotes around the *.
One choice is adding properties inference with static analysis into the compiler(is there a possibility this inference algorithm be designed perfect?). Another is to define the property commutativity directly on the function *, instead of the domain. Or both.