roberthoenig / FirstOrderLogic.jl

Julia package for parsing, manipulating and evaluating formulas in first-order logic.
Other
19 stars 6 forks source link

Support for conversion to DNF? #2

Open fsaad opened 5 years ago

fsaad commented 5 years ago

Hi @roberthoenig, do you have utilities or suggestions on how to use your library to convert a Formula to disjunctive normal form (DNF)? I see that you have implemented get_conjunctive_normal_form(formula)

roberthoenig commented 5 years ago

Hi @fsaad, sorry for the (very) late reply. I haven't actively maintained this repository since Julia 0.6. This means that in order to use any of the library functions, you'd have to first upgrade the code to work with Julia 1.x.

As for converting a formula to DNF: This library doesn't have a built-in function for that. However, there is literature on algorithms for converting an arbitrary propositional logic formula to DNF. You could probably implement it similarly to get_conjunctive_normal_form.

Does that help?