Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
caisar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
caisar
Commits
4b510f29
Commit
4b510f29
authored
2 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
[json] Rename result into prover_answer.
parent
cc99ad76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
src/JSON.ml
+1
-1
1 addition, 1 deletion
src/JSON.ml
src/JSON.mli
+1
-1
1 addition, 1 deletion
src/JSON.mli
src/main.ml
+7
-6
7 additions, 6 deletions
src/main.ml
src/verification.ml
+3
-3
3 additions, 3 deletions
src/verification.ml
src/verification.mli
+1
-1
1 addition, 1 deletion
src/verification.mli
with
13 additions
and
12 deletions
src/JSON.ml
+
1
−
1
View file @
4b510f29
...
@@ -42,7 +42,7 @@ and property = {
...
@@ -42,7 +42,7 @@ and property = {
type
output
=
{
type
output
=
{
id
:
string
;
id
:
string
;
result
:
prover_answer
;
prover_answer
:
prover_answer
;
percentage_valid
:
float
;
percentage_valid
:
float
;
dataset_results
:
string
;
dataset_results
:
string
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/JSON.mli
+
1
−
1
View file @
4b510f29
...
@@ -41,7 +41,7 @@ and property = private {
...
@@ -41,7 +41,7 @@ and property = private {
type
output
=
{
type
output
=
{
id
:
string
;
id
:
string
;
result
:
prover_answer
;
prover_answer
:
prover_answer
;
percentage_valid
:
float
;
percentage_valid
:
float
;
dataset_results
:
string
;
dataset_results
:
string
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main.ml
+
7
−
6
View file @
4b510f29
...
@@ -125,13 +125,13 @@ let log_theory_answer =
...
@@ -125,13 +125,13 @@ let log_theory_answer =
Logs
.
info
(
fun
m
->
Logs
.
info
(
fun
m
->
m
"@[Verification results for theory '%s'@]"
theory_name
);
m
"@[Verification results for theory '%s'@]"
theory_name
);
List
.
iter
task_answers
List
.
iter
task_answers
~
f
:
(
fun
{
Verification
.
id
;
result
;
additional_info
}
->
~
f
:
(
fun
{
Verification
.
id
;
prover_answer
;
additional_info
}
->
let
additional_info
=
let
additional_info
=
match
additional_info
with
Generic
s
->
s
|
Dataset
_
->
None
match
additional_info
with
Generic
s
->
s
|
Dataset
_
->
None
in
in
Logs
.
app
(
fun
m
->
Logs
.
app
(
fun
m
->
m
"@[Goal %a:@ %a%a@]"
Pretty
.
print_pr
id
m
"@[Goal %a:@ %a%a@]"
Pretty
.
print_pr
id
Call_provers
.
print_prover_answer
result
Call_provers
.
print_prover_answer
prover_answer
Fmt
.(
option
~
none
:
nop
(
any
" "
++
string
))
Fmt
.(
option
~
none
:
nop
(
any
" "
++
string
))
additional_info
)))
additional_info
)))
...
@@ -149,7 +149,7 @@ let verify ?format ~loadpath ?memlimit ?timelimit ?dataset prover ?prover_altern
...
@@ -149,7 +149,7 @@ let verify ?format ~loadpath ?memlimit ?timelimit ?dataset prover ?prover_altern
List
.
iter
theory_answers
~
f
:
log_theory_answer
;
List
.
iter
theory_answers
~
f
:
log_theory_answer
;
theory_answers
theory_answers
let
record_dataset_results
id
result
dataset
outfile
=
let
record_dataset_results
id
prover_answer
dataset
outfile
=
let
percentage_valid
=
let
percentage_valid
=
let
nb_valid
=
let
nb_valid
=
List
.
count
dataset
~
f
:
(
fun
record
->
List
.
count
dataset
~
f
:
(
fun
record
->
...
@@ -170,7 +170,7 @@ let record_dataset_results id result dataset outfile =
...
@@ -170,7 +170,7 @@ let record_dataset_results id result dataset outfile =
Csv
.
close_out
csv_out_channel
;
Csv
.
close_out
csv_out_channel
;
dataset_results
dataset_results
in
in
let
output
=
{
JSON
.
id
;
result
;
percentage_valid
;
dataset_results
}
in
let
output
=
{
JSON
.
id
;
prover_answer
;
percentage_valid
;
dataset_results
}
in
let
out_channel
=
Stdlib
.
open_out
outfile
in
let
out_channel
=
Stdlib
.
open_out
outfile
in
Yojson
.
Safe
.
to_channel
out_channel
(
JSON
.
output_to_yojson
output
);
Yojson
.
Safe
.
to_channel
out_channel
(
JSON
.
output_to_yojson
output
);
Logs
.
info
(
fun
m
->
m
"@[Results recorded in file '%s'@]"
outfile
);
Logs
.
info
(
fun
m
->
m
"@[Results recorded in file '%s'@]"
outfile
);
...
@@ -179,8 +179,9 @@ let record_dataset_results id result dataset outfile =
...
@@ -179,8 +179,9 @@ let record_dataset_results id result dataset outfile =
let
record_theory_answers
id
outfile
=
let
record_theory_answers
id
outfile
=
Why3
.
Wstdlib
.
Mstr
.
iter
(
fun
theory_name
task_answers
->
Why3
.
Wstdlib
.
Mstr
.
iter
(
fun
theory_name
task_answers
->
match
task_answers
with
match
task_answers
with
|
[
{
Verification
.
result
;
additional_info
=
Dataset
dataset
;
_
}
]
->
|
[
{
Verification
.
prover_answer
;
additional_info
=
Dataset
dataset
;
_
}
]
record_dataset_results
id
result
dataset
outfile
->
record_dataset_results
id
prover_answer
dataset
outfile
|
_
->
failwith
(
Fmt
.
str
"Unexpected answers for theory '%s'"
theory_name
))
|
_
->
failwith
(
Fmt
.
str
"Unexpected answers for theory '%s'"
theory_name
))
let
verify_json
?
memlimit
?
timelimit
?
outfile
json
=
let
verify_json
?
memlimit
?
timelimit
?
outfile
json
=
...
...
This diff is collapsed.
Click to expand it.
src/verification.ml
+
3
−
3
View file @
4b510f29
...
@@ -61,7 +61,7 @@ type theory_answer = answer list Wstdlib.Mstr.t
...
@@ -61,7 +61,7 @@ type theory_answer = answer list Wstdlib.Mstr.t
and
answer
=
{
and
answer
=
{
id
:
Decl
.
prsymbol
;
id
:
Decl
.
prsymbol
;
result
:
Call_provers
.
prover_answer
;
prover_answer
:
Call_provers
.
prover_answer
;
additional_info
:
additional_info
;
additional_info
:
additional_info
;
}
}
...
@@ -223,7 +223,7 @@ let answer_generic limit config env prover config_prover driver task =
...
@@ -223,7 +223,7 @@ let answer_generic limit config env prover config_prover driver task =
(
prover_answer
,
None
)
(
prover_answer
,
None
)
let
call_prover
?
dataset
~
limit
config
env
prover
config_prover
driver
task
=
let
call_prover
?
dataset
~
limit
config
env
prover
config_prover
driver
task
=
let
result
,
additional_info
=
let
prover_answer
,
additional_info
=
match
prover
with
match
prover
with
|
Prover
.
Saver
->
|
Prover
.
Saver
->
let
prover_answer
,
additional_info
=
let
prover_answer
,
additional_info
=
...
@@ -243,7 +243,7 @@ let call_prover ?dataset ~limit config env prover config_prover driver task =
...
@@ -243,7 +243,7 @@ let call_prover ?dataset ~limit config env prover config_prover driver task =
(
prover_answer
,
Generic
additional_info
)
(
prover_answer
,
Generic
additional_info
)
in
in
let
id
=
Task
.
task_goal
task
in
let
id
=
Task
.
task_goal
task
in
{
id
;
result
;
additional_info
}
{
id
;
prover_answer
;
additional_info
}
let
verify
?
(
debug
=
false
)
?
format
~
loadpath
?
memlimit
?
timelimit
?
dataset
let
verify
?
(
debug
=
false
)
?
format
~
loadpath
?
memlimit
?
timelimit
?
dataset
prover
?
prover_altern
file
=
prover
?
prover_altern
file
=
...
...
This diff is collapsed.
Click to expand it.
src/verification.mli
+
1
−
1
View file @
4b510f29
...
@@ -34,7 +34,7 @@ type theory_answer = answer list Wstdlib.Mstr.t
...
@@ -34,7 +34,7 @@ type theory_answer = answer list Wstdlib.Mstr.t
and
answer
=
private
{
and
answer
=
private
{
id
:
Decl
.
prsymbol
;
id
:
Decl
.
prsymbol
;
result
:
Call_provers
.
prover_answer
;
prover_answer
:
Call_provers
.
prover_answer
;
additional_info
:
additional_info
;
additional_info
:
additional_info
;
}
}
...
...
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