Simplification of Boolean Expression in java

拈花ヽ惹草 提交于 2019-12-13 16:15:18

问题


Is there any tool or library in java which simplifies a boolean expression formula and gives result.

when inputs are like that,

exp = (a || a' ) result = 1

exp = ( a || b ) && ( a' || b )  result = b (after simplification)

Expressions can be larger or more complex than above.


回答1:


IntelliJ supports "intentions" which allow you to simplify boolean expressions within the editor. Alternatively, PMD can report these kind of errors for you (see the boolean rules)



来源:https://stackoverflow.com/questions/5104207/simplification-of-boolean-expression-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!