On July 28, 2006 3:21 AM Christian Aistleitner wrote:Actually, I do not like your code, as this does not give you the kind of information you would like to have with a reflection framework (e.g.: Using proper types for types and functions, Getting parameter types), and will cause you lots of problems -- but maybe I am too early thinking about such issues. However, besides the parsing part, the extensions and all the other issues, if it's the way you choose, let me help you getting it to compile and run. The following piece of code works: fricas (1) -> <aldor> #include "fricas" fricas Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8835833890607368219-25px001.as using Aldor compiler and options -O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra Use the system command )set compiler args to change these options. fricas Compiling Lisp source code from file ./8835833890607368219-25px001.lsp Issuing )library command for 8835833890607368219-25px001 fricas Reading /var/aw/var/LatexWiki/8835833890607368219-25px001.asy EXPORT0 is now explicitly exposed in frame initial EXPORT0 will be automatically loaded when needed from /var/aw/var/LatexWiki/8835833890607368219-25px001 EXPORT1 is now explicitly exposed in frame initial EXPORT1 will be automatically loaded when needed from /var/aw/var/LatexWiki/8835833890607368219-25px001 EXPORT2 is now explicitly exposed in frame initial EXPORT2 will be automatically loaded when needed from /var/aw/var/LatexWiki/8835833890607368219-25px001 MyDom is now explicitly exposed in frame initial MyDom will be automatically loaded when needed from /var/aw/var/LatexWiki/8835833890607368219-25px001 fricas main()
Type: List(Boolean)
fricas )clear completely What did I do to get the code working?I got rid of pile. Piles are simply a pain to my eyes. I turned exports into a function, as you'd probably want to call it more than once. You yielded anonymous categories, created just within the yield clause. This looked dangerous to me, so I turned them into proper definitions within MyDom?'s add part. This however gave problems when checking by has (as the Categories where no longer anonymous), so I had to use them already in the with clause, and moved them to the top-level scope (EXPORT0, ...). I use the macro yieldT instead of simply yield, to tell the compiler the yielded thing really is a Category. For some of my experiments this wasn't necessary -- for some it was. I moved your "has" check in a separate function. It doesn't seem to work out well, if the Cat part of "Dom has Sig" is not constant in scope. That's it. Bill Page wrote: I am very pleased that your code compiles and runs in Aldor but ... Pile Notation is BeautifulWhy would anyone prefer to see all that redundant punctuation? To my eyes the ;{} stuff looks old and ugly. aldor #include "fricas" #pile +++ +++ Example domain with self-identifying declarations +++ EXPORT3: Category == with { +:(%, aldor Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8956387683164927995-25px003.as using Aldor compiler and options -O -Fasy -Fao -Flsp -lfricas -Mno-ALDOR_W_WillObsolete -DFriCAS -Y $FRICAS/algebra -I $FRICAS/algebra Use the system command )set compiler args to change these options. "/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/8956387683164927995-25px003.as", fricas main2() Unfortunately Axiom apparently cannot access Aldor category values fricas X := exports()$Reflection(MyDom2); |