3 ms·
This is probably very difficult, but wouldn’t it be interesting to write a program that generates the minimal function that matches a given decision table? I im
by eiieirurjdndjd 8y ago
This is probably very difficult, but wouldn’t it be interesting to write a program that generates the minimal function that matches a given decision table? I imagine with current techniques this would only be possible for very simple functions, but the programming workflow if you had such a tool would be neat. Instead of writing a function and tests, you simply write the test, and grow it until the function looks how you want it to.
- jedimastert 8y agoFor strictly Boolean decision tables (that is to say, truth tables[1]) this is already a solved problem, through a method known as Karnaugh mapping[2]. It can transform any arbitrary truth table into a Boolean algebra expression, which you can then simplify using any Computer Algebra System you'd like. You could probably expand this method to other forms. [1]: https://www.wikiwand.com/en/Truth_table https://www.wikiwand.com/en/Truth_table [2]: https://www.wikiwand.com/en/Karnaugh_map https://www.wikiwand.com/en/Karnaugh_map