diff --git a/src/main/java/avatartranslator/mutation/ActionMutation.java b/src/main/java/avatartranslator/mutation/ActionMutation.java index 89b458a57c31757ac77a6cf1c40d1cdbd73b5409..26b339ea4fd92a84cdbe2207caf199ef4110c6b9 100644 --- a/src/main/java/avatartranslator/mutation/ActionMutation.java +++ b/src/main/java/avatartranslator/mutation/ActionMutation.java @@ -88,5 +88,11 @@ public abstract class ActionMutation extends TransitionMutation { public void setIndex(int _index) { index = _index; } + + public AvatarAction createAction(AvatarSpecification _avspec) { + AvatarBlock block = getBlock(_avspec); + AvatarAction action = AvatarTerm.createActionFromString(block, getActionString()); + return action; + } } diff --git a/src/main/java/avatartranslator/mutation/AddActionMutation.java b/src/main/java/avatartranslator/mutation/AddActionMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..3430669a65b48b985b301bf7547db7a90edbf0fc --- /dev/null +++ b/src/main/java/avatartranslator/mutation/AddActionMutation.java @@ -0,0 +1,81 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; +//import myutil.TraceManager; + +/** + * Class AddActionMutation + * Creation: 28/06/2022 + * + * @author Léon FRENOT + * @version 1.0 28/06/2022 + */ + +public class AddActionMutation extends ActionMutation implements AddMutation { + + public AddActionMutation(String _blockName, String _actionString) { + setBlockName(_blockName); + setActionString(_actionString); + initActions(); + } + + public AddActionMutation(String _blockName, String _actionString, int _index) { + this(_blockName, _actionString); + setIndex(_index); + } + + public AvatarElement createElement(AvatarSpecification _avspec) { + return null; + } + + public void apply(AvatarSpecification _avspec) { + AvatarAction action = createAction(_avspec); + AvatarTransition transition = getElement(_avspec); + if(getIndex() == -1) { + transition.addAction(action); + return; + } + List<AvatarAction> actions = transition.getActions(); + actions.add(getIndex(), action); + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/AddAssociationMutation.java b/src/main/java/avatartranslator/mutation/AddAssociationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..5e6de25b87dc18e892679b058151982381dbf567 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/AddAssociationMutation.java @@ -0,0 +1,66 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; + +/** + * Class AddAssociationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public class AddAssociationMutation extends AssociationMutation implements AddMutation{ + + public AddAssociationMutation(String _block1, String _block2, String _signal1, String _signal2) { + setBlocks(_block1, _block2); + setSignals(_signal1, _signal2); + } + + public AvatarElement createElement(AvatarSpecification _avspec) { + return null; + } + + public void apply(AvatarSpecification _avspec) { + AvatarRelation relation = getElement(_avspec); + relation.addSignals(getSignal1(_avspec), getSignal2(_avspec)); + } + +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/AddBlockMutation.java b/src/main/java/avatartranslator/mutation/AddBlockMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..282c42218be01b54d452aecea889e631cd121a6e --- /dev/null +++ b/src/main/java/avatartranslator/mutation/AddBlockMutation.java @@ -0,0 +1,68 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; +/** + * Class AddBlockMutation + * Creation: 23/06/2022 + * + * @author Léon FRENOT + * @version 1.0 23/06/2022 + */ + +public class AddBlockMutation extends BlockStructMutation implements AddMutation { + + private boolean isGraphical = false; + + public AddBlockMutation(String _blockName) { + setBlockName(_blockName); + } + + //todo : graphic + public AvatarBlock createElement(AvatarSpecification _avspec) { + AvatarBlock block = new AvatarBlock(getBlockName(), _avspec, null); + return block; + } + + public void apply(AvatarSpecification _avspec) { + AvatarBlock block = createElement(_avspec); + _avspec.addBlock(block); + } +} diff --git a/src/main/java/avatartranslator/mutation/AddRelationMutation.java b/src/main/java/avatartranslator/mutation/AddRelationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..a71ec70d936019769edcfec4eaafc22dbf8318b3 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/AddRelationMutation.java @@ -0,0 +1,85 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; + +/** + * Class AddRelationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public class AddRelationMutation extends RelationMutation implements AddMutation { + + private boolean isGraphic = false; + + public AddRelationMutation(String _block1, String _block2) { + setBlocks(_block1, _block2); + } + + //todo : graphic + public AvatarRelation createElement(AvatarSpecification _avspec) { + AvatarRelation relation = new AvatarRelation(getName(), getBlock1(_avspec), getBlock2(_avspec), null); + + if (this.blockingSet()) relation.setBlocking(this.isBlocking()); + + if (this.asynchronousSet()) relation.setAsynchronous(this.isAsynchronous()); + + if (this.AMSSet()) relation.setAMS(this.isAMS()); + + if (this.privateSet()) relation.setPrivate(this.isPrivate()); + + if (this.broadcastSet()) relation.setBroadcast(this.isBroadcast()); + + if (this.lossySet()) relation.setLossy(this.isLossy()); + + if (this.sizeOfFIFOSet()) relation.setSizeOfFIFO(this.getSizeOfFIFO()); + + if (this.idSet()) relation.setId(this.getId()); + + return relation; + } + + public void apply(AvatarSpecification _avspec) { + AvatarRelation relation = createElement(_avspec); + _avspec.addRelation(relation); + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/AssociationMutation.java b/src/main/java/avatartranslator/mutation/AssociationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..8a4eb8b1a1d9b3b2fee97efcbb2e5b0cfafcdf88 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/AssociationMutation.java @@ -0,0 +1,86 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; + +/** + * Class AssociationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public abstract class AssociationMutation extends RelationMutation { + + private String signal1; + private String signal2; + + public AvatarSignal getSignal(AvatarSpecification _avspec, String _signal) { + AvatarBlock block = getBlock1(_avspec); + AvatarSignal signal = block.getSignalByName(_signal); + if (signal == null) { + block = getBlock2(_avspec); + signal = block.getSignalByName(_signal); + } + return signal; + } + + public String getSignal1() { + return signal1; + } + + public AvatarSignal getSignal1(AvatarSpecification _avspec) { + return getSignal(_avspec, getSignal1()); + } + + public String getSignal2() { + return signal2; + } + + public AvatarSignal getSignal2(AvatarSpecification _avspec) { + return getSignal(_avspec, getSignal2()); + } + + public void setSignals(String _signal1, String _signal2) { + signal1 = _signal1; + signal2 = _signal2; + } + +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/AvatarMutation.java b/src/main/java/avatartranslator/mutation/AvatarMutation.java index bc2d80d3926cda811cce97b4962a778cf03e5288..6acddb465f16531d07f42c89b61411b77e00f2b0 100644 --- a/src/main/java/avatartranslator/mutation/AvatarMutation.java +++ b/src/main/java/avatartranslator/mutation/AvatarMutation.java @@ -49,5 +49,9 @@ import avatartranslator.*; */ public abstract class AvatarMutation { + public AvatarBlock getBlock(AvatarSpecification _avspec, String _block) { + return _avspec.getBlockWithName(_block); + } + public abstract void apply(AvatarSpecification _avspec); } \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/BlockStructMutation.java b/src/main/java/avatartranslator/mutation/BlockStructMutation.java index 539b5c9d2ff56e17b1fb5623526b5b60bc98ecfb..524b415ef2752f14600e8a1d81ebdf85e25ffd6f 100644 --- a/src/main/java/avatartranslator/mutation/BlockStructMutation.java +++ b/src/main/java/avatartranslator/mutation/BlockStructMutation.java @@ -58,6 +58,10 @@ public abstract class BlockStructMutation extends AvatarMutation { return _avspec.getBlockWithName(blockName); } + public String getBlockName() { + return blockName; + } + public AvatarAttribute getAttribute(AvatarSpecification _avspec, String _name) { AvatarBlock block = getBlock(_avspec); return block.getAvatarAttributeWithName(_name); diff --git a/src/main/java/avatartranslator/mutation/MdActionMutation.java b/src/main/java/avatartranslator/mutation/MdActionMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..71e15d80a76099c2a92f2a93e94d4973c31ee5bd --- /dev/null +++ b/src/main/java/avatartranslator/mutation/MdActionMutation.java @@ -0,0 +1,71 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; +//import myutil.TraceManager; + +/** + * Class MdActionMutation + * Creation: 28/06/2022 + * + * @author Léon FRENOT + * @version 1.0 28/06/2022 + */ + +public class MdActionMutation extends ActionMutation implements MdMutation { + + public MdActionMutation(String _blockName, String _actionString, int _index) { + setBlockName(_blockName); + setActionString(_actionString); + setIndex(_index); + initActions(); + } + + public void apply(AvatarSpecification _avspec) { + AvatarTransition transition = getElement(_avspec); + List<AvatarAction> actions = transition.getActions(); + AvatarAction action = createAction(_avspec); + + actions.remove(getIndex()); + actions.add(getIndex(), action); + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/MdRelationMutation.java b/src/main/java/avatartranslator/mutation/MdRelationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..4bea56614a84edcf9b018f2dab3f0ed27cd7d25c --- /dev/null +++ b/src/main/java/avatartranslator/mutation/MdRelationMutation.java @@ -0,0 +1,123 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; + +/** + * Class MdRelationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public class MdRelationMutation extends RelationMutation implements MdMutation { + + private RelationMutation current; + + public MdRelationMutation(String _block1, String _block2) { + setBlocks(_block1, _block2); + current = new RmRelationMutation(_block1, _block2); + } + + @Override + public void setName(String _name) { + current.setName(_name); + super.setName(_name); + } + + @Override + public void setUUID(String _uuid) { + current.setUUID(_uuid); + super.setUUID(_uuid); + } + + public void setCurrentBlocking(boolean b) { + current.setBlocking(b); + } + + public void setCurrentAsynchronous(boolean b) { + current.setAsynchronous(b); + } + + public void setCurrentAMS(boolean b) { + current.setAMS(b); + } + + public void setCurrentPrivate(boolean b) { + current.setPrivate(b); + } + + public void setCurrentBroadcast(boolean b) { + current.setBroadcast(b); + } + + public void setCurrentLossy(boolean b) { + current.setLossy(b); + } + + public void setCurrentSizeOfFIFO(int _sizeOfFIFO) { + current.setSizeOfFIFO(_sizeOfFIFO); + } + + public void setCurrentId(int _id) { + current.setId(_id); + } + + public void apply(AvatarSpecification _avspec) { + AvatarRelation relation = current.getElement(_avspec); + + if (this.blockingSet()) relation.setBlocking(this.isBlocking()); + + if (this.asynchronousSet()) relation.setAsynchronous(this.isAsynchronous()); + + if (this.AMSSet()) relation.setAMS(this.isAMS()); + + if (this.privateSet()) relation.setPrivate(this.isPrivate()); + + if (this.broadcastSet()) relation.setBroadcast(this.isBroadcast()); + + if (this.lossySet()) relation.setLossy(this.isLossy()); + + if (this.sizeOfFIFOSet()) relation.setSizeOfFIFO(this.getSizeOfFIFO()); + + if (this.idSet()) relation.setId(this.getId()); + } + +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/RelationMutation.java b/src/main/java/avatartranslator/mutation/RelationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..a9a1ccbd6ecb36dd4f865b81305357bd680a3e36 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/RelationMutation.java @@ -0,0 +1,273 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; +import java.util.UUID; + + +import avatartranslator.*; + +/** + * Class RelationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public abstract class RelationMutation extends AvatarMutation implements UnnamedElementMutation { + + private String name = ""; + private int nameType = UNDEFINED_TYPE; + + private String block1, block2; + + private boolean blocking = false, asynchronous = false, ams = false, isPrivate, isBroadcast = false, isLossy; + private boolean blockingSet = false, asynchronousSet = false, amsSet = false, isPrivateSet = false, isBroadcastSet = false, isLossySet = false; + + private int sizeOfFIFO = 1024; // -1 means infinite + private boolean sizeOfFIFOSet = false; + + private int id = 0;//DG + private boolean idSet = false; + + public String getName() { + return name; + } + + public boolean isNameSet() { + return nameType != UNDEFINED_TYPE; + } + + public int getNameType() { + return nameType; + } + + public void setName(String _name) { + name = _name; + nameType = NAME_TYPE; + } + + public void setUUID(String _uuid) { + name = _uuid; + nameType = UUID_TYPE; + } + + public String getBlock1() { + return block1; + } + + public AvatarBlock getBlock1(AvatarSpecification _avspec) { + return getBlock(_avspec, getBlock1()); + } + + public String getBlock2() { + return block2; + } + + public AvatarBlock getBlock2(AvatarSpecification _avspec) { + return getBlock(_avspec, getBlock2()); + } + + public void setBlocks(String _block1, String _block2) { + block1 = _block1; + block2 = _block2; + } + + public boolean isBlocking() { + return blocking; + } + + public boolean blockingSet() { + return blockingSet; + } + + public void setBlocking(boolean b) { + blocking = b; + blockingSet = true; + } + + public boolean isAsynchronous() { + return asynchronous; + } + + public boolean asynchronousSet() { + return asynchronousSet; + } + + public void setAsynchronous(boolean b) { + asynchronous = b; + asynchronousSet = true; + } + + public boolean isAMS() { + return ams; + } + + public boolean AMSSet() { + return amsSet; + } + + public void setAMS(boolean b) { + ams = b; + amsSet = true; + } + + public boolean isPrivate() { + return isPrivate; + } + + public boolean privateSet() { + return isPrivateSet; + } + + public void setPrivate(boolean b) { + isPrivate = b; + isPrivateSet = true; + } + + public boolean isBroadcast() { + return isBroadcast; + } + + public boolean broadcastSet() { + return isBroadcastSet; + } + + public void setBroadcast(boolean b) { + isBroadcast = b; + isBroadcastSet = true; + } + + public boolean isLossy() { + return isLossy; + } + + public boolean lossySet() { + return isLossySet; + } + + public void setLossy(boolean b) { + isLossy = b; + isLossySet = true; + } + + public int getSizeOfFIFO() { + return sizeOfFIFO; + } + + public boolean sizeOfFIFOSet() { + return sizeOfFIFOSet; + } + + public void setSizeOfFIFO(int _sizeOfFIFO) { + sizeOfFIFO = _sizeOfFIFO; + sizeOfFIFOSet = true; + } + + public int getId() { + return id; + } + + public boolean idSet() { + return idSet; + } + + public void setId(int _id) { + id = _id; + idSet = true; + } + + public AvatarRelation getElementFromName(AvatarSpecification _avspec, String _name) { + List<AvatarRelation> relations = _avspec.getRelations(); + for (AvatarRelation rel : relations) { + if (rel.getName().equals(_name)) return rel; + } + return null; + } + + public AvatarRelation getElementFromUUID(AvatarSpecification _avspec, String _uuid) { + List<AvatarRelation> relations = _avspec.getRelations(); + for (AvatarRelation rel : relations) { + UUID relUUID = rel.getUUID(); + UUID uuid = UUID.fromString(_uuid); + if (relUUID != null) { + if (relUUID.equals(uuid)) return rel; + } + } + return null; + } + + public AvatarRelation getElement(AvatarSpecification _avspec, int _type, String _name) { + if (_type == NAME_TYPE) return getElementFromName(_avspec, _name); + if (_type == UUID_TYPE) return getElementFromUUID(_avspec, _name); + return null; + } + + public AvatarRelation getElement(AvatarSpecification _avspec) { + if(!isNameSet()) { + List<AvatarRelation> relations = _avspec.getRelations(); + for (AvatarRelation relation : relations) { + boolean flag = relation.getBlock1().getName().equals(this.getBlock1()); + + flag = flag && relation.getBlock2().getName().equals(this.getBlock2()); + + if (flag && blockingSet()) flag = (relation.isBlocking() == this.isBlocking()); + + if (flag && asynchronousSet()) flag = (relation.isAsynchronous() == this.isAsynchronous()); + + if (flag && AMSSet()) flag = (relation.isAMS() == this.isAMS()); + + if (flag && privateSet()) flag = (relation.isPrivate() == this.isPrivate()); + + if (flag && broadcastSet()) flag = (relation.isBroadcast() == this.isBroadcast()); + + if (flag && lossySet()) flag = (relation.isLossy() == this.isLossy()); + + if (flag && sizeOfFIFOSet()) flag = (relation.getSizeOfFIFO() == this.getSizeOfFIFO()); + + if (flag && idSet()) flag = (relation.getId() == this.getId()); + + if (flag) return relation; + } + return null; + } + return getElement(_avspec, getNameType(), getName()); + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/RmActionMutation.java b/src/main/java/avatartranslator/mutation/RmActionMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..a59194f38f9b3673d6ca2ef806c5e869930c258d --- /dev/null +++ b/src/main/java/avatartranslator/mutation/RmActionMutation.java @@ -0,0 +1,86 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; +//import myutil.TraceManager; + +/** + * Class RmActionMutation + * Creation: 28/06/2022 + * + * @author Léon FRENOT + * @version 1.0 28/06/2022 + */ + +public class RmActionMutation extends ActionMutation implements RmMutation { + + public RmActionMutation(String _blockName, String _actionString) { + setBlockName(_blockName); + setActionString(_actionString); + initActions(); + } + + public RmActionMutation(String _blockName, int _index) { + setBlockName(_blockName); + setIndex(_index); + initActions(); + } + + public void apply(AvatarSpecification _avspec) { + AvatarTransition transition = getElement(_avspec); + + List<AvatarAction> actions = transition.getActions(); + + if(getIndex() != -1) { + actions.remove(getIndex()); + return; + } + + AvatarAction action = createAction(_avspec); + for(AvatarAction tmp_action : actions) { + if(action.toString().equals(tmp_action.toString())) { + actions.remove(tmp_action); + return; + } + } + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/RmAssociationMutation.java b/src/main/java/avatartranslator/mutation/RmAssociationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..78fa553cb34bab3ec4cf511ab5f55cc3b07d1e69 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/RmAssociationMutation.java @@ -0,0 +1,62 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import avatartranslator.*; + +/** + * Class RmAssociationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public class RmAssociationMutation extends AssociationMutation implements RmMutation { + + public RmAssociationMutation(String _block1, String _block2, String _signal1, String _signal2) { + setBlocks(_block1, _block2); + setSignals(_signal1, _signal2); + } + + public void apply(AvatarSpecification _avspec) { + AvatarRelation relation = getElement(_avspec); + relation.removeAssociation(getSignal1(_avspec), getSignal2(_avspec)); + } + +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/RmBlockMutation.java b/src/main/java/avatartranslator/mutation/RmBlockMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..8d59519f4c9ffce85ae535ee8f8daacb0601b60b --- /dev/null +++ b/src/main/java/avatartranslator/mutation/RmBlockMutation.java @@ -0,0 +1,67 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; +/** + * Class RmBlockMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ + +public class RmBlockMutation extends BlockStructMutation implements RmMutation { + + public RmBlockMutation(String _blockName) { + setBlockName(_blockName); + } + + public AvatarBlock getElement(AvatarSpecification _avspec) { + return getBlock(_avspec); + } + + public void apply(AvatarSpecification _avspec) { + AvatarBlock block = getElement(_avspec); + List<AvatarBlock> blocks = _avspec.getListOfBlocks(); + blocks.remove(block); + } +} diff --git a/src/main/java/avatartranslator/mutation/RmRelationMutation.java b/src/main/java/avatartranslator/mutation/RmRelationMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..32c14cb56b7e72cc09d146a57cba1f4cda5a2868 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/RmRelationMutation.java @@ -0,0 +1,64 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; + +/** + * Class RmRelationMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ +public class RmRelationMutation extends RelationMutation implements RmMutation { + + public RmRelationMutation(String _block1, String _block2) { + setBlocks(_block1, _block2); + } + + public void apply(AvatarSpecification _avspec) { + AvatarRelation relation = getElement(_avspec); + List<AvatarRelation> relations = _avspec.getRelations(); + relations.remove(relation); + } + +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/StateMachineElementMutation.java b/src/main/java/avatartranslator/mutation/StateMachineElementMutation.java index 7767af6969ed88d4337f6b1a5ef146a7a3ecd179..d7fb2561306a725d7ddd88b979f6c370f3b8f5ea 100644 --- a/src/main/java/avatartranslator/mutation/StateMachineElementMutation.java +++ b/src/main/java/avatartranslator/mutation/StateMachineElementMutation.java @@ -51,36 +51,39 @@ import java.util.UUID; * @version 1.0 27/06/2022 */ -public abstract class StateMachineElementMutation extends BlockStructMutation { +public abstract class StateMachineElementMutation extends BlockStructMutation implements UnnamedElementMutation { - public static final int UNDEFINED_TYPE = -1; - public static final int NAME_TYPE = 0; - public static final int UUID_TYPE = 1; - public AvatarStateMachine getAvatarStateMachine(AvatarSpecification _avspec) { AvatarBlock block = getBlock(_avspec); return block.getStateMachine(); } - public AvatarStateMachineElement getElement(AvatarSpecification _avspec, int _type, String _name) { + public AvatarStateMachineElement getElementFromName(AvatarSpecification _avspec, String _name) { + AvatarStateMachine asm = getAvatarStateMachine(_avspec); + List<AvatarStateMachineElement> elts = asm.getListOfElements(); + for (AvatarStateMachineElement elt : elts) { + if (elt.getName().equals(_name)) return elt; + } + return null; + } + + public AvatarStateMachineElement getElementFromUUID(AvatarSpecification _avspec, String _uuid) { AvatarStateMachine asm = getAvatarStateMachine(_avspec); List<AvatarStateMachineElement> elts = asm.getListOfElements(); - switch(_type) { - case NAME_TYPE: - for (AvatarStateMachineElement elt : elts) { - if (elt.getName().equals(_name)) return elt; - } - return null; - case UUID_TYPE: - for (AvatarStateMachineElement elt : elts) { - UUID eltUUID = elt.getUUID(); - UUID uuid = UUID.fromString(_name); - if (eltUUID != null) { - if (eltUUID.equals(uuid)) return elt; - } - } - return null; + for (AvatarStateMachineElement elt : elts) { + UUID eltUUID = elt.getUUID(); + UUID uuid = UUID.fromString(_uuid); + if (eltUUID != null) { + if (eltUUID.equals(uuid)) return elt; + } } return null; + + } + + public AvatarStateMachineElement getElement(AvatarSpecification _avspec, int _type, String _name) { + if (_type == NAME_TYPE) return getElementFromName(_avspec, _name); + if (_type == UUID_TYPE) return getElementFromUUID(_avspec, _name); + return null; } } diff --git a/src/main/java/avatartranslator/mutation/SwapActionMutation.java b/src/main/java/avatartranslator/mutation/SwapActionMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..6148bb04a5289dc730913a05d05fae4cf697166b --- /dev/null +++ b/src/main/java/avatartranslator/mutation/SwapActionMutation.java @@ -0,0 +1,81 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; +import java.lang.Math; + +import avatartranslator.*; +//import myutil.TraceManager; + +/** + * Class SwapActionMutation + * Creation: 28/06/2022 + * + * @author Léon FRENOT + * @version 1.0 28/06/2022 + */ + +public class SwapActionMutation extends ActionMutation implements MdMutation { + + private int maxIndex; + + public SwapActionMutation(String _blockName, int _index1, int _index2) { + int minIndex = Math.min(_index1, _index2); + int maxIndex = Math.max(_index1, _index2); + + setBlockName(_blockName); + setIndex(minIndex); + this.maxIndex = maxIndex; + initActions(); + } + + public void apply(AvatarSpecification _avspec) { + AvatarTransition transition = getElement(_avspec); + List<AvatarAction> actions = transition.getActions(); + AvatarAction action1 = actions.get(getIndex()); + AvatarAction action2 = actions.get(maxIndex); + + actions.remove(getIndex()); + actions.remove(maxIndex); + + actions.add(getIndex(), action2); + actions.add(maxIndex, action1); + } +} \ No newline at end of file diff --git a/src/main/java/avatartranslator/mutation/UnnamedElementMutation.java b/src/main/java/avatartranslator/mutation/UnnamedElementMutation.java new file mode 100644 index 0000000000000000000000000000000000000000..66fd6df4e9c6e1cddab9e951763de9a14c01ddb2 --- /dev/null +++ b/src/main/java/avatartranslator/mutation/UnnamedElementMutation.java @@ -0,0 +1,60 @@ +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille + * + * ludovic.apvrille AT enst.fr + * + * This software is a computer program whose purpose is to allow the + * edition of TURTLE analysis, design and deployment diagrams, to + * allow the generation of RT-LOTOS or Java code from this diagram, + * and at last to allow the analysis of formal validation traces + * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP + * from INRIA Rhone-Alpes. + * + * This software is governed by the CeCILL license under French law and + * abiding by the rules of distribution of free software. You can use, + * modify and/ or redistribute the software under the terms of the CeCILL + * license as circulated by CEA, CNRS and INRIA at the following URL + * "http://www.cecill.info". + * + * As a counterpart to the access to the source code and rights to copy, + * modify and redistribute granted by the license, users are provided only + * with a limited warranty and the software's author, the holder of the + * economic rights, and the successive licensors have only limited + * liability. + * + * In this respect, the user's attention is drawn to the risks associated + * with loading, using, modifying and/or developing or reproducing the + * software by the user in light of its specific status of free software, + * that may mean that it is complicated to manipulate, and that also + * therefore means that it is reserved for developers and experienced + * professionals having in-depth computer knowledge. Users are therefore + * encouraged to load and test the software's suitability as regards their + * requirements in conditions enabling the security of their systems and/or + * data to be ensured and, more generally, to use and operate it in the + * same conditions as regards security. + * + * The fact that you are presently reading this means that you have had + * knowledge of the CeCILL license and that you accept its terms. + */ + +package avatartranslator.mutation; + +import java.util.List; + +import avatartranslator.*; + +/** + * Interface UnnamedElementMutation + * Creation: 29/06/2022 + * + * @author Léon FRENOT + * @version 1.0 29/06/2022 + */ + +public interface UnnamedElementMutation { + + public static final int UNDEFINED_TYPE = -1; + public static final int NAME_TYPE = 0; + public static final int UUID_TYPE = 1; + + public AvatarElement getElement(AvatarSpecification _avspec, int _type, String _name); +}