Main Page | Report this Page
 
   
Science Forum Index  »  Math - Symbolic Forum  »  toy symbolic manipulation program
Page 1 of 1    
Author Message
Allan Adler
Posted: Thu Feb 08, 2007 12:34 pm
Guest
I would like to find a toy symbolic manipulation program satisfying the
following conditions:
(1) It is written in C, the source code is free and it runs on any UNIX system
(including my ancient version of Linux, i.e. RedHat 7.1).
(2) It handles polynomials with integer coefficients in several variables.
It can add, subtract and multiply polynomials (including by integers).
I don't care about any other operations at the moment.
(3) The variables can be strings.
(4) It is constructed using Yacc/Bison and Lex/Flex to parse input strings.
(5) It allows nesting with parentheses and can expand stuff like
(a+b)*((w+x)*(y+z)) using the distributive laws.
(6) It does NOT use an intermediate language, such as LISP, to define the
operations of the symbolic manipulator. It just does everything directly
using C via Yacc/Bison and Lex/Flex.

I don't care about using it. I just want to study the source code, the
smaller the better.
--
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
David L. Johnson
Posted: Thu Feb 08, 2007 10:30 pm
Guest
Allan Adler wrote:
Quote:
I would like to find a toy symbolic manipulation program satisfying the
following conditions:
(1) It is written in C, the source code is free and it runs on any UNIX system
(including my ancient version of Linux, i.e. RedHat 7.1).
(2) It handles polynomials with integer coefficients in several variables.
It can add, subtract and multiply polynomials (including by integers).
I don't care about any other operations at the moment.
(3) The variables can be strings.
(4) It is constructed using Yacc/Bison and Lex/Flex to parse input strings.
(5) It allows nesting with parentheses and can expand stuff like
(a+b)*((w+x)*(y+z)) using the distributive laws.
(6) It does NOT use an intermediate language, such as LISP, to define the
operations of the symbolic manipulator. It just does everything directly
using C via Yacc/Bison and Lex/Flex.

I don't care about using it. I just want to study the source code, the
smaller the better.

Allan: Did you try to find Pari (AKA pari-gp)? I have no idea whether
it is still around, but it used to be all this. Ah, google is my
friend. http://pari.math.u-bordeaux.fr/ It was written in C. It has a
bias towards number-theoretic computations, as I recall, but manipulated
polynomials and the like. In fact, I think it's integration method was
to compute the Taylor (MacLaurin) polynomial of the function then do the
obvious.

--

David L. Johnson

And what if you track down these men and kill them, what if you killed
all of us? From every corner of Europe, hundreds, thousands would
rise up to take our places. Even Nazis can't kill that fast.
-- Paul Henreid (Casablanca).
Allan Adler
Posted: Fri Feb 09, 2007 12:58 am
Guest
"David L. Johnson" <david.johnson@lehigh.edu> writes:

Quote:
Allan: Did you try to find Pari (AKA pari-gp)? I have no idea whether
it is still around, but it used to be all this. Ah, google is my
friend. http://pari.math.u-bordeaux.fr/ It was written in C. It has a
bias towards number-theoretic computations, as I recall, but manipulated
polynomials and the like. In fact, I think it's integration method was
to compute the Taylor (MacLaurin) polynomial of the function then do the
obvious.

I have a version of Pari installed. It probably does meet most of the
enumerated conditions, but probably doesn't meet the unnumbered condition:

Quote:
I just want to study the source code, the smaller the better.

It is a big program and I even got lost trying to follow how it computed
class numbers. If I could just extract a few files adequate to construct
a subsystem that does what I enumerated and little else, and which would
compile by itself, I might be more tempted to try. But Pari is not by any
means a toy symbolic manipulation program.

Also, I'm not sure it does its magic via Yacc/Bison and Lex/Flex, which
was one of the conditions. I just took a quick look at the source code
for pari-2.3.1 and didn't see any .y files or .l files.
--
Ignorantly,
Allan Adler <ara@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Thu Dec 04, 2008 11:44 am