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

Method-local invariants? #127

Open
MattWindsor91 opened this issue Jan 4, 2017 · 1 comment
Open

Method-local invariants? #127

MattWindsor91 opened this issue Jan 4, 2017 · 1 comment

Comments

@MattWindsor91
Copy link
Collaborator

One for the 'would be nice' pile: some syntax like

method foo(int bar, bool baz) invariant {| P(bar) * Q(bar, baz) |} {
    {| X() |} ... {| Y() |}
}

which is syntactic sugar for

method foo(int bar, bool baz) invariant {| P(bar) * Q(bar, baz) |} {
    {| P(bar) * Q(bar, baz) * X() |} ... {| P(bar) * Q(bar, baz) * Y() |}
}

This would clean up a few methods where we need special information about the incoming parameters to pass through the entire method body. There are some examples in the GRASShopper stuff.

@MattWindsor91
Copy link
Collaborator Author

One thing this doesn't really help us with is when we need to thread through information about parameters in a way that changes view throughout the method (thread state machines, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant