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
1b9c0d0c
Commit
1b9c0d0c
authored
12 years ago
by
Régis Blanc
Browse files
Options
Downloads
Patches
Plain Diff
use reflection to load test generation and support nodefaults option
parent
f678acc5
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
src/main/scala/leon/Extensions.scala
+1
-1
1 addition, 1 deletion
src/main/scala/leon/Extensions.scala
src/main/scala/leon/TestGeneration.scala
+3
-1
3 additions, 1 deletion
src/main/scala/leon/TestGeneration.scala
with
4 additions
and
2 deletions
src/main/scala/leon/Extensions.scala
+
1
−
1
View file @
1b9c0d0c
...
...
@@ -99,7 +99,7 @@ object Extensions {
allLoaded
=
defaultExtensions
++
loaded
analysisExtensions
=
allLoaded
.
filter
(
_
.
isInstanceOf
[
Analyser
]).
map
(
_
.
asInstanceOf
[
Analyser
])
analysisExtensions
=
new
TestGeneration
(
extensionsReporter
)
+:
analysisExtensions
//
analysisExtensions = new TestGeneration(extensionsReporter) +: analysisExtensions
val
solverExtensions0
=
allLoaded
.
filter
(
_
.
isInstanceOf
[
Solver
]).
map
(
_
.
asInstanceOf
[
Solver
])
val
solverExtensions1
=
if
(
Settings
.
useQuickCheck
)
new
RandomSolver
(
extensionsReporter
)
+:
solverExtensions0
else
solverExtensions0
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/TestGeneration.scala
+
3
−
1
View file @
1b9c0d0c
...
...
@@ -13,8 +13,10 @@ class TestGeneration(reporter: Reporter) extends Analyser(reporter) {
def
description
:
String
=
"Generate random testcases"
override
def
shortDescription
:
String
=
"test"
private
val
z3Solver
=
new
FairZ3Solver
(
reporter
)
def
analyse
(
program
:
Program
)
{
z3Solver
.
setProgram
(
program
)
reporter
.
info
(
"Running test generation"
)
val
allFuns
=
program
.
definedFunctions
allFuns
.
foreach
(
fd
=>
{
...
...
@@ -37,7 +39,7 @@ class TestGeneration(reporter: Reporter) extends Analyser(reporter) {
reporter
.
info
(
"Now considering path condition: "
+
pathCond
)
var
testcase
:
Option
[
Map
[
Identifier
,
Expr
]]
=
None
val
z3Solver
:
FairZ3Solver
=
loadedSolverExtensions
.
find
(
se
=>
se
.
isInstanceOf
[
FairZ3Solver
]).
get
.
asInstanceOf
[
FairZ3Solver
]
//
val z3Solver: FairZ3Solver = loadedSolverExtensions.find(se => se.isInstanceOf[FairZ3Solver]).get.asInstanceOf[FairZ3Solver]
z3Solver
.
init
()
z3Solver
.
restartZ3
...
...
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