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
fa582037
Commit
fa582037
authored
2 years ago
by
Michele Alberti
Browse files
Options
Downloads
Patches
Plain Diff
Rework and prepare cmdline to accept new command.
parent
497f8208
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
+34
-41
34 additions, 41 deletions
src/main.ml
with
34 additions
and
41 deletions
src/main.ml
+
34
−
41
View file @
fa582037
...
@@ -158,7 +158,7 @@ let config_cmd =
...
@@ -158,7 +158,7 @@ let config_cmd =
ret
ret
(
const
(
fun
detect
_
->
(
const
(
fun
detect
_
->
if
not
detect
if
not
detect
then
`Help
(
`Pager
,
Some
"config"
)
then
`Help
(
`Pager
,
Some
cmdname
)
else
else
(* TODO: Do not only check for [detect], and enable it by default,
(* TODO: Do not only check for [detect], and enable it by default,
as soon as other options are available. *)
as soon as other options are available. *)
...
@@ -167,47 +167,43 @@ let config_cmd =
...
@@ -167,47 +167,43 @@ let config_cmd =
in
in
Cmd
.
v
info
term
Cmd
.
v
info
term
let
memlimit
=
let
doc
=
"Memory limit. $(docv) is intended in megabytes (MB) by default, but \
gigabytes (GB) and terabytes (TB) may also be specified instead."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"m"
;
"memlimit"
]
~
doc
~
docv
:
"MEM"
)
let
timelimit
=
let
doc
=
"Time limit. $(docv) is intended in seconds (s) by default, but minutes \
(m) and hours (h) may also be specified instead."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"t"
;
"timelimit"
]
~
doc
~
docv
:
"TIME"
)
let
format
=
let
doc
=
"File format."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"format"
]
~
doc
)
let
loadpath
=
let
doc
=
"Additional loadpath."
in
Arg
.(
value
&
opt_all
string
[
"."
]
&
info
[
"L"
;
"loadpath"
]
~
doc
)
let
verify_cmd
=
let
verify_cmd
=
let
cmdname
=
"verify"
in
let
cmdname
=
"verify"
in
let
doc
=
"Property verification using external provers."
in
let
info
=
let
info
=
let
doc
=
"Property verification using external provers."
in
Cmd
.
info
cmdname
~
sdocs
:
Manpage
.
s_common_options
~
exits
:
Cmd
.
Exit
.
defaults
Cmd
.
info
cmdname
~
sdocs
:
Manpage
.
s_common_options
~
exits
:
Cmd
.
Exit
.
defaults
~
doc
~
doc
~
man
:
[
`S
Manpage
.
s_description
;
`P
doc
]
~
man
:
[
`S
Manpage
.
s_description
;
`P
doc
]
in
in
let
term
=
let
term
=
let
files
=
let
files
=
let
doc
=
"File
s
to verify."
in
let
doc
=
"File to verify."
in
let
file_or_stdin
=
Verification
.
File
.(
of_string
,
pretty
)
in
let
file_or_stdin
=
Verification
.
File
.(
of_string
,
pretty
)
in
Arg
.(
value
&
pos_all
file_or_stdin
[]
&
info
[]
~
doc
)
Arg
.(
non_empty
&
pos_all
file_or_stdin
[]
&
info
[]
~
doc
~
docv
:
"FILE"
)
in
let
format
=
let
doc
=
"File format."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"format"
]
~
doc
)
in
let
loadpath
=
let
doc
=
"Additional loadpath."
in
Arg
.(
value
&
opt_all
string
[
"."
]
&
info
[
"L"
;
"loadpath"
]
~
doc
)
in
let
memlimit
=
let
doc
=
"Memory limit. $(docv) is intended in megabytes (MB) by default, but \
gigabytes (GB) and terabytes (TB) may also be specified instead."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"m"
;
"memlimit"
]
~
doc
~
docv
:
"MEM"
)
in
let
timelimit
=
let
doc
=
"Time limit. $(docv) is intended in seconds (s) by default, but \
minutes (m) and hours (h) may also be specified instead."
in
Arg
.(
value
&
opt
(
some
string
)
None
&
info
[
"t"
;
"timelimit"
]
~
doc
~
docv
:
"TIME"
)
in
in
let
prover
=
let
prover
=
let
all_provers
=
Prover
.
list_available
()
in
let
all_provers
=
Prover
.
list_available
()
in
...
@@ -227,15 +223,12 @@ let verify_cmd =
...
@@ -227,15 +223,12 @@ let verify_cmd =
Arg
.(
value
&
opt
(
some
file
)
None
&
info
[
"dataset-csv"
]
~
doc
)
Arg
.(
value
&
opt
(
some
file
)
None
&
info
[
"dataset-csv"
]
~
doc
)
in
in
Term
.(
Term
.(
ret
const
(
const
(
fun
format
loadpath
memlimit
timelimit
prover
dataset_csv
files
_
->
(
fun
format
loadpath
memlimit
timelimit
prover
dataset_csv
files
_
->
exec_cmd
cmdname
(
fun
()
->
`Ok
verify
format
loadpath
memlimit
timelimit
prover
dataset_csv
files
))
(
exec_cmd
cmdname
(
fun
()
->
$
format
$
loadpath
$
memlimit
$
timelimit
$
prover
$
dataset_csv
$
files
verify
format
loadpath
memlimit
timelimit
prover
dataset_csv
$
setup_logs
)
files
)))
$
format
$
loadpath
$
memlimit
$
timelimit
$
prover
$
dataset_csv
$
files
$
setup_logs
))
in
in
Cmd
.
v
info
term
Cmd
.
v
info
term
...
...
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