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
c55db9cb
Commit
c55db9cb
authored
2 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
Add global timeout as new command line option.
parent
aeb70fed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main.ml
+9
-5
9 additions, 5 deletions
src/main.ml
src/verification.ml
+1
-2
1 addition, 2 deletions
src/verification.ml
src/verification.mli
+3
-1
3 additions, 1 deletion
src/verification.mli
with
13 additions
and
8 deletions
src/main.ml
+
9
−
5
View file @
c55db9cb
...
...
@@ -65,10 +65,10 @@ let config detect () =
Whyconf
.
print_prover
Pp
.
nothing
)
provers
))
let
verify
format
loadpath
memlimit
prover
files
=
let
verify
format
loadpath
memlimit
timeout
prover
files
=
let
debug
=
match
Logs
.
level
()
with
Some
Debug
->
true
|
_
->
false
in
List
.
iter
~
f
:
(
Verification
.
verify
~
debug
format
loadpath
?
memlimit
~
prover
)
~
f
:
(
Verification
.
verify
~
debug
format
loadpath
?
memlimit
?
timeout
~
prover
)
files
let
exec_cmd
cmdname
cmd
=
...
...
@@ -133,6 +133,10 @@ let verify_cmd =
let
doc
=
"Memory limit (in megabytes)."
in
Arg
.(
value
&
opt
(
some
int
)
None
&
info
[
"m"
;
"memlimit"
]
~
doc
)
in
let
timeout
=
let
doc
=
"Timeout (in seconds)."
in
Arg
.(
value
&
opt
(
some
int
)
None
&
info
[
"t"
;
"timeout"
]
~
doc
)
in
let
prover
=
let
doc
=
"Prover to use."
in
Arg
.(
required
&
opt
(
some
string
)
None
&
info
[
"p"
;
"prover"
]
~
doc
)
...
...
@@ -144,11 +148,11 @@ let verify_cmd =
let
man
=
[
`S
Manpage
.
s_description
;
`P
doc
]
in
(
Term
.(
ret
(
const
(
fun
format
loadpath
memlimit
prover
files
_
->
(
const
(
fun
format
loadpath
memlimit
timeout
prover
files
_
->
`Ok
(
exec_cmd
cmdname
(
fun
()
->
verify
format
loadpath
memlimit
prover
files
)))
$
format
$
loadpath
$
memlimit
$
prover
$
files
$
setup_logs
))
,
verify
format
loadpath
memlimit
timeout
prover
files
)))
$
format
$
loadpath
$
memlimit
$
timeout
$
prover
$
files
$
setup_logs
))
,
Term
.
info
cmdname
~
sdocs
:
Manpage
.
s_common_options
~
exits
~
doc
~
man
)
let
default_cmd
=
...
...
This diff is collapsed.
Click to expand it.
src/verification.ml
+
1
−
2
View file @
c55db9cb
...
...
@@ -69,12 +69,11 @@ let call_prover ~limit config (prover : Why3.Whyconf.config_prover) driver task
Fmt
.
pr
"Goal %a: %a@."
Pretty
.
print_pr
(
Task
.
task_goal
task
)
Call_provers
.
print_prover_answer
answer
let
verify
?
(
debug
=
false
)
format
loadpath
?
memlimit
~
prover
file
=
let
verify
?
(
debug
=
false
)
format
loadpath
?
memlimit
?
timeout
~
prover
file
=
let
open
Why3
in
if
debug
then
Debug
.
set_flag
(
Debug
.
lookup_flag
"call_prover"
);
let
env
,
config
=
create_env
loadpath
in
let
steplimit
=
None
in
let
timeout
=
None
in
let
steps
=
match
steplimit
with
Some
0
->
None
|
_
->
steplimit
in
let
limit
=
let
memlimit
=
...
...
This diff is collapsed.
Click to expand it.
src/verification.mli
+
3
−
1
View file @
c55db9cb
...
...
@@ -9,6 +9,7 @@ val verify :
string
option
->
string
list
->
?
memlimit
:
int
->
?
timeout
:
int
->
prover
:
string
->
string
->
unit
...
...
@@ -19,4 +20,5 @@ val verify :
@param format is the [file] format.
@param loadpath is the additional loadpath.
@param memlimit
is the memory limit (in megabytes) granted to the verification. *)
is the memory limit (in megabytes) granted to the verification.
@param timeout is the timeout (in seconds) granted to the verification. *)
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