Skip to content

Conversation

@ttuegel
Copy link
Contributor

@ttuegel ttuegel commented Oct 16, 2020

Fixes #2183


Reviewer checklist
  • Test coverage: stack test --coverage
  • Public API documentation: stack haddock

@ttuegel ttuegel force-pushed the feature--save-proofs-success branch from 15b9cd6 to 249d6b9 Compare October 16, 2020 19:09
@ttuegel
Copy link
Contributor Author

ttuegel commented Oct 16, 2020

This should just about be ready. I only need to add some documentation for types I added.

@ttuegel ttuegel force-pushed the feature--save-proofs-success branch 2 times, most recently from 9eb3fc6 to 1d1e8dd Compare October 22, 2020 18:48
@ttuegel ttuegel marked this pull request as ready for review October 22, 2020 18:50
@ttuegel ttuegel force-pushed the feature--save-proofs-success branch from 1d1e8dd to bc5b93f Compare October 22, 2020 18:50
Return the entire stuck claims, instead of the left-hand sides only.
@ttuegel ttuegel force-pushed the feature--save-proofs-success branch from bc5b93f to 7af018d Compare October 22, 2020 20:42
Copy link
Contributor

@ana-pantilie ana-pantilie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some questions.

In addition, I saw that you cleaned up the tests in kore/test/Test/Kore/Reachability/Prove.hs, but some of them kept the previous structure (I added a comment on one instance of this). Is there any reason for this, or could we (the reviewers) try to clean up those tests as well, as part of the reviewer refactoring?

-- | The result of proving some claims.
data ProveClaimsResult =
ProveClaimsResult
{ stuckClaim :: !StuckClaims
Copy link
Contributor

@ana-pantilie ana-pantilie Oct 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we rename this field to something more suggestive? In Main, we check if stuckClaim is \\top and it took me a while to realize what this meant (I had to look at the types in this module). I think stuckClaims would be a little clearer, it at least implies this is a collection. stuckClaimsConjunction is even better I think, because it's clear what \\top means, but it's kind of long. Maybe a middle ground solution would be stuckClaims, with the check in Main (line 703) renamed to noStuckClaims (or something similar) in a where clause.

Another question, in what situation can we have more than one stuck claim? I thought we stop execution when we find the first one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a middle ground solution would be stuckClaims, with the check in Main (line 703) renamed to noStuckClaims (or something similar) in a where clause.

That sounds good to me!

Another question, in what situation can we have more than one stuck claim? I thought we stop execution when we find the first one.

When we exceed the breadth limit, we will present all the branches for the user to help with debugging.

in
[ mkTest "OnePath" simpleOnePathClaim
, mkTest "AllPath" simpleAllPathClaim
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we don't want the mixed cases anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing that these mixed cases actually tested is that the backend doesn't try to use one-path claims to prove all-path claims, or vice versa. There are already tests specifically for that, and I didn't think it made sense to duplicate that check too many times.

assertEqual ""
(Right ())
actual
assertEqual "" MultiAnd.top actual
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these tests be combined like the tests above were?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I cleaned up the test suite some more.

@ttuegel ttuegel requested a review from ana-pantilie October 23, 2020 19:27
@ttuegel ttuegel merged commit 07e9318 into runtimeverification:master Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save proofs even when successful

3 participants