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
6ff83caa
Commit
6ff83caa
authored
10 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Soc2c : do not crash if the soc contains reference to extern types.
parent
5b2ddb82
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/soc2c.ml
+2
-2
2 additions, 2 deletions
src/soc2c.ml
src/socVar.ml
+2
-4
2 additions, 4 deletions
src/socVar.ml
test/lus2lic.sum
+5
-5
5 additions, 5 deletions
test/lus2lic.sum
test/lus2lic.time
+1
-1
1 addition, 1 deletion
test/lus2lic.time
with
10 additions
and
12 deletions
src/soc2c.ml
+
2
−
2
View file @
6ff83caa
(* Time-stamp: <modified the 10/06/2014 (at 1
5:52
) by Erwan Jahier> *)
(* Time-stamp: <modified the 10/06/2014 (at 1
6:01
) by Erwan Jahier> *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
...
@@ -228,7 +228,7 @@ let (type_to_format_string : Data.t -> string) =
...
@@ -228,7 +228,7 @@ let (type_to_format_string : Data.t -> string) =
|
Bool
->
"%d"
|
Bool
->
"%d"
|
Int
->
"%d"
|
Int
->
"%d"
|
Real
->
"%g"
|
Real
->
"%g"
|
Extern
s
->
assert
false
|
Extern
s
->
"%s"
|
Enum
(
s
,
sl
)
->
"%d"
|
Enum
(
s
,
sl
)
->
"%d"
|
Struct
(
sid
,_
)
->
"%s"
|
Struct
(
sid
,_
)
->
"%s"
|
Array
(
ty
,
sz
)
->
"%s"
|
Array
(
ty
,
sz
)
->
"%s"
...
...
This diff is collapsed.
Click to expand it.
src/socVar.ml
+
2
−
4
View file @
6ff83caa
(* Time-stamp: <modified the 10/06/2014 (at 1
1:10
) by Erwan Jahier> *)
(* Time-stamp: <modified the 10/06/2014 (at 1
5:57
) by Erwan Jahier> *)
open
Data
open
Data
...
@@ -23,9 +23,7 @@ and expand_var enum_flag c_access var = match var with
...
@@ -23,9 +23,7 @@ and expand_var enum_flag c_access var = match var with
|
(
vn
,
Struct
(
name
,
fl
))
->
|
(
vn
,
Struct
(
name
,
fl
))
->
expand_profile
enum_flag
c_access
expand_profile
enum_flag
c_access
(
List
.
map
(
fun
(
fn
,
t
)
->
vn
^
(
if
c_access
then
"."
else
"_"
)
^
fn
,
t
)
fl
)
(
List
.
map
(
fun
(
fn
,
t
)
->
vn
^
(
if
c_access
then
"."
else
"_"
)
^
fn
,
t
)
fl
)
|
(
vn
,
Extern
id
)
->
|
(
vn
,
Extern
id
)
->
[
var
]
print_string
"*** Extern node not yet supported, sorry
\n
"
;
flush
stdout
;
assert
false
(* finish me! *)
|
(
vn
,
Alpha
_
)
->
assert
false
(* should not occur *)
|
(
vn
,
Alpha
_
)
->
assert
false
(* should not occur *)
let
(
int_to_enum
:
Data
.
v
->
Soc
.
ident
list
->
Data
.
v
)
=
let
(
int_to_enum
:
Data
.
v
->
Soc
.
ident
list
->
Data
.
v
)
=
...
...
This diff is collapsed.
Click to expand it.
test/lus2lic.sum
+
5
−
5
View file @
6ff83caa
Test Run By jahier on Tue Jun 10 1
5:44:46
2014
Test Run By jahier on Tue Jun 10 1
6:03:22
2014
Native configuration is i686-pc-linux-gnu
Native configuration is i686-pc-linux-gnu
=== lus2lic tests ===
=== lus2lic tests ===
...
@@ -1379,7 +1379,7 @@ PASS: ./lus2lic {-o /tmp/simple.lic should_work/simple.lus}
...
@@ -1379,7 +1379,7 @@ PASS: ./lus2lic {-o /tmp/simple.lic should_work/simple.lus}
PASS: ./lus2lic {-ec -o /tmp/simple.ec should_work/simple.lus}
PASS: ./lus2lic {-ec -o /tmp/simple.ec should_work/simple.lus}
PASS: ./myec2c {-o /tmp/simple.c /tmp/simple.ec}
PASS: ./myec2c {-o /tmp/simple.c /tmp/simple.ec}
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/simple.lus
FAIL: Try to compare lus2lic -exec and ecexe: ../utils/test_lus2lic_no_node should_work/simple.lus
FAIL: Generate c code
: ./lus2lic {-2c should_work/simple.lus -n simple}
PASS
: ./lus2lic {-2c should_work/simple.lus -n simple}
FAIL: Check that the generated C code compiles : gcc simple_simple.c simple_simple_loop.c
FAIL: Check that the generated C code compiles : gcc simple_simple.c simple_simple_loop.c
PASS: ./lus2lic {-o /tmp/func_with_body.lic should_work/func_with_body.lus}
PASS: ./lus2lic {-o /tmp/func_with_body.lic should_work/func_with_body.lus}
PASS: ./lus2lic {-ec -o /tmp/func_with_body.ec should_work/func_with_body.lus}
PASS: ./lus2lic {-ec -o /tmp/func_with_body.ec should_work/func_with_body.lus}
...
@@ -1468,9 +1468,9 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman
...
@@ -1468,9 +1468,9 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman
=== lus2lic Summary ===
=== lus2lic Summary ===
# of expected passes 112
1
# of expected passes 112
2
# of unexpected failures 27
7
# of unexpected failures 27
6
# of unexpected successes 21
# of unexpected successes 21
# of expected failures 37
# of expected failures 37
testcase ./lus2lic.tests/non-reg.exp completed in 1
20
seconds
testcase ./lus2lic.tests/non-reg.exp completed in 1
11
seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
This diff is collapsed.
Click to expand it.
test/lus2lic.time
+
1
−
1
View file @
6ff83caa
testcase ./lus2lic.tests/non-reg.exp completed in 1
20
seconds
testcase ./lus2lic.tests/non-reg.exp completed in 1
11
seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
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