Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
LARA
inox
Commits
543488bf
Commit
543488bf
authored
9 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Keep functionality of --verify --termination, and document it
parent
8d1a95b3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/options.rst
+1
-1
1 addition, 1 deletion
doc/options.rst
src/main/scala/leon/Main.scala
+12
-15
12 additions, 15 deletions
src/main/scala/leon/Main.scala
with
13 additions
and
16 deletions
doc/options.rst
+
1
−
1
View file @
543488bf
...
...
@@ -37,7 +37,7 @@ These options are mutually exclusive. By default, ``--verify`` is chosen.
* ``--termination``
Runs
a simple
termination analysis.
Runs termination analysis.
Can be used along ``--verify``.
* ``--xlang``
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/Main.scala
+
12
−
15
View file @
543488bf
...
...
@@ -37,16 +37,16 @@ object Main {
*/
object
MainComponent
extends
LeonComponent
{
val
name
=
"main"
val
description
=
"Options that
determine
the feature of Leon to be used
(mutually exclusive)
. Default: verify"
val
description
=
"Options that
select
the feature of Leon to be used. Default: verify"
val
optEval
=
LeonStringOptionDef
(
"eval"
,
"Evaluate ground functions
with selected evaluator
"
,
"default"
,
"[code|default]"
)
val
optEval
=
LeonStringOptionDef
(
"eval"
,
"Evaluate ground functions
through code generation or evaluation (default)
"
,
"default"
,
"[code|default]"
)
val
optXLang
=
LeonFlagOptionDef
(
"xlang"
,
"Verification with support for extra program constructs (imperative,...)"
,
false
)
val
optTermination
=
LeonFlagOptionDef
(
"termination"
,
"Check program termination"
,
false
)
val
optRepair
=
LeonFlagOptionDef
(
"repair"
,
"Repair selected functions"
,
false
)
val
optSynthesis
=
LeonFlagOptionDef
(
"synthesis"
,
"Partial synthesis of choose() constructs"
,
false
)
val
optNoop
=
LeonFlagOptionDef
(
"noop"
,
"No operation performed, just output program"
,
false
)
val
optVerify
=
LeonFlagOptionDef
(
"verify"
,
"Verify function contracts"
,
true
)
val
optHelp
=
LeonFlagOptionDef
(
"help"
,
"Show help message"
,
false
)
val
optTermination
=
LeonFlagOptionDef
(
"termination"
,
"Check program termination
. Can be used along --verify
"
,
false
)
val
optRepair
=
LeonFlagOptionDef
(
"repair"
,
"Repair selected functions"
,
false
)
val
optSynthesis
=
LeonFlagOptionDef
(
"synthesis"
,
"Partial synthesis of choose() constructs"
,
false
)
val
optNoop
=
LeonFlagOptionDef
(
"noop"
,
"No operation performed, just output program"
,
false
)
val
optVerify
=
LeonFlagOptionDef
(
"verify"
,
"Verify function contracts"
,
false
)
val
optHelp
=
LeonFlagOptionDef
(
"help"
,
"Show help message"
,
false
)
override
val
definedOptions
:
Set
[
LeonOptionDef
[
Any
]]
=
Set
(
optTermination
,
optRepair
,
optSynthesis
,
optXLang
,
optNoop
,
optHelp
,
optEval
,
optVerify
)
...
...
@@ -93,8 +93,6 @@ object Main {
val
initReporter
=
new
DefaultReporter
(
Set
())
val
allOptions
:
Set
[
LeonOptionDef
[
Any
]]
=
this
.
allOptions
val
options
=
args
.
filter
(
_
.
startsWith
(
"--"
)).
toSet
val
files
=
args
.
filterNot
(
_
.
startsWith
(
"-"
)).
map
(
new
java
.
io
.
File
(
_
))
...
...
@@ -156,14 +154,14 @@ object Main {
val
repairF
=
ctx
.
findOptionOrDefault
(
optRepair
)
val
terminationF
=
ctx
.
findOptionOrDefault
(
optTermination
)
val
verifyF
=
ctx
.
findOptionOrDefault
(
optVerify
)
val
evalF
=
ctx
.
findOption
(
optEval
)
val
evalF
=
ctx
.
findOption
(
optEval
)
.
isDefined
val
analysisF
=
verifyF
&&
terminationF
def
debugTrees
(
title
:
String
)
:
LeonPhase
[
Program
,
Program
]
=
{
if
(
ctx
.
reporter
.
isDebugEnabled
(
DebugSectionTrees
))
{
PrintTreePhase
(
title
)
}
else
{
NoopPhase
[
Program
]
NoopPhase
[
Program
]
()
}
}
...
...
@@ -191,9 +189,8 @@ object Main {
else
if
(
analysisF
)
Pipeline
.
both
(
FunctionClosure
andThen
AnalysisPhase
,
TerminationPhase
)
else
if
(
terminationF
)
TerminationPhase
else
if
(
xlangF
)
XLangAnalysisPhase
else
if
(
evalF
.
isDefined
)
EvaluationPhase
else
if
(
verifyF
)
FunctionClosure
andThen
AnalysisPhase
else
NoopPhase
()
else
if
(
evalF
)
EvaluationPhase
else
FunctionClosure
andThen
AnalysisPhase
}
pipeBegin
andThen
...
...
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