Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
b7c3790e
Commit
b7c3790e
authored
7 years ago
by
Pierre Loic Garoche
Browse files
Options
Downloads
Patches
Plain Diff
[lustret] improved enumeration of mutants
parent
cda2fcc8
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/mutation.ml
+7
-7
7 additions, 7 deletions
src/mutation.ml
with
7 additions
and
7 deletions
src/mutation.ml
+
7
−
7
View file @
b7c3790e
...
...
@@ -93,7 +93,7 @@ let compute_records_const_value c =
let
rec
compute_records_expr
expr
=
let
boolexpr
=
if
(
Types
.
repr
expr
.
expr_type
)
.
Types
.
tdesc
=
Types
.
Tbool
then
if
Types
.
is_bool_type
expr
.
expr_type
then
{
empty_records
with
nb_boolexpr
=
1
}
else
empty_records
...
...
@@ -202,15 +202,15 @@ match op with
|
_
->
op
let
rdm_mutate_var
expr
=
match
(
Types
.
repr
expr
.
expr_type
)
.
Types
.
tdesc
with
|
Types
.
Tbool
->
let
rdm_mutate_var
expr
=
if
Types
.
is_bool_type
expr
.
expr_type
then
(* if Random.int 100 > threshold_negate_bool_var then *)
let
new_e
=
mkpredef_call
expr
.
expr_loc
"not"
[
expr
]
in
Some
(
expr
,
new_e
)
,
new_e
(* else *)
(* expr *)
|
_
->
None
,
expr
(* expr *)
else
None
,
expr
let
rdm_mutate_pre
orig_expr
=
let
new_e
=
Expr_pre
orig_expr
in
...
...
@@ -540,7 +540,7 @@ let rec fold_mutate_expr expr =
{
expr
with
expr_desc
=
new_desc
}
)
in
if
(
Types
.
repr
expr
.
expr_type
)
.
Types
.
tdesc
=
Types
.
Tbool
then
if
Types
.
is_bool_type
expr
.
expr_type
then
fold_mutate_boolexpr
new_expr
else
new_expr
...
...
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