add the infrastructure for Coq to automatically infer the "inG" instances
I added a new typeclass "inGF" to witness that a particular *functor* is part of \Sigma. inG, in contrast, witnesses a particular *CMRA* to be in there, after applying the functor to "\later iProp". inGF can be inferred if that functor is consed to the head of \Sigma, and it is preserved by consing a new functor to \Sigma. This is not the case for inG since the recursive occurence of \Sigma also changes. For evry construction (auth, sts, saved_prop), there is an instance infering the respective authG, stsG, savedPropG from an inGF. There is also a global inG_inGF, but Coq is unable to use it. I tried to instead have *only* inGF, since having both typeclasses seemed weird. However, then the actual type that e.g. "own" is about is the result of applying a functor, and Coq entirely fails to infer anything. I had to add a few type annotations in heap.v, because Coq tried to use the "authG_inGF" instance before the A got fixed, and ended up looping and expanding endlessly on that proof of timelessness. This does not seem entirely unreasonable, I was honestly surprised Coq was able to infer the types previously.
Showing
- barrier/client.v 1 addition, 10 deletionsbarrier/client.v
- heap_lang/heap.v 3 additions, 2 deletionsheap_lang/heap.v
- heap_lang/tests.v 1 addition, 4 deletionsheap_lang/tests.v
- program_logic/auth.v 7 additions, 0 deletionsprogram_logic/auth.v
- program_logic/ghost_ownership.v 19 additions, 0 deletionsprogram_logic/ghost_ownership.v
- program_logic/saved_prop.v 3 additions, 0 deletionsprogram_logic/saved_prop.v
- program_logic/sts.v 6 additions, 0 deletionsprogram_logic/sts.v
Loading
Please register or sign in to comment