OCamlPro / alt-ergo

OCamlPro public development repository for Alt-Ergo
https://alt-ergo.ocamlpro.com/
Other
130 stars 33 forks source link

ADT destructors are delayed functions #1086

Closed Halbaroth closed 5 months ago

Halbaroth commented 5 months ago

Before this PR, the ADT destructors worked as follow:

The reason of this contruction is because all the functions are total in the SMT-LIB standard, even the destructors. So a destructor is partially interpreted:

If v is an ADT value and d is a destructor of this ADT associated with the constructor c, then:

This PR uses the new mechanism Rel_utils.Delayed to delay the computation of d v until we know that v is of the form (c ...).

This PR is rebased on #1078.