Changeset 1246 for src/LIN/LIN.ma
- Timestamp:
- Sep 22, 2011, 2:50:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/LIN/LIN.ma
r1236 r1246 1 1 include "joint/Joint.ma". 2 include "utilities/lists.ma". 2 3 3 definition lin_params : params≝4 mk_params (mk_params_ unit unit unit unit registers_move Register False unit unit unit) unit.4 definition lin_params_: params_ ≝ 5 mk_params_ (mk_params__ unit unit unit unit registers_move Register False unit unit unit) unit. 5 6 6 definition lin_statement ≝ joint_statement lin_params.7 definition pre_lin_statement ≝ joint_statement lin_params_. 7 8 8 9 definition well_formed_P ≝ … … 16 17 | None ⇒ True]]. 17 18 18 (* 19 definition lin_sem_params_: ∀globals. sem_params_ lin_params globals ≝ 19 definition lin_statement ≝ λglobals.(option label) × (pre_lin_statement globals). 20 21 (*CSC: move elsewhere, also in joint/semantics.ma *) 22 definition pi1: ∀A.∀P:A → Prop. (Σx:A. P x) → A ≝ 23 λA,P,c. match c with [ dp w _ ⇒ w ]. 24 coercion pi1: ∀A.∀P:A → Prop.∀p:(Σx:A. P x).A ≝ pi1 on _p:Σx:?.? to ?. 25 26 definition lin_params: ∀globals. params globals ≝ 20 27 λglobals. 21 mk_sem_params_ lin_params globals (Σcode:list (lin_statement globals). well_formed_P … code) ?. 22 (*CSC: lookup function to be implemented *) 23 cases daemon 24 qed. 25 *) 28 mk_params globals lin_params_ (Σcode:list (lin_statement globals). well_formed_P … code) 29 (λcode:Σcode.?. λl. 30 find ?? (λs. let 〈l',x〉 ≝ s in 31 match l' with [ None ⇒ None … | Some l'' ⇒ if eq_identifier … l l'' then Some … x else None ?]) code). 26 32 27 33 definition lin_program ≝ joint_program lin_params.
Note: See TracChangeset
for help on using the changeset viewer.