| 1 |
Require Import Rupicola.Lib.Api. |
| 2 |
Require Import Crypto.Arithmetic.PrimeFieldTheorems. |
| 3 |
Require Import Crypto.Bedrock.Specs.Field. |
| 4 |
|
| 5 |
Section Gallina. |
| 6 |
Definition point {field_parameters : FieldParameters} : Type |
| 7 |
:= (F M_pos * F M_pos). |
| 8 |
End Gallina. |
| 9 |
|
| 10 |
Section Compile. |
| 11 |
Context {width: Z} {BW: Bitwidth width} {word: word.word width} {mem: map.map word Byte.byte}. |
| 12 |
Context {locals: map.map String.string word}. |
| 13 |
Context {ext_spec: bedrock2.Semantics.ExtSpec}. |
| 14 |
Context {word_ok : word.ok word} {mem_ok : map.ok mem}. |
| 15 |
Context {locals_ok : map.ok locals}. |
| 16 |
Context {ext_spec_ok : Semantics.ext_spec.ok ext_spec}. |
| 17 |
Context {field_parameters : FieldParameters} |
| 18 |
{field_representation : FieldRepresentation}. |
| 19 |
|
| 20 |
(* TODO: uses removed notation. |
| 21 |
Find out whether anything still uses this file |
| 22 |
Lemma compile_point_assign : |
| 23 |
forall (l: locals) (mem: mem) |
| 24 |
(locals_ok : locals -> Prop) |
| 25 |
tr retvars R functions T (pred: T -> _ -> _ -> Prop) |
| 26 |
(x y : F M_pos) k k_impl, |
| 27 |
let v := (x, y) in |
| 28 |
(let _ := 0 in (* placeholder *) |
| 29 |
find k_impl |
| 30 |
implementing (pred (dlet x |
| 31 |
(fun x => dlet y |
| 32 |
(fun y => k (x, y))))) |
| 33 |
and-returning retvars |
| 34 |
and-locals-post locals_ok |
| 35 |
with-locals l and-memory mem and-trace tr and-rest R |
| 36 |
and-functions functions) -> |
| 37 |
(let head := v in |
| 38 |
find k_impl |
| 39 |
implementing (pred (dlet head k)) |
| 40 |
and-returning retvars |
| 41 |
and-locals-post locals_ok |
| 42 |
with-locals l and-memory mem and-trace tr and-rest R |
| 43 |
and-functions functions). |
| 44 |
Proof. |
| 45 |
repeat straightline'. eauto. |
| 46 |
Qed. |
| 47 |
*) |
| 48 |
End Compile. |