Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
verimag
synchrone
lutin
Commits
ccb8b62b
Commit
ccb8b62b
authored
Jul 03, 2019
by
erwan
Browse files
Fix: variables contraint to a value at declaration were buggy (close
#2
)
cf example/Bug/freevar.lut node ko
parent
e53b6f05
Pipeline
#26584
passed with stages
in 9 minutes and 43 seconds
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
examples/Bug/freevar.lut
View file @
ccb8b62b
-- ok works fine, but not ko:
node
ko
()
returns
(
b
:
int
[
0
;
0
];
a
:
int
)
=
a
=
b
node
ok
()
returns
(
a
:
int
[
0
;
0
];
b
:
int
)
=
a
=
b
\ No newline at end of file
node
ok
()
returns
(
a
:
int
[
0
;
0
];
b
:
int
)
=
a
=
b
lutin/src/ne.ml
View file @
ccb8b62b
...
...
@@ -106,8 +106,8 @@ let (substl_to_string : subst list -> string) =
fun
sl
->
(
List
.
fold_left
(
fun
acc
((
vn
,
a
)
,
ne
)
->
(
acc
^
" "
^
(
Value
.
num_value_to_string
a
)
^
"."
^
vn
^
" -> "
^
to_string
ne
^
"
\n
"
)
(
acc
^
" "
^
(
Value
.
num_value_to_string
a
)
^
"."
^
vn
^
" -> "
^
to_string
ne
^
"
\n
"
)
)
""
sl
...
...
@@ -369,7 +369,7 @@ let (split : t -> split_res) =
let
divide
c1
c2
=
match
(
c1
,
c2
)
with
|
I
i1
,
I
i2
->
Num
.
eq_num
(
Num
.
mod_num
i2
i1
)
(
Num
.
Int
0
)
|
_
,_
->
true
|
_
,
_
->
assert
false
(* used to be "true" instead, but it looked weird! *)
in
let
cl
=
(
StringMap
.
fold
(
fun
v
c
acc
->
(
c
,
v
)
::
acc
)
ne
[]
)
in
let
res
=
...
...
lutin/src/store.ml
View file @
ccb8b62b
This diff is collapsed.
Click to expand it.
erwan
@jahier
mentioned in commit
9714d85a
·
Jul 11, 2019
mentioned in commit
9714d85a
mentioned in commit 9714d85abfb64decb4aeb8f26967fca6462e09fa
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment