sctn
sctn

Reputation: 71

Simplification of Boolean Expression in java

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.

Upvotes: 3

Views: 5213

Answers (1)

Jeff Foster
Jeff Foster

Reputation: 44706

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)

Upvotes: 2

Related Questions