Changeset 1383 for src/LIN/semantics.ma


Ignore:
Timestamp:
Oct 15, 2011, 12:13:23 AM (8 years ago)
Author:
sacerdot
Message:

Potential bug fixed and bug found: the way pointers and labels are put in
bijection must be different between LIN and graph-like languages (bug fixed).
Moreover, in both cases it must be possible to retrieve the function from the
address and the easiest (only?) way to do that is to use the block of the
address to store the block of the function, and put the offsets in bijection
with labels/offsets, preventing pointer mangling since the pointer is in
the Code region (found, to be fixed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/LIN/semantics.ma

    r1382 r1383  
    55 λ_.λaddr. addr_add addr 1.
    66
    7 (*CSC: XXXXXXXXXX *)
    8 axiom lin_fetch_statement: ∀globals. genv … (lin_params globals) → state (ltl_lin_sem_params … lin_succ_pc) → res (pre_lin_statement globals).
     7axiom lin_pointer_of_label: label → Σp:pointer. ptype p = Code.
    98
    10 definition lin_fullexec ≝ ltl_lin_fullexec … lin_succ_pc … lin_fetch_statement.
     9axiom NotFound: String.
     10axiom lin_fetch_statement:
     11 ∀globals. genv … (lin_params globals) → state (ltl_lin_sem_params … lin_succ_pc lin_pointer_of_label) → res (pre_lin_statement globals).(* ≝
     12 λglobals,ge,st.
     13  let pc ≝ pc … st in
     14 ?.
     15  let fn ≝ ? in
     16  opt_to_res ? [MSG NotFound] (lookup … (lin_params …) (joint_if_code … fn) ?(*label???*)).
     17*)
     18
     19definition lin_fullexec ≝ ltl_lin_fullexec … lin_succ_pc lin_pointer_of_label … lin_fetch_statement.
Note: See TracChangeset for help on using the changeset viewer.