commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Speirs <wspe...@apache.org>
Subject Re: Parsing and solving algebraic equation from string
Date Tue, 29 Jul 2014 15:21:35 GMT
Someone else who is more experienced please jump-in here. My $0.02...

1. Would this be significantly different from SymJa?
> https://bitbucket.org/axelclk/symja_android_library/wiki/Home


I think we're talking about two different thing:

1) Mansour was asking for a library that can take a string and returned
some sort of AST for mathematical equations. Maybe it would also produce a
tree of components that are found in commons-math.

2) I'm looking at/working on a GUI that can take a string, display it in
LaTex output, and also produce a tree structure of components found in
commons-math. Then this tree would be evaluated/interpreted to produce an
output for the user. My project is akin to commons-math + parser +
evaluator/interpreter.

I don't know enough about SymJa, but it looks to be much closer to #2 than
#1 -- which isn't to say that it doesn't already contain #1 in it. It looks
like JAS (which SymJa uses) does a lot of this:
http://krum.rz.uni-mannheim.de/jas/


> 2. Should this be an implementation of an existing spec, like RPN or
> MathML, or do we need a new one?
>

My goal was to match the Maple "spec" as closely as possible. It's fairly
close to LaTex (again, LaTex has more syntax for formatting than needed
here). I went with that primarily because I know Maple and didn't know
about RPN or MathML :-) Also, I'm looking for things like A := 2*x + 3
where you're assigning an equation to the "variable" A.


> 3. Will the language be interpreted, or will Java code be generated, or
> will JSR 199 be used to invoke the Java compiler?
>

My thought would be the resulting tree structure from after parsing would
be evaluated/interpreted and the result presented to the user.

The site seems to be down, but I think you can play around with a demo
version of Maple here: http://www.maplesoft.com/products/maple/demo/

That is what I'm going for... thoughts?

Bill-

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message