aboutsummaryrefslogtreecommitdiff
path: root/src/Reflection/MultiSizeTest2.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-01-11 21:02:50 -0500
committerGravatar Jason Gross <jasongross9@gmail.com>2017-03-01 11:45:47 -0500
commit6b3048c37ad348dc88ecc03ef892ecfb121bfa7f (patch)
tree351e5438c5664ab0caf08b9d5054f296ff4aa2ee /src/Reflection/MultiSizeTest2.v
parent80dc66a34fbf031bfac1214ccbb3bb1dcdef3d39 (diff)
Switch to fully uncurried form for reflection
This will eventually make a number of proofs easier. Unfortunately, the correctness lemmas for AddCoordinates and LadderStep no longer work (because of different arities), and there's a proof in Experiments/Ed25519 that I've admitted. The correctness lemmas will be easy to re-add when we have a more general version that handle arbitrary type shapes.
Diffstat (limited to 'src/Reflection/MultiSizeTest2.v')
-rw-r--r--src/Reflection/MultiSizeTest2.v13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Reflection/MultiSizeTest2.v b/src/Reflection/MultiSizeTest2.v
index afd53bd19..575b8978a 100644
--- a/src/Reflection/MultiSizeTest2.v
+++ b/src/Reflection/MultiSizeTest2.v
@@ -151,19 +151,20 @@ Definition Boundify {t1} (e1 : Expr base_type op t1) args2
(** * Examples *)
-Example ex1 : Expr base_type op TNat := fun var =>
+Example ex1 : Expr base_type op (Arrow Unit TNat) := fun var =>
+ Abs (fun _ =>
LetIn (Constf (t:=Nat) 127) (fun a : var Nat =>
LetIn (Constf (t:=Nat) 63) (fun b : var Nat =>
LetIn (Op (tR:=TNat) (Plus Nat) (Pair (Var a) (Var b))) (fun c : var Nat =>
- Op (Plus Nat) (Pair (Var c) (Var c))))).
+ Op (Plus Nat) (Pair (Var c) (Var c)))))).
-Example ex1f : Expr base_type op (Arrow Nat (Arrow Nat TNat)) := fun var =>
- Abs (fun a0 =>
- Abs (fun b0 =>
+Example ex1f : Expr base_type op (Arrow (TNat * TNat) TNat) := fun var =>
+ Abs (fun a0b0 : interp_flat_type _ (TNat * TNat) =>
+ let a0 := fst a0b0 in let b0 := snd a0b0 in
LetIn (Var a0) (fun a : var Nat =>
LetIn (Var b0) (fun b : var Nat =>
LetIn (Op (tR:=TNat) (Plus Nat) (Pair (Var a) (Var b))) (fun c : var Nat =>
- Op (Plus Nat) (Pair (Var c) (Var c))))))).
+ Op (Plus Nat) (Pair (Var c) (Var c)))))).
Eval compute in (Interp (@interp_op) ex1).
Eval cbv -[plus] in (Interp (@interp_op) ex1f).