Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonminimal_bool can produce minimal but not human readable expressions #3141

Open
oli-obk opened this issue Sep 6, 2018 · 2 comments
Open
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages E-medium Call for participation: Medium difficulty level problem and requires some initial experience.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Sep 6, 2018

E.g. !a && (b || c) || a && (d || e) || !a && f produces

  • !(!a && !b && !c && !f || a && !d && !e)
  • (a || b || c || f) && (!a || d || e)

But a human would rather have

a && (d || e) || !a && (b || c || f)

which is three operators deep, and our algorithm always produces expressions two operators deep.

There must be some scientific papers, theses or blog posts about different models of "simple" boolean expressions. Lets find some and implement them.

@oli-obk oli-obk added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Sep 6, 2018
@kazcw
Copy link

kazcw commented Sep 8, 2018

For this particular example, I think the best representation would be:

if a { d || e } else { b || c || f }

@flip1995
Copy link
Member

flip1995 commented Sep 9, 2018

Context: #3129 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages E-medium Call for participation: Medium difficulty level problem and requires some initial experience.
Projects
None yet
Development

No branches or pull requests

3 participants