Order of operations

Nov 16, 2007 at 11:01 PM
Hi Eugene,

Yet another question. This might be our final hurdle, but it's a major one and I think we won't be the only people who will run into it.

We need to be able to load up a list of expressions and NOT compile them until we indicate. We are planning on having thousands of expressions, and having to organize the order of those will be pretty hard. Ideally we would load up all of them, and then tell the engine to compile.

I'm not sure how difficult a problem this is, but I think for large-scale apps it's going to be pretty important. It seems like you could keep a dependency tree as items are loaded or something and then compile them in the order you derive from the tree.

Thanks,
Dustin
Coordinator
Nov 17, 2007 at 1:23 AM
Basically, you want to be able to add expressions to the calculation engine in any order. Once you are finished, you then call a method on the engine that compiles all the expressions and links them together.

I'm going to have to think over the weekend about how I would do this as my brain isn't working right now 80)
Nov 18, 2007 at 1:34 PM
Edited Nov 18, 2007 at 1:36 PM
Exactly. I imagine that as the expressions are added they'd be parsed and the tree would be searched to find where they go. It would make adding expressions much slower, but in our app we'd take an up-front hit to load everything at first.

I think for any industrial use this is pretty important. I was thinking at first that a user like me could add them to a data structure and order them myself, and then add them to Flee's calculation engine in the correct order. But then I'd have to parse, and it seems like a waste and potentially buggy for me to parse with my own parser and then hand it off to you for your parser.