Revision eb70bae5
Added by Christophe Garion about 7 years ago
src/tools/stateflow/semantics/cPS.ml | ||
---|---|---|
1 |
open Basetypes
|
|
1 |
open Basetypes |
|
2 | 2 |
open Datatype |
3 | 3 |
open CPS_transformer |
4 |
open Theta
|
|
4 |
open Theta |
|
5 | 5 |
|
6 | 6 |
module Semantics = functor (T: TransformerType) (M: MODEL_T) -> |
7 | 7 |
struct |
8 |
|
|
8 |
|
|
9 | 9 |
module Prog = |
10 | 10 |
struct |
11 |
let init, defs, state_vars =
|
|
12 |
let (init, defs, globals) = M.model in |
|
11 |
let init, defs, state_vars = |
|
12 |
let Program (init, defs, globals) = M.model in
|
|
13 | 13 |
let state_vars = SF.states M.model in |
14 | 14 |
init, defs, state_vars |
15 |
|
|
15 |
|
|
16 | 16 |
(*let _ = Format.printf "Model definitions@.%a@.####" Simulink.pp_src defs; () *) |
17 | 17 |
end |
18 | 18 |
|
... | ... | |
35 | 35 |
let module Thetaify = KenvTheta.ModularThetaify (Tables) (Modularity) in |
36 | 36 |
let module EvalProg = Interp.Evaluation (Thetaify) (Prog) in |
37 | 37 |
(module EvalProg: Interp.EvaluationType) |
38 |
|
|
38 |
|
|
39 | 39 |
let compute modular = |
40 | 40 |
let module Eval = (val (eval modular)) in |
41 |
Eval.eval_prog
|
|
42 |
|
|
41 |
Eval.eval_prog |
|
42 |
|
|
43 | 43 |
let code_gen modular = |
44 | 44 |
let module Eval = (val (eval modular)) in |
45 | 45 |
let principal, components = Eval.eval_prog, Eval.eval_components in |
Also available in: Unified diff
parser-json: final version of parser with new types