Hello Gaby, Sorry for being so late, Christmas preparation and the like.
Le jeudi 18 décembre 2008 à 14:48 -0600, Gabriel Dos Reis a écrit : [...] > My suspicion is that they knew about it, but did not document the bug > because it takes some combination of events to exhibit it and they > carefully write their codes in such way that they don't run into it. > For example, you need to have `else' or `then' by themselves on a > line, and you need `single' expressions in at least one branch. > If you look at the algebra codes, you'll see you don't get those > combinations :-) Also, the logic was fixed in the interpreter parser. Hmm... I hate undocumented bug when they are known! > For your amusement, you can have a look at the documentation of > ADD-PARENS-AND-SEMIS-TO-LINE (the offender) in preparse.lisp to see > why the logic is bogus (item C.). You can use the following testcase > > % cat > if.spad > f x == > if a then > if x then > y > else > if c then d > e > > and issue the following instructions in OpenAxiom > > )boot TRACE ADD_-PARENS_-AND_-SEMIS_-TO_-LINE > )boot PREPARSE > parse "if.spad" > > to see the bug in the preparsing phase. It took some time to me to understand what is going on, but now I understand, you're right, the preparser misses some parenthesis. Thanks for the pointer. > | > That phase is improperly putting parenthesis and around things (more > | > precisely, it misses places where it should put parenthesis). > | > I suspect a proper fix for that is to do actual tokenization, but the > whole > | > purpose of the preparsing phase is that it is done before tokenization. > | > A proper fix to that problem is probably: Just Throw Away The Old Parser. > | > | Hmm... Do you plan to do that ? > > I did plan to do that a while ago, but daytime job consistently gets > me focused on other things. You may realize that the interpreter > parser now parses much more library stuff than before (there remains > one last bug that needs to be fixed). That is good news, I know you're working on the interpreter but not noticed that. Another good thing is that you're cleaning and reorganising the source code of src/interp, an indispensable thing for me. [...] > > | That will probably take a while, won't it? > > Yes, it certainly takes some amount of work and I'll use all the help > I can get :-) Like everywhere. I would be glad to help, and be sure that if I can I will, but I have to admit that I do not have a lot of time actually. So usually I perform several checks (build OpenAxiom, compiles several Spad files that I own, use it, and report any bug that I find). Moreover I'm intimidated by theories that gouvern your work, I need time to document myself since I'm somewhat a newbie in logic behind computational algebraic mathematics. Many thanks Gaby and keep up the good work! Greg > -- Gaby > ------------------------------------------------------------------------------ _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel