Registered by Riccardo Bernardini

A generic package that allows to manipulate very, very simple symbolic expressions

SymExpr is a generic Ada package that allows the manipulation of "symbolic expressions." The expressions can be obtained by parsing a string or by using the provided constructors, together with the provided operators.
This package was born one day that I wanted to allow the users of a program of mine to specify date constraints like "This activity will start two months before the end of this other one." After writing the code for handling such requirements, I noticed that with a little effort I could have it made a stand-alone package, so I did and SymExpr was born.

Expressions in have the usual form with the four operations (+, -, * and /), the two unary operators (+ and -), function calls, variables and parenthesis. The type of the values that enter in the expression is specified as parameter to the generic package, so you can have expressions of floats, of integers, but also of dates (my case), complexes, and so on... You can create expressions by parsing strings as X := Parse("foo+(bar-3)*max(bar, foo)") or by using constructors and operators to build expressions, for example

X := Variable("x");
Y := X*X - 2*X + 1;

Project information

Licence:
GNU LGPL v3

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Bazaar
Programming languages:
Ada

All bugs Latest bugs reported

Get Involved

Downloads

Latest version is 1.1
released

All downloads

Announcements

  • SymExpr 1.1 released on 2013-03-17
    This new version has a procedure that allows for the solution of "triangular"...
  • SymExpr 1.0 released on 2013-03-16
    The first release of SymExpr 1.0 is ready! Better, improved and lemon scent...