I recently started making use of named specification clauses so that I can debug `search` failures using `unfold`. I have two questions regarding this feature.
1. Is there any reason why we can't use notation like `unfold 5` on a goal like `{G |- of ...}`
to refer to the 5th clause of the of predicate instead of having to name the clauses in the specification?
Note that the witness grammar already includes `unfold(of,5,...)`, although I recognize that clauses are renumbered for the purpose of witnesses when hypotheticals are added dynamically to the beginning of the sequence, which itself creates some confusion. One suggestion here is to use negative clause numbers for dynamic additions to the clause database, so that specification clauses always retain their original numbers.
2. I've been getting some "Unsolvable unification of head of program clause" errors when attempting unfolds that involve higher-order patterns in program clauses. For example, here is the type-application rule from System F:
%:tapp:
of (tapp P E) (T P) :- typ P, of E (all T).
Assuming I've diagnosed the problem correctly, it would be nice if I could do something like `unfold tapp with T = ....` to help out with the unification. In the absence of this feature, is there any workaround?
Todd Wilson
California State University, Fresno