Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
2196948d
Commit
2196948d
authored
7 years ago
by
Pierre Loic Garoche
Browse files
Options
Downloads
Patches
Plain Diff
[EMF] Less verbose
parent
db7468fd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backends/EMF/EMF_backend.ml
+13
-13
13 additions, 13 deletions
src/backends/EMF/EMF_backend.ml
src/backends/EMF/EMF_common.ml
+4
-4
4 additions, 4 deletions
src/backends/EMF/EMF_common.ml
with
17 additions
and
17 deletions
src/backends/EMF/EMF_backend.ml
+
13
−
13
View file @
2196948d
...
...
@@ -290,20 +290,20 @@ let rec pp_emf_instr m fmt i =
|
MBranch
(
g
,
hl
)
->
(
let
all_outputs
,
outputs
,
inputs
=
branch_instr_vars
m
i
in
Format
.
eprintf
"Mbranch %a@.vars: all_out: %a, out:%a, in:%a@.@."
Machine_code
.
pp_instr
i
(
fprintf_list
~
sep
:
", "
pp_var_string
)
(
ISet
.
elements
all_outputs
)
(
fprintf_list
~
sep
:
", "
pp_var_string
)
(
ISet
.
elements
outputs
)
pp_emf_vars_decl
(
VSet
.
elements
inputs
)
;
(*
Format.eprintf "Mbranch %a@.vars: all_out: %a, out:%a, in:%a@.@."
*)
(*
Machine_code.pp_instr i
*)
(*
(fprintf_list ~sep:", " pp_var_string) (ISet.elements all_outputs)
*)
(*
(fprintf_list ~sep:", " pp_var_string) (ISet.elements outputs)
*)
(*
pp_emf_vars_decl
*)
(*
(VSet.elements inputs)
*)
(* ; *)
let
inputs
=
VSet
.
filter
(
fun
v
->
not
(
ISet
.
mem
v
.
var_id
all_outputs
))
inputs
in
Format
.
eprintf
"Filtering in: %a@.@."
pp_emf_vars_decl
(
VSet
.
elements
inputs
)
(*
Format.eprintf "Filtering in: %a@.@."
*)
(*
pp_emf_vars_decl
*)
(*
(VSet.elements inputs)
*)
;
(* ; *)
fprintf
fmt
"
\"
kind
\"
:
\"
branch
\"
,@ "
;
fprintf
fmt
"
\"
guard
\"
: %a,@ "
pp_emf_cst_or_var
g
;
(* it has to be a variable or a constant *)
fprintf
fmt
"
\"
outputs
\"
: [%a],@ "
(
fprintf_list
~
sep
:
", "
pp_var_string
)
(
ISet
.
elements
outputs
);
...
...
@@ -318,7 +318,7 @@ let rec pp_emf_instr m fmt i =
(
fun
fmt
(
tag
,
instrs_tag
)
->
let
branch_all_lhs
,
_
,
branch_inputs
=
branch_block_vars
m
instrs_tag
in
let
branch_inputs
=
VSet
.
filter
(
fun
v
->
not
(
ISet
.
mem
v
.
var_id
branch_all_lhs
))
branch_inputs
in
fprintf
fmt
"@[<v 2>
\"
%
s
\"
: {@ "
tag
;
fprintf
fmt
"@[<v 2>
\"
%
a
\"
: {@ "
print_protect
(
fun
fmt
->
Format
.
pp_print_string
fmt
tag
)
;
fprintf
fmt
"
\"
guard_value
\"
:
\"
%a
\"
,@ "
pp_tag_id
tag
;
fprintf
fmt
"
\"
inputs
\"
: [%a],@ "
pp_emf_vars_decl
(
VSet
.
elements
branch_inputs
);
fprintf
fmt
"@[<v 2>
\"
instrs
\"
: {@ "
;
...
...
This diff is collapsed.
Click to expand it.
src/backends/EMF/EMF_common.ml
+
4
−
4
View file @
2196948d
...
...
@@ -43,10 +43,10 @@ let print_protect fmt f =
let
s
=
flush_str_formatter
()
in
let
l
=
String
.
length
s
in
if
l
>
30
then
let
_
=
Format
.
eprintf
"Looking for variable %s in hash @[<v 0>%t@]@."
s
(
fun
fmt
->
Hashtbl
.
iter
(
fun
s
new_s
->
fprintf
fmt
"%s -> %s@ "
s
new_s
)
hash_map
)
in
(*
let _ = Format.eprintf "Looking for variable %s in hash @[<v 0>%t@]@."
*)
(* s *)
(*
(fun fmt -> Hashtbl.iter (fun s new_s -> fprintf fmt "%s -> %s@ " s new_s) hash_map)
*)
(* in *)
if
Hashtbl
.
mem
hash_map
s
then
fprintf
fmt
"%s"
(
Hashtbl
.
find
hash_map
s
)
else
...
...
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