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
c6227cfb
Commit
c6227cfb
authored
16 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Split structures appearing inside expressions int the
"one_op_per_equation" mode.
parent
f1cbf548
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/split.ml
+21
-2
21 additions, 2 deletions
src/split.ml
src/test/test.res.exp
+224
-179
224 additions, 179 deletions
src/test/test.res.exp
with
245 additions
and
181 deletions
src/split.ml
+
21
−
2
View file @
c6227cfb
(** Time-stamp: <modified the 20/11/2008 (at 1
0:47
) by Erwan Jahier> *)
(** Time-stamp: <modified the 20/11/2008 (at 1
4:32
) by Erwan Jahier> *)
open
Lxm
...
...
@@ -143,6 +143,7 @@ and (split_val_exp : bool -> Eff.local_env -> Eff.val_exp -> Eff.val_exp * split
->
ve
,
([]
,
[]
)
|
CallByNameEff
(
by_name_op_eff
,
fl
)
->
let
lxm
=
by_name_op_eff
.
src
in
let
fl
,
eql
,
vl
=
List
.
fold_left
(
fun
(
fl_acc
,
eql_acc
,
vl_acc
)
(
fn
,
fv
)
->
...
...
@@ -152,8 +153,26 @@ and (split_val_exp : bool -> Eff.local_env -> Eff.val_exp -> Eff.val_exp * split
([]
,
[]
,
[]
)
fl
in
CallByNameEff
(
by_name_op_eff
,
List
.
rev
fl
)
,
(
eql
,
vl
)
let
rhs
=
CallByNameEff
(
by_name_op_eff
,
List
.
rev
fl
)
in
if
top_level
then
rhs
,
(
eql
,
vl
)
else
(* create the var for the current call *)
let
clk_l
=
EvalClock
.
get_val_exp_eff
ve
in
let
typ_l
=
EvalType
.
val_exp_eff
ve
in
let
nv_l
=
List
.
map2
(
new_var
node_env
)
typ_l
clk_l
in
let
nve
=
match
nv_l
with
|
[
nv
]
->
CallByPosEff
(
Lxm
.
flagit
(
Eff
.
IDENT
(
Ident
.
to_idref
nv
.
var_name_eff
))
lxm
,
OperEff
[]
)
|
_
->
assert
false
in
let
lpl
=
List
.
map
(
fun
nv
->
LeftVarEff
(
nv
,
lxm
))
nv_l
in
let
eq
=
Lxm
.
flagit
(
lpl
,
rhs
)
lxm
in
nve
,
(
eql
@
[
eq
]
,
vl
@
nv_l
)
|
CallByPosEff
(
by_pos_op_eff
,
OperEff
vel
)
->
(* recursively split the arguments *)
...
...
This diff is collapsed.
Click to expand it.
src/test/test.res.exp
+
224
−
179
View file @
c6227cfb
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