From 05cc697cce50c87541cb619854be7ecbcfb586e9 Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Wed, 16 Aug 2017 18:53:37 +0200 Subject: Adding transitive closure to the logic language --- .../model/logiclanguage/LogiclanguageFactory.java | 9 + .../model/logiclanguage/LogiclanguagePackage.java | 133 ++++++++ .../model/logiclanguage/TransitiveClosure.java | 104 ++++++ .../impl/LogiclanguageFactoryImpl.java | 11 + .../impl/LogiclanguagePackageImpl.java | 54 +++ .../logiclanguage/impl/TransitiveClosureImpl.java | 303 +++++++++++++++++ .../util/LogiclanguageAdapterFactory.java | 18 + .../logiclanguage/util/LogiclanguageSwitch.java | 21 ++ .../model/logiclanguage.aird | 375 ++++++++++++++++++--- .../model/logiclanguage.ecore | 7 + 10 files changed, 986 insertions(+), 49 deletions(-) create mode 100644 Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/TransitiveClosure.java create mode 100644 Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java (limited to 'Framework') diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java index 0d1061d7..57b263aa 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguageFactory.java @@ -399,6 +399,15 @@ public interface LogiclanguageFactory extends EFactory { */ StringLiteral createStringLiteral(); + /** + * Returns a new object of class 'Transitive Closure'. + * + * + * @return a new object of class 'Transitive Closure'. + * @generated + */ + TransitiveClosure createTransitiveClosure(); + /** * Returns the package supported by this factory. * diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java index 4e8cdcdc..59bb841a 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/LogiclanguagePackage.java @@ -2629,6 +2629,62 @@ public interface LogiclanguagePackage extends EPackage { int STRING_LITERAL_OPERATION_COUNT = ATOMIC_TERM_OPERATION_COUNT + 0; + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl Transitive Closure}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getTransitiveClosure() + * @generated + */ + int TRANSITIVE_CLOSURE = 57; + + /** + * The feature id for the 'Left Operand' containment reference. + * + * + * @generated + * @ordered + */ + int TRANSITIVE_CLOSURE__LEFT_OPERAND = 0; + + /** + * The feature id for the 'Right Operand' containment reference. + * + * + * @generated + * @ordered + */ + int TRANSITIVE_CLOSURE__RIGHT_OPERAND = 1; + + /** + * The feature id for the 'Relation' reference. + * + * + * @generated + * @ordered + */ + int TRANSITIVE_CLOSURE__RELATION = 2; + + /** + * The number of structural features of the 'Transitive Closure' class. + * + * + * @generated + * @ordered + */ + int TRANSITIVE_CLOSURE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Transitive Closure' class. + * + * + * @generated + * @ordered + */ + int TRANSITIVE_CLOSURE_OPERATION_COUNT = 0; + + /** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type Type}'. * @@ -3870,6 +3926,49 @@ public interface LogiclanguagePackage extends EPackage { */ EAttribute getStringLiteral_Value(); + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure Transitive Closure}'. + * + * + * @return the meta object for class 'Transitive Closure'. + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure + * @generated + */ + EClass getTransitiveClosure(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getLeftOperand Left Operand}'. + * + * + * @return the meta object for the containment reference 'Left Operand'. + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getLeftOperand() + * @see #getTransitiveClosure() + * @generated + */ + EReference getTransitiveClosure_LeftOperand(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRightOperand Right Operand}'. + * + * + * @return the meta object for the containment reference 'Right Operand'. + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRightOperand() + * @see #getTransitiveClosure() + * @generated + */ + EReference getTransitiveClosure_RightOperand(); + + /** + * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRelation Relation}'. + * + * + * @return the meta object for the reference 'Relation'. + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRelation() + * @see #getTransitiveClosure() + * @generated + */ + EReference getTransitiveClosure_Relation(); + /** * Returns the factory that creates the instances of the model. * @@ -4951,6 +5050,40 @@ public interface LogiclanguagePackage extends EPackage { */ EAttribute STRING_LITERAL__VALUE = eINSTANCE.getStringLiteral_Value(); + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl Transitive Closure}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.TransitiveClosureImpl + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getTransitiveClosure() + * @generated + */ + EClass TRANSITIVE_CLOSURE = eINSTANCE.getTransitiveClosure(); + + /** + * The meta object literal for the 'Left Operand' containment reference feature. + * + * + * @generated + */ + EReference TRANSITIVE_CLOSURE__LEFT_OPERAND = eINSTANCE.getTransitiveClosure_LeftOperand(); + + /** + * The meta object literal for the 'Right Operand' containment reference feature. + * + * + * @generated + */ + EReference TRANSITIVE_CLOSURE__RIGHT_OPERAND = eINSTANCE.getTransitiveClosure_RightOperand(); + + /** + * The meta object literal for the 'Relation' reference feature. + * + * + * @generated + */ + EReference TRANSITIVE_CLOSURE__RELATION = eINSTANCE.getTransitiveClosure_Relation(); + } } //LogiclanguagePackage diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/TransitiveClosure.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/TransitiveClosure.java new file mode 100644 index 00000000..92c80341 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/TransitiveClosure.java @@ -0,0 +1,104 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Transitive Closure'. + * + * + *

+ * The following features are supported: + *

+ * + * + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getTransitiveClosure() + * @model + * @generated + */ +public interface TransitiveClosure extends EObject { + /** + * Returns the value of the 'Left Operand' containment reference. + * + *

+ * If the meaning of the 'Left Operand' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Left Operand' containment reference. + * @see #setLeftOperand(Term) + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getTransitiveClosure_LeftOperand() + * @model containment="true" + * @generated + */ + Term getLeftOperand(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getLeftOperand Left Operand}' containment reference. + * + * + * @param value the new value of the 'Left Operand' containment reference. + * @see #getLeftOperand() + * @generated + */ + void setLeftOperand(Term value); + + /** + * Returns the value of the 'Right Operand' containment reference. + * + *

+ * If the meaning of the 'Right Operand' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Right Operand' containment reference. + * @see #setRightOperand(Term) + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getTransitiveClosure_RightOperand() + * @model containment="true" + * @generated + */ + Term getRightOperand(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRightOperand Right Operand}' containment reference. + * + * + * @param value the new value of the 'Right Operand' containment reference. + * @see #getRightOperand() + * @generated + */ + void setRightOperand(Term value); + + /** + * Returns the value of the 'Relation' reference. + * + *

+ * If the meaning of the 'Relation' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Relation' reference. + * @see #setRelation(Relation) + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getTransitiveClosure_Relation() + * @model + * @generated + */ + Relation getRelation(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure#getRelation Relation}' reference. + * + * + * @param value the new value of the 'Relation' reference. + * @see #getRelation() + * @generated + */ + void setRelation(Relation value); + +} // TransitiveClosure diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java index b4d03cfd..0ad07f55 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguageFactoryImpl.java @@ -98,6 +98,7 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu case LogiclanguagePackage.INSTANCE_OF: return createInstanceOf(); case LogiclanguagePackage.STRING_TYPE_REFERENCE: return createStringTypeReference(); case LogiclanguagePackage.STRING_LITERAL: return createStringLiteral(); + case LogiclanguagePackage.TRANSITIVE_CLOSURE: return createTransitiveClosure(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -523,6 +524,16 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu return stringLiteral; } + /** + * + * + * @generated + */ + public TransitiveClosure createTransitiveClosure() { + TransitiveClosureImpl transitiveClosure = new TransitiveClosureImpl(); + return transitiveClosure; + } + /** * * diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java index 8bc329d5..73560344 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/LogiclanguagePackageImpl.java @@ -54,6 +54,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicDeclaration; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TermDescription; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition; @@ -483,6 +484,13 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu */ private EClass stringLiteralEClass = null; + /** + * + * + * @generated + */ + private EClass transitiveClosureEClass = null; + /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package @@ -1614,6 +1622,42 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu return (EAttribute)stringLiteralEClass.getEStructuralFeatures().get(0); } + /** + * + * + * @generated + */ + public EClass getTransitiveClosure() { + return transitiveClosureEClass; + } + + /** + * + * + * @generated + */ + public EReference getTransitiveClosure_LeftOperand() { + return (EReference)transitiveClosureEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTransitiveClosure_RightOperand() { + return (EReference)transitiveClosureEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getTransitiveClosure_Relation() { + return (EReference)transitiveClosureEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -1816,6 +1860,11 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu stringLiteralEClass = createEClass(STRING_LITERAL); createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE); + + transitiveClosureEClass = createEClass(TRANSITIVE_CLOSURE); + createEReference(transitiveClosureEClass, TRANSITIVE_CLOSURE__LEFT_OPERAND); + createEReference(transitiveClosureEClass, TRANSITIVE_CLOSURE__RIGHT_OPERAND); + createEReference(transitiveClosureEClass, TRANSITIVE_CLOSURE__RELATION); } /** @@ -2080,6 +2129,11 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu initEClass(stringLiteralEClass, StringLiteral.class, "StringLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getStringLiteral_Value(), ecorePackage.getEString(), "value", null, 1, 1, StringLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(transitiveClosureEClass, TransitiveClosure.class, "TransitiveClosure", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTransitiveClosure_LeftOperand(), this.getTerm(), null, "leftOperand", null, 0, 1, TransitiveClosure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTransitiveClosure_RightOperand(), this.getTerm(), null, "rightOperand", null, 0, 1, TransitiveClosure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTransitiveClosure_Relation(), this.getRelation(), null, "relation", null, 0, 1, TransitiveClosure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Create resource createResource(eNS_URI); } diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java new file mode 100644 index 00000000..9633334b --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/TransitiveClosureImpl.java @@ -0,0 +1,303 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Transitive Closure'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class TransitiveClosureImpl extends MinimalEObjectImpl.Container implements TransitiveClosure { + /** + * The cached value of the '{@link #getLeftOperand() Left Operand}' containment reference. + * + * + * @see #getLeftOperand() + * @generated + * @ordered + */ + protected Term leftOperand; + + /** + * The cached value of the '{@link #getRightOperand() Right Operand}' containment reference. + * + * + * @see #getRightOperand() + * @generated + * @ordered + */ + protected Term rightOperand; + + /** + * The cached value of the '{@link #getRelation() Relation}' reference. + * + * + * @see #getRelation() + * @generated + * @ordered + */ + protected Relation relation; + + /** + * + * + * @generated + */ + protected TransitiveClosureImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogiclanguagePackage.Literals.TRANSITIVE_CLOSURE; + } + + /** + * + * + * @generated + */ + public Term getLeftOperand() { + return leftOperand; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLeftOperand(Term newLeftOperand, NotificationChain msgs) { + Term oldLeftOperand = leftOperand; + leftOperand = newLeftOperand; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, oldLeftOperand, newLeftOperand); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLeftOperand(Term newLeftOperand) { + if (newLeftOperand != leftOperand) { + NotificationChain msgs = null; + if (leftOperand != null) + msgs = ((InternalEObject)leftOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, null, msgs); + if (newLeftOperand != null) + msgs = ((InternalEObject)newLeftOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, null, msgs); + msgs = basicSetLeftOperand(newLeftOperand, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND, newLeftOperand, newLeftOperand)); + } + + /** + * + * + * @generated + */ + public Term getRightOperand() { + return rightOperand; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRightOperand(Term newRightOperand, NotificationChain msgs) { + Term oldRightOperand = rightOperand; + rightOperand = newRightOperand; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, oldRightOperand, newRightOperand); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRightOperand(Term newRightOperand) { + if (newRightOperand != rightOperand) { + NotificationChain msgs = null; + if (rightOperand != null) + msgs = ((InternalEObject)rightOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, null, msgs); + if (newRightOperand != null) + msgs = ((InternalEObject)newRightOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, null, msgs); + msgs = basicSetRightOperand(newRightOperand, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND, newRightOperand, newRightOperand)); + } + + /** + * + * + * @generated + */ + public Relation getRelation() { + if (relation != null && relation.eIsProxy()) { + InternalEObject oldRelation = (InternalEObject)relation; + relation = (Relation)eResolveProxy(oldRelation); + if (relation != oldRelation) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION, oldRelation, relation)); + } + } + return relation; + } + + /** + * + * + * @generated + */ + public Relation basicGetRelation() { + return relation; + } + + /** + * + * + * @generated + */ + public void setRelation(Relation newRelation) { + Relation oldRelation = relation; + relation = newRelation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION, oldRelation, relation)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: + return basicSetLeftOperand(null, msgs); + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: + return basicSetRightOperand(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: + return getLeftOperand(); + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: + return getRightOperand(); + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: + if (resolve) return getRelation(); + return basicGetRelation(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: + setLeftOperand((Term)newValue); + return; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: + setRightOperand((Term)newValue); + return; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: + setRelation((Relation)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: + setLeftOperand((Term)null); + return; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: + setRightOperand((Term)null); + return; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: + setRelation((Relation)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogiclanguagePackage.TRANSITIVE_CLOSURE__LEFT_OPERAND: + return leftOperand != null; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RIGHT_OPERAND: + return rightOperand != null; + case LogiclanguagePackage.TRANSITIVE_CLOSURE__RELATION: + return relation != null; + } + return super.eIsSet(featureID); + } + +} //TransitiveClosureImpl diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java index c756cf31..d61c3a2a 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageAdapterFactory.java @@ -296,6 +296,10 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl { return createStringLiteralAdapter(); } @Override + public Adapter caseTransitiveClosure(TransitiveClosure object) { + return createTransitiveClosureAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } @@ -1113,6 +1117,20 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl { return null; } + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure Transitive Closure}'. + * + * 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. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TransitiveClosure + * @generated + */ + public Adapter createTransitiveClosureAdapter() { + return null; + } + /** * Creates a new adapter for the default case. * diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java index 43376940..74575fb6 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/util/LogiclanguageSwitch.java @@ -544,6 +544,12 @@ public class LogiclanguageSwitch extends Switch { if (result == null) result = defaultCase(theEObject); return result; } + case LogiclanguagePackage.TRANSITIVE_CLOSURE: { + TransitiveClosure transitiveClosure = (TransitiveClosure)theEObject; + T result = caseTransitiveClosure(transitiveClosure); + if (result == null) result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } } @@ -1403,6 +1409,21 @@ public class LogiclanguageSwitch extends Switch { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Transitive Closure'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Transitive Closure'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTransitiveClosure(TransitiveClosure object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. * diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.aird b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.aird index 16247fdd..bed19d16 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.aird +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.aird @@ -7295,10 +7295,6 @@ - - - - @@ -7618,6 +7614,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7973,17 +8004,17 @@ - + - + - + - + @@ -8579,22 +8610,6 @@ - - - - - - - - - - - - - - - - @@ -8611,9 +8626,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -8622,7 +8765,7 @@ - + KEEP_LOCATION @@ -8632,14 +8775,6 @@ - - - - - - - - @@ -8707,7 +8842,7 @@ - + KEEP_LOCATION @@ -8946,7 +9081,7 @@ - + KEEP_LOCATION @@ -9694,7 +9829,7 @@ - + KEEP_LOCATION @@ -9743,18 +9878,6 @@ - - - - - - - italic - - - - - @@ -9786,6 +9909,160 @@ + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + bold + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + italic + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + italic + + + + + + + + + + + + labelSize + + + labelSize + + + + diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore index bf42e9b9..5effb631 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore @@ -204,4 +204,11 @@ + + + + + -- cgit v1.2.3-54-g00ecf