Difference between revisions of "Formula Parser-JEP removal"
Tom Parker (talk | contribs) (Created page with '{| align="right" | __TOC__ |} ==Background== From a code team discussion about tasks for PCGen 5.17, it was brought up that one project was additional work on formula proce...') |
(No difference)
|
Revision as of 20:47, 30 April 2009
Background
From a code team discussion about tasks for PCGen 5.17, it was brought up that one project was additional work on formula processing, JEP, output sheets. This discussion effectively starts in message DEV_2. This discussion led to considering the removal of JEP from PCGen.
Status
This is a proposal. It is not finalized, and is actively undergoing discussion. Please comment to the pcgen_developers list on this issue/proposal.
This Wiki is a summary page, it is NOT intended to host the discussion - please do not use it to carry on discussion.
Reasoning
The long-term discussion/proposal is around removing JEP from PCGen. This is a result of
- JEP is now a closed source library, so we cannot continue to benefit from future releases/bug fixes
- JEP is a license exception in our code, which restricts our license flexibility
- JEP has more features than we need (some of which get in our way)
Requirements
The following are the currently identified (proposed) requirements for a Formula Parser for PCGen:
- Recognize the bits that make up a PCGEN formula
- Follow mathematical precedence for operators
- Do not involve tens (hundreds) of recursive calls every time we evaluate a formula.
- Have the ability to complain at LST load (vs at runtime) if a formula is invalid, which means it also has the ability to detect and warn at LST load for deprecated formula styles, e.g. 2MAXINT
Potential Implementation Details/Future projects:
- Have a formula factory that can detect situations where a formula like 1+INT is used multiple places in the LST. These should be reduced via a cache to a single Formula object (since a Formula is immutable) to save memory and hopefully reduce LST load time.
- Make formula terms/variables into plugins, so the Formula system can be extended without modifying the core.
Proposal
Being developed, please see pcgen_developers list for current status.