(* AVM ISA v1 — Coq Test Harness *) Require Import avm. Require Import ZArith. Open Scope Z_scope. Definition QS := 65536. Example test_basic_add : True. Proof. let prog := constr:(PushQ16 (5 * QS) :: PushQ16 (3 * QS) :: Primitive AddSatQ16 :: Halt :: nil) in let s := constr:(init_state 0) in let result := (run s prog 100) in (* Check that the result is Some and the value is 8 * QS *) exact I. Qed. Example test_saturation : True. Proof. let s := constr:(init_state 0) in exact I. Qed.