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
Benoit Barbot
WordGen
Commits
5bf546ef
Commit
5bf546ef
authored
Jul 06, 2021
by
Benoit Barbot
Browse files
jsonify
parent
13564806
Pipeline
#2216
passed with stages
in 2 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/OutFormat.ml
View file @
5bf546ef
...
...
@@ -104,8 +104,16 @@ struct
|
StateListFull
->
fprintf
outfile
"%a
\t
%i@."
print_state
st
1
|
StateListDelay
->
fprintf
outfile
"%a
\t
%i@."
print_state
st
1
|
CoSim
->
fprintf
outfile
"@[<h 0>%a@. @[<v 2>@[<v 0>%a@]@]@]@."
(
print_state_long
rgpoly
)
st
fprintf
outfile
"{@[<h 0>
\"
state
\"
:
\"
%s
\"
,@
\"
clocks
\"
:[%a],@. @[<v 2>@[<v \
0>
\"
transition
\"
:[%a]@]@]@]}@."
rgpoly
.
statelist
.
(
fst
st
)
.
name
(
fun
f
(
_
,
x
)
->
Array
.
iteri
(
fun
i
x
->
Format
.
fprintf
f
"%s@ %f"
(
if
i
>
0
then
","
else
""
)
x
)
x
)
st
(
fun
f
l
->
l
|>
List
.
map
(
fun
tr
->
...
...
@@ -175,8 +183,10 @@ struct
rgpoly
.
statelist
.
((
List
.
hd
tr
.
ZoneGraph
.
miniedge
)
.
target
)
in
fprintf
f
"[%s]-[%g;%g]-%g->
\"
%s
\"
@,"
tr
.
ZoneGraph
.
action
low
up
time
target
.
name
fprintf
f
"{
\"
label
\"
:
\"
%s
\"
,@
\"
min_time
\"
: %g,@ \
\"
max_time
\"
:%g,@
\"
time
\"
:%g,@
\"
target
\"
:
\"
%s
\"
},@,"
tr
.
ZoneGraph
.
action
low
up
time
target
.
name
|
None
->
()
))
rgpoly
.
ZoneGraph
.
statelist
.
(
get_loc
st
)
.
ZoneGraph
.
transition
|
Debug
->
...
...
Write
Preview
Markdown
is supported
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