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

Wrong coverage reported for conditional such as IF-THEN-ELSE #846

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lemmy
Copy link
Member

@lemmy lemmy commented Nov 17, 2023

tlc2.tool.coverage.OpApplNodeWrapper.print(int, Calculate) contracts consistent sub-trees into the parent node if the parent and the sub-tree have the same costs, or the sub-tree has zero cost. Evidently, this is a wrong in the case of ITE when the true or false branch has zero cost. Essentially, the traversal of the cost model has to force reporting the children of an ITE node if the child stats are inconsistent.

TODO:

  • Diagnose and fix test failures
    • Constant definitions report into a dummy CostModel, and, thus their nested ITEs show up with zero coverage (even the conditional)
  • Unify OpApplNodeWrapper#ite and OpApplNodeWrapper#prime?
  • Support other conditionals such as CASE

Part of Github issue #845
#845

[Bug][TLC]

consistent sub-trees into the parent node if the parent and the sub-tree
have the same costs, or the sub-tree has zero cost.  Evidently, this is
a wrong in the case of ITE when the true or false branch has zero cost.
Essentially, the traversal of the cost model has to force reporting the
children of an ITE node if the child stats are inconsistent.

TODO:
- Diagnose and fix test failures
  - Constant definitions report into a dummy CostModel, and, thus their
nested ITEs show up with zero coverage (even the conditional)
- Unify OpApplNodeWrapper#ite and OpApplNodeWrapper#prime
- Support other conditionals such as CASE

Part of Github issue #845
#845

[Bug][TLC]

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
@lemmy lemmy added bug error, glitch, fault, flaw, ... Tools The command line tools - TLC, SANY, ... labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error, glitch, fault, flaw, ... Tools The command line tools - TLC, SANY, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant