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
ad005c3c
Commit
ad005c3c
authored
10 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Soc2c : print "_true" instead of "true" for true constant (ditto for false).
test: 238->203 failures
parent
b1ce1e9f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/lic2soc.ml
+1
-1
1 addition, 1 deletion
src/lic2soc.ml
src/soc2c.ml
+5
-3
5 additions, 3 deletions
src/soc2c.ml
src/soc2cIdent.ml
+3
-1
3 additions, 1 deletion
src/soc2cIdent.ml
test/lus2lic.sum
+37
-44
37 additions, 44 deletions
test/lus2lic.sum
test/lus2lic.time
+2
-2
2 additions, 2 deletions
test/lus2lic.time
with
48 additions
and
51 deletions
src/lic2soc.ml
+
1
−
1
View file @
ad005c3c
(** Time-stamp: <modified the 1
2
/06/2014 (at
09:32
) by Erwan Jahier> *)
(** Time-stamp: <modified the 1
3
/06/2014 (at
16:28
) by Erwan Jahier> *)
open
Lxm
open
Lxm
open
Lic
open
Lic
...
...
This diff is collapsed.
Click to expand it.
src/soc2c.ml
+
5
−
3
View file @
ad005c3c
(* Time-stamp: <modified the 13/06/2014 (at 1
5:36
) by Erwan Jahier> *)
(* Time-stamp: <modified the 13/06/2014 (at 1
6:23
) 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 = *)
...
@@ -81,6 +81,8 @@ let (is_memory_less : Soc.t -> bool) =
...
@@ -81,6 +81,8 @@ let (is_memory_less : Soc.t -> bool) =
let
rec
(
string_of_var_expr
:
Soc
.
t
->
Soc
.
var_expr
->
string
)
=
let
rec
(
string_of_var_expr
:
Soc
.
t
->
Soc
.
var_expr
->
string
)
=
fun
soc
->
function
fun
soc
->
function
|
Const
(
"true"
,
_
)
->
"_true"
|
Const
(
"false"
,
_
)
->
"_false"
|
Const
(
id
,
_
)
->
id2s
id
|
Const
(
id
,
_
)
->
id2s
id
|
Var
(
"mem_pre"
,_
)
->
(* Clutch! it's not an interface var... *)
"ctx->mem_pre"
|
Var
(
"mem_pre"
,_
)
->
(* Clutch! it's not an interface var... *)
"ctx->mem_pre"
|
Var
(
id
,_
)
->
|
Var
(
id
,_
)
->
...
@@ -408,10 +410,10 @@ let (gen_loop_file : Soc.t -> unit) =
...
@@ -408,10 +410,10 @@ let (gen_loop_file : Soc.t -> unit) =
static int ISATTY;
static int ISATTY;
/* MACROS DEFINITIONS ****************/
/* MACROS DEFINITIONS ****************/
#ifndef TT
#ifndef TT
#define TT
\"
true
\"
#define TT
\"
1
\"
#endif
#endif
#ifndef FF
#ifndef FF
#define FF
\"
false
\"
#define FF
\"
0
\"
#endif
#endif
#ifndef BB
#ifndef BB
#define BB
\"
bottom
\"
#define BB
\"
bottom
\"
...
...
This diff is collapsed.
Click to expand it.
src/soc2cIdent.ml
+
3
−
1
View file @
ad005c3c
(* Time-stamp: <modified the 1
1
/06/2014 (at 1
4:5
4) by Erwan Jahier> *)
(* Time-stamp: <modified the 1
3
/06/2014 (at 1
6:2
4) by Erwan Jahier> *)
let
colcol
=
Str
.
regexp
"::"
let
colcol
=
Str
.
regexp
"::"
let
id2s
id
=
(* XXX Refuser les noms de module à la con plutot *)
let
id2s
id
=
(* XXX Refuser les noms de module à la con plutot *)
let
str
=
let
str
=
match
Str
.
split
colcol
id
with
match
Str
.
split
colcol
id
with
|
[
"true"
]
->
"_true"
(* a good idea to do that here ? *)
|
[
"false"
]
->
"_false"
|
[
s
]
->
s
|
[
s
]
->
s
|
[
m
;
s
]
->
if
Lv6MainArgs
.
global_opt
.
Lv6MainArgs
.
no_prefix
then
s
else
m
^
"_"
^
s
|
[
m
;
s
]
->
if
Lv6MainArgs
.
global_opt
.
Lv6MainArgs
.
no_prefix
then
s
else
m
^
"_"
^
s
|
_
->
id
|
_
->
id
...
...
This diff is collapsed.
Click to expand it.
test/lus2lic.sum
+
37
−
44
View file @
ad005c3c
This diff is collapsed.
Click to expand it.
test/lus2lic.time
+
2
−
2
View file @
ad005c3c
testcase ./lus2lic.tests/non-reg.exp completed in 11
8
seconds
testcase ./lus2lic.tests/non-reg.exp completed in 1
2
1 seconds
testcase ./lus2lic.tests/progression.exp completed in
1
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