Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
c22edbc5
Commit
c22edbc5
authored
10 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to control whether or not structured type should be expanded.
parent
f8130603
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lus2licRun.ml
+13
-7
13 additions, 7 deletions
src/lus2licRun.ml
src/lv6MainArgs.ml
+8
-1
8 additions, 1 deletion
src/lv6MainArgs.ml
src/lv6MainArgs.mli
+1
-0
1 addition, 0 deletions
src/lv6MainArgs.mli
with
22 additions
and
8 deletions
src/lus2licRun.ml
+
13
−
7
View file @
c22edbc5
(* Time-stamp: <modified the
15
/0
1
/2015 (at
13:43
) by Erwan Jahier> *)
(* Time-stamp: <modified the
27
/0
2
/2015 (at
09:50
) by Erwan Jahier> *)
(*-----------------------------------------------------------------------
(*-----------------------------------------------------------------------
** Copyright (C) - Verimag.
** Copyright (C) - Verimag.
*)
*)
...
@@ -42,12 +42,18 @@ let make argv =
...
@@ -42,12 +42,18 @@ let make argv =
)
)
in
in
let
soc
=
try
Soc
.
SocMap
.
find
sk
soc_tbl
with
Not_found
->
assert
false
in
let
soc
=
try
Soc
.
SocMap
.
find
sk
soc_tbl
with
Not_found
->
assert
false
in
let
soc_outputs
=
(
SocVar
.
expand_profile
true
false
(
snd
soc
.
profile
))
in
let
soc_inputs
,
soc_outputs
=
soc
.
profile
in
let
(
vntl_i
:
Data
.
vntl
)
=
(
fst
soc
.
profile
)
in
let
soc_inputs
,
soc_outputs
=
if
opt
.
Lv6MainArgs
.
expand_io_type
then
let
(
vntl_o
:
Data
.
vntl
)
=
(
snd
soc
.
profile
)
in
(
SocVar
.
expand_profile
true
false
(
fst
soc
.
profile
))
,
(* Lv6util.dump_entete oc; *)
(
SocVar
.
expand_profile
true
false
(
snd
soc
.
profile
))
(* RifIO.write_interface oc vntl_i vntl_o None None; *)
else
(* RifIO.flush oc; *)
soc_inputs
,
soc_outputs
in
let
(
vntl_i
:
Data
.
vntl
)
=
soc_inputs
in
let
(
vntl_o
:
Data
.
vntl
)
=
soc_outputs
in
(* Lv6util.dump_entete oc; *)
(* RifIO.write_interface oc vntl_i vntl_o None None; *)
(* RifIO.flush oc; *)
let
(
to_soc_subst
:
SocExecValue
.
ctx
->
Soc
.
var
list
->
Data
.
subst
list
)
=
let
(
to_soc_subst
:
SocExecValue
.
ctx
->
Soc
.
var
list
->
Data
.
subst
list
)
=
fun
ctx
vl
->
fun
ctx
vl
->
...
...
This diff is collapsed.
Click to expand it.
src/lv6MainArgs.ml
+
8
−
1
View file @
c22edbc5
(* Time-stamp: <modified the 2
6
/02/2015 (at 09:
52
) by Erwan Jahier> *)
(* Time-stamp: <modified the 2
7
/02/2015 (at 09:
19
) by Erwan Jahier> *)
(*
(*
Le manager d'argument adapt de celui de lutin, plus joli
Le manager d'argument adapt de celui de lutin, plus joli
N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global,
N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global,
...
@@ -30,6 +30,7 @@ type t = {
...
@@ -30,6 +30,7 @@ type t = {
mutable
expand_nodes
:
bool
;
mutable
expand_nodes
:
bool
;
mutable
expand_node_call
:
string
list
;
mutable
expand_node_call
:
string
list
;
mutable
expand_arrays
:
bool
;
mutable
expand_arrays
:
bool
;
mutable
expand_io_type
:
bool
;
mutable
optim_ite
:
bool
;
mutable
optim_ite
:
bool
;
mutable
gen_autotest
:
bool
;
mutable
gen_autotest
:
bool
;
mutable
oc
:
Pervasives
.
out_channel
;
mutable
oc
:
Pervasives
.
out_channel
;
...
@@ -91,6 +92,7 @@ let (make_opt : unit -> t) =
...
@@ -91,6 +92,7 @@ let (make_opt : unit -> t) =
expand_nodes
=
false
;
expand_nodes
=
false
;
expand_node_call
=
[]
;
expand_node_call
=
[]
;
expand_arrays
=
false
;
expand_arrays
=
false
;
expand_io_type
=
false
;
optim_ite
=
false
;
optim_ite
=
false
;
gen_autotest
=
false
;
gen_autotest
=
false
;
(** the output channel *)
(** the output channel *)
...
@@ -284,6 +286,11 @@ let mkoptab (opt:t) : unit = (
...
@@ -284,6 +286,11 @@ let mkoptab (opt:t) : unit = (
(
Arg
.
Unit
(
fun
_
->
opt
.
expand_nodes
<-
true
))
(
Arg
.
Unit
(
fun
_
->
opt
.
expand_nodes
<-
true
))
[
"Expand all node calls in the main node."
]
[
"Expand all node calls in the main node."
]
;
;
mkopt
opt
[
"-en"
;
"--expand-io-type"
]
(
Arg
.
Unit
(
fun
_
->
opt
.
expand_io_type
<-
true
))
[
"Expand structured types of the main node (impact the simulation only)."
]
;
mkopt
opt
mkopt
opt
[
"-enc"
;
"---expand-node-call"
]
[
"-enc"
;
"---expand-node-call"
]
~
arg
:
" <string> "
~
arg
:
" <string> "
...
...
This diff is collapsed.
Click to expand it.
src/lv6MainArgs.mli
+
1
−
0
View file @
c22edbc5
...
@@ -31,6 +31,7 @@ type t = {
...
@@ -31,6 +31,7 @@ type t = {
mutable
expand_nodes
:
bool
;
mutable
expand_nodes
:
bool
;
mutable
expand_node_call
:
string
list
;
mutable
expand_node_call
:
string
list
;
mutable
expand_arrays
:
bool
;
mutable
expand_arrays
:
bool
;
mutable
expand_io_type
:
bool
;
mutable
optim_ite
:
bool
;
mutable
optim_ite
:
bool
;
mutable
gen_autotest
:
bool
;
mutable
gen_autotest
:
bool
;
mutable
oc
:
Pervasives
.
out_channel
;
mutable
oc
:
Pervasives
.
out_channel
;
...
...
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