Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
95d13330
Commit
95d13330
authored
3 years ago
by
Pierre Loic Garoche
Browse files
Options
Downloads
Patches
Plain Diff
lustresf: change in model signature
parent
293f2afd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/tools/stateflow/models/model_stopwatch.ml
+15
-11
15 additions, 11 deletions
src/tools/stateflow/models/model_stopwatch.ml
src/tools/stateflow/sf_sem.ml
+1
-1
1 addition, 1 deletion
src/tools/stateflow/sf_sem.ml
with
16 additions
and
12 deletions
src/tools/stateflow/models/model_stopwatch.ml
+
15
−
11
View file @
95d13330
...
...
@@ -249,17 +249,21 @@ let model =
let
globals
=
let
int_typ
=
Corelang
.
mktyp
Location
.
dummy_loc
Lustre_types
.
Tydec_int
in
List
.
map
(
fun
k
->
Corelang
.
mkvar_decl
Location
.
dummy_loc
(
k
,
(* name *)
int_typ
,
(* type *)
Corelang
.
dummy_clock_dec
,
(* clock *)
false
,
(* not a constant *)
None
,
(* no default value *)
None
(* no parent known *)
)
,
(* Default value is zero *)
Corelang
.
mkexpr
Location
.
dummy_loc
(
Lustre_types
.
Expr_const
(
Lustre_types
.
Const_int
0
))
let
vdecl
=
Corelang
.
mkvar_decl
Location
.
dummy_loc
(
k
,
(* name *)
int_typ
,
(* type *)
Corelang
.
dummy_clock_dec
,
(* clock *)
false
,
(* not a constant *)
None
,
(* no default value *)
None
(* no parent known *)
)
in
let
init_val
=
(* Default value is zero *)
Corelang
.
mkexpr
Location
.
dummy_loc
(
Lustre_types
.
Expr_const
(
Lustre_types
.
Const_int
0
))
in
{
GlobalVarDef
.
variable
=
vdecl
;
init_val
=
init_val
;
}
)
[
"cent"
;
...
...
This diff is collapsed.
Click to expand it.
src/tools/stateflow/sf_sem.ml
+
1
−
1
View file @
95d13330
...
...
@@ -64,7 +64,7 @@ let _ =
let
module
Model
=
(
val
model
)
in
let
state_vars
=
Datatype
.
SF
.
states
Model
.
model
in
let
global_vars
=
List
.
map
(
fun
(
v
,
e
)
->
{
Basetypes
.
GlobalVarDef
.
variable
=
v
;
init_val
=
e
;})
(*
List.map (fun (v,e) -> {Basetypes.GlobalVarDef.variable = v; init_val = e;})
*)
(
Datatype
.
SF
.
global_vars
Model
.
model
)
in
let
module
T
=
CPS_lustre_generator
.
LustrePrinter
(
struct
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment