Simplification of Boolean Expression in java

2019-07-19 02:19发布

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条回答
smile是对你的礼貌
2楼-- · 2019-07-19 02:42

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)

查看更多
登录 后发表回答