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

Pact checking #422

Merged
merged 50 commits into from Mar 28, 2019
Merged

Pact checking #422

merged 50 commits into from Mar 28, 2019

Conversation

joelburget
Copy link
Contributor

@joelburget joelburget commented Mar 5, 2019

Feedback please. Things that still need to be done:

  • Emit trace steps for resets (@bts I started working on this but had some trouble with it -- if you want to tackle it that would be amazing. If not I can continue with your guidance). Edit: now done
  • The method we currently use for resets is pretty lame -- we just free everything that could be changed between steps, without considering what could actually be changed with the API presented by the module. This is pretty weak (in terms of what we can prove). It would be better to take the closure of sequences of operations available in the module. Unfortunately I'm not sure how to do this. Also I'm not sure which things need to be freed between steps in the current method.
  • If someone declares (property (= (column-delta accounts 'balance) 1)) for a pact, does that mean that the sum of that column is the same when the pact finishes executing, or that the code in the pact itself doesn't change the sum of the column? Edit: we're going with the latter
  • Need to do a lot of testing. This is partly dependent on questions like the previous.
  • Note: please ignore that I commented out all the other tests

@joelburget joelburget requested a review from bts March 5, 2019 00:15
src/Pact/Analyze/Translate.hs Outdated Show resolved Hide resolved
@bts
Copy link
Contributor

bts commented Mar 6, 2019

I can add the trace steps once I take care of the pending capability analysis tweaks I need to finish up

src/Pact/Analyze/Model/Text.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Translate.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
bts and others added 8 commits March 19, 2019 11:14
At this point we generate the correct graph for the failure of the last
pact test -- the very last test in the test suite.
Fixes:

1. We had mistakenly reversed the order of cancels and rollbacks in pact
   translation.
2. In evaluation we had (nondeterministically) tagged some rollbacks as
   triggering, even though their corresponding step had not run.
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
@joelburget joelburget marked this pull request as ready for review March 27, 2019 15:15
Also, several cosmetic cleanups in AnalyzeSpec.
src/Pact/Analyze/Types/Eval.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Translate.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Model/Tags.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval/Term.hs Outdated Show resolved Hide resolved
src/Pact/Analyze/Eval.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@bts bts left a comment

Choose a reason for hiding this comment

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

We're very close. Mainly a naming question

@bts bts merged commit e594d43 into master Mar 28, 2019
@bts bts deleted the pact-checking branch March 28, 2019 01:36
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.

None yet

2 participants