Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
702e2659
Commit
702e2659
authored
9 years ago
by
David Hauzar
Browse files
Options
Downloads
Patches
Plain Diff
Printing counterexample arrays made compatible with json format.
parent
048d5150
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/model_parser.ml
+14
-12
14 additions, 12 deletions
src/core/model_parser.ml
with
14 additions
and
12 deletions
src/core/model_parser.ml
+
14
−
12
View file @
702e2659
...
@@ -60,29 +60,31 @@ let array_add_element ~array ~index ~value =
...
@@ -60,29 +60,31 @@ let array_add_element ~array ~index ~value =
arr_indices
=
arr_index
::
array
.
arr_indices
;
arr_indices
=
arr_index
::
array
.
arr_indices
;
}
}
let
rec
print_indices
sanit_print
fmt
indices
=
let
rec
print_indices
fmt
indices
=
match
indices
with
match
indices
with
|
[]
->
()
|
[]
->
()
|
index
::
tail
->
|
index
::
tail
->
fprintf
fmt
"; %a -> "
(
print_model_value
_sanit
sanit_print
)
index
.
arr_index_key
;
fprintf
fmt
"; %a -> "
print_model_value
index
.
arr_index_key
;
print_model_value
_sanit
sanit_print
fmt
index
.
arr_index_value
;
print_model_value
fmt
index
.
arr_index_value
;
print_indices
sanit_print
fmt
tail
print_indices
fmt
tail
and
and
print_array
sanit_print
fmt
arr
=
print_array
fmt
arr
=
fprintf
fmt
"
{
others -> "
;
fprintf
fmt
"
[
others -> "
;
print_model_value
_sanit
sanit_print
fmt
arr
.
arr_others
;
print_model_value
fmt
arr
.
arr_others
;
print_indices
sanit_print
fmt
arr
.
arr_indices
;
print_indices
fmt
arr
.
arr_indices
;
fprintf
fmt
"
}
"
fprintf
fmt
"
]
"
and
and
print_model_value_sanit
sanit_print
fmt
value
=
print_model_value_sanit
sanit_print
fmt
value
=
(* Prints model value. *)
(* Prints model value. *)
match
value
with
match
value
with
|
Integer
s
->
sanit_print
fmt
s
|
Integer
s
->
sanit_print
fmt
s
|
Unparsed
s
->
sanit_print
fmt
s
|
Unparsed
s
->
sanit_print
fmt
s
|
Array
a
->
print_array
sanit_print
fmt
a
|
Array
a
->
print_array
str_formatter
a
;
sanit_print
fmt
(
flush_str_formatter
()
);
|
Bitvector
v
->
sanit_print
fmt
(
string_of_int
v
)
|
Bitvector
v
->
sanit_print
fmt
(
string_of_int
v
)
and
let
print_model_value
fmt
value
=
print_model_value
fmt
value
=
print_model_value_sanit
(
fun
fmt
s
->
fprintf
fmt
"%s"
s
)
fmt
value
print_model_value_sanit
(
fun
fmt
s
->
fprintf
fmt
"%s"
s
)
fmt
value
...
...
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