A specific constructor for injecting values in expressions
We add a specific constructor to the type of expressions for injecting values in expressions. The advantage are : - Values can be assumed to be always closed when performing substitutions (even though they could contain free variables, but it turns out it does not cause any problem in the proofs in practice). This means that we no longer need the `Closed` typeclass and everything that comes with it (all the reflection-based machinery contained in tactics.v is no longer necessary). I have not measured anything, but I guess this would have a significant performance impact. - There is only one constructor for values. As a result, the AsVal and IntoVal typeclasses are no longer necessary: an expression which is a value will always unify with `Val _`, and therefore lemmas can be stated using this constructor. Of course, this means that there are two ways of writing such a thing as "The pair of integers 1 and 2": Either by using the value constructor applied to the pair represented as a value, or by using the expression pair constructor. So we add reduction rules that transform reduced pair, injection and closure expressions into values. At first, this seems weird, because of the redundancy. But in fact, this has some meaning, since the machine migth actually be doing something to e.g., allocate the pair or the closure. These additional steps of computation show up in the proofs, and some additional wp_* tactics need to be called.
Showing
- _CoqProject 1 addition, 0 deletions_CoqProject
- tests/heap_lang.ref 13 additions, 1 deletiontests/heap_lang.ref
- tests/heap_lang.v 4 additions, 0 deletionstests/heap_lang.v
- tests/ipm_paper.v 4 additions, 4 deletionstests/ipm_paper.v
- tests/list_reverse.ref 2 additions, 2 deletionstests/list_reverse.ref
- tests/list_reverse.v 2 additions, 2 deletionstests/list_reverse.v
- tests/one_shot.ref 1 addition, 1 deletiontests/one_shot.ref
- tests/one_shot.v 5 additions, 5 deletionstests/one_shot.v
- tests/tree_sum.v 1 addition, 1 deletiontests/tree_sum.v
- theories/heap_lang/lang.v 222 additions, 262 deletionstheories/heap_lang/lang.v
- theories/heap_lang/lib/assert.v 4 additions, 4 deletionstheories/heap_lang/lib/assert.v
- theories/heap_lang/lib/atomic_heap.v 18 additions, 20 deletionstheories/heap_lang/lib/atomic_heap.v
- theories/heap_lang/lib/coin_flip.v 2 additions, 3 deletionstheories/heap_lang/lib/coin_flip.v
- theories/heap_lang/lib/counter.v 5 additions, 5 deletionstheories/heap_lang/lib/counter.v
- theories/heap_lang/lib/increment.v 4 additions, 5 deletionstheories/heap_lang/lib/increment.v
- theories/heap_lang/lib/par.v 14 additions, 16 deletionstheories/heap_lang/lib/par.v
- theories/heap_lang/lib/spawn.v 2 additions, 2 deletionstheories/heap_lang/lib/spawn.v
- theories/heap_lang/lib/spin_lock.v 1 addition, 1 deletiontheories/heap_lang/lib/spin_lock.v
- theories/heap_lang/lib/ticket_lock.v 4 additions, 4 deletionstheories/heap_lang/lib/ticket_lock.v
- theories/heap_lang/lifting.v 75 additions, 76 deletionstheories/heap_lang/lifting.v
Loading
Please register or sign in to comment