include "joint/Joint.ma". inductive rtl_seq : Type[0] ≝ | rtl_stack_address: register → register → rtl_seq. definition RTL_uns ≝ λhas_tailcalls.mk_unserialized_params (* acc_a_reg ≝ *) register (* acc_b_reg ≝ *) register (* acc_a_arg ≝ *) psd_argument (* acc_b_arg ≝ *) psd_argument (* dpl_reg ≝ *) register (* dph_reg ≝ *) register (* dpl_arg ≝ *) psd_argument (* dph_arg ≝ *) psd_argument (* snd_arg ≝ *) psd_argument (* pair_move ≝ *) (register × psd_argument) (* call_args ≝ *) (list psd_argument) (* call_dest ≝ *) (list register) (* ext_seq ≝ *) rtl_seq (* ext_seq_labels ≝ *) (λ_.[]) (* has_tailcalls ≝ *) has_tailcalls (* paramsT ≝ *) (list register). definition RTL ≝ mk_graph_params (RTL_uns true). definition rtl_program ≝ joint_program RTL. interpretation "move" 'mov r a = (MOVE RTL ? (mk_Prod ? psd_argument r a)). (* aid unification *) include "hints_declaration.ma". unification hint 0 ≔ (*---------------*) ⊢ acc_a_reg RTL ≡ register. unification hint 0 ≔ (*---------------*) ⊢ acc_b_reg RTL ≡ register. unification hint 0 ≔ (*---------------*) ⊢ acc_a_arg RTL ≡ psd_argument. unification hint 0 ≔ (*---------------*) ⊢ acc_b_arg RTL ≡ psd_argument. unification hint 0 ≔ (*---------------*) ⊢ dpl_reg RTL ≡ register. unification hint 0 ≔ (*---------------*) ⊢ dph_reg RTL ≡ register. unification hint 0 ≔ (*---------------*) ⊢ dpl_arg RTL ≡ psd_argument. unification hint 0 ≔ (*---------------*) ⊢ dph_arg RTL ≡ psd_argument. unification hint 0 ≔ (*---------------*) ⊢ snd_arg RTL ≡ psd_argument. unification hint 0 ≔ (*---------------*) ⊢ pair_move RTL ≡ register × psd_argument. unification hint 0 ≔ (*---------------*) ⊢ call_args RTL ≡ list psd_argument. unification hint 0 ≔ (*---------------*) ⊢ call_dest RTL ≡ list register. unification hint 0 ≔ (*---------------*) ⊢ ext_seq RTL ≡ rtl_seq. coercion reg_to_rtl_snd_argument : ∀r : register.snd_arg RTL ≝ psd_argument_from_reg on _r : register to snd_arg RTL. coercion byte_to_rtl_snd_argument : ∀b : Byte.snd_arg RTL ≝ psd_argument_from_byte on _b : Byte to snd_arg RTL. (************ Same without tail calls ****************) definition RTL_ntc ≝ mk_graph_params (RTL_uns false). definition rtl_ntc_program ≝ joint_program RTL_ntc.