include "LIN/joint_LTL_LIN.ma". definition LTL ≝ mk_graph_params LTL_LIN. (* aid unification *) unification hint 0 ≔ (*---------------*) ⊢ acc_a_reg LTL ≡ unit. unification hint 0 ≔ (*---------------*) ⊢ acc_a_arg LTL ≡ unit. unification hint 0 ≔ (*---------------*) ⊢ acc_b_reg LTL ≡ unit. unification hint 0 ≔ (*---------------*) ⊢ acc_a_arg LTL ≡ unit. unification hint 0 ≔ (*---------------*) ⊢ snd_arg LTL ≡ hdw_argument. unification hint 0 ≔ (*---------------*) ⊢ ext_seq LTL ≡ ltl_lin_seq. unification hint 0 ≔ (*---------------*) ⊢ pair_move LTL ≡ registers_move. definition ltl_program ≝ joint_program LTL. unification hint 0 ≔ ⊢ ltl_program ≡ joint_program LTL. coercion byte_to_ltl_argument : ∀b: Byte.snd_arg LTL ≝ hdw_argument_from_byte on _b : Byte to snd_arg LTL. coercion reg_to_ltl_argument : ∀r: Register.snd_arg LTL ≝ hdw_argument_from_reg on _r : Register to snd_arg LTL. definition LTL_premain : ∀p : ltl_program. joint_closed_internal_function LTL (prog_names … p) ≝ λp. let l1 : label ≝ an_identifier … one in let l2 : label ≝ an_identifier … (p0 one) in let l3 : label ≝ an_identifier … (p1 one) in let res ≝ mk_joint_internal_function LTL (prog_names … p) (mk_universe … (p0 (p0 one))) (mk_universe … one) it it 0 0 (empty_map …) l1 in (* todo: args for main? *) let res ≝ add_graph … l1 (sequential … (COST_LABEL … (init_cost_label … p)) l2) res in let res ≝ add_graph … l2 (sequential … (CALL LTL ? (inl … (prog_main … p)) 0 it) l3) res in let res ≝ add_graph … l3 (GOTO ? l3) res in res. % [ ** [2,3: * [2,3,5,6: #p ]] #s whd in ⊢ (??%?→?); #EQ destruct % [1,3,5: %{I} % whd in ⊢ (??%(??%)→?); #EQ destruct |2: % |4,6: % whd in ⊢ (??%%→?); #EQ destruct ] | ** [2,3: * [2,3,5,6: #p ]] #s whd in ⊢ (??%?→?); #EQ destruct % try @I %{I I} | ** [2,3: * [2,3,5,6: #p ]] * whd whd in ⊢ (?%%); // | ** [2,3: * [2,3,5,6: #p ]] #s whd in ⊢ (??%%→?); #EQ destruct @I | %{l2} %{(init_cost_label … p)} % ] qed.