diff --git a/docs/README-Zoo.txt b/docs/README-Zoo.txt new file mode 100644 index 0000000000000000000000000000000000000000..5ca997f4c2b5c49517aec474bf25e71147782a4b --- /dev/null +++ b/docs/README-Zoo.txt @@ -0,0 +1,171 @@ + +Model transformation case study using ATL : +Truth tables to Binary Decision Diagrams + +Guillaume Savaton, ESEO +<guillaume (dot) savaton (at) eseo (dot) fr> + +----------------------------------------------------------- +Summary +----------------------------------------------------------- + +These files provide a case study for model transformation applied to digital logic circuits. +Engineers can use various formalisms to represent combinatorial or sequential logic. +The most widespread representations for combinatorial logic are truth tables and boolean equations. + +In many EDA tools, combinatorial logic is represented in a canonical form using Binary Decision +Diagrams (BDD). +BDDs are manly used for model checking and logic optimization. + +The purpose here is to use model transformation to transform a truth table into +a binary decision diagram. + +----------------------------------------------------------- +Truth tables +----------------------------------------------------------- + +The test files provided correspond to the following example. +Files TT/examples/Test.tt and Test.ttmodel contain representations of this truth table : + + A B C D | S +----------|--- + 0 0 - - | 0 + 0 1 0 0 | 1 + 0 1 0 1 | 0 + 0 1 1 - | 0 + 1 0 0 0 | 0 + 1 0 1 0 | 1 + 1 - - 1 | 0 + 1 1 0 0 | 1 + 1 1 1 0 | 0 + +A truth table (class TruthTable of the metamodel) has ports (class Port). +Ports are either +- input ports (class InputPort) such as A, B, C, D in the example ; +- or output ports (class OutputPort) such as S in the example. + +A truth table is composed of rows (class Row of the metamodels) that can appear in any order. +A row provides a mapping between an input pattern (a detected set of values of input ports) +and an output pattern (values assigned to output ports). +A row is made of cells (class Cell) : each cell associates a boolean value to a given port. + +Usually, boolean values are represented using symbols "0" (false) and "1" (true). +In file Test.tt, the symbols used are "F" (false) and "T" (true). + +In a given row, the absence of a cell for a given input port means that the value of this port is +indifferent with respect to the result. In the example, this is the case for ports C and D in the first row. +However, in each row, all output ports must have a corresponding cell. + +----------------------------------------------------------- +Binary decision diagrams +----------------------------------------------------------- + +Here is a BDD representation for the example truth table : + + (A) + | + 0 --------------------- 1 + | | + (B) (D) + | | + 0 ------- 1 0 -------- 1 + | | | | + | (C) (B) | + | | | | + | 0 --- 1 0---------1 | + | | | | | | + | (D) | (C) (C) | + | | | | | | + | 0 --- 1 | 0 --- 1 0 --- 1 | + | | | | | | | | | +S = [0] [1] [0][0][0] [1] [1] [0][0] + +Usually, edges are distinguished by a line style : +- dashed lines represent 0 (or false) decisions +- continuouse lines represent 1 (or true) decisions. + +In file Test.bdd, edges are labelled with a symbol : "F" (false) or "T" (true). + +The evaluation process in a BDD is recursive and can be easily translated into an if-then-else +hierarchy : + +if A=0 then + if B=0 then + S := 0; + else + if C=0 then + if D=0 then + S := 1; + else + S := 0; + endif + else + S := 0; + endif + endif +else + if D=0 then + if B=0 then + if C=0 then + S := 0; + else + S := 1; + endif + else + if C=0 then + S := 1; + else + S := 0; + endif + endif + else + S := 0; + endif +endif + +In our metamodel, a binary decision diagram (class BDD of the metamodel) has input and output ports in +the same sense as truth tables. + +A BDD is composed of a tree (class Tree). +A tree can be either a leaf node (class Leaf) or a subtree (class Subtree). +A subtree has a reference to an input port (see nodes labeled A, B, C and D on the example). +Upon the value of this port, two edges can be followed : +- one corresponding to a 0 (false) value (reference subtreeForZero in the metamodel) +- one corresponding to a 1 (true) value (reference subtreeForOne in the metamodel) + +Leaf nodes represent values assigned to output ports. +In this example there is only one output port but the provided metamodel supports +multiple output ports if needed. +As a result, a leaf node is composed of one or several assignments (class Assignment). + +----------------------------------------------------------- +File index +----------------------------------------------------------- + +Folders : + TT/ - All files related to truth tables (metamodel, models, diagrams) + BDD/ - All files related to Binary Decision Diagrams (metamodel, models, diagrams) + TT2BDD/ - The transformation from truth table to BDD + +Files : + + TT/TT.km3 - The Truth Table metamodel in text form (KM3 notation) + TT/TT.ecore - The Truth Table metamodel in XMI format + + TT/diagrams/TT.png - Graphical representation of the Truth Table metamodel + + TT/examples/Test.tt - An example truth table in text form + TT/examples/Test.ttmodel - The same example in XMI format + + BDD/BDD.km3 - The BDD metamodel in text form (KM3 notation) + BDD/BDD.ecore - The BDD metamodel in XMI format + + BDD/diagrams/BDD.png - + BDD/diagrams/Tree.png - Graphical representation of the BDD metamodel + BDD/diagrams/Nodes.png - + + BDD/examples/Test.bdd - An example BDD in text form + BDD/examples/Test.bddmodel - The same example BDD in XMI format + + TT2BDD/TT2BDD.atl - The transformation from Truth Table to BDD, in ATL + diff --git a/models/Test.ttmodel b/models/Test.ttmodel index 06ff94fedc750ce75181bd5a15525a92dc5e437b..98d2058f07f17458a9e9aef08bad19dcf077e66d 100644 --- a/models/Test.ttmodel +++ b/models/Test.ttmodel @@ -1,66 +1,66 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<TruthTable xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.transformation-tool-contest.eu/2019/tt" location="2:1-13:2" name="Test"> - <ports xsi:type="InputPort" location="2:19-2:23" name="a" cells="//@rows.0/@cells.0 //@rows.1/@cells.0 //@rows.2/@cells.0 //@rows.3/@cells.0 //@rows.4/@cells.0 //@rows.5/@cells.0 //@rows.6/@cells.0 //@rows.7/@cells.0 //@rows.8/@cells.0"/> - <ports xsi:type="InputPort" location="2:25-2:29" name="b" cells="//@rows.0/@cells.1 //@rows.1/@cells.1 //@rows.2/@cells.1 //@rows.3/@cells.1 //@rows.4/@cells.1 //@rows.5/@cells.1 //@rows.7/@cells.1 //@rows.8/@cells.1"/> - <ports xsi:type="InputPort" location="2:31-2:35" name="c" cells="//@rows.1/@cells.2 //@rows.2/@cells.2 //@rows.3/@cells.2 //@rows.4/@cells.2 //@rows.5/@cells.2 //@rows.7/@cells.2 //@rows.8/@cells.2"/> - <ports xsi:type="InputPort" location="2:37-2:41" name="d" cells="//@rows.1/@cells.3 //@rows.2/@cells.3 //@rows.4/@cells.3 //@rows.5/@cells.3 //@rows.6/@cells.1 //@rows.7/@cells.3 //@rows.8/@cells.3"/> - <ports xsi:type="OutputPort" location="2:43-2:48" name="s" cells="//@rows.0/@cells.2 //@rows.1/@cells.4 //@rows.2/@cells.4 //@rows.3/@cells.3 //@rows.4/@cells.4 //@rows.5/@cells.4 //@rows.6/@cells.2 //@rows.7/@cells.4 //@rows.8/@cells.4"/> - <rows location="4:4-4:29"> - <cells location="4:5-4:8" value="false" port="//@ports.0"/> - <cells location="4:10-4:13" value="false" port="//@ports.1"/> - <cells location="4:25-4:28" value="false" port="//@ports.4"/> +<TruthTable xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://www.transformation-tool-contest.eu/2019/tt" name="Test"> + <ports xsi:type="InputPort" name="a" cells="//@rows.0/@cells.0 //@rows.1/@cells.0 //@rows.2/@cells.0 //@rows.3/@cells.0 //@rows.4/@cells.0 //@rows.5/@cells.0 //@rows.6/@cells.0 //@rows.7/@cells.0 //@rows.8/@cells.0"/> + <ports xsi:type="InputPort" name="b" cells="//@rows.0/@cells.1 //@rows.1/@cells.1 //@rows.2/@cells.1 //@rows.3/@cells.1 //@rows.4/@cells.1 //@rows.5/@cells.1 //@rows.7/@cells.1 //@rows.8/@cells.1"/> + <ports xsi:type="InputPort" name="c" cells="//@rows.1/@cells.2 //@rows.2/@cells.2 //@rows.3/@cells.2 //@rows.4/@cells.2 //@rows.5/@cells.2 //@rows.7/@cells.2 //@rows.8/@cells.2"/> + <ports xsi:type="InputPort" name="d" cells="//@rows.1/@cells.3 //@rows.2/@cells.3 //@rows.4/@cells.3 //@rows.5/@cells.3 //@rows.6/@cells.1 //@rows.7/@cells.3 //@rows.8/@cells.3"/> + <ports xsi:type="OutputPort" name="s" cells="//@rows.0/@cells.2 //@rows.1/@cells.4 //@rows.2/@cells.4 //@rows.3/@cells.3 //@rows.4/@cells.4 //@rows.5/@cells.4 //@rows.6/@cells.2 //@rows.7/@cells.4 //@rows.8/@cells.4"/> + <rows> + <cells value="false" port="//@ports.0"/> + <cells value="false" port="//@ports.1"/> + <cells value="false" port="//@ports.4"/> </rows> - <rows location="5:4-5:29"> - <cells location="5:5-5:8" value="false" port="//@ports.0"/> - <cells location="5:10-5:13" value="true" port="//@ports.1"/> - <cells location="5:15-5:18" value="false" port="//@ports.2"/> - <cells location="5:20-5:23" value="false" port="//@ports.3"/> - <cells location="5:25-5:28" value="true" port="//@ports.4"/> + <rows> + <cells value="false" port="//@ports.0"/> + <cells value="true" port="//@ports.1"/> + <cells value="false" port="//@ports.2"/> + <cells value="false" port="//@ports.3"/> + <cells value="true" port="//@ports.4"/> </rows> - <rows location="6:4-6:29"> - <cells location="6:5-6:8" value="false" port="//@ports.0"/> - <cells location="6:10-6:13" value="true" port="//@ports.1"/> - <cells location="6:15-6:18" value="false" port="//@ports.2"/> - <cells location="6:20-6:23" value="true" port="//@ports.3"/> - <cells location="6:25-6:28" value="false" port="//@ports.4"/> + <rows> + <cells value="false" port="//@ports.0"/> + <cells value="true" port="//@ports.1"/> + <cells value="false" port="//@ports.2"/> + <cells value="true" port="//@ports.3"/> + <cells value="false" port="//@ports.4"/> </rows> - <rows location="7:4-7:29"> - <cells location="7:5-7:8" value="false" port="//@ports.0"/> - <cells location="7:10-7:13" value="true" port="//@ports.1"/> - <cells location="7:15-7:18" value="true" port="//@ports.2"/> - <cells location="7:25-7:28" value="false" port="//@ports.4"/> + <rows> + <cells value="false" port="//@ports.0"/> + <cells value="true" port="//@ports.1"/> + <cells value="true" port="//@ports.2"/> + <cells value="false" port="//@ports.4"/> </rows> - <rows location="8:4-8:29"> - <cells location="8:5-8:8" value="true" port="//@ports.0"/> - <cells location="8:10-8:13" value="false" port="//@ports.1"/> - <cells location="8:15-8:18" value="false" port="//@ports.2"/> - <cells location="8:20-8:23" value="false" port="//@ports.3"/> - <cells location="8:25-8:28" value="false" port="//@ports.4"/> + <rows> + <cells value="true" port="//@ports.0"/> + <cells value="false" port="//@ports.1"/> + <cells value="false" port="//@ports.2"/> + <cells value="false" port="//@ports.3"/> + <cells value="false" port="//@ports.4"/> </rows> - <rows location="9:4-9:29"> - <cells location="9:5-9:8" value="true" port="//@ports.0"/> - <cells location="9:10-9:13" value="false" port="//@ports.1"/> - <cells location="9:15-9:18" value="true" port="//@ports.2"/> - <cells location="9:20-9:23" value="false" port="//@ports.3"/> - <cells location="9:25-9:28" value="true" port="//@ports.4"/> + <rows> + <cells value="true" port="//@ports.0"/> + <cells value="false" port="//@ports.1"/> + <cells value="true" port="//@ports.2"/> + <cells value="false" port="//@ports.3"/> + <cells value="true" port="//@ports.4"/> </rows> - <rows location="10:4-10:29"> - <cells location="10:5-10:8" value="true" port="//@ports.0"/> - <cells location="10:10-10:13" value="true" port="//@ports.3"/> - <cells location="10:25-10:28" value="false" port="//@ports.4"/> + <rows> + <cells value="true" port="//@ports.0"/> + <cells value="true" port="//@ports.3"/> + <cells value="false" port="//@ports.4"/> </rows> - <rows location="11:4-11:29"> - <cells location="11:5-11:8" value="true" port="//@ports.0"/> - <cells location="11:10-11:13" value="true" port="//@ports.1"/> - <cells location="11:15-11:18" value="false" port="//@ports.2"/> - <cells location="11:20-11:23" value="false" port="//@ports.3"/> - <cells location="11:25-11:28" value="true" port="//@ports.4"/> + <rows> + <cells value="true" port="//@ports.0"/> + <cells value="true" port="//@ports.1"/> + <cells value="false" port="//@ports.2"/> + <cells value="false" port="//@ports.3"/> + <cells value="true" port="//@ports.4"/> </rows> - <rows location="12:4-12:29"> - <cells location="12:5-12:8" value="true" port="//@ports.0"/> - <cells location="12:10-12:13" value="true" port="//@ports.1"/> - <cells location="12:15-12:18" value="true" port="//@ports.2"/> - <cells location="12:20-12:23" value="false" port="//@ports.3"/> - <cells location="12:25-12:28" value="false" port="//@ports.4"/> + <rows> + <cells value="true" port="//@ports.0"/> + <cells value="true" port="//@ports.1"/> + <cells value="true" port="//@ports.2"/> + <cells value="false" port="//@ports.3"/> + <cells value="false" port="//@ports.4"/> </rows> </TruthTable> diff --git a/solutions/EMFSolutionATL/models/TT.ecore b/solutions/EMFSolutionATL/models/TT.ecore index 30767c8119676bd96cedf33684ec194524d5b588..92b16b720d7d4ad21aa3757c97dd6eeabca71643 100644 --- a/solutions/EMFSolutionATL/models/TT.ecore +++ b/solutions/EMFSolutionATL/models/TT.ecore @@ -2,11 +2,7 @@ <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="tt" nsURI="https://www.transformation-tool-contest.eu/2019/tt" nsPrefix="tt"> - <eClassifiers xsi:type="ecore:EClass" name="LocatedElement"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" ordered="false" - unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="TruthTable" eSuperTypes="#//LocatedElement"> + <eClassifiers xsi:type="ecore:EClass" name="TruthTable"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EReference" name="ports" ordered="false" @@ -14,7 +10,7 @@ <eStructuralFeatures xsi:type="ecore:EReference" name="rows" ordered="false" lowerBound="2" upperBound="-1" eType="#//Row" containment="true" eOpposite="#//Row/owner"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Port" abstract="true" eSuperTypes="#//LocatedElement"> + <eClassifiers xsi:type="ecore:EClass" name="Port" abstract="true"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> <eStructuralFeatures xsi:type="ecore:EReference" name="owner" ordered="false" @@ -24,13 +20,13 @@ </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="InputPort" eSuperTypes="#//Port"/> <eClassifiers xsi:type="ecore:EClass" name="OutputPort" eSuperTypes="#//Port"/> - <eClassifiers xsi:type="ecore:EClass" name="Row" eSuperTypes="#//LocatedElement"> + <eClassifiers xsi:type="ecore:EClass" name="Row"> <eStructuralFeatures xsi:type="ecore:EReference" name="owner" ordered="false" lowerBound="1" eType="#//TruthTable" eOpposite="#//TruthTable/rows"/> <eStructuralFeatures xsi:type="ecore:EReference" name="cells" ordered="false" lowerBound="1" upperBound="-1" eType="#//Cell" containment="true" eOpposite="#//Cell/owner"/> </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="Cell" eSuperTypes="#//LocatedElement"> + <eClassifiers xsi:type="ecore:EClass" name="Cell"> <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false" unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EReference" name="owner" ordered="false" diff --git a/solutions/EMFSolutionATL/models/TT.genmodel b/solutions/EMFSolutionATL/models/TT.genmodel index 95a8dc24d004f12891bcb2a0b55a1186e3c72e7b..00951fc01c10c74bbe75d918163b72cd6f402676 100644 --- a/solutions/EMFSolutionATL/models/TT.genmodel +++ b/solutions/EMFSolutionATL/models/TT.genmodel @@ -7,9 +7,6 @@ <foreignModel>TT.ecore</foreignModel> <genPackages prefix="TT" basePackage="ttc2019" disposableProviderFactory="true" ecorePackage="TT.ecore#/"> - <genClasses ecoreClass="TT.ecore#//LocatedElement"> - <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TT.ecore#//LocatedElement/location"/> - </genClasses> <genClasses ecoreClass="TT.ecore#//TruthTable"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TT.ecore#//TruthTable/name"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TT.ecore#//TruthTable/ports"/> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Cell.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Cell.java index 04781708d8af68c6179b690cb9a46cd8919abd2a..8af1adb5d9741afe22d63fa44c4a0548f73ff036 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Cell.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Cell.java @@ -2,6 +2,8 @@ */ package ttc2019.tt; +import org.eclipse.emf.ecore.EObject; + /** * <!-- begin-user-doc --> @@ -21,7 +23,7 @@ package ttc2019.tt; * @model * @generated */ -public interface Cell extends LocatedElement { +public interface Cell extends EObject { /** * Returns the value of the '<em><b>Value</b></em>' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Port.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Port.java index 70e24ba2cc2fe721335e3afbaa83ca62c85df8bd..e6c50438003fda28c5213b5ba3e86ed62ecf4252 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Port.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Port.java @@ -3,6 +3,7 @@ package ttc2019.tt; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> @@ -22,7 +23,7 @@ import org.eclipse.emf.common.util.EList; * @model abstract="true" * @generated */ -public interface Port extends LocatedElement { +public interface Port extends EObject { /** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Row.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Row.java index b65bc587806cce274ea999b0648747706f99e540..f82dc447d5ad79fb1deabd90027263d71d9f97fc 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Row.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/Row.java @@ -3,6 +3,7 @@ package ttc2019.tt; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> @@ -21,7 +22,7 @@ import org.eclipse.emf.common.util.EList; * @model * @generated */ -public interface Row extends LocatedElement { +public interface Row extends EObject { /** * Returns the value of the '<em><b>Owner</b></em>' container reference. * It is bidirectional and its opposite is '{@link ttc2019.tt.TruthTable#getRows <em>Rows</em>}'. diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTFactory.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTFactory.java index c552b3461fcae64fbd30e2045a8e409e752465fe..e5b60b50f8ef2f96b6934053d7bf30bae073c8b8 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTFactory.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTFactory.java @@ -21,15 +21,6 @@ public interface TTFactory extends EFactory { */ TTFactory eINSTANCE = ttc2019.tt.impl.TTFactoryImpl.init(); - /** - * Returns a new object of class '<em>Located Element</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Located Element</em>'. - * @generated - */ - LocatedElement createLocatedElement(); - /** * Returns a new object of class '<em>Truth Table</em>'. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTPackage.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTPackage.java index d8018bd581458a4765d9edf059045972b43fa6d9..e1a2ca484fbf9530b5b6a98278aa8ee124c958ab 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTPackage.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TTPackage.java @@ -56,43 +56,6 @@ public interface TTPackage extends EPackage { */ TTPackage eINSTANCE = ttc2019.tt.impl.TTPackageImpl.init(); - /** - * The meta object id for the '{@link ttc2019.tt.impl.LocatedElementImpl <em>Located Element</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see ttc2019.tt.impl.LocatedElementImpl - * @see ttc2019.tt.impl.TTPackageImpl#getLocatedElement() - * @generated - */ - int LOCATED_ELEMENT = 0; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int LOCATED_ELEMENT__LOCATION = 0; - - /** - * The number of structural features of the '<em>Located Element</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int LOCATED_ELEMENT_FEATURE_COUNT = 1; - - /** - * The number of operations of the '<em>Located Element</em>' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int LOCATED_ELEMENT_OPERATION_COUNT = 0; - /** * The meta object id for the '{@link ttc2019.tt.impl.TruthTableImpl <em>Truth Table</em>}' class. * <!-- begin-user-doc --> @@ -101,16 +64,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getTruthTable() * @generated */ - int TRUTH_TABLE = 1; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int TRUTH_TABLE__LOCATION = LOCATED_ELEMENT__LOCATION; + int TRUTH_TABLE = 0; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -119,7 +73,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int TRUTH_TABLE__NAME = LOCATED_ELEMENT_FEATURE_COUNT + 0; + int TRUTH_TABLE__NAME = 0; /** * The feature id for the '<em><b>Ports</b></em>' containment reference list. @@ -128,7 +82,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int TRUTH_TABLE__PORTS = LOCATED_ELEMENT_FEATURE_COUNT + 1; + int TRUTH_TABLE__PORTS = 1; /** * The feature id for the '<em><b>Rows</b></em>' containment reference list. @@ -137,7 +91,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int TRUTH_TABLE__ROWS = LOCATED_ELEMENT_FEATURE_COUNT + 2; + int TRUTH_TABLE__ROWS = 2; /** * The number of structural features of the '<em>Truth Table</em>' class. @@ -146,7 +100,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int TRUTH_TABLE_FEATURE_COUNT = LOCATED_ELEMENT_FEATURE_COUNT + 3; + int TRUTH_TABLE_FEATURE_COUNT = 3; /** * The number of operations of the '<em>Truth Table</em>' class. @@ -155,7 +109,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int TRUTH_TABLE_OPERATION_COUNT = LOCATED_ELEMENT_OPERATION_COUNT + 0; + int TRUTH_TABLE_OPERATION_COUNT = 0; /** * The meta object id for the '{@link ttc2019.tt.impl.PortImpl <em>Port</em>}' class. @@ -165,16 +119,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getPort() * @generated */ - int PORT = 2; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int PORT__LOCATION = LOCATED_ELEMENT__LOCATION; + int PORT = 1; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -183,7 +128,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int PORT__NAME = LOCATED_ELEMENT_FEATURE_COUNT + 0; + int PORT__NAME = 0; /** * The feature id for the '<em><b>Owner</b></em>' container reference. @@ -192,7 +137,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int PORT__OWNER = LOCATED_ELEMENT_FEATURE_COUNT + 1; + int PORT__OWNER = 1; /** * The feature id for the '<em><b>Cells</b></em>' reference list. @@ -201,7 +146,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int PORT__CELLS = LOCATED_ELEMENT_FEATURE_COUNT + 2; + int PORT__CELLS = 2; /** * The number of structural features of the '<em>Port</em>' class. @@ -210,7 +155,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int PORT_FEATURE_COUNT = LOCATED_ELEMENT_FEATURE_COUNT + 3; + int PORT_FEATURE_COUNT = 3; /** * The number of operations of the '<em>Port</em>' class. @@ -219,7 +164,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int PORT_OPERATION_COUNT = LOCATED_ELEMENT_OPERATION_COUNT + 0; + int PORT_OPERATION_COUNT = 0; /** * The meta object id for the '{@link ttc2019.tt.impl.InputPortImpl <em>Input Port</em>}' class. @@ -229,16 +174,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getInputPort() * @generated */ - int INPUT_PORT = 3; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int INPUT_PORT__LOCATION = PORT__LOCATION; + int INPUT_PORT = 2; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -293,16 +229,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getOutputPort() * @generated */ - int OUTPUT_PORT = 4; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int OUTPUT_PORT__LOCATION = PORT__LOCATION; + int OUTPUT_PORT = 3; /** * The feature id for the '<em><b>Name</b></em>' attribute. @@ -357,16 +284,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getRow() * @generated */ - int ROW = 5; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int ROW__LOCATION = LOCATED_ELEMENT__LOCATION; + int ROW = 4; /** * The feature id for the '<em><b>Owner</b></em>' container reference. @@ -375,7 +293,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int ROW__OWNER = LOCATED_ELEMENT_FEATURE_COUNT + 0; + int ROW__OWNER = 0; /** * The feature id for the '<em><b>Cells</b></em>' containment reference list. @@ -384,7 +302,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int ROW__CELLS = LOCATED_ELEMENT_FEATURE_COUNT + 1; + int ROW__CELLS = 1; /** * The number of structural features of the '<em>Row</em>' class. @@ -393,7 +311,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int ROW_FEATURE_COUNT = LOCATED_ELEMENT_FEATURE_COUNT + 2; + int ROW_FEATURE_COUNT = 2; /** * The number of operations of the '<em>Row</em>' class. @@ -402,7 +320,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int ROW_OPERATION_COUNT = LOCATED_ELEMENT_OPERATION_COUNT + 0; + int ROW_OPERATION_COUNT = 0; /** * The meta object id for the '{@link ttc2019.tt.impl.CellImpl <em>Cell</em>}' class. @@ -412,16 +330,7 @@ public interface TTPackage extends EPackage { * @see ttc2019.tt.impl.TTPackageImpl#getCell() * @generated */ - int CELL = 6; - - /** - * The feature id for the '<em><b>Location</b></em>' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int CELL__LOCATION = LOCATED_ELEMENT__LOCATION; + int CELL = 5; /** * The feature id for the '<em><b>Value</b></em>' attribute. @@ -430,7 +339,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int CELL__VALUE = LOCATED_ELEMENT_FEATURE_COUNT + 0; + int CELL__VALUE = 0; /** * The feature id for the '<em><b>Owner</b></em>' container reference. @@ -439,7 +348,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int CELL__OWNER = LOCATED_ELEMENT_FEATURE_COUNT + 1; + int CELL__OWNER = 1; /** * The feature id for the '<em><b>Port</b></em>' reference. @@ -448,7 +357,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int CELL__PORT = LOCATED_ELEMENT_FEATURE_COUNT + 2; + int CELL__PORT = 2; /** * The number of structural features of the '<em>Cell</em>' class. @@ -457,7 +366,7 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int CELL_FEATURE_COUNT = LOCATED_ELEMENT_FEATURE_COUNT + 3; + int CELL_FEATURE_COUNT = 3; /** * The number of operations of the '<em>Cell</em>' class. @@ -466,29 +375,8 @@ public interface TTPackage extends EPackage { * @generated * @ordered */ - int CELL_OPERATION_COUNT = LOCATED_ELEMENT_OPERATION_COUNT + 0; - - - /** - * Returns the meta object for class '{@link ttc2019.tt.LocatedElement <em>Located Element</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Located Element</em>'. - * @see ttc2019.tt.LocatedElement - * @generated - */ - EClass getLocatedElement(); + int CELL_OPERATION_COUNT = 0; - /** - * Returns the meta object for the attribute '{@link ttc2019.tt.LocatedElement#getLocation <em>Location</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Location</em>'. - * @see ttc2019.tt.LocatedElement#getLocation() - * @see #getLocatedElement() - * @generated - */ - EAttribute getLocatedElement_Location(); /** * Returns the meta object for class '{@link ttc2019.tt.TruthTable <em>Truth Table</em>}'. @@ -694,24 +582,6 @@ public interface TTPackage extends EPackage { * @generated */ interface Literals { - /** - * The meta object literal for the '{@link ttc2019.tt.impl.LocatedElementImpl <em>Located Element</em>}' class. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see ttc2019.tt.impl.LocatedElementImpl - * @see ttc2019.tt.impl.TTPackageImpl#getLocatedElement() - * @generated - */ - EClass LOCATED_ELEMENT = eINSTANCE.getLocatedElement(); - - /** - * The meta object literal for the '<em><b>Location</b></em>' attribute feature. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - EAttribute LOCATED_ELEMENT__LOCATION = eINSTANCE.getLocatedElement_Location(); - /** * The meta object literal for the '{@link ttc2019.tt.impl.TruthTableImpl <em>Truth Table</em>}' class. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TruthTable.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TruthTable.java index 18793d7678a763395832682ff59fb281ac8351cb..fd4dd3fd5e2500330cc7074e2173ea85ded4ce60 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TruthTable.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/TruthTable.java @@ -3,6 +3,7 @@ package ttc2019.tt; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> @@ -22,7 +23,7 @@ import org.eclipse.emf.common.util.EList; * @model * @generated */ -public interface TruthTable extends LocatedElement { +public interface TruthTable extends EObject { /** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/CellImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/CellImpl.java index 1e7076a09c173d2eeca6892ee3cdd57bb7ccf5ab..9c8bebab9185ac5e00e7c1174506bbbb982f46bd 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/CellImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/CellImpl.java @@ -10,6 +10,7 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EcoreUtil; import ttc2019.tt.Cell; @@ -32,7 +33,7 @@ import ttc2019.tt.TTPackage; * * @generated */ -public class CellImpl extends LocatedElementImpl implements Cell { +public class CellImpl extends MinimalEObjectImpl.Container implements Cell { /** * The default value of the '{@link #isValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/LocatedElementImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/LocatedElementImpl.java deleted file mode 100644 index 01f17feb29585a1f203ab279bee1b2fb39c22099..0000000000000000000000000000000000000000 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/LocatedElementImpl.java +++ /dev/null @@ -1,163 +0,0 @@ -/** - */ -package ttc2019.tt.impl; - -import org.eclipse.emf.common.notify.Notification; - -import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; - -import ttc2019.tt.LocatedElement; -import ttc2019.tt.TTPackage; - -/** - * <!-- begin-user-doc --> - * An implementation of the model object '<em><b>Located Element</b></em>'. - * <!-- end-user-doc --> - * <p> - * The following features are implemented: - * </p> - * <ul> - * <li>{@link ttc2019.tt.impl.LocatedElementImpl#getLocation <em>Location</em>}</li> - * </ul> - * - * @generated - */ -public class LocatedElementImpl extends MinimalEObjectImpl.Container implements LocatedElement { - /** - * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected static final String LOCATION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getLocation() - * @generated - * @ordered - */ - protected String location = LOCATION_EDEFAULT; - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected LocatedElementImpl() { - super(); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - protected EClass eStaticClass() { - return TTPackage.Literals.LOCATED_ELEMENT; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public String getLocation() { - return location; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public void setLocation(String newLocation) { - String oldLocation = location; - location = newLocation; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, TTPackage.LOCATED_ELEMENT__LOCATION, oldLocation, location)); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case TTPackage.LOCATED_ELEMENT__LOCATION: - return getLocation(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case TTPackage.LOCATED_ELEMENT__LOCATION: - setLocation((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case TTPackage.LOCATED_ELEMENT__LOCATION: - setLocation(LOCATION_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case TTPackage.LOCATED_ELEMENT__LOCATION: - return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); - } - return super.eIsSet(featureID); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (location: "); - result.append(location); - result.append(')'); - return result.toString(); - } - -} //LocatedElementImpl diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/PortImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/PortImpl.java index 0ecef62786c4e5640ee2f5c1584701677aaef657..04b82f3358066d12fb48bd83cdffcf1fac58047f 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/PortImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/PortImpl.java @@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; @@ -38,7 +39,7 @@ import ttc2019.tt.TruthTable; * * @generated */ -public abstract class PortImpl extends LocatedElementImpl implements Port { +public abstract class PortImpl extends MinimalEObjectImpl.Container implements Port { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/RowImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/RowImpl.java index 2a1a97037ed88bf7906f68a14a2e5d37d73cb7e1..eb3912025cb1426da9a368ff509f1002916a0394 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/RowImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/RowImpl.java @@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; @@ -37,7 +38,7 @@ import ttc2019.tt.TruthTable; * * @generated */ -public class RowImpl extends LocatedElementImpl implements Row { +public class RowImpl extends MinimalEObjectImpl.Container implements Row { /** * The cached value of the '{@link #getCells() <em>Cells</em>}' containment reference list. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTFactoryImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTFactoryImpl.java index 57aa987ecff82b79b0234feb514511fd91c4141d..97edeb3798662d2a0b3d4cfff34201c14d33512e 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTFactoryImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTFactoryImpl.java @@ -56,7 +56,6 @@ public class TTFactoryImpl extends EFactoryImpl implements TTFactory { @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { - case TTPackage.LOCATED_ELEMENT: return createLocatedElement(); case TTPackage.TRUTH_TABLE: return createTruthTable(); case TTPackage.INPUT_PORT: return createInputPort(); case TTPackage.OUTPUT_PORT: return createOutputPort(); @@ -67,16 +66,6 @@ public class TTFactoryImpl extends EFactoryImpl implements TTFactory { } } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public LocatedElement createLocatedElement() { - LocatedElementImpl locatedElement = new LocatedElementImpl(); - return locatedElement; - } - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTPackageImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTPackageImpl.java index 2ce677977e93e4d4e894a18fc1b1e9abae1bc293..e9d318f0e02187729440aa3d724f3542962c981b 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTPackageImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TTPackageImpl.java @@ -11,7 +11,6 @@ import org.eclipse.emf.ecore.impl.EPackageImpl; import ttc2019.tt.Cell; import ttc2019.tt.InputPort; -import ttc2019.tt.LocatedElement; import ttc2019.tt.OutputPort; import ttc2019.tt.Port; import ttc2019.tt.Row; @@ -26,13 +25,6 @@ import ttc2019.tt.TruthTable; * @generated */ public class TTPackageImpl extends EPackageImpl implements TTPackage { - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - private EClass locatedElementEClass = null; - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -136,24 +128,6 @@ public class TTPackageImpl extends EPackageImpl implements TTPackage { return theTTPackage; } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EClass getLocatedElement() { - return locatedElementEClass; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public EAttribute getLocatedElement_Location() { - return (EAttribute)locatedElementEClass.getEStructuralFeatures().get(0); - } - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -335,9 +309,6 @@ public class TTPackageImpl extends EPackageImpl implements TTPackage { isCreated = true; // Create classes and their features - locatedElementEClass = createEClass(LOCATED_ELEMENT); - createEAttribute(locatedElementEClass, LOCATED_ELEMENT__LOCATION); - truthTableEClass = createEClass(TRUTH_TABLE); createEAttribute(truthTableEClass, TRUTH_TABLE__NAME); createEReference(truthTableEClass, TRUTH_TABLE__PORTS); @@ -390,17 +361,10 @@ public class TTPackageImpl extends EPackageImpl implements TTPackage { // Set bounds for type parameters // Add supertypes to classes - truthTableEClass.getESuperTypes().add(this.getLocatedElement()); - portEClass.getESuperTypes().add(this.getLocatedElement()); inputPortEClass.getESuperTypes().add(this.getPort()); outputPortEClass.getESuperTypes().add(this.getPort()); - rowEClass.getESuperTypes().add(this.getLocatedElement()); - cellEClass.getESuperTypes().add(this.getLocatedElement()); // Initialize classes, features, and operations; add parameters - initEClass(locatedElementEClass, LocatedElement.class, "LocatedElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getLocatedElement_Location(), ecorePackage.getEString(), "location", null, 1, 1, LocatedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); - initEClass(truthTableEClass, TruthTable.class, "TruthTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTruthTable_Name(), ecorePackage.getEString(), "name", null, 1, 1, TruthTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); initEReference(getTruthTable_Ports(), this.getPort(), this.getPort_Owner(), "ports", null, 1, -1, TruthTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TruthTableImpl.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TruthTableImpl.java index ab5034489560118afb246956611c770371e52e11..0625543f05a0b4662a482885d46c48e5bf956a3c 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TruthTableImpl.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/impl/TruthTableImpl.java @@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.InternalEList; @@ -37,7 +38,7 @@ import ttc2019.tt.TruthTable; * * @generated */ -public class TruthTableImpl extends LocatedElementImpl implements TruthTable { +public class TruthTableImpl extends MinimalEObjectImpl.Container implements TruthTable { /** * The default value of the '{@link #getName() <em>Name</em>}' attribute. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTAdapterFactory.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTAdapterFactory.java index b0a353d996b802493e967f326e9406fcdd91c17c..4fc7d13877142a2a9f3534071fbd70e8cedbde00 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTAdapterFactory.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTAdapterFactory.java @@ -67,10 +67,6 @@ public class TTAdapterFactory extends AdapterFactoryImpl { */ protected TTSwitch<Adapter> modelSwitch = new TTSwitch<Adapter>() { - @Override - public Adapter caseLocatedElement(LocatedElement object) { - return createLocatedElementAdapter(); - } @Override public Adapter caseTruthTable(TruthTable object) { return createTruthTableAdapter(); @@ -115,20 +111,6 @@ public class TTAdapterFactory extends AdapterFactoryImpl { } - /** - * Creates a new adapter for an object of class '{@link ttc2019.tt.LocatedElement <em>Located Element</em>}'. - * <!-- begin-user-doc --> - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * <!-- end-user-doc --> - * @return the new adapter. - * @see ttc2019.tt.LocatedElement - * @generated - */ - public Adapter createLocatedElementAdapter() { - return null; - } - /** * Creates a new adapter for an object of class '{@link ttc2019.tt.TruthTable <em>Truth Table</em>}'. * <!-- begin-user-doc --> diff --git a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTSwitch.java b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTSwitch.java index 6d49406998acd5c248ceae6d2e4df0d3b812de2d..7319b3414486cf1cc96aa98bd7c8792f50128071 100644 --- a/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTSwitch.java +++ b/solutions/EMFSolutionATL/src-gen/ttc2019/tt/util/TTSwitch.java @@ -66,23 +66,15 @@ public class TTSwitch<T> extends Switch<T> { @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { - case TTPackage.LOCATED_ELEMENT: { - LocatedElement locatedElement = (LocatedElement)theEObject; - T result = caseLocatedElement(locatedElement); - if (result == null) result = defaultCase(theEObject); - return result; - } case TTPackage.TRUTH_TABLE: { TruthTable truthTable = (TruthTable)theEObject; T result = caseTruthTable(truthTable); - if (result == null) result = caseLocatedElement(truthTable); if (result == null) result = defaultCase(theEObject); return result; } case TTPackage.PORT: { Port port = (Port)theEObject; T result = casePort(port); - if (result == null) result = caseLocatedElement(port); if (result == null) result = defaultCase(theEObject); return result; } @@ -90,7 +82,6 @@ public class TTSwitch<T> extends Switch<T> { InputPort inputPort = (InputPort)theEObject; T result = caseInputPort(inputPort); if (result == null) result = casePort(inputPort); - if (result == null) result = caseLocatedElement(inputPort); if (result == null) result = defaultCase(theEObject); return result; } @@ -98,21 +89,18 @@ public class TTSwitch<T> extends Switch<T> { OutputPort outputPort = (OutputPort)theEObject; T result = caseOutputPort(outputPort); if (result == null) result = casePort(outputPort); - if (result == null) result = caseLocatedElement(outputPort); if (result == null) result = defaultCase(theEObject); return result; } case TTPackage.ROW: { Row row = (Row)theEObject; T result = caseRow(row); - if (result == null) result = caseLocatedElement(row); if (result == null) result = defaultCase(theEObject); return result; } case TTPackage.CELL: { Cell cell = (Cell)theEObject; T result = caseCell(cell); - if (result == null) result = caseLocatedElement(cell); if (result == null) result = defaultCase(theEObject); return result; } @@ -120,21 +108,6 @@ public class TTSwitch<T> extends Switch<T> { } } - /** - * Returns the result of interpreting the object as an instance of '<em>Located Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Located Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseLocatedElement(LocatedElement object) { - return null; - } - /** * Returns the result of interpreting the object as an instance of '<em>Truth Table</em>'. * <!-- begin-user-doc -->