rust-lang / rust-lang/rust-clippy

nonminimal_bool can produce minimal but not human readable expressions

Open
#3,141 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement E-medium
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the examples in the issue and investigate scientific papers, theses, or blog posts that define alternative models of simple Boolean expressions. Compare those models against the current minimal-but-hard-to-read outputs, then define an approach that produces the human-preferred expression while preserving correctness; the issue is complete when that approach is implemented and validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.