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

Modified instrumentation #82

Merged
merged 4 commits into from
May 29, 2024
Merged

Modified instrumentation #82

merged 4 commits into from
May 29, 2024

Conversation

Kukovec
Copy link
Collaborator

@Kukovec Kukovec commented May 29, 2024

closes #81
This PR changes instrumentation, to the format discussed during our recent meeting. A detailed explanation of the format can be found inside instrument.ts.
To this end, it makes the following changes:

  • Instrumentation now constructs Init from oldFields, and Next from a conjunction of state-variable updates from fields and transition constraints from method and methodArgs.
  • Instrumentation adds Gen(1) initializations (in either Init or Next) to all variables declared in the monitor, but absent from the transaction data (in oldFields or fields, respectively). This allows us to avoid Apalache errors on transactions in which data storage changes.
  • Tests with expecetd instrumentation syntax have been updated to reflect the changes. No semantic changes have been made in those tests
  • New tests covering the newly-supported initialization paradigm have been added
  • entry-timelock.json has been fixed to comply with the transition requirements of Claim (last_error' = "contract is not initialized" whenever ~is_initialized)

Copy link
Collaborator

@thpani thpani left a comment

Choose a reason for hiding this comment

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

Looks great!

I'm a bit scared about the empty conjunction (see my comment below) if the code evolves.

solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
solarkraft/src/instrument.ts Outdated Show resolved Hide resolved
@Kukovec Kukovec force-pushed the jk/methodParams branch from f622c5d to 3886f69 Compare May 29, 2024 13:17
@Kukovec
Copy link
Collaborator Author

Kukovec commented May 29, 2024

@thpani just fyi, it seems like the prettier reverted some of your method argument parenthesis suggestions, it's not me manually reverting these

@Kukovec Kukovec merged commit d98853c into main May 29, 2024
3 checks passed
@Kukovec Kukovec deleted the jk/methodParams branch May 29, 2024 13:35
thpani added a commit that referenced this pull request Jun 12, 2024
We now have support for missing fields:
#82
@konnov konnov added this to the M2: Monitor executor milestone Jun 19, 2024
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.

Support transactions where the fields change
3 participants