OON: Re: Object Oriented Equation Parsing

From: Eero Hyvönen (eero.hyvonen@delisoft.fi)
Date: Fri May 02 1997 - 03:43:08 EST


----------
> From: Mark S. Johnson <mjohnson@calpoly.edu>
> To: oon-list@oonumerics.org
> Subject: OON: Object Oriented Equation Parsing
> Date: Wednesday, April 30, 1997 9:47 PM
>
>
> I would like to write some code to parse mathematical expressions and
> place the results into meaningful objects. Better yet, I'd rather use
> someone else's code to do this! :-)
>
> Sample line to parse: (pseudo-Maple-style syntax)
>
> x * y + exp(x) = 5;
>

We wrote our InC++ interval solvers (for solving optimization problem,
equation sets and interval constraint satisfaction problems) using Lex
(lexical analysis) and Yacc (parser) metacompilers (standard tools
available with C/C++ compilers). This a simple way to extract the structure
of an expression in C++ world, another way would be to overload
operators/function to do parsing based on their arguments. For example, to
create a function to be minimized/maximized or to solve an equation pair
one can create the following objects:

IFunction myFunction("y=x^2+x*y^2-sin(x)");

Ice myEquationSet (2, "a+sin(b)=2", "b^2+a*b<a");

Free evaluation versions and user guides of the InC++ libraries are
available at

http://www.delisoft.fi

Yours

Eero Hyvonen



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:05 EST