ExpressionOasis released - Project for Expression Evaluation

Please refer to http://knowledge-friendz.blogspot.com/ for more blogs. 

Expression Engine:

What it will do -

This system is defined to evaluate various kind of expressions.

With the basic version, it is capable of evaluating the mathematical, logical and object property expressions. However system can be extended easily to evaluate any new type of expression like XML. The extensibility comes from the definition of grammar, parsing rules and expression implementations in the configuration files (XML based), which can be extended easily.

System does have support for evaluating the functions and variables. User just need to provide the helping classes having implementation for functions and variables. Any new implementation can be plugged easily to the system.

System is also capable to return the possible return type for any expression without actually evaluating the expression. Another capability is to get the possible operand types for any expression. This is very usable features while implementing the UI for any tool which is based on expression evaluation for its features.

System is capable to work in multi-threaded environment.

What purpose it will solve -

The expression engine can be used as a plug-gable component with other framework components like
-With BPEL based Workflow Engine which require an expression evaluator,
-Or with a UI framework to evaluate the properties of various data objects and fill these in UI components,
-Or by any scientific or mathematics research program,
-Or with any financial or general software which need to evaluate the expressions.

What problem will it solve -

As define with the purpose, many of the software may need this component. It helps the developer to avoid reinventing the wheel and help them to easily plug the expression evaluation with their software. Besides it, it will be very simple in use and will not be dependent on other libraries (It may require one or two utility classes from our utility library).

Examples:

Airthmatic Expressions -

2+5-7*8
20-(5*3)+10

Logical Expressions -

a && b
(2-1) > 0

Expressions with variables -

principle * rate * 100 / time, where principle, rate and time are the variables

Expressions with Functions -

CurrentBalance + SimpleInterest (principle, rate, time)

Object property expression -

person.city.name, where person is the identifier which points to java object of Person class and city is the property of person and further name is the property of city

Future Goals:
XML Expression Support
A Sample UI with support of expressions

People who read this post also read :



6 comments:

juanl3l said...

Hello, I'm using your framework and I've a important question. In logical expressions, how I use the denial??
For example, I want to do (A && !B), but it fails.

Could you help me, please? Is posible use denials?

juanl3l said...

Hi, I'm not sure if you got my last message.
I just want to ask you if it is possible to make a negative logical expression, like A && ¬B.
I'm asking you this because I'm getting an error.
Is it possible to do that using your library?
Thanks in advance and congratulation for your great work.

Mohit Gupta said...

Hi,

We are looking into this issue and will update you soon.

Mohit Gupta said...

Hi,
Please get the latest download (2.1) from http://code.google.com/p/xpressionengine/. It should fix the issue.

juanl3l said...

Hello, now it works fine.
thanks for fix the problem.

Ashish said...

i was executing testcases attached with the source and getting below error? Please let me know it is because of mismatch version of library or any other configuration issue?

org.simpleframework.xml.core.PersistenceException: Constructor not matched for class org.vedantatree.expressionoasis.config.FunctionProviderConfig
at org.simpleframework.xml.core.ClassCreator.getInstance(ClassCreator.java:105)
at org.simpleframework.xml.core.Composite.readConstructor(Composite.java:271)
at org.simpleframework.xml.core.Composite.read(Composite.java:219)
at org.simpleframework.xml.core.Composite.read(Composite.java:185)
at org.simpleframework.xml.core.Composite.read(Composite.java:133)
at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
at org.simpleframework.xml.core.CompositeList.populate(CompositeList.java:169)
at org.simpleframework.xml.core.CompositeList.read(CompositeList.java:114)
at org.simpleframework.xml.core.Composite.readObject(Composite.java:626)
at org.simpleframework.xml.core.Composite.read(Composite.java:569)
at org.simpleframework.xml.core.Composite.readElement(Composite.java:550)
at org.simpleframework.xml.core.Composite.readElements(Composite.java:466)
at org.simpleframework.xml.core.Composite.read(Composite.java:350)
at org.simpleframework.xml.core.Composite.readDefault(Composite.java:245)
at org.simpleframework.xml.core.Composite.read(Composite.java:215)

Post a Comment