|Truth table evaluation email@example.com (Philip Riebold) (1994-02-25)|
|Re: Truth table evaluation firstname.lastname@example.org (1994-02-26)|
|Re: Truth table evaluation email@example.com (1994-02-26)|
|Re: Truth table evaluation firstname.lastname@example.org (1994-02-28)|
|Truth table evaluation, summary and thanks email@example.com (Philip Riebold) (1994-03-04)|
|From:||Philip Riebold <firstname.lastname@example.org>|
|Date:||Fri, 25 Feb 1994 16:43:04 GMT|
[apologies that this query hasn't got that much to do with compilers but I
thought some compiler techniques might be applicable]
I have an application that generates arbitrary postfix boolean expressions
a b AND c b NOT AND OR END
There are up to 16 different variables in each expression and each
variable may occur more than once.
I need to evaluate the truth table for the expression. At present I use a
straightforward method of evaluating the expression for each of the
possible combination of the variables. For 16 variables this takes ~3
seconds on a SUN IPC.
Are there any ways I can speed this up ? There are special case rules I
can apply if all the operators are the same but I am looking for methods
which work in the general case.
Any help/suggestions would be appreciated.
Return to the
Search the comp.compilers archives again.