Closed Pat-Lafon closed 1 month ago
This seems useful for the STLC benchmarks as well because the recursion template takes into account 2 arguments instead of just 1.
I've made this change and it both seems to work as expected and reduces the hackiness of the code base
rbtree_gen has the following spec:
In the typing context of
??
:I've enumerated the following term:
Which passes the recursion check because
h > 0
andinv == h + h || inv == h + h + 1
soh >= 0 && h < inv
.Ideally, I would like to reject this term because it violates the third arguments overapproximate refinement type. (Alternatively, maybe I can say something about this term's coverage?)
What would be the danger in extending the current hack for the recursive call's argument check to other function calls.
https://github.com/zhezhouzz/underapproximation_type/blob/94d0f056488c98bfd9177813c56237f8be466222/typing/termcheck.ml#L300-L317