source: src/RTLabs/RTLabsToRTLAxiom.ma @ 3096

Last change on this file since 3096 was 3096, checked in by tranquil, 7 years ago

preliminary work on closing correctness.ma

File size: 2.1 KB
Line 
1(**************************************************************************)
2(*       ___                                                              *)
3(*      ||M||                                                             *)
4(*      ||A||       A project by Andrea Asperti                           *)
5(*      ||T||                                                             *)
6(*      ||I||       Developers:                                           *)
7(*      ||T||         The HELM team.                                      *)
8(*      ||A||         http://helm.cs.unibo.it                             *)
9(*      \   /                                                             *)
10(*       \ /        This file is distributed under the terms of the       *)
11(*        v         GNU General Public License Version 2                  *)
12(*                                                                        *)
13(**************************************************************************)
14
15include "RTLabs/RTLabsToRTL.ma".
16include "common/StatusSimulation.ma".
17include "joint/Traces.ma".
18include "RTLabs/RTLabs_abstract.ma".
19include "RTL/RTL_semantics.ma".
20include "RTLabs/MeasurableToStructured.ma". (* for make_ext_initial_state *)
21
22definition RTLabsToRTLstacksizes_ok : (ident → option ℕ) → RTLabs_program → Prop ≝
23λstack_sizes,p.
24All …
25  (λi_f.let 〈i, f〉 ≝ i_f in
26    match f with
27    [ External _ ⇒ True
28    | Internal def ⇒
29      ∃sz.stack_sizes i = Some ? sz ∧ f_stacksize … def ≤ sz
30    ]) (prog_funct … p).
31
32axiom RTLabsToRTL_ok :
33∀stacksizes : ident → option ℕ.
34∀cost.
35∀p_in : RTLabs_program.
36RTLabsToRTLstacksizes_ok stacksizes p_in →
37let p_out ≝ rtlabs_to_rtl cost p_in in
38∀init_in.make_ext_initial_state p_in = OK … init_in →
39∃init_out : state_pc RTL_semantics_separate.
40  make_initial_state
41   (mk_prog_params RTL_semantics_separate p_out stacksizes) =
42    OK ? init_out ∧
43∃[1] R.
44  status_simulation_with_init
45    (RTLabs_status (make_global … p_in))
46    (joint_status RTL_semantics_separate p_out stacksizes) R
47    init_in init_out.
Note: See TracBrowser for help on using the repository browser.