question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detect Tautologies

See original GitHub issue

Example contract:


contract MyContract {

  function foo(uint256 a) returns(uint256) {
    if(a >= 0){ //this will never be false
      return 0;
    }
    return 1;
  }
}```

Mythril should detect a comparison which is always true, at least one as simple as this. 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:43 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
muellerberndtcommented, May 7, 2018

We should call it Muffle. Mythril + Truffle.

Or not.

1reaction
muellerberndtcommented, Apr 18, 2018

My main concern is that if we simplify the CFG by removing paths that are unreachable for particular concrete values, there might be a chance for false negatives to occur. Specifically if an error state is reachable via multiple transactions (e.g., a variable needs to be initialized first). This isn’t that relevant right now as long as inputs are largely symbolic, but might become an issue when we start using concrete initial states.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tautology (logic) - Wikipedia
In mathematical logic, a tautology (from Greek: ταυτολογία) is a formula or assertion that is true in every possible interpretation. An example is...
Read more >
How to use PARTIAL TRUTH TABLES to find tautologies ...
How to use PARTIAL TRUTH TABLES to find tautologies, contradictions, and valid arguments - Logic.
Read more >
What is the best way check whether statement is tautology
Short-cut method: try to find a falsifying assignment. In the above example, a truth assignment v such that v(c ...
Read more >
2. Logical Equivalence, Tautologies and Contradictions
Since the expression involves the negation, ~p, of p, we add a column for ~p. (Type "T" or "F" in each slot and...
Read more >
Tautology in Math | Truth Table & Examples - Study.com
If you are given a statement and want to determine if it is a tautology, then all you need to do is construct...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found