-
Notifications
You must be signed in to change notification settings - Fork 49
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
[tactic] outline #473
[tactic] outline #473
Conversation
To note, this is part of the re-engineering of Providing smarter code matching could help in reduction steps. Providing better contextual call rewriting could help in Hoare goals. (Where we rewrite a procedure call into another procedure on which we may already have a useful lemma.) |
@Cameron-Low Not a fan of the
|
Without playing shift/reduce whack-a-mole, I can get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left 2 comments. Otherwise, LGTM.
Also, your PR description should be in the commit description. |
aa9057e
to
d9163bf
Compare
@strub, the most recent commit should address all the comments you had. |
d9163bf
to
bd60342
Compare
The main idea is to provide an inverse to inline when proving an equiv. Currently, it supports basic procedure unification that requires manual selection of the program slice to unify with, as well as, requiring near exact matches on program structure. An optional return value can be supplied for situations where the return expression is just a program variable and needs to be renamed/deconstructed. There is also support for statement outlining although, this is more of a transitivity * with program slicing so may require change. Syntax and variants: - Procedure outlining: outline {m} [s - e] lv? <@ M.foo - Statement outlining: outline {m} [s - e] { s1; s2; ... } with - m: 1 or 2 - s,e: code position - M.foo: path to procedure - lv: a left-value when `s = e`, one can use `[s]` instead of `[s-s]` For example usage see: tests/outline.ec
bd60342
to
ab91f49
Compare
Most recent push was just an amendment to the commit message. Otherwise shall I merge this? |
It's approved: merge and add doc to the wiki. (Not necessarily in that order, but merging is probably best done with a bit of padding before people leave for the holidays.) |
The main idea is to provide an inverse to
inline
when proving an equiv.Currently, it supports basic procedure unification that requires manual selection of the program slice to unify with, as well as, requiring near exact matches on program structure. An optional return value can be supplied for situations where the return expression is just a program variable and needs to be renamed/deconstructed.
There is also support for statement outlining although, this is more of a
transitivity *
with program slicing so may require change.Syntax and variants:
outline {m} [s - e] M.foo
oroutline {m} [s - e] M.foo @ lv
outline {m} [s - e] { s1; s2; ... }
m: 1 or 2
s,e: code position
M.foo: path to procedure
lv: a left-value
when s = e, one can use
[s]
instead of[s-s]
For example usage see: examples/tactics/outline.ec