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
73d58d51
Commit
73d58d51
authored
10 years ago
by
Emmanouil (Manos) Koukoutos
Committed by
Etienne Kneuss
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Shortcut test discovery
parent
8af07f42
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/scala/leon/repair/Repairman.scala
+15
-7
15 additions, 7 deletions
src/main/scala/leon/repair/Repairman.scala
with
15 additions
and
7 deletions
src/main/scala/leon/repair/Repairman.scala
+
15
−
7
View file @
73d58d51
...
...
@@ -296,7 +296,12 @@ class Repairman(ctx: LeonContext, initProgram: Program, fd: FunDef, verifTimeout
val
vctx
=
VerificationContext
(
ctx
,
prog
,
solver
,
reporter
)
val
vcs
=
AnalysisPhase
.
generateVerificationConditions
(
vctx
,
Some
(
List
(
fd
.
id
.
name
)))
AnalysisPhase
.
checkVerificationConditions
(
vctx
,
vcs
,
checkInParallel
=
true
)
AnalysisPhase
.
checkVerificationConditions
(
vctx
,
vcs
,
checkInParallel
=
true
,
interruptOn
=
_
.
counterExample
.
isDefined
)
var
invalid
=
false
;
var
ces
=
List
[
Seq
[
Expr
]]()
...
...
@@ -357,7 +362,7 @@ class Repairman(ctx: LeonContext, initProgram: Program, fd: FunDef, verifTimeout
new
InExample
(
ins
)
}
}
val
generatedTests
=
inputs
.
take
(
maxEnumerated
)
.
filter
(
filtering
)
...
...
@@ -370,14 +375,17 @@ class Repairman(ctx: LeonContext, initProgram: Program, fd: FunDef, verifTimeout
case
_
=>
false
}
// Try to verify, if it fails, we have at least one CE
val
ces
=
getVerificationCounterExamples
(
fd
,
program
)
getOrElse
Nil
// Extract passing/failing from the passes in POST
val
ef
=
new
ExamplesFinder
(
ctx
,
program
)
val
(
userPassing
,
userFailing
)
=
ef
.
extractTests
(
fd
)
val
(
userPassing
,
userFailing
)
=
ef
.
extractTests
(
fd
)
// If we have no ce yet, try to verify, if it fails, we have at least one CE
val
ces
=
(
generatedFailing
++
userFailing
)
match
{
case
Seq
()
=>
getVerificationCounterExamples
(
fd
,
program
)
getOrElse
Nil
case
nonEmpty
=>
nonEmpty
}
(
generatedPassing
++
userPassing
,
generatedFailing
++
ces
++
userFailing
)
(
generatedPassing
++
userPassing
,
ces
.
toList
)
}
...
...
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