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
4bea7636
Commit
4bea7636
authored
2 years ago
by
Julien Girard-Satabin
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.frama-c.com:laiser/caisar
parents
bc88da1d
1f6d08f2
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/main.ml
+13
-5
13 additions, 5 deletions
src/main.ml
with
13 additions
and
5 deletions
src/main.ml
+
13
−
5
View file @
4bea7636
...
...
@@ -47,6 +47,9 @@ let setup_logs =
in
Term
.(
const
setup_log
$
Logs_cli
.
level
()
)
let
log_level_is_debug
()
=
match
Logs
.
level
()
with
Some
Debug
->
true
|
_
->
false
(* -- Commands. *)
let
config
detect
()
=
...
...
@@ -54,7 +57,7 @@ let config detect () =
then
(
Logs
.
debug
(
fun
m
->
m
"Automatic detection."
);
let
config
=
let
debug
=
match
Logs
.
level
()
with
Some
Debug
->
true
|
_
->
false
in
let
debug
=
log_level_is_debug
()
in
Autodetect
.
autodetection
~
debug
()
in
let
open
Why3
in
...
...
@@ -66,7 +69,7 @@ let config detect () =
provers
))
let
verify
format
loadpath
memlimit
timeout
prover
files
=
let
debug
=
match
Logs
.
level
()
with
Some
Debug
->
true
|
_
->
false
in
let
debug
=
log_level_is_debug
()
in
List
.
iter
~
f
:
(
Verification
.
verify
~
debug
format
loadpath
?
memlimit
?
timeout
~
prover
)
files
...
...
@@ -173,6 +176,11 @@ let default_cmd =
Term
.
info
caisar
~
version
~
doc
~
sdocs
~
exits
:
Term
.
default_exits
~
man
)
let
()
=
match
Term
.(
eval_choice
default_cmd
[
config_cmd
;
verify_cmd
])
with
|
`Error
_
->
Caml
.
exit
1
|
_
->
Caml
.
exit
(
if
Logs
.
err_count
()
>
0
then
1
else
0
)
try
match
Term
.(
eval_choice
~
catch
:
false
default_cmd
[
config_cmd
;
verify_cmd
])
with
|
`Error
_
->
Caml
.
exit
1
|
_
->
Caml
.
exit
(
if
Logs
.
err_count
()
>
0
then
1
else
0
)
with
exn
when
not
(
log_level_is_debug
()
)
->
Fmt
.
epr
"%a@."
Why3
.
Exn_printer
.
exn_printer
exn
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