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

Symbolic evaluator #50

Closed
romac opened this issue Nov 16, 2017 · 1 comment
Closed

Symbolic evaluator #50

romac opened this issue Nov 16, 2017 · 1 comment

Comments

@romac
Copy link
Member

romac commented Nov 16, 2017

Following the discussion in epfl-lara/stainless#104:

@jad-hamza:
For the general case with free variables, we could take inspiration from the Coq "simpl" tactic. This tactic simplifies the terms that appear in your goal (or in your premises) by applying reductions rules (beta-reduction, etc.). But it doesn't evaluate blindly, and tries to only apply reductions that make the terms more readable (and to avoid non-termination).

For instance, given the definitions in #96, plus(n,m) would not be simplified further (even though there is a valid beta-reduction rule that can be applied), but plus(S(n),m) would be simplified to S(plus(n,m)).

@samarion:
For simplifications of non-ground terms, I also agree with @jad-hamza. Note that Inox actually already does this pretty extensively in SimplifierWithPC. However, no beta-reduction is performed for named functions, so that could be an interesting new simplification to consider. The challenge is to choose good heuristics about when a function inlining can be considered 'useful'. Possibly basing ourselves off the simp tactic could indeed be useful, but I would prefer automatic this as much as possible.

@romac
Copy link
Member Author

romac commented Apr 5, 2018

Closing as per #61 (comment).

@romac romac closed this as completed Apr 5, 2018
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

2 participants