include "joint/Joint_paolo.ma". definition a_acc ≝ it. definition b_acc ≝ it. inductive registers_move: Type[0] ≝ | from_acc: Register → unit → registers_move | to_acc: unit → Register → registers_move | int_to_reg : Register → Byte → registers_move | int_to_acc : unit → Byte → registers_move. inductive ltl_argument : Type[0] ≝ | Reg : Register → ltl_argument | Imm : Byte → ltl_argument. coercion reg_ltl_argument : ∀r : Register.ltl_argument ≝ Reg on _r : Register to ltl_argument. coercion int_ltl_argument : ∀b : Byte.ltl_argument ≝ Imm on _b : Byte to ltl_argument. notation "𝐀" with precedence 90 for @{a_acc}. notation "𝐁" with precedence 90 for @{b_acc}. inductive ltl_lin_seq : Type[0] ≝ | SAVE_CARRY : ltl_lin_seq | RESTORE_CARRY : ltl_lin_seq. definition ltl_lin_params : unserialized_params ≝ mk_unserialized_params (mk_step_params (* acc_a_reg ≝ *) unit (* acc_b_reg ≝ *) unit (* acc_a_arg ≝ *) unit (* acc_b_arg ≝ *) unit (* dpl_reg ≝ *) unit (* dph_reg ≝ *) unit (* dpl_arg ≝ *) unit (* dph_arg ≝ *) unit (* snd_arg ≝ *) ltl_argument (* pair_move ≝ *) registers_move (* call_args ≝ *) ℕ (* call_dest ≝ *) unit (* ext_seq ≝ *) ltl_lin_seq (* ext_call ≝ *) void (* ext_tailcall ≝ *) void ) (mk_local_params (mk_funct_params (* resultT ≝ *) unit (* paramsT ≝ *) unit) (* localsT ≝ *) void). interpretation "from accumulator" 'mov a b = (MOVE ?? (from_acc a b)). interpretation "to accumulator" 'mov a b = (MOVE ?? (to_acc a b)). interpretation "int to register" 'mov a b = (MOVE ?? (int_to_reg a b)). interpretation "int to accumulator" 'mov a b = (MOVE ?? (int_to_acc a b)). definition nat_to_byte : ℕ → Byte ≝ nat_to_bv 8. coercion nat_as_byte : ∀n : ℕ.Byte ≝ nat_to_byte on _n : ℕ to Byte.