Changeset 2823 for src/joint


Ignore:
Timestamp:
Mar 8, 2013, 3:51:18 PM (7 years ago)
Author:
tranquil
Message:
  • corrected bug in ERTL semantics (both delframe and newframe did the same operation on the stack pointer...)
  • split RTL semantics in two (one with multiple stack spaces per call, one with only one for all)
  • joint_if_entry is not required anymore to be in the code (as it is covered by entry_costed in good_if)
  • temporarily replaced the two biggest proofs of linearise by daemons
Location:
src/joint
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/joint/Joint.ma

    r2808 r2823  
    479479    (that are already on stack in the front end) *)
    480480  joint_if_code     : codeT p globals ;
    481   joint_if_entry : Σpt.bool_to_Prop (code_has_point … joint_if_code pt) (*;
     481  joint_if_entry : code_point p (* Paolo: condition entry ∈ code is ensured by good_if ;
    482482  joint_if_exit : Σpt.bool_to_Prop (code_has_point … joint_if_code pt) *)
    483483}.
     
    523523          Some … (sequential … (COST_LABEL … l) nxt)
    524524; entry_unused :
    525   let entry ≝ pi1 … (joint_if_entry … def) in
     525  let entry ≝ joint_if_entry … def in
    526526  let code ≝ joint_if_code … def in
    527527  forall_statements_i …
     
    555555       (joint_if_local_stacksize … int_fun)
    556556      graph entry (*exit*).
    557 
    558 definition set_joint_if_graph ≝
    559   λglobals.λpars : graph_params.
    560   λgraph.
    561   λp:joint_internal_function pars globals.
    562   λentry_prf.
    563   (*λexit_prf.*)
    564     set_joint_code globals pars p
    565       graph
    566       (mk_Sig ?? (joint_if_entry ?? p) entry_prf)
    567       (*(mk_Sig … (joint_if_exit ?? p) exit_prf)*).
    568557
    569558definition set_luniverse ≝
     
    594583     (joint_if_params … p) (joint_if_stacksize … p) (joint_if_local_stacksize … p)
    595584     code
    596      (pi1 … (joint_if_entry … p))
     585     (joint_if_entry … p)
    597586     (*(pi1 … (joint_if_exit … p))*).
    598 >graph_code_has_point whd in match code; >mem_set_add
    599 @orb_Prop_r elim (joint_if_entry ???)
    600 #x #H <graph_code_has_point @H
    601 qed.
    602587
    603588definition joint_function ≝ λp,globals. fundef (joint_closed_internal_function p globals).
  • src/joint/TranslateUtils.ma

    r2808 r2823  
    502502; ss_def_out_eq :
    503503           joint_if_stacksize … def_out = init_stack_size … data
    504 ; entry_eq :
    505           pi1 … (joint_if_entry … def_out) = pi1 … (joint_if_entry … def_in)
     504; entry_eq : joint_if_entry … def_out = joint_if_entry … def_in
    506505; partition_lbls : partial_partition … f_lbls
    507506; partition_regs : partial_partition … f_regs
     
    573572    (joint_if_local_stacksize … def)
    574573    (add ?? (empty_map ? (joint_statement ??)) entry (RETURN …))
    575     («pi1 … entry, mem_set_add_id …») in
     574    entry in
    576575  let f : label → joint_statement (src_g_pars : params) globals →
    577576    joint_internal_function dst_g_pars globals → joint_internal_function dst_g_pars globals ≝
  • src/joint/linearise.ma

    r2808 r2823  
    237237    ] n_prf
    238238  ] (chop_ok ? (λx.x∈visited) visiting).
    239 (* cases daemon *)
     239cases daemon (*)
    240240whd
    241241[ (* base case, visiting is all visited *)
     
    518518|
    519519]
    520 (**)
     520*)
    521521qed.
    522522
     
    705705| >commutative_plus change with (? ≤ |g|) %
    706706]
    707 (* cases daemon *)
     707cases daemon (*)
    708708**
    709709#visited #required #generated normalize nodelta ****
     
    813813  ]
    814814]
    815 (**)
     815*)
    816816qed.
    817817
     
    846846  let code ≝ \fst code_sigma in
    847847  let sigma ≝ \snd code_sigma in
    848   let entry : Σpt.bool_to_Prop (code_has_point … code pt) ≝ «0, hide_prf ??» in
    849848  «〈«mk_joint_internal_function (mk_lin_params p) globals
    850849   (joint_if_luniverse ?? f_sig) (joint_if_runiverse ?? f_sig)
    851850   (joint_if_result ?? f_sig) (joint_if_params ?? f_sig)
    852851   (joint_if_stacksize ?? f_sig) (joint_if_local_stacksize ?? f_sig)
    853    code entry (* exit is dummy! *), hide_prf ??»,
     852   code 0 (* exit is dummy! *), hide_prf ??»,
    854853   sigma〉, proj1 ?? (pi2 ?? code_sigma)».
     854cases daemon (*)
    855855[2: whd in match code; cases code_sigma -code_sigma * #code #sigma
    856856  normalize nodelta *** #H3 #H4 #H5
     
    877877  ]
    878878]
     879*)
    879880qed.
    880881
Note: See TracChangeset for help on using the changeset viewer.