Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
mbe-tools
TTool
Commits
ea5e2761
Commit
ea5e2761
authored
2 years ago
by
Bastien Sultan
Browse files
Options
Downloads
Patches
Plain Diff
AMULET: patching state deletion method
parent
91b18c4b
No related branches found
No related tags found
2 merge requests
!439
Patching two methods on mutation compiler, creating a new CLI command for compiling a batch of mutations, adding some tests
,
!438
Patching two bugs in mutation compiler
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/runConfigurations.xml
+10
-0
10 additions, 0 deletions
.idea/runConfigurations.xml
src/main/java/avatartranslator/mutation/RmStateMutation.java
+17
-7
17 additions, 7 deletions
src/main/java/avatartranslator/mutation/RmStateMutation.java
with
27 additions
and
7 deletions
.idea/runConfigurations.xml
0 → 100644
+
10
−
0
View file @
ea5e2761
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"RunConfigurationProducerService"
>
<option
name=
"ignoredProducers"
>
<set>
<option
value=
"com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer"
/>
</set>
</option>
</component>
</project>
This diff is collapsed.
Click to expand it.
src/main/java/avatartranslator/mutation/RmStateMutation.java
+
17
−
7
View file @
ea5e2761
...
...
@@ -41,6 +41,7 @@ package avatartranslator.mutation;
import
avatartranslator.*
;
import
myutil.TraceManager
;
import
java.util.LinkedList
;
import
java.util.List
;
/**
...
...
@@ -60,18 +61,27 @@ public class RmStateMutation extends StateMutation implements RmMutation {
public
void
apply
(
AvatarSpecification
_avspec
)
throws
ApplyMutationException
{
AvatarState
state
=
getElement
(
_avspec
);
AvatarStateMachine
asm
=
getAvatarStateMachine
(
_avspec
);
List
<
AvatarStateMachineElement
>
elements
=
asm
.
getListOfElements
();
for
(
AvatarStateMachineElement
element
:
elements
)
{
if
(
element
.
getNexts
().
contains
(
state
)){
for
(
AvatarStateMachineElement
element2
:
elements
)
{
if
(
element2
.
getNexts
().
contains
(
element
)){
List
<
AvatarStateMachineElement
>
asmElements
=
asm
.
getListOfElements
();
List
<
AvatarStateMachineElement
>
asmElementsToRemove
=
new
LinkedList
<>();
for
(
AvatarStateMachineElement
element
:
asmElements
)
{
if
(
element
.
getNexts
().
contains
(
state
))
{
for
(
AvatarStateMachineElement
element2
:
asmElements
)
{
if
(
element2
.
getNexts
().
contains
(
element
))
{
element2
.
removeNext
(
element
);
}
}
asm
.
remove
Element
(
element
);
asmElement
sToRemove
.
add
(
element
);
}
if
(
element
==
state
)
{
for
(
AvatarStateMachineElement
element3
:
state
.
getNexts
())
{
asmElementsToRemove
.
add
(
element3
);
}
}
}
System
.
out
.
println
(
asmElementsToRemove
.
toString
());
for
(
AvatarStateMachineElement
element
:
asmElementsToRemove
){
asm
.
removeElement
(
element
);
}
state
.
removeAllNexts
();
asm
.
removeElement
(
state
);
}
...
...
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