axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Some thoughts on CATS


From: Ayal Pinkus
Subject: [Axiom-developer] Some thoughts on CATS
Date: Mon, 14 Jul 2003 23:37:16 +0200


Hi all,
I think CATS is a great initiative! However, I would at least like to try
to get the tests in a form where all systems could read the same tests
somehow. So here are some thoughts/proposals.

1) would it be an idea to have the test in LISP syntax? I think all
     systems have a way of reading LISP expressions, and if they
     don't, it is (or should be) easy to write a parser for LISP code.
     The nice thing about LISP syntax is that it is unambiguous and
     easy to parse (and actually, all systems are implemented in LISP
     in some form, apart from Giac).
2) tests are typically of the form "When you evaluate A you should
     get B as a result". It thus compares "(EVAL A)" with "B". However,
     we could give hints, tell the system what it is comparing. We could
     have tests like

        (VERIFY-POLY-EQUAL
          (* (+ X 1) (+ X 1) )
          (+ (* X X) (* 2 X) 1))

so that we will accept that ordering of the polynomial terms is not important, or

        (VERIFY-NUMERIC-EQUAL
          (+ 1.1 2.2)
          3.3)

allowing the system to compare two floats taking precision into account.
Each system will want to define these tests, VERIFY-*-EQUAL as macros
that map the operation to some functions defined in the system.

3) There should be some way to specify some system-specific declarations. Axiom is a clear example, in that it needs to know the types of objects. But
     other systems might for instance require some 'assume'. Systems
are then free to skip declarations meant for other systems. I don't know what
     that would look like in Axiom, but hopefully that is possible?

What do you think? Is it too ambitious to try to share the code amongst systems?

Ayal Pinkus








reply via email to

[Prev in Thread] Current Thread [Next in Thread]