aboutsummaryrefslogtreecommitdiff
path: root/src/Reflection/Z/JavaNotations.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/Z/JavaNotations.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/Z/JavaNotations.v')
-rw-r--r--src/Reflection/Z/JavaNotations.v42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/Reflection/Z/JavaNotations.v b/src/Reflection/Z/JavaNotations.v
index 4a33a6330..8dc23ec82 100644
--- a/src/Reflection/Z/JavaNotations.v
+++ b/src/Reflection/Z/JavaNotations.v
@@ -40,18 +40,18 @@ Notation "'(int)' x" := (Op (Cast _ (TWord 5)) (Var x)).
Notation "'M32' & x" := (Op (Cast _ (TWord 6)) (Var x)).
Notation "'(uint128_t)' x" := (Op (Cast _ (TWord 7)) (Var x)).
*)
-Notation "x + y" := (Op (Add) (Pair x y)).
-Notation "x + y" := (Op (Add) (Pair (Var x) y)).
-Notation "x + y" := (Op (Add) (Pair x (Var y))).
-Notation "x + y" := (Op (Add) (Pair (Var x) (Var y))).
-Notation "x - y" := (Op (Sub) (Pair x y)).
-Notation "x - y" := (Op (Sub) (Pair (Var x) y)).
-Notation "x - y" := (Op (Sub) (Pair x (Var y))).
-Notation "x - y" := (Op (Sub) (Pair (Var x) (Var y))).
-Notation "x * y" := (Op (Mul) (Pair x y)).
-Notation "x * y" := (Op (Mul) (Pair (Var x) y)).
-Notation "x * y" := (Op (Mul) (Pair x (Var y))).
-Notation "x * y" := (Op (Mul) (Pair (Var x) (Var y))).
+Notation "x + y" := (Op (Add _) (Pair x y)).
+Notation "x + y" := (Op (Add _) (Pair (Var x) y)).
+Notation "x + y" := (Op (Add _) (Pair x (Var y))).
+Notation "x + y" := (Op (Add _) (Pair (Var x) (Var y))).
+Notation "x - y" := (Op (Sub _) (Pair x y)).
+Notation "x - y" := (Op (Sub _) (Pair (Var x) y)).
+Notation "x - y" := (Op (Sub _) (Pair x (Var y))).
+Notation "x - y" := (Op (Sub _) (Pair (Var x) (Var y))).
+Notation "x * y" := (Op (Mul _) (Pair x y)).
+Notation "x * y" := (Op (Mul _) (Pair (Var x) y)).
+Notation "x * y" := (Op (Mul _) (Pair x (Var y))).
+Notation "x * y" := (Op (Mul _) (Pair (Var x) (Var y))).
(* python:
<<
for opn, op in (('*', 'Mul'), ('+', 'Add'), ('&', 'Land')):
@@ -115,20 +115,18 @@ Notation "x + y" := (Op (Add (TWord 7)) (Pair x (Op (Cast _ (TWord 7)) (Var y)))
Notation "x + y" := (Op (Add (TWord 7)) (Pair (Var x) (Op (Cast _ (TWord 7)) y))).
Notation "x + y" := (Op (Add (TWord 7)) (Pair (Var x) (Op (Cast _ (TWord 7)) (Var y)))).
*)
-Notation "x >>> y" := (Op (Shr) (Pair x y)).
-Notation "x >>> y" := (Op (Shr) (Pair (Var x) y)).
-Notation "x >>> y" := (Op (Shr) (Pair x (Var y))).
-Notation "x >>> y" := (Op (Shr) (Pair (Var x) (Var y))).
-(*
+Notation "x >>> y" := (Op (Shr _) (Pair x y)).
+Notation "x >>> y" := (Op (Shr _) (Pair (Var x) y)).
+Notation "x >>> y" := (Op (Shr _) (Pair x (Var y))).
+Notation "x >>> y" := (Op (Shr _) (Pair (Var x) (Var y))).
Notation "x >>> y" := (Op (Shr _) (Pair x (Op (Cast _ _) y))).
Notation "x >>> y" := (Op (Shr _) (Pair (Var x) (Op (Cast _ _) y))).
Notation "x >>> y" := (Op (Shr _) (Pair x (Op (Cast _ _) (Var y)))).
Notation "x >>> y" := (Op (Shr _) (Pair (Var x) (Op (Cast _ _) (Var y)))).
-*)
-Notation "x & y" := (Op (Land) (Pair x y)).
-Notation "x & y" := (Op (Land) (Pair (Var x) y)).
-Notation "x & y" := (Op (Land) (Pair x (Var y))).
-Notation "x & y" := (Op (Land) (Pair (Var x) (Var y))).
+Notation "x & y" := (Op (Land _) (Pair x y)).
+Notation "x & y" := (Op (Land _) (Pair (Var x) y)).
+Notation "x & y" := (Op (Land _) (Pair x (Var y))).
+Notation "x & y" := (Op (Land _) (Pair (Var x) (Var y))).
(*
Notation "x & y" := (Op (Land (TWord 6)) (Pair (Op (Cast _ (TWord 6)) x) y)).
Notation "x & y" := (Op (Land (TWord 6)) (Pair (Op (Cast _ (TWord 6)) x) (Var y))).