-
Notifications
You must be signed in to change notification settings - Fork 26
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
[CN] Pure term (partial) evaluation #447
base: master
Are you sure you want to change the base?
Conversation
It would be useful if you could explain why as well as what. I'm off on holiday for until 12th, so I'll let Christopher handle this. |
backend/cn/lib/eval.ml
Outdated
let eval_num_binop = eval_num_binop eval_aux bt here in | ||
match t_ with | ||
| Const _ -> return it | ||
| Sym x -> Result.error (Sym.pp_string x ^ " is free") |
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.
If we want to be able to use eval
to simplify quantified constraints or assertions, then it can't crash on free variables.
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.
It doesn't crash, it returns Error
, which partial_eval
accounts for (and is what would be used for simplification).
9c55130
to
27590d7
Compare
27590d7
to
9733f6f
Compare
9733f6f
to
f872a72
Compare
Evaluates terms (
IndexTerms.t
). Can be used for term simplification.It is needed to evaluate terms when generating test cases in OCaml-land.
Potential issues
List.combine
)Other