diff --git a/src/main/java/avatartranslator/AvatarBlock.java b/src/main/java/avatartranslator/AvatarBlock.java index eb55607d19953b39052714cae88e6aa54a8b1c29..4a631bbdd5b69062c49db47a29e8b0797d9c9d3e 100644 --- a/src/main/java/avatartranslator/AvatarBlock.java +++ b/src/main/java/avatartranslator/AvatarBlock.java @@ -38,7 +38,7 @@ package avatartranslator; -import myutil.intboolsolver.IBSCompParam; +import myutil.intboolsolver.IBSParamComp; import java.util.ArrayList; import java.util.LinkedList; @@ -51,7 +51,7 @@ import java.util.List; * @author Ludovic APVRILLE, Raja GATGOUT * @version 1.1 01/07/2014 */ -public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwner,IBSCompParam { +public class AvatarBlock extends AvatarElement implements AvatarStateMachineOwner, IBSParamComp { private AvatarBlock father; private List<AvatarAttribute> attributes; diff --git a/src/main/java/avatartranslator/AvatarSpecification.java b/src/main/java/avatartranslator/AvatarSpecification.java index b8b11246f3b9e8116f27fa39437688b53a670725..55ff4e9944946b6b8a3283e60e2602bedc22de4e 100644 --- a/src/main/java/avatartranslator/AvatarSpecification.java +++ b/src/main/java/avatartranslator/AvatarSpecification.java @@ -39,8 +39,7 @@ package avatartranslator; import myutil.TraceManager; -import myutil.intboolsolver.IBSParams; -import myutil.intboolsolver.IBSSpecParam; +import myutil.intboolsolver.IBSParamSpec; import java.util.*; @@ -52,7 +51,7 @@ import java.util.*; * @author Ludovic APVRILLE * @version 1.0 20/05/2010 */ -public class AvatarSpecification extends AvatarElement implements IBSSpecParam { +public class AvatarSpecification extends AvatarElement implements IBSParamSpec { public final static int UPPAAL_MAX_INT = 32767; diff --git a/src/main/java/avatartranslator/AvatarStateMachineElement.java b/src/main/java/avatartranslator/AvatarStateMachineElement.java index f5827eab9a6a360f1afac293bb1b82fb6053efc7..18c27f1061527e447c27e6f70ab8188d3bf1154b 100644 --- a/src/main/java/avatartranslator/AvatarStateMachineElement.java +++ b/src/main/java/avatartranslator/AvatarStateMachineElement.java @@ -40,7 +40,7 @@ package avatartranslator; import myutil.TraceManager; -import myutil.intboolsolver.IBSStateParam; +import myutil.intboolsolver.IBSParamState; import ui.TGComponent; import java.util.HashMap; @@ -55,7 +55,7 @@ import java.util.List; * @author Ludovic APVRILLE * @version 1.0 20/05/2010 */ -public abstract class AvatarStateMachineElement extends AvatarElement implements IBSStateParam { +public abstract class AvatarStateMachineElement extends AvatarElement implements IBSParamState { protected List<AvatarStateMachineElement> nexts; private AvatarState myState; diff --git a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsSolver.java b/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsSolver.java index d2160d2929c4b781b0a664ab357073922ed97b68..770d7546af6452656f08e0c6b0cbc6507b40d3e4 100644 --- a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsSolver.java +++ b/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsSolver.java @@ -13,11 +13,11 @@ public class AvatarIBSAbsSolver extends IBSolver< AvatarStateMachineElement, SpecificationState, SpecificationBlock, - AvatarIBSAbsAttribute, - AvatarIBSAbsAttributeClass + AvatarIBSStdAttribute, + AvatarIBSStdAttributeClass > { public AvatarIBSAbsSolver() { - super(new AvatarIBSAbsAttributeClass()); + super(new AvatarIBSStdAttributeClass()); } void main(String[] args) { return;} } diff --git a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttribute.java b/src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttribute.java similarity index 99% rename from src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttribute.java rename to src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttribute.java index d315ef456fa0e944de8390b113b396581756ac31..4d2a7213499fcbb994ae84fdb713338529381216 100644 --- a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttribute.java +++ b/src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttribute.java @@ -40,7 +40,7 @@ package avatartranslator.intboolsolver; import avatartranslator.*; import avatartranslator.modelchecker.SpecificationBlock; import avatartranslator.modelchecker.SpecificationState; -import myutil.intboolsolver.IBSAbsAttribute; +import myutil.intboolsolver.IBSStdAttribute; import myutil.intboolsolver.IBSAttributeTypes; /** @@ -59,7 +59,7 @@ import myutil.intboolsolver.IBSAttributeTypes; // - AvatarSpecificationState must extend AvatarIBSAbstractAttribute.SpecificationState // - AvatarSpecificationBlock must extend AvatarIBSAbstractAttribute.SpecificationBlock -public class AvatarIBSAbsAttribute extends IBSAbsAttribute< +public class AvatarIBSStdAttribute extends IBSStdAttribute< AvatarSpecification, AvatarBlock, AvatarStateMachineElement, diff --git a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttributeClass.java b/src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttributeClass.java similarity index 91% rename from src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttributeClass.java rename to src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttributeClass.java index 0fe2fdac8157d54154f5d6355911cfd76fe76271..d67a3fa213dd8bd99ad1ac7054f7dd57ab83285b 100644 --- a/src/main/java/avatartranslator/intboolsolver/AvatarIBSAbsAttributeClass.java +++ b/src/main/java/avatartranslator/intboolsolver/AvatarIBSStdAttributeClass.java @@ -6,20 +6,20 @@ import avatartranslator.AvatarSpecification; import avatartranslator.AvatarStateMachineElement; import avatartranslator.modelchecker.SpecificationBlock; import avatartranslator.modelchecker.SpecificationState; -import myutil.intboolsolver.IBSAbsAttributeClass; +import myutil.intboolsolver.IBSStdAttributeClass; import myutil.intboolsolver.IBSAttributeTypes; import myutil.intboolsolver.IBSTypedAttribute; import java.util.HashMap; import java.util.Map; -public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< +public class AvatarIBSStdAttributeClass extends IBSStdAttributeClass< AvatarSpecification, AvatarBlock, AvatarStateMachineElement, SpecificationState, SpecificationBlock, - AvatarIBSAbsAttribute + AvatarIBSStdAttribute > { private static Map<AvatarElement, IBSTypedAttribute> attributesMap; // handling already covered attributes (memorisation) @@ -28,12 +28,12 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< private static String findString = ""; private static AvatarElement keyElement; - AvatarIBSAbsAttributeClass(){} + AvatarIBSStdAttributeClass(){} public IBSTypedAttribute getTypedAttribute(AvatarSpecification _spec, String _s) { IBSTypedAttribute a = findAttribute(_spec, _s); if (a == null) { - AvatarIBSAbsAttribute x = new AvatarIBSAbsAttribute(); // replaced... + AvatarIBSStdAttribute x = new AvatarIBSStdAttribute(); // replaced... x.classInitAttribute(_spec,_s); switch (x.getType()) { case IBSAttributeTypes.NullAttr:{ @@ -57,7 +57,7 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< public IBSTypedAttribute getTypedAttribute(AvatarBlock _comp, String _s) { IBSTypedAttribute a = findAttribute(_comp, _s); if (a == null) { - AvatarIBSAbsAttribute x = new AvatarIBSAbsAttribute(); // replaced + AvatarIBSStdAttribute x = new AvatarIBSStdAttribute(); // replaced x.classInitAttribute(_comp,_s); switch (x.getType()) { case IBSAttributeTypes.NullAttr:{ @@ -80,7 +80,7 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< public IBSTypedAttribute getTypedAttribute(AvatarBlock _comp, AvatarStateMachineElement _state) { IBSTypedAttribute a = findAttribute(_comp, _state); if (a == null) { - AvatarIBSAbsAttribute x = new AvatarIBSAbsAttribute(); // replaced + AvatarIBSStdAttribute x = new AvatarIBSStdAttribute(); // replaced x.classInitAttribute(_comp,_state); switch (x.getType()) { case IBSAttributeTypes.NullAttr:{ @@ -102,14 +102,14 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< public boolean instanceOfMe(int _type, Object _val) { - return (_val instanceof AvatarIBSAbsAttribute && - _type == ((AvatarIBSAbsAttribute)_val).getType()); + return (_val instanceof AvatarIBSStdAttribute && + _type == ((AvatarIBSStdAttribute)_val).getType()); } public boolean instanceOfMe(IBSTypedAttribute _ta) { Object v = _ta.getVal(); - return (v instanceof AvatarIBSAbsAttribute && - _ta.getType() == ((AvatarIBSAbsAttribute)v).getType()); + return (v instanceof AvatarIBSStdAttribute && + _ta.getType() == ((AvatarIBSStdAttribute)v).getType()); } @@ -129,7 +129,7 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< IBSTypedAttribute ta = attributesMap.get(ae); if (ta.isAttribute()){ //might be uninitialized - ((AvatarIBSAbsAttribute)(ta.getVal())).linkComp(_spec); + ((AvatarIBSStdAttribute)(ta.getVal())).linkComp(_spec); } return ta; } @@ -146,7 +146,7 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< else ae = getElement(_s, _spec); if (ae != null){ - if (_att.isAttribute() && !(_att.getVal() instanceof AvatarIBSAbsAttribute)) + if (_att.isAttribute() && !(_att.getVal() instanceof AvatarIBSStdAttribute)) return; // should be an error attributesMap.put(ae, _att); } @@ -172,7 +172,7 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< else ae = getElement(_s, _comp); if (ae != null){ - if (_att.isAttribute() && !(_att.getVal() instanceof AvatarIBSAbsAttribute)) + if (_att.isAttribute() && !(_att.getVal() instanceof AvatarIBSStdAttribute)) return; // should be an error attributesMap.put(ae, _att); } @@ -191,8 +191,8 @@ public class AvatarIBSAbsAttributeClass extends IBSAbsAttributeClass< if (_att == null || (_att.isAttribute() && (!(instanceOfMe(_att)) || - !((AvatarIBSAbsAttribute) _att.getVal()).isState() || - _state != ((AvatarIBSAbsAttribute) _att.getVal()).state + !((AvatarIBSStdAttribute) _att.getVal()).isState() || + _state != ((AvatarIBSStdAttribute) _att.getVal()).state ) ) ) diff --git a/src/main/java/avatartranslator/modelchecker/SpecificationBlock.java b/src/main/java/avatartranslator/modelchecker/SpecificationBlock.java index f8ad6664a55b130ac052add089629e957b8d9df6..8b62c67ed70b38d0ee7ba8f209e5b6af8d20ca87 100644 --- a/src/main/java/avatartranslator/modelchecker/SpecificationBlock.java +++ b/src/main/java/avatartranslator/modelchecker/SpecificationBlock.java @@ -40,7 +40,7 @@ package avatartranslator.modelchecker; import avatartranslator.AvatarAttribute; import avatartranslator.AvatarBlock; -import myutil.intboolsolver.IBSCompStateParam; +import myutil.intboolsolver.IBSParamCompState; import java.util.Arrays; import java.util.List; @@ -54,7 +54,7 @@ import java.util.Vector; * @author Ludovic APVRILLE * @version 1.0 31/05/2016 */ -public class SpecificationBlock implements IBSCompStateParam { +public class SpecificationBlock implements IBSParamCompState { public static final int HEADER_VALUES = 3; diff --git a/src/main/java/avatartranslator/modelchecker/SpecificationState.java b/src/main/java/avatartranslator/modelchecker/SpecificationState.java index 85af9a621e324325f56b38b87a664eb68505057b..70cd150317cf56994d65f18fa85a7785747822ea 100644 --- a/src/main/java/avatartranslator/modelchecker/SpecificationState.java +++ b/src/main/java/avatartranslator/modelchecker/SpecificationState.java @@ -45,9 +45,8 @@ package avatartranslator.modelchecker; import avatartranslator.AvatarBlock; import avatartranslator.AvatarSpecification; -import myutil.intboolsolver.IBSSpecStateParam; +import myutil.intboolsolver.IBSParamSpecState; -import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; @@ -58,7 +57,7 @@ import java.util.LinkedList; * @version 1.0 31/05/2016 * @author Ludovic APVRILLE */ -public class SpecificationState implements IBSSpecStateParam, Comparable<SpecificationState> { +public class SpecificationState implements IBSParamSpecState, Comparable<SpecificationState> { public SpecificationBlock [] blocks; public int hashValue; public boolean hashComputed; diff --git a/src/main/java/myutil/intboolsolver/IBSAttribute.java b/src/main/java/myutil/intboolsolver/IBSAttribute.java index 9798d734259c009c062e963a6b3788a1ddf1b1ef..8f6f6185b4497b1bb8b39d4917678fa4c9f657fd 100644 --- a/src/main/java/myutil/intboolsolver/IBSAttribute.java +++ b/src/main/java/myutil/intboolsolver/IBSAttribute.java @@ -1,4 +1,4 @@ - /* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille +/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille * * ludovic.apvrille AT enst.fr * @@ -35,24 +35,30 @@ * 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 myutil.intboolsolver; -// import intboolsolver.IBSolver; // usefull in implementations +package myutil.intboolsolver; /** - * Class IBSAttribute - * Creation: 27/02/2023 - * @version 0.0 27/02/2023 - * - * @author Sophie Coudert + * Interface IBSAttribute, describing the "dynamic" generic part of open + * leaves of {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> This interface describes the features required from the + * instances of {@link myutil.intboolsolver.IBSolver IBSolver} + * attributes. Its implementations are intended to instantiate + * the {@code ATT} parameter of the generic + * {@link myutil.intboolsolver.IBSolver IBSolver} </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) */ -interface IBSAttribute< - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam +public interface IBSAttribute< + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState > { // returns a type from IBSolver // (i.e. among IMMEDIATE_(BOOL,INT,NO)) diff --git a/src/main/java/myutil/intboolsolver/IBSAttributeClass.java b/src/main/java/myutil/intboolsolver/IBSAttributeClass.java index 2fe3d6fe23e18c56227f5f30666afceb9a779aad..665b921d42eb1076cc0470f5405f340f44e806bc 100644 --- a/src/main/java/myutil/intboolsolver/IBSAttributeClass.java +++ b/src/main/java/myutil/intboolsolver/IBSAttributeClass.java @@ -1,11 +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 myutil.intboolsolver; +/** + * class IBSAttribute (interface), describing the "static" generic part + * shared by all open leaves of {@link myutil.intboolsolver.IBSolver + * IBSolver}. + * Creation: 07/03/2023 + * + * <p> This interface describes the features required from the + * class of {@link myutil.intboolsolver.IBSolver IBSolver} + * attributes (methods that do not depend on attribute instances). + * Its implementations are intended to instantiate + * the {@code AtC} parameter of the generic + * {@link myutil.intboolsolver.IBSolver IBSolver} </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) + */ + public class IBSAttributeClass< - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam, + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState, Att extends IBSAttribute<Spec,Comp,State,SpecState,CompState> > { public IBSTypedAttribute getTypedAttribute(Spec _spec, String _s) { diff --git a/src/main/java/myutil/intboolsolver/IBSAttributeTypes.java b/src/main/java/myutil/intboolsolver/IBSAttributeTypes.java index 6f6ab4bc6dd8c4f10ea404f2db89e2d598d70ca7..62fed41751144f7a3ad1662b8828ccc07044f614 100644 --- a/src/main/java/myutil/intboolsolver/IBSAttributeTypes.java +++ b/src/main/java/myutil/intboolsolver/IBSAttributeTypes.java @@ -1,4 +1,49 @@ +/* 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 myutil.intboolsolver; + +/** + * The type of results that can be returned when trying to build + * attributes. + * Creation: 07/03/2023 + * @author Sophie Coudert + */ + public final class IBSAttributeTypes { public static final int NullAttr =0; // val is null public static final int BoolConst =1; // val is an Int integer diff --git a/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttribute.java b/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttribute.java index 9773e0209d52e0a9246c755ffb73a36f86e3de67..ee83205c461403ea1e87054b0d6373edb31f1f9b 100644 --- a/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttribute.java +++ b/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttribute.java @@ -1,11 +1,11 @@ package myutil.intboolsolver; -public class IBSClosedFormulaAttribute extends IBSAbsAttribute< - IBSSpecParam, - IBSCompParam, - IBSStateParam, - IBSSpecStateParam, - IBSCompStateParam +public class IBSClosedFormulaAttribute extends IBSStdAttribute< + IBSParamSpec, + IBSParamComp, + IBSParamState, + IBSParamSpecState, + IBSParamCompState > { IBSClosedFormulaAttribute(){} } diff --git a/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttributeClass.java b/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttributeClass.java index 1b5683e6a3109cdf06e0a9a7d97de95305432ee5..a4e2e3c048677a9c1551158d7b81a9a0d6bb0ca9 100644 --- a/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttributeClass.java +++ b/src/main/java/myutil/intboolsolver/IBSClosedFormulaAttributeClass.java @@ -1,12 +1,12 @@ package myutil.intboolsolver; -public class IBSClosedFormulaAttributeClass extends IBSAbsAttributeClass< - IBSSpecParam, - IBSCompParam, - IBSStateParam, - IBSSpecStateParam, - IBSCompStateParam, +public class IBSClosedFormulaAttributeClass extends IBSStdAttributeClass< + IBSParamSpec, + IBSParamComp, + IBSParamState, + IBSParamSpecState, + IBSParamCompState, IBSClosedFormulaAttribute - > { + > { IBSClosedFormulaAttributeClass(){} } diff --git a/src/main/java/myutil/intboolsolver/IBSClosedFormulaSolver.java b/src/main/java/myutil/intboolsolver/IBSClosedFormulaSolver.java index 245bfdb1dcf69a380cc48f5833e5b304a5f102f6..34e73a53bd105150e03ba3f3881f3a5d6622572f 100644 --- a/src/main/java/myutil/intboolsolver/IBSClosedFormulaSolver.java +++ b/src/main/java/myutil/intboolsolver/IBSClosedFormulaSolver.java @@ -1,11 +1,11 @@ package myutil.intboolsolver; public class IBSClosedFormulaSolver extends IBSolver < - IBSSpecParam, - IBSCompParam, - IBSStateParam, - IBSSpecStateParam, - IBSCompStateParam, + IBSParamSpec, + IBSParamComp, + IBSParamState, + IBSParamSpecState, + IBSParamCompState, IBSClosedFormulaAttribute, IBSClosedFormulaAttributeClass > { IBSClosedFormulaSolver() { diff --git a/src/main/java/myutil/intboolsolver/IBSCompParam.java b/src/main/java/myutil/intboolsolver/IBSCompParam.java deleted file mode 100644 index 6b7245130b4fe0ef4c4e5cc40d559dba63eff33b..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSCompParam.java +++ /dev/null @@ -1,4 +0,0 @@ -package myutil.intboolsolver; - -public interface IBSCompParam { -} diff --git a/src/main/java/myutil/intboolsolver/IBSCompStateParam.java b/src/main/java/myutil/intboolsolver/IBSCompStateParam.java deleted file mode 100644 index 99a511a4d951c43d6ce1988087905e135fc2cd42..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSCompStateParam.java +++ /dev/null @@ -1,4 +0,0 @@ -package myutil.intboolsolver; - -public interface IBSCompStateParam { -} diff --git a/src/main/java/myutil/intboolsolver/IBSParamComp.java b/src/main/java/myutil/intboolsolver/IBSParamComp.java new file mode 100644 index 0000000000000000000000000000000000000000..87d1d843a0c91477df5cdaa01bfb9e674c4c6a45 --- /dev/null +++ b/src/main/java/myutil/intboolsolver/IBSParamComp.java @@ -0,0 +1,58 @@ +/* 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 myutil.intboolsolver; + +/** + * Interface IBSParamComp, to be implemented by classes intended to + * instantiate the {@code Comp} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> The {@code Comp} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver} may be instantiated + * by any class without modification, except that the class must implement + * this interface and none of the other IBSParamXXX interface. + * </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ + +public interface IBSParamComp { +} diff --git a/src/main/java/myutil/intboolsolver/IBSParamCompState.java b/src/main/java/myutil/intboolsolver/IBSParamCompState.java new file mode 100644 index 0000000000000000000000000000000000000000..986c9f755db5c88f99cf1ea625084a02353884ce --- /dev/null +++ b/src/main/java/myutil/intboolsolver/IBSParamCompState.java @@ -0,0 +1,58 @@ +/* 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 myutil.intboolsolver; + +/** + * Interface IBSParamCompState, to be implemented by classes intended to + * instantiate the {@code CompState} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> The {@code CompState} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver} may be instantiated + * by any class without modification, except that the class must implement + * this interface and none of the other IBSParamXXX interface. + * </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ + +public interface IBSParamCompState { +} diff --git a/src/main/java/myutil/intboolsolver/IBSParamSpec.java b/src/main/java/myutil/intboolsolver/IBSParamSpec.java new file mode 100644 index 0000000000000000000000000000000000000000..b0db023b540163050abd49b38d25e71c5a02287c --- /dev/null +++ b/src/main/java/myutil/intboolsolver/IBSParamSpec.java @@ -0,0 +1,58 @@ +/* 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 myutil.intboolsolver; + +/** + * Interface IBSParamSpec, to be implemented by classes intended to + * instantiate the {@code Spec} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> The {@code Spec} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver} may be instantiated + * by any class without modification, except that the class must implement + * this interface and none of the other IBSParamXXX interface. + * </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ + +public interface IBSParamSpec { +} diff --git a/src/main/java/myutil/intboolsolver/IBSParamSpecState.java b/src/main/java/myutil/intboolsolver/IBSParamSpecState.java new file mode 100644 index 0000000000000000000000000000000000000000..d24133e41f7dbe478efc147111e3ca6b2e9211d1 --- /dev/null +++ b/src/main/java/myutil/intboolsolver/IBSParamSpecState.java @@ -0,0 +1,57 @@ +/* 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 myutil.intboolsolver; + +/** + * Interface IBSParamSpecState, to be implemented by classes intended to + * instantiate the {@code SpecState} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> The {@code SpecState} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver} may be instantiated + * by any class without modification, except that the class must implement + * this interface and none of the other IBSParamXXX interface. + * </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ +public interface IBSParamSpecState { +} diff --git a/src/main/java/myutil/intboolsolver/IBSParamState.java b/src/main/java/myutil/intboolsolver/IBSParamState.java new file mode 100644 index 0000000000000000000000000000000000000000..6d17cfcd52c166c80689442e55f17a274f11b37a --- /dev/null +++ b/src/main/java/myutil/intboolsolver/IBSParamState.java @@ -0,0 +1,58 @@ +/* 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 myutil.intboolsolver; + +/** + * Interface IBSParamState, to be implemented by classes intended to + * instantiate the {@code State} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver}. + * Creation: 07/03/2023 + * + * <p> The {@code State} parameter of + * {@link myutil.intboolsolver.IBSolver IBSolver} may be instantiated + * by any class without modification, except that the class must implement + * this interface and none of the other IBSParamXXX interface. + * </p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ + +public interface IBSParamState { +} diff --git a/src/main/java/myutil/intboolsolver/IBSParams.java b/src/main/java/myutil/intboolsolver/IBSParams.java deleted file mode 100644 index f26f2b57cb425eb6f0736355d4b648c4ae73269b..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSParams.java +++ /dev/null @@ -1,9 +0,0 @@ -package myutil.intboolsolver; - -public class IBSParams { - public class Spec{} - public class Comp{} - public class State{} - public class SpecState{} - public class CompState{} -} diff --git a/src/main/java/myutil/intboolsolver/IBSSpecParam.java b/src/main/java/myutil/intboolsolver/IBSSpecParam.java deleted file mode 100644 index c6dcfc7e981928804de0b3a5044d14b0c2e13bad..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSSpecParam.java +++ /dev/null @@ -1,4 +0,0 @@ -package myutil.intboolsolver; - -public interface IBSSpecParam { -} diff --git a/src/main/java/myutil/intboolsolver/IBSSpecStateParam.java b/src/main/java/myutil/intboolsolver/IBSSpecStateParam.java deleted file mode 100644 index 60127d62112c27cb53b0c0c96fdc5456d95e563e..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSSpecStateParam.java +++ /dev/null @@ -1,4 +0,0 @@ -package myutil.intboolsolver; - -public interface IBSSpecStateParam { -} diff --git a/src/main/java/myutil/intboolsolver/IBSStateParam.java b/src/main/java/myutil/intboolsolver/IBSStateParam.java deleted file mode 100644 index f961048043b6a38d65ec53e005ae73651c9ef164..0000000000000000000000000000000000000000 --- a/src/main/java/myutil/intboolsolver/IBSStateParam.java +++ /dev/null @@ -1,4 +0,0 @@ -package myutil.intboolsolver; - -public interface IBSStateParam { -} diff --git a/src/main/java/myutil/intboolsolver/IBSAbsAttribute.java b/src/main/java/myutil/intboolsolver/IBSStdAttribute.java similarity index 85% rename from src/main/java/myutil/intboolsolver/IBSAbsAttribute.java rename to src/main/java/myutil/intboolsolver/IBSStdAttribute.java index 75cf5fe9d3511855ae353315eb3501e051a7d88b..8d67540793519050e4fe0206a8d17821e15c09b6 100644 --- a/src/main/java/myutil/intboolsolver/IBSAbsAttribute.java +++ b/src/main/java/myutil/intboolsolver/IBSStdAttribute.java @@ -35,25 +35,37 @@ * 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 myutil.intboolsolver; +// import intboolsolver.IBSolver; // usefull in implementations /** - * Class IBSAbstractAttribute - * This Class is a documented interface for implementing IBSAttribute. - * It provides some partial implementation, tools and rules for extention. - * Creation: 27/02/2023 + * Class IBSStdAttribute (should be abstract), partially + * implementing {@link myutil.intboolsolver.IBSAttribute + * IBSAttribute} for systems with states as boolean leaves. + * Creation: 07/03/2023 + * + * <p> This class (together with + * {@link myutil.intboolsolver.IBSStdAttributeClass) + * IBSStdAttributeClass}) is a step toward an instantiation + * of the solver for systems with states as boolean leaves.</p> + * The (very) partial implementation provided here is sometime + * provided as code in comments that must be copied in final + * instantiation (when genericity disappear).</p> + * <p> To instantiate the solver using this approach, a fully + * implemented extension of this class must be provided. + * Comments in the file say what remains to implement + * (in the futur, abstraction, for automatic checking...).</p> * + * @version 0.1 07/03/2023 * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) - * @version 0.0 27/02/2023 */ -public class IBSAbsAttribute< - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam +public class IBSStdAttribute< + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState > implements IBSAttribute< Spec , Comp , diff --git a/src/main/java/myutil/intboolsolver/IBSAbsAttributeClass.java b/src/main/java/myutil/intboolsolver/IBSStdAttributeClass.java similarity index 60% rename from src/main/java/myutil/intboolsolver/IBSAbsAttributeClass.java rename to src/main/java/myutil/intboolsolver/IBSStdAttributeClass.java index 955965db6f9e1a204cfd67787c2f6461a06146a1..8ce7bc0f85d9da24d60ba17f40f7b0115fbc38b5 100644 --- a/src/main/java/myutil/intboolsolver/IBSAbsAttributeClass.java +++ b/src/main/java/myutil/intboolsolver/IBSStdAttributeClass.java @@ -1,11 +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 myutil.intboolsolver; -public class IBSAbsAttributeClass< - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam, +/** + * Class IBSStdAttributeClass (should be abstract), partially + * implementing {@link myutil.intboolsolver.IBSAttributeClass + * IBSAttributeClass} for systems with states as boolean leaves. + * Creation: 07/03/2023 + * + * <p> This class (together with + * {@link myutil.intboolsolver.IBSStdAttribute) + * IBSStdAttribute}) is a step toward an instantiation + * of the solver for systems with states as boolean leaves.</p> + * The (very) partial implementation provided here is sometime + * provided as code in comments that must be copied in final + * instantiation (when genericity disappear).</p> + * <p> To instantiate the solver using this approach, a fully + * implemented extension of this class must be provided. + * Comments in the file say what remains to implement + * (in the futur, abstraction, for automatic checking...).</p> + * + * @version 0.1 07/03/2023 + * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) + */ + +public class IBSStdAttributeClass< + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState, Att extends IBSAttribute<Spec,Comp,State,SpecState,CompState> > extends IBSAttributeClass < Spec , diff --git a/src/main/java/myutil/intboolsolver/IBSTypedAttribute.java b/src/main/java/myutil/intboolsolver/IBSTypedAttribute.java index f742122a6f20bbed0bc985b33dce1a710f6ab543..ee3c8319b8f80b77500c40d18f2782061f649d61 100644 --- a/src/main/java/myutil/intboolsolver/IBSTypedAttribute.java +++ b/src/main/java/myutil/intboolsolver/IBSTypedAttribute.java @@ -1,4 +1,46 @@ +/* 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 myutil.intboolsolver; +/** + * A class to allow parsing to return different types of result. + * @version 0.1 07/03/2023 + * @author Sophie Coudert + */ public class IBSTypedAttribute { private Object val = null; diff --git a/src/main/java/myutil/intboolsolver/IBSolver.java b/src/main/java/myutil/intboolsolver/IBSolver.java index b8ee5e9aa8f083902362eb189e0527501773400e..afc70289b8631a258f99ea812f1fbb7fb1f8d995 100644 --- a/src/main/java/myutil/intboolsolver/IBSolver.java +++ b/src/main/java/myutil/intboolsolver/IBSolver.java @@ -37,14 +37,16 @@ */ package myutil.intboolsolver; - -import java.util.HashMap; -import java.util.Map; import java.util.HashSet; -import myutil.intboolsolver.IBSAttribute; + /** - * Class IBSolver - * Integer/boolean Expression Solver + * Class IBSolver implements the generic solver. + * + * <p>For general information about the solver, see + * {@link myutil.intboolsolver package page}.</p> + * + * <p>For documentation about exported API, see + * {@link myutil.intboolsolver.IBSolverAPI IBSolverAPI}</p> * Creation: 27/02/2023 * * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) @@ -52,11 +54,11 @@ import myutil.intboolsolver.IBSAttribute; */ public class IBSolver < - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam, + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState, ATT extends IBSAttribute<Spec,Comp,State,SpecState,CompState>, AtC extends IBSAttributeClass<Spec,Comp,State,SpecState,CompState,ATT> > { diff --git a/src/main/java/myutil/intboolsolver/IBSolverInterface.java b/src/main/java/myutil/intboolsolver/IBSolverAPI.java similarity index 91% rename from src/main/java/myutil/intboolsolver/IBSolverInterface.java rename to src/main/java/myutil/intboolsolver/IBSolverAPI.java index 997ac0b945b4b95e14ece34406b40739fe6222c1..1362fe9e33d753bf8f816a02626797fd6619bd30 100644 --- a/src/main/java/myutil/intboolsolver/IBSolverInterface.java +++ b/src/main/java/myutil/intboolsolver/IBSolverAPI.java @@ -37,24 +37,23 @@ */ package myutil.intboolsolver; - import java.util.HashSet; /** - * Class IBSolverInterface - * Integer/boolean Expression Solver features. For documentation, not for use... + * Class IBSolverAPI + * Integer/boolean Expression Solver API (exported features). For documentation, not for use... * Creation: /03_2023 * * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) * @version 0.0 27/02/2023 */ -public abstract class IBSolverInterface< - Spec extends IBSSpecParam, - Comp extends IBSCompParam, - State extends IBSStateParam, - SpecState extends IBSSpecStateParam, - CompState extends IBSCompStateParam, +public abstract class IBSolverAPI< + Spec extends IBSParamSpec, + Comp extends IBSParamComp, + State extends IBSParamState, + SpecState extends IBSParamSpecState, + CompState extends IBSParamCompState, ATT extends IBSAttribute<Spec,Comp,State,SpecState,CompState>, AtC extends IBSAttributeClass<Spec,Comp,State,SpecState,CompState,ATT> > { diff --git a/src/main/java/myutil/intboolsolver/package-info.java b/src/main/java/myutil/intboolsolver/package-info.java index 39c85045cffdfc64b46c4bd99457e01c9ad2c3f9..2c00d3b4ac72428ec3fccba7655f8b49e8016259 100644 --- a/src/main/java/myutil/intboolsolver/package-info.java +++ b/src/main/java/myutil/intboolsolver/package-info.java @@ -53,8 +53,8 @@ * * </p> * <ul> - * <li> {@link myutil.intboolsolver.IBSolverInterface - * IBSolverInterface} provides documentation about the functions + * <li> {@link myutil.intboolsolver.IBSolverAPI + * IBSolverAPI} provides documentation about the functions * exported by the solver after it has been instantiated. * </li> * <li> <p>{@link myutil.intboolsolver.IBSolver IBSolver} is the solver @@ -68,68 +68,76 @@ * provide:</b></p> * <ul> * <li> <p>{@code Spec} class, which must implement {@link - * myutil.intboolsolver.IBSSpecParam IBSSpecParam}: The class of + * myutil.intboolsolver.IBSParamSpec IBSParamSpec}: The class of * global system specifications, which intuitively associates * leave structures to (spec-dedicated) leave identifiers).</p> * </li> * <li> <p>{@code Comp} class, which <b>must implement</b> {@link - * myutil.intboolsolver.IBSCompParam IBSCompParam}: the class + * myutil.intboolsolver.IBSParamComp IBSParamComp}: the class * of system components, which intuitively associates leave * structures to (comp-dedicated) leave identifiers).</p> * </li> - * <li> <p>{@code SpecState} class, which <b>must implement</b> - * {@link myutil.intboolsolver.IBSSpecStateParam - * IBSSpecStateParam}: the class of specification state, which - * intuitively associates leaves to int/bool values.</p> - * </li> - * <li> <p>{@code CompState} class, which <b>must implement</b> - * {@link myutil.intboolsolver.IBSCompStateParam - * IBSCompStateParam}: the class of component states, which - * intuitively associates leaves to int/bool values.</p> - * </li> * <li> <p>{@code State} class, which <b>must implement</b> - * {@link myutil.intboolsolver.IBSStateParam IBSStateParam}: + * {@link myutil.intboolsolver.IBSParamState IBSParamState}: * a class of states. It is intended to receive state machine * states in provided extensions but can be used another way * (in the provided extensions, there are state leaves that * may be true or false in different contexts...).</p> * </li> + * <li> <p>{@code SpecState} class, which <b>must implement</b> + * {@link myutil.intboolsolver.IBSParamSpecState + * IBSParamSpecState}: the class of specification state, which + * intuitively associates leaves to int/bool values.</p> + * </li> + * <li> <p>{@code CompState} class, which <b>must implement</b> + * {@link myutil.intboolsolver.IBSParamCompState + * IBSParamCompState}: the class of component states, which + * intuitively associates leaves to int/bool values.</p> + * </li> * </ul> * <p><b>WARNING!!</b> A successful instantiation requires that * class <i>xxx</i> (with <i>xxx</i> among {@code Spec}, {@code Comp}, * {@code SpecState}, {@code CompState} and {@code State}) does * not implement any IBS<i>yyy</i>Param with <i>yyy</i> * ≠ <i>xxx</i>.</p> - * <p>The structure of leaf expressions is then instantiation - * dependent and relies on "attribute" parameters which must - * also be provided (themselves parametrized by the five classes - * above) while instantiating. Attribute parameters are decomposed - * into two classes:</p> + * <p>{@link myutil.intboolsolver.IBSParamSpec IBSParamSpec}, + * {@link myutil.intboolsolver.IBSParamComp IBSParamComp}, + * {@link myutil.intboolsolver.IBSParamState IBSParamState}, + * {@link myutil.intboolsolver.IBSParamSpecState IBSParamSpecState} + * and + * {@link myutil.intboolsolver.IBSParamCompState IBSParamCompState} + * can be used as default parameters to instanciate solvers that do + * not implement the corresponding concepts.</p> + * <p>The structure of leaf expressions is instantiation dependent. + * Thus it is parametrized by "attribute" parameters (themselves + * parametrized by the five classes above) for which an + * implementation must also be provided in order to instantiate + * {@link myutil.intboolsolver.IBSolver IBSolver}. Attribute + * parameters are decomposed into two classes:</p> * <ul> - * <li> <p>an "attribute class" class which contains all the - * ("static") methods that do not depend on attribute - * instances</p> - * </li> - * <li> <p>an "attribute class" which allow to create + * <li> <p>an "Attribute" class which allow to create * attribute instances with instance dependent methods.</p> * </li> + * <li> <p>an "Attribute Class" class which contains all the + * methods that do not depend on attribute instances</p> + * </li> * </ul> * </li> * <li><p>{@link myutil.intboolsolver.IBSAttribute * IBSAttribute} is the interface describing the features - * to provide in order to instantiate the "attribute" class + * to provide in order to instantiate the "Attribute" class * of {@link myutil.intboolsolver.IBSolver * IBSolver} (features that depend on attribute instances). * <b> implementation must be provides </b>. It can be - * implemented using provided extensions.</p> + * implemented directly or using the provided extensions.</p> * </li> * <li><p>{@link myutil.intboolsolver.IBSAttributeClass * IBSAttributeClass} is the interface describing the features * to provide in order to instantiate the "attribute class" * class of {@link myutil.intboolsolver.IBSolver IBSolver} * (features that do not depend on attribute instances). - * <b> implementation must be provides </b>. It requires to - * instanciate an "attribute" parameter by a class that extends + * <b> implementation must be provided </b>. It requires to + * instanciate an "Attribute" parameter by a class that extends * {@link myutil.intboolsolver.IBSAttribute IBSAttribute}, * (with the same {@code Spec}, {@code Comp}, {@code SpecState}, * {@code CompState} and {@code State} parameters). @@ -200,31 +208,31 @@ * </ul> * * <hr> - * <span style="font-size: 120%"> Extension Abstract Attribute </span> + * <span style="font-size: 120%"> Extension Standard Attributes </span> * <p> This extension provides a skeleton for a typical * implementation with (boolean) state leaves. It provides a guided * way to implement some methods of * {@link myutil.intboolsolver.IBSAttribute IBSAttribute} and * {@link myutil.intboolsolver.IBSAttributeClass * IBSAttributeClass}</p> - * <p> Following the proposed method some partial implementation is - * provided. It is sometime provided as code in comments that must - * be copied in final instanciation (when genericity disappear).</p> - * <p> This extention refines the two abstract class for + * <p> Following the proposed approach, some partial implementation + * is provided. It is sometime provided as code in comments that must + * be copied in final instantiation (when genericity disappear).</p> + * <p> This extension refines the two abstract class for * attributes</p> * <p> Note: the two following classes should be abstract * (future work) making the remaining work to do more clear</p> * <ul> - * <li><p>{@link myutil.intboolsolver.IBSAbsAttribute - * IBSAbsAttribute} implements + * <li><p>{@link myutil.intboolsolver.IBSStdAttribute + * IBSStdAttribute} implements * {@link myutil.intboolsolver.IBSAttribute IBSAttribute}. * To instantiate the solver using this approach, <b>a fully * implemented extension of this class must be provided</b>. * Comments in the file say what remains to implement * (in the futur, abstraction, for automatic checking...). * </li> - * <li><p>{@link myutil.intboolsolver.IBSAbsAttributeClass - * IBSAbsAttributeClass} implements + * <li><p>{@link myutil.intboolsolver.IBSStdAttributeClass + * IBSStdAttributeClass} implements * {@link myutil.intboolsolver.IBSAttributeClass * IBSAttributeClass}. * To instantiate the solver using this approach, <b>a fully @@ -236,11 +244,11 @@ * * <p><b>Instantiation summary:</b></p> * <p> similar to <a href="#instanciation_sumary"> the previously - * described process</a>, replacing IBSAttribute by IBSAbsAttribute - * and IBSAttributeClass by IBSAbsAttributeClass.</p> + * described process</a>, replacing IBSAttribute by IBSStdAttribute + * and IBSAttributeClass by IBSStdAttributeClass.</p> * - * @version 0.0 27/02/2023 + * @version 0.1 07/03/2023 * - * @author Sophie Coudert + * @author Sophie Coudert (rewrite from Alessandro TEMPIA CALVINO) */ package myutil.intboolsolver; \ No newline at end of file