java中布尔表达式的简化
java中是否有任何工具或库可以简化布尔表达式公式并给出结果。
当输入是这样时,
exp = (a || a' ) result = 1
exp = ( a || b ) && ( a' || b ) result = b (after simplification)
表达式可以比上面更大或更复杂。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IntelliJ 支持 "intentions",它允许您在编辑器中简化布尔表达式。或者,PMD 可以为您报告此类错误(请参阅布尔规则)
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)