-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use Dolmen type variables #1267
Use Dolmen type variables #1267
Conversation
We do not need a value field in the type variable of Alt-Ergo. These values were only used by the unification of the types in the legacy typechecker.
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.
OK for me to merge with the requested change.
src/lib/structures/expr.ml
Outdated
@@ -335,7 +335,7 @@ module SmtPrinter = struct | |||
|
|||
(* This printer follows the convention used to print | |||
type variables in the module [Ty]. *) | |||
let pp_tyvar ppf v = Fmt.pf ppf "A%d" v | |||
let pp_tvar ppf v = Fmt.pf ppf "A%a" DE.Ty.Var.print v |
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.
let pp_tvar ppf v = Fmt.pf ppf "A%a" DE.Ty.Var.print v | |
let pp_tvar ppf v = Fmt.pf ppf "%a" DE.Ty.Var.print v |
"A"
is already added to the name of the variable in fresh_tvar
, and there is no need to add a prefix to variables from the problem (once we use them).
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.
Indeed, it should work because it seems that we always call Ty.fresh_tvar()
in Translate
even if we do not need to call it on some type variables emitted by Dolmen. Otherwise, we could see type variables without this prefix. I remove the printer.
This PR is open to replace #1263: