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

Haskell backend supports functional claims directly #3010

Open
Tracked by #2491
ehildenb opened this issue Mar 24, 2022 · 7 comments
Open
Tracked by #2491

Haskell backend supports functional claims directly #3010

ehildenb opened this issue Mar 24, 2022 · 7 comments

Comments

@ehildenb
Copy link
Member

ehildenb commented Mar 24, 2022

Part of runtimeverification/k#2491

Should the backend be allowed to use these functional claims as lemmas directly? When discharging other proof goals, we could treat these functional claims as lemmas, to assist in those proofs.

@ehildenb ehildenb changed the title Backend supports recognizing these claims and discharging them directly perhaps using kore-simplify tool. Haskell backend supports functional claims directly Mar 24, 2022
@ehildenb ehildenb transferred this issue from runtimeverification/k Mar 24, 2022
@ana-pantilie
Copy link
Contributor

Requires modifying kore-exec to detect "functional claims", which will be encoded as REQ -> (LHS #Equals (RHS #And ENS)) (in order to be very similar to actual simplification rules) inside spec modules. If the proof fails, return the claim as part of the stuck claims conjunction (as we do with the other type of claims).

See https://github.com/runtimeverification/haskell-backend/blob/master/kore/src/Kore/Reachability/Prove.hs

@ana-pantilie
Copy link
Contributor

If implication simplification works as expected for this feature this should be small

@ana-pantilie
Copy link
Contributor

@JKTKops We need to make sure that #3121 is supported in this feature. A similar test should be added when implementing this.

@ana-pantilie
Copy link
Contributor

What would be the best way to represent EquationalClaims?

It's an implication, always of the form \\implies(requires, \\equals(leftTerm, \\and(rightTerm, ensures))).

simplify :: Pattern -> OrPattern

checkImplication :: claim -> LogicT m (CheckImplicationResult claim)

We want trans1 :: EquationalClaim -> Pattern and trans2 :: OrPattern -> EquationalClaim

For now let's go with EquationalClaim ~ OrPattern.

We will refactor class Claim later to make it more general.

@ana-pantilie
Copy link
Contributor

is our Pattern generator

@radumereuta let us know when you have a working branch with the frontend support so that we can start integration testing.

@radumereuta
Copy link
Contributor

Front end changes: runtimeverification/k#2733

@JKTKops
Copy link
Contributor

JKTKops commented Jul 25, 2022

Status update posted on the PR.

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

Successfully merging a pull request may close this issue.

4 participants