|We don't bite newbies here... much|
Re: Code generation from truth table.by dragonchild (Archbishop)
|on Apr 09, 2003 at 17:04 UTC ( #249306=note: print w/replies, xml )||Need Help??|
Instead of writing it as a truth table, write it as a state machine. I would translate that as follows:
If you don't want to go that route, I would suggest using sub generators and a hash table of paths.
As an aside - business logic is generally much more complicated than a truth table can represent. That's why state machines (and their little cousins flowcharts) are much better. They're something both business analysts and developers can understand and analyze for correctness and completeness.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section Seekers of Perl Wisdom