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

[Feature Request][Move prover] Specification for lambda expressions #15197

Open
rahxephon89 opened this issue Nov 5, 2024 · 0 comments
Open
Assignees
Labels
enhancement New feature or request move-prover stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@rahxephon89
Copy link
Contributor

🚀 Feature Request

To prove inline functions with lambda expressions, we may want to extend the specification language to support function-level specification for lambda expressions. The syntax is not determined yet but one possible solution is to attach a spec block to the lambda expression where pre- and post-conditions are provided.

    vector::for_each_mut(&mut registry.packages, |pack| {
        let package: &mut PackageMetadata = pack;
        package.upgrade_policy = upgrade_policy_immutable();
	    }
	    spec {
	        ensures pack.upgrade_policy == upgrade_policy_immutable();
	    }
    );
@rahxephon89 rahxephon89 added the enhancement New feature or request label Nov 5, 2024
@rahxephon89 rahxephon89 self-assigned this Nov 5, 2024
@rahxephon89 rahxephon89 moved this from 🆕 New to Assigned in Move Language and Runtime Nov 14, 2024
@sausagee sausagee added the stale-exempt Prevents issues from being automatically marked and closed as stale label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request move-prover stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Status: Assigned
Development

No branches or pull requests

2 participants