diff options
author | Oszkar Semerath <semerath@mit.bme.hu> | 2019-07-09 20:49:10 +0200 |
---|---|---|
committer | Oszkar Semerath <semerath@mit.bme.hu> | 2019-07-09 20:49:10 +0200 |
commit | 9152a660dbfbf3294964233c76d6cf22111298ff (patch) | |
tree | ad181e0f7abbdd546dc6c8206fc318be26b9c992 /Framework | |
parent | Updated link to Alloy (diff) | |
download | VIATRA-Generator-9152a660dbfbf3294964233c76d6cf22111298ff.tar.gz VIATRA-Generator-9152a660dbfbf3294964233c76d6cf22111298ff.tar.zst VIATRA-Generator-9152a660dbfbf3294964233c76d6cf22111298ff.zip |
aggregated partial substitution + builder
Diffstat (limited to 'Framework')
14 files changed, 784 insertions, 123 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java index be146469..4b38becf 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregateExpression.java | |||
@@ -2,6 +2,8 @@ | |||
2 | */ | 2 | */ |
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage; | 3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage; |
4 | 4 | ||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
5 | 7 | ||
6 | /** | 8 | /** |
7 | * <!-- begin-user-doc --> | 9 | * <!-- begin-user-doc --> |
@@ -13,6 +15,7 @@ package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage; | |||
13 | * </p> | 15 | * </p> |
14 | * <ul> | 16 | * <ul> |
15 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getRelation <em>Relation</em>}</li> | 17 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getRelation <em>Relation</em>}</li> |
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution <em>Parameter Substitution</em>}</li> | ||
16 | * </ul> | 19 | * </ul> |
17 | * | 20 | * |
18 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregateExpression() | 21 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregateExpression() |
@@ -46,4 +49,16 @@ public interface AggregateExpression extends Term { | |||
46 | */ | 49 | */ |
47 | void setRelation(Relation value); | 50 | void setRelation(Relation value); |
48 | 51 | ||
52 | /** | ||
53 | * Returns the value of the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
54 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution}. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @return the value of the '<em>Parameter Substitution</em>' containment reference list. | ||
58 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregateExpression_ParameterSubstitution() | ||
59 | * @model containment="true" | ||
60 | * @generated | ||
61 | */ | ||
62 | EList<AggregatedParameterSubstitution> getParameterSubstitution(); | ||
63 | |||
49 | } // AggregateExpression | 64 | } // AggregateExpression |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java new file mode 100644 index 00000000..94b6365d --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/AggregatedParameterSubstitution.java | |||
@@ -0,0 +1,46 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Aggregated Parameter Substitution</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable <em>Variable</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregatedParameterSubstitution() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface AggregatedParameterSubstitution extends EObject { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Variable</b></em>' reference. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <!-- end-user-doc --> | ||
28 | * @return the value of the '<em>Variable</em>' reference. | ||
29 | * @see #setVariable(Variable) | ||
30 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage#getAggregatedParameterSubstitution_Variable() | ||
31 | * @model | ||
32 | * @generated | ||
33 | */ | ||
34 | Variable getVariable(); | ||
35 | |||
36 | /** | ||
37 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable <em>Variable</em>}' reference. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @param value the new value of the '<em>Variable</em>' reference. | ||
41 | * @see #getVariable() | ||
42 | * @generated | ||
43 | */ | ||
44 | void setVariable(Variable value); | ||
45 | |||
46 | } // AggregatedParameterSubstitution | ||
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 a6b0a790..33d79329 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 | |||
@@ -454,6 +454,15 @@ public interface LogiclanguageFactory extends EFactory { | |||
454 | Max createMax(); | 454 | Max createMax(); |
455 | 455 | ||
456 | /** | 456 | /** |
457 | * Returns a new object of class '<em>Aggregated Parameter Substitution</em>'. | ||
458 | * <!-- begin-user-doc --> | ||
459 | * <!-- end-user-doc --> | ||
460 | * @return a new object of class '<em>Aggregated Parameter Substitution</em>'. | ||
461 | * @generated | ||
462 | */ | ||
463 | AggregatedParameterSubstitution createAggregatedParameterSubstitution(); | ||
464 | |||
465 | /** | ||
457 | * Returns the package supported by this factory. | 466 | * Returns the package supported by this factory. |
458 | * <!-- begin-user-doc --> | 467 | * <!-- begin-user-doc --> |
459 | * <!-- end-user-doc --> | 468 | * <!-- end-user-doc --> |
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 ddfb75a2..f5347e31 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 | |||
@@ -2751,13 +2751,22 @@ public interface LogiclanguagePackage extends EPackage { | |||
2751 | int AGGREGATE_EXPRESSION__RELATION = TERM_FEATURE_COUNT + 0; | 2751 | int AGGREGATE_EXPRESSION__RELATION = TERM_FEATURE_COUNT + 0; |
2752 | 2752 | ||
2753 | /** | 2753 | /** |
2754 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
2755 | * <!-- begin-user-doc --> | ||
2756 | * <!-- end-user-doc --> | ||
2757 | * @generated | ||
2758 | * @ordered | ||
2759 | */ | ||
2760 | int AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = TERM_FEATURE_COUNT + 1; | ||
2761 | |||
2762 | /** | ||
2754 | * The number of structural features of the '<em>Aggregate Expression</em>' class. | 2763 | * The number of structural features of the '<em>Aggregate Expression</em>' class. |
2755 | * <!-- begin-user-doc --> | 2764 | * <!-- begin-user-doc --> |
2756 | * <!-- end-user-doc --> | 2765 | * <!-- end-user-doc --> |
2757 | * @generated | 2766 | * @generated |
2758 | * @ordered | 2767 | * @ordered |
2759 | */ | 2768 | */ |
2760 | int AGGREGATE_EXPRESSION_FEATURE_COUNT = TERM_FEATURE_COUNT + 1; | 2769 | int AGGREGATE_EXPRESSION_FEATURE_COUNT = TERM_FEATURE_COUNT + 2; |
2761 | 2770 | ||
2762 | /** | 2771 | /** |
2763 | * The number of operations of the '<em>Aggregate Expression</em>' class. | 2772 | * The number of operations of the '<em>Aggregate Expression</em>' class. |
@@ -2788,6 +2797,15 @@ public interface LogiclanguagePackage extends EPackage { | |||
2788 | int PROJECTED_AGGREGATE_EXPRESSION__RELATION = AGGREGATE_EXPRESSION__RELATION; | 2797 | int PROJECTED_AGGREGATE_EXPRESSION__RELATION = AGGREGATE_EXPRESSION__RELATION; |
2789 | 2798 | ||
2790 | /** | 2799 | /** |
2800 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
2801 | * <!-- begin-user-doc --> | ||
2802 | * <!-- end-user-doc --> | ||
2803 | * @generated | ||
2804 | * @ordered | ||
2805 | */ | ||
2806 | int PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION; | ||
2807 | |||
2808 | /** | ||
2791 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. | 2809 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. |
2792 | * <!-- begin-user-doc --> | 2810 | * <!-- begin-user-doc --> |
2793 | * <!-- end-user-doc --> | 2811 | * <!-- end-user-doc --> |
@@ -2834,6 +2852,15 @@ public interface LogiclanguagePackage extends EPackage { | |||
2834 | int SUM__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; | 2852 | int SUM__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; |
2835 | 2853 | ||
2836 | /** | 2854 | /** |
2855 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
2856 | * <!-- begin-user-doc --> | ||
2857 | * <!-- end-user-doc --> | ||
2858 | * @generated | ||
2859 | * @ordered | ||
2860 | */ | ||
2861 | int SUM__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION; | ||
2862 | |||
2863 | /** | ||
2837 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. | 2864 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. |
2838 | * <!-- begin-user-doc --> | 2865 | * <!-- begin-user-doc --> |
2839 | * <!-- end-user-doc --> | 2866 | * <!-- end-user-doc --> |
@@ -2880,6 +2907,15 @@ public interface LogiclanguagePackage extends EPackage { | |||
2880 | int COUNT__RELATION = AGGREGATE_EXPRESSION__RELATION; | 2907 | int COUNT__RELATION = AGGREGATE_EXPRESSION__RELATION; |
2881 | 2908 | ||
2882 | /** | 2909 | /** |
2910 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
2911 | * <!-- begin-user-doc --> | ||
2912 | * <!-- end-user-doc --> | ||
2913 | * @generated | ||
2914 | * @ordered | ||
2915 | */ | ||
2916 | int COUNT__PARAMETER_SUBSTITUTION = AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION; | ||
2917 | |||
2918 | /** | ||
2883 | * The number of structural features of the '<em>Count</em>' class. | 2919 | * The number of structural features of the '<em>Count</em>' class. |
2884 | * <!-- begin-user-doc --> | 2920 | * <!-- begin-user-doc --> |
2885 | * <!-- end-user-doc --> | 2921 | * <!-- end-user-doc --> |
@@ -2917,6 +2953,15 @@ public interface LogiclanguagePackage extends EPackage { | |||
2917 | int MIN__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; | 2953 | int MIN__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; |
2918 | 2954 | ||
2919 | /** | 2955 | /** |
2956 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
2957 | * <!-- begin-user-doc --> | ||
2958 | * <!-- end-user-doc --> | ||
2959 | * @generated | ||
2960 | * @ordered | ||
2961 | */ | ||
2962 | int MIN__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION; | ||
2963 | |||
2964 | /** | ||
2920 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. | 2965 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. |
2921 | * <!-- begin-user-doc --> | 2966 | * <!-- begin-user-doc --> |
2922 | * <!-- end-user-doc --> | 2967 | * <!-- end-user-doc --> |
@@ -2963,6 +3008,15 @@ public interface LogiclanguagePackage extends EPackage { | |||
2963 | int MAX__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; | 3008 | int MAX__RELATION = PROJECTED_AGGREGATE_EXPRESSION__RELATION; |
2964 | 3009 | ||
2965 | /** | 3010 | /** |
3011 | * The feature id for the '<em><b>Parameter Substitution</b></em>' containment reference list. | ||
3012 | * <!-- begin-user-doc --> | ||
3013 | * <!-- end-user-doc --> | ||
3014 | * @generated | ||
3015 | * @ordered | ||
3016 | */ | ||
3017 | int MAX__PARAMETER_SUBSTITUTION = PROJECTED_AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION; | ||
3018 | |||
3019 | /** | ||
2966 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. | 3020 | * The feature id for the '<em><b>Projection Index</b></em>' attribute. |
2967 | * <!-- begin-user-doc --> | 3021 | * <!-- begin-user-doc --> |
2968 | * <!-- end-user-doc --> | 3022 | * <!-- end-user-doc --> |
@@ -2991,6 +3045,44 @@ public interface LogiclanguagePackage extends EPackage { | |||
2991 | 3045 | ||
2992 | 3046 | ||
2993 | /** | 3047 | /** |
3048 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl <em>Aggregated Parameter Substitution</em>}' class. | ||
3049 | * <!-- begin-user-doc --> | ||
3050 | * <!-- end-user-doc --> | ||
3051 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl | ||
3052 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getAggregatedParameterSubstitution() | ||
3053 | * @generated | ||
3054 | */ | ||
3055 | int AGGREGATED_PARAMETER_SUBSTITUTION = 65; | ||
3056 | |||
3057 | /** | ||
3058 | * The feature id for the '<em><b>Variable</b></em>' reference. | ||
3059 | * <!-- begin-user-doc --> | ||
3060 | * <!-- end-user-doc --> | ||
3061 | * @generated | ||
3062 | * @ordered | ||
3063 | */ | ||
3064 | int AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE = 0; | ||
3065 | |||
3066 | /** | ||
3067 | * The number of structural features of the '<em>Aggregated Parameter Substitution</em>' class. | ||
3068 | * <!-- begin-user-doc --> | ||
3069 | * <!-- end-user-doc --> | ||
3070 | * @generated | ||
3071 | * @ordered | ||
3072 | */ | ||
3073 | int AGGREGATED_PARAMETER_SUBSTITUTION_FEATURE_COUNT = 1; | ||
3074 | |||
3075 | /** | ||
3076 | * The number of operations of the '<em>Aggregated Parameter Substitution</em>' class. | ||
3077 | * <!-- begin-user-doc --> | ||
3078 | * <!-- end-user-doc --> | ||
3079 | * @generated | ||
3080 | * @ordered | ||
3081 | */ | ||
3082 | int AGGREGATED_PARAMETER_SUBSTITUTION_OPERATION_COUNT = 0; | ||
3083 | |||
3084 | |||
3085 | /** | ||
2994 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type <em>Type</em>}'. | 3086 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type <em>Type</em>}'. |
2995 | * <!-- begin-user-doc --> | 3087 | * <!-- begin-user-doc --> |
2996 | * <!-- end-user-doc --> | 3088 | * <!-- end-user-doc --> |
@@ -4306,6 +4398,17 @@ public interface LogiclanguagePackage extends EPackage { | |||
4306 | EReference getAggregateExpression_Relation(); | 4398 | EReference getAggregateExpression_Relation(); |
4307 | 4399 | ||
4308 | /** | 4400 | /** |
4401 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution <em>Parameter Substitution</em>}'. | ||
4402 | * <!-- begin-user-doc --> | ||
4403 | * <!-- end-user-doc --> | ||
4404 | * @return the meta object for the containment reference list '<em>Parameter Substitution</em>'. | ||
4405 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression#getParameterSubstitution() | ||
4406 | * @see #getAggregateExpression() | ||
4407 | * @generated | ||
4408 | */ | ||
4409 | EReference getAggregateExpression_ParameterSubstitution(); | ||
4410 | |||
4411 | /** | ||
4309 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Sum <em>Sum</em>}'. | 4412 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Sum <em>Sum</em>}'. |
4310 | * <!-- begin-user-doc --> | 4413 | * <!-- begin-user-doc --> |
4311 | * <!-- end-user-doc --> | 4414 | * <!-- end-user-doc --> |
@@ -4367,6 +4470,27 @@ public interface LogiclanguagePackage extends EPackage { | |||
4367 | EAttribute getProjectedAggregateExpression_ProjectionIndex(); | 4470 | EAttribute getProjectedAggregateExpression_ProjectionIndex(); |
4368 | 4471 | ||
4369 | /** | 4472 | /** |
4473 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution <em>Aggregated Parameter Substitution</em>}'. | ||
4474 | * <!-- begin-user-doc --> | ||
4475 | * <!-- end-user-doc --> | ||
4476 | * @return the meta object for class '<em>Aggregated Parameter Substitution</em>'. | ||
4477 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution | ||
4478 | * @generated | ||
4479 | */ | ||
4480 | EClass getAggregatedParameterSubstitution(); | ||
4481 | |||
4482 | /** | ||
4483 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable <em>Variable</em>}'. | ||
4484 | * <!-- begin-user-doc --> | ||
4485 | * <!-- end-user-doc --> | ||
4486 | * @return the meta object for the reference '<em>Variable</em>'. | ||
4487 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution#getVariable() | ||
4488 | * @see #getAggregatedParameterSubstitution() | ||
4489 | * @generated | ||
4490 | */ | ||
4491 | EReference getAggregatedParameterSubstitution_Variable(); | ||
4492 | |||
4493 | /** | ||
4370 | * Returns the factory that creates the instances of the model. | 4494 | * Returns the factory that creates the instances of the model. |
4371 | * <!-- begin-user-doc --> | 4495 | * <!-- begin-user-doc --> |
4372 | * <!-- end-user-doc --> | 4496 | * <!-- end-user-doc --> |
@@ -5510,6 +5634,14 @@ public interface LogiclanguagePackage extends EPackage { | |||
5510 | EReference AGGREGATE_EXPRESSION__RELATION = eINSTANCE.getAggregateExpression_Relation(); | 5634 | EReference AGGREGATE_EXPRESSION__RELATION = eINSTANCE.getAggregateExpression_Relation(); |
5511 | 5635 | ||
5512 | /** | 5636 | /** |
5637 | * The meta object literal for the '<em><b>Parameter Substitution</b></em>' containment reference list feature. | ||
5638 | * <!-- begin-user-doc --> | ||
5639 | * <!-- end-user-doc --> | ||
5640 | * @generated | ||
5641 | */ | ||
5642 | EReference AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION = eINSTANCE.getAggregateExpression_ParameterSubstitution(); | ||
5643 | |||
5644 | /** | ||
5513 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.SumImpl <em>Sum</em>}' class. | 5645 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.SumImpl <em>Sum</em>}' class. |
5514 | * <!-- begin-user-doc --> | 5646 | * <!-- begin-user-doc --> |
5515 | * <!-- end-user-doc --> | 5647 | * <!-- end-user-doc --> |
@@ -5567,6 +5699,24 @@ public interface LogiclanguagePackage extends EPackage { | |||
5567 | */ | 5699 | */ |
5568 | EAttribute PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX = eINSTANCE.getProjectedAggregateExpression_ProjectionIndex(); | 5700 | EAttribute PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX = eINSTANCE.getProjectedAggregateExpression_ProjectionIndex(); |
5569 | 5701 | ||
5702 | /** | ||
5703 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl <em>Aggregated Parameter Substitution</em>}' class. | ||
5704 | * <!-- begin-user-doc --> | ||
5705 | * <!-- end-user-doc --> | ||
5706 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl | ||
5707 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.LogiclanguagePackageImpl#getAggregatedParameterSubstitution() | ||
5708 | * @generated | ||
5709 | */ | ||
5710 | EClass AGGREGATED_PARAMETER_SUBSTITUTION = eINSTANCE.getAggregatedParameterSubstitution(); | ||
5711 | |||
5712 | /** | ||
5713 | * The meta object literal for the '<em><b>Variable</b></em>' reference feature. | ||
5714 | * <!-- begin-user-doc --> | ||
5715 | * <!-- end-user-doc --> | ||
5716 | * @generated | ||
5717 | */ | ||
5718 | EReference AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE = eINSTANCE.getAggregatedParameterSubstitution_Variable(); | ||
5719 | |||
5570 | } | 5720 | } |
5571 | 5721 | ||
5572 | } //LogiclanguagePackage | 5722 | } //LogiclanguagePackage |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java index fc1420b0..0459af42 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregateExpressionImpl.java | |||
@@ -3,15 +3,21 @@ | |||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | 3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; |
4 | 4 | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression; | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression; |
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | 7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; |
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; | 8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation; |
8 | 9 | ||
10 | import java.util.Collection; | ||
9 | import org.eclipse.emf.common.notify.Notification; | 11 | import org.eclipse.emf.common.notify.Notification; |
10 | 12 | ||
13 | import org.eclipse.emf.common.notify.NotificationChain; | ||
14 | import org.eclipse.emf.common.util.EList; | ||
11 | import org.eclipse.emf.ecore.EClass; | 15 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.InternalEObject; | 16 | import org.eclipse.emf.ecore.InternalEObject; |
13 | 17 | ||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 18 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
19 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
20 | import org.eclipse.emf.ecore.util.InternalEList; | ||
15 | 21 | ||
16 | /** | 22 | /** |
17 | * <!-- begin-user-doc --> | 23 | * <!-- begin-user-doc --> |
@@ -22,6 +28,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; | |||
22 | * </p> | 28 | * </p> |
23 | * <ul> | 29 | * <ul> |
24 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregateExpressionImpl#getRelation <em>Relation</em>}</li> | 30 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregateExpressionImpl#getRelation <em>Relation</em>}</li> |
31 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregateExpressionImpl#getParameterSubstitution <em>Parameter Substitution</em>}</li> | ||
25 | * </ul> | 32 | * </ul> |
26 | * | 33 | * |
27 | * @generated | 34 | * @generated |
@@ -38,6 +45,16 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg | |||
38 | protected Relation relation; | 45 | protected Relation relation; |
39 | 46 | ||
40 | /** | 47 | /** |
48 | * The cached value of the '{@link #getParameterSubstitution() <em>Parameter Substitution</em>}' containment reference list. | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @see #getParameterSubstitution() | ||
52 | * @generated | ||
53 | * @ordered | ||
54 | */ | ||
55 | protected EList<AggregatedParameterSubstitution> parameterSubstitution; | ||
56 | |||
57 | /** | ||
41 | * <!-- begin-user-doc --> | 58 | * <!-- begin-user-doc --> |
42 | * <!-- end-user-doc --> | 59 | * <!-- end-user-doc --> |
43 | * @generated | 60 | * @generated |
@@ -102,11 +119,40 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg | |||
102 | * @generated | 119 | * @generated |
103 | */ | 120 | */ |
104 | @Override | 121 | @Override |
122 | public EList<AggregatedParameterSubstitution> getParameterSubstitution() { | ||
123 | if (parameterSubstitution == null) { | ||
124 | parameterSubstitution = new EObjectContainmentEList<AggregatedParameterSubstitution>(AggregatedParameterSubstitution.class, this, LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION); | ||
125 | } | ||
126 | return parameterSubstitution; | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
136 | switch (featureID) { | ||
137 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION: | ||
138 | return ((InternalEList<?>)getParameterSubstitution()).basicRemove(otherEnd, msgs); | ||
139 | } | ||
140 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
105 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 149 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
106 | switch (featureID) { | 150 | switch (featureID) { |
107 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: | 151 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: |
108 | if (resolve) return getRelation(); | 152 | if (resolve) return getRelation(); |
109 | return basicGetRelation(); | 153 | return basicGetRelation(); |
154 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION: | ||
155 | return getParameterSubstitution(); | ||
110 | } | 156 | } |
111 | return super.eGet(featureID, resolve, coreType); | 157 | return super.eGet(featureID, resolve, coreType); |
112 | } | 158 | } |
@@ -116,12 +162,17 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg | |||
116 | * <!-- end-user-doc --> | 162 | * <!-- end-user-doc --> |
117 | * @generated | 163 | * @generated |
118 | */ | 164 | */ |
165 | @SuppressWarnings("unchecked") | ||
119 | @Override | 166 | @Override |
120 | public void eSet(int featureID, Object newValue) { | 167 | public void eSet(int featureID, Object newValue) { |
121 | switch (featureID) { | 168 | switch (featureID) { |
122 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: | 169 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: |
123 | setRelation((Relation)newValue); | 170 | setRelation((Relation)newValue); |
124 | return; | 171 | return; |
172 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION: | ||
173 | getParameterSubstitution().clear(); | ||
174 | getParameterSubstitution().addAll((Collection<? extends AggregatedParameterSubstitution>)newValue); | ||
175 | return; | ||
125 | } | 176 | } |
126 | super.eSet(featureID, newValue); | 177 | super.eSet(featureID, newValue); |
127 | } | 178 | } |
@@ -137,6 +188,9 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg | |||
137 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: | 188 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: |
138 | setRelation((Relation)null); | 189 | setRelation((Relation)null); |
139 | return; | 190 | return; |
191 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION: | ||
192 | getParameterSubstitution().clear(); | ||
193 | return; | ||
140 | } | 194 | } |
141 | super.eUnset(featureID); | 195 | super.eUnset(featureID); |
142 | } | 196 | } |
@@ -151,6 +205,8 @@ public abstract class AggregateExpressionImpl extends TermImpl implements Aggreg | |||
151 | switch (featureID) { | 205 | switch (featureID) { |
152 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: | 206 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__RELATION: |
153 | return relation != null; | 207 | return relation != null; |
208 | case LogiclanguagePackage.AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION: | ||
209 | return parameterSubstitution != null && !parameterSubstitution.isEmpty(); | ||
154 | } | 210 | } |
155 | return super.eIsSet(featureID); | 211 | return super.eIsSet(featureID); |
156 | } | 212 | } |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java new file mode 100644 index 00000000..15af0f21 --- /dev/null +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/ecore-gen/hu/bme/mit/inf/dslreasoner/logic/model/logiclanguage/impl/AggregatedParameterSubstitutionImpl.java | |||
@@ -0,0 +1,159 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.Notification; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EClass; | ||
12 | import org.eclipse.emf.ecore.InternalEObject; | ||
13 | |||
14 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
15 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Aggregated Parameter Substitution</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.AggregatedParameterSubstitutionImpl#getVariable <em>Variable</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class AggregatedParameterSubstitutionImpl extends MinimalEObjectImpl.Container implements AggregatedParameterSubstitution { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getVariable() <em>Variable</em>}' reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getVariable() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected Variable variable; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected AggregatedParameterSubstitutionImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return LogiclanguagePackage.Literals.AGGREGATED_PARAMETER_SUBSTITUTION; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | public Variable getVariable() { | ||
67 | if (variable != null && variable.eIsProxy()) { | ||
68 | InternalEObject oldVariable = (InternalEObject)variable; | ||
69 | variable = (Variable)eResolveProxy(oldVariable); | ||
70 | if (variable != oldVariable) { | ||
71 | if (eNotificationRequired()) | ||
72 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE, oldVariable, variable)); | ||
73 | } | ||
74 | } | ||
75 | return variable; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public Variable basicGetVariable() { | ||
84 | return variable; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | @Override | ||
93 | public void setVariable(Variable newVariable) { | ||
94 | Variable oldVariable = variable; | ||
95 | variable = newVariable; | ||
96 | if (eNotificationRequired()) | ||
97 | eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE, oldVariable, variable)); | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | @Override | ||
106 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
107 | switch (featureID) { | ||
108 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE: | ||
109 | if (resolve) return getVariable(); | ||
110 | return basicGetVariable(); | ||
111 | } | ||
112 | return super.eGet(featureID, resolve, coreType); | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | */ | ||
120 | @Override | ||
121 | public void eSet(int featureID, Object newValue) { | ||
122 | switch (featureID) { | ||
123 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE: | ||
124 | setVariable((Variable)newValue); | ||
125 | return; | ||
126 | } | ||
127 | super.eSet(featureID, newValue); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public void eUnset(int featureID) { | ||
137 | switch (featureID) { | ||
138 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE: | ||
139 | setVariable((Variable)null); | ||
140 | return; | ||
141 | } | ||
142 | super.eUnset(featureID); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @generated | ||
149 | */ | ||
150 | @Override | ||
151 | public boolean eIsSet(int featureID) { | ||
152 | switch (featureID) { | ||
153 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE: | ||
154 | return variable != null; | ||
155 | } | ||
156 | return super.eIsSet(featureID); | ||
157 | } | ||
158 | |||
159 | } //AggregatedParameterSubstitutionImpl | ||
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 b890b6e0..b8d87d99 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 | |||
@@ -104,6 +104,7 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu | |||
104 | case LogiclanguagePackage.COUNT: return createCount(); | 104 | case LogiclanguagePackage.COUNT: return createCount(); |
105 | case LogiclanguagePackage.MIN: return createMin(); | 105 | case LogiclanguagePackage.MIN: return createMin(); |
106 | case LogiclanguagePackage.MAX: return createMax(); | 106 | case LogiclanguagePackage.MAX: return createMax(); |
107 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION: return createAggregatedParameterSubstitution(); | ||
107 | default: | 108 | default: |
108 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | 109 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
109 | } | 110 | } |
@@ -643,6 +644,17 @@ public class LogiclanguageFactoryImpl extends EFactoryImpl implements Logiclangu | |||
643 | * @generated | 644 | * @generated |
644 | */ | 645 | */ |
645 | @Override | 646 | @Override |
647 | public AggregatedParameterSubstitution createAggregatedParameterSubstitution() { | ||
648 | AggregatedParameterSubstitutionImpl aggregatedParameterSubstitution = new AggregatedParameterSubstitutionImpl(); | ||
649 | return aggregatedParameterSubstitution; | ||
650 | } | ||
651 | |||
652 | /** | ||
653 | * <!-- begin-user-doc --> | ||
654 | * <!-- end-user-doc --> | ||
655 | * @generated | ||
656 | */ | ||
657 | @Override | ||
646 | public LogiclanguagePackage getLogiclanguagePackage() { | 658 | public LogiclanguagePackage getLogiclanguagePackage() { |
647 | return (LogiclanguagePackage)getEPackage(); | 659 | return (LogiclanguagePackage)getEPackage(); |
648 | } | 660 | } |
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 6d370c0f..64ebdde1 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 | |||
@@ -3,6 +3,7 @@ | |||
3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; | 3 | package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; |
4 | 4 | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression; | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression; |
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And; | 7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And; |
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion; | 8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion; |
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AtomicTerm; | 9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AtomicTerm; |
@@ -548,6 +549,13 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
548 | private EClass projectedAggregateExpressionEClass = null; | 549 | private EClass projectedAggregateExpressionEClass = null; |
549 | 550 | ||
550 | /** | 551 | /** |
552 | * <!-- begin-user-doc --> | ||
553 | * <!-- end-user-doc --> | ||
554 | * @generated | ||
555 | */ | ||
556 | private EClass aggregatedParameterSubstitutionEClass = null; | ||
557 | |||
558 | /** | ||
551 | * Creates an instance of the model <b>Package</b>, registered with | 559 | * Creates an instance of the model <b>Package</b>, registered with |
552 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | 560 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
553 | * package URI value. | 561 | * package URI value. |
@@ -1874,6 +1882,16 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
1874 | * @generated | 1882 | * @generated |
1875 | */ | 1883 | */ |
1876 | @Override | 1884 | @Override |
1885 | public EReference getAggregateExpression_ParameterSubstitution() { | ||
1886 | return (EReference)aggregateExpressionEClass.getEStructuralFeatures().get(1); | ||
1887 | } | ||
1888 | |||
1889 | /** | ||
1890 | * <!-- begin-user-doc --> | ||
1891 | * <!-- end-user-doc --> | ||
1892 | * @generated | ||
1893 | */ | ||
1894 | @Override | ||
1877 | public EClass getSum() { | 1895 | public EClass getSum() { |
1878 | return sumEClass; | 1896 | return sumEClass; |
1879 | } | 1897 | } |
@@ -1934,6 +1952,26 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
1934 | * @generated | 1952 | * @generated |
1935 | */ | 1953 | */ |
1936 | @Override | 1954 | @Override |
1955 | public EClass getAggregatedParameterSubstitution() { | ||
1956 | return aggregatedParameterSubstitutionEClass; | ||
1957 | } | ||
1958 | |||
1959 | /** | ||
1960 | * <!-- begin-user-doc --> | ||
1961 | * <!-- end-user-doc --> | ||
1962 | * @generated | ||
1963 | */ | ||
1964 | @Override | ||
1965 | public EReference getAggregatedParameterSubstitution_Variable() { | ||
1966 | return (EReference)aggregatedParameterSubstitutionEClass.getEStructuralFeatures().get(0); | ||
1967 | } | ||
1968 | |||
1969 | /** | ||
1970 | * <!-- begin-user-doc --> | ||
1971 | * <!-- end-user-doc --> | ||
1972 | * @generated | ||
1973 | */ | ||
1974 | @Override | ||
1937 | public LogiclanguageFactory getLogiclanguageFactory() { | 1975 | public LogiclanguageFactory getLogiclanguageFactory() { |
1938 | return (LogiclanguageFactory)getEFactoryInstance(); | 1976 | return (LogiclanguageFactory)getEFactoryInstance(); |
1939 | } | 1977 | } |
@@ -2141,6 +2179,7 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
2141 | 2179 | ||
2142 | aggregateExpressionEClass = createEClass(AGGREGATE_EXPRESSION); | 2180 | aggregateExpressionEClass = createEClass(AGGREGATE_EXPRESSION); |
2143 | createEReference(aggregateExpressionEClass, AGGREGATE_EXPRESSION__RELATION); | 2181 | createEReference(aggregateExpressionEClass, AGGREGATE_EXPRESSION__RELATION); |
2182 | createEReference(aggregateExpressionEClass, AGGREGATE_EXPRESSION__PARAMETER_SUBSTITUTION); | ||
2144 | 2183 | ||
2145 | sumEClass = createEClass(SUM); | 2184 | sumEClass = createEClass(SUM); |
2146 | 2185 | ||
@@ -2152,6 +2191,9 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
2152 | 2191 | ||
2153 | projectedAggregateExpressionEClass = createEClass(PROJECTED_AGGREGATE_EXPRESSION); | 2192 | projectedAggregateExpressionEClass = createEClass(PROJECTED_AGGREGATE_EXPRESSION); |
2154 | createEAttribute(projectedAggregateExpressionEClass, PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX); | 2193 | createEAttribute(projectedAggregateExpressionEClass, PROJECTED_AGGREGATE_EXPRESSION__PROJECTION_INDEX); |
2194 | |||
2195 | aggregatedParameterSubstitutionEClass = createEClass(AGGREGATED_PARAMETER_SUBSTITUTION); | ||
2196 | createEReference(aggregatedParameterSubstitutionEClass, AGGREGATED_PARAMETER_SUBSTITUTION__VARIABLE); | ||
2155 | } | 2197 | } |
2156 | 2198 | ||
2157 | /** | 2199 | /** |
@@ -2433,6 +2475,7 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
2433 | 2475 | ||
2434 | initEClass(aggregateExpressionEClass, AggregateExpression.class, "AggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 2476 | initEClass(aggregateExpressionEClass, AggregateExpression.class, "AggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
2435 | initEReference(getAggregateExpression_Relation(), this.getRelation(), null, "relation", null, 0, 1, AggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 2477 | initEReference(getAggregateExpression_Relation(), this.getRelation(), null, "relation", null, 0, 1, AggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
2478 | initEReference(getAggregateExpression_ParameterSubstitution(), this.getAggregatedParameterSubstitution(), null, "parameterSubstitution", null, 0, -1, AggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
2436 | 2479 | ||
2437 | initEClass(sumEClass, Sum.class, "Sum", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 2480 | initEClass(sumEClass, Sum.class, "Sum", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
2438 | 2481 | ||
@@ -2445,6 +2488,9 @@ public class LogiclanguagePackageImpl extends EPackageImpl implements Logiclangu | |||
2445 | initEClass(projectedAggregateExpressionEClass, ProjectedAggregateExpression.class, "ProjectedAggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 2488 | initEClass(projectedAggregateExpressionEClass, ProjectedAggregateExpression.class, "ProjectedAggregateExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
2446 | initEAttribute(getProjectedAggregateExpression_ProjectionIndex(), ecorePackage.getEInt(), "projectionIndex", "-1", 1, 1, ProjectedAggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 2489 | initEAttribute(getProjectedAggregateExpression_ProjectionIndex(), ecorePackage.getEInt(), "projectionIndex", "-1", 1, 1, ProjectedAggregateExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
2447 | 2490 | ||
2491 | initEClass(aggregatedParameterSubstitutionEClass, AggregatedParameterSubstitution.class, "AggregatedParameterSubstitution", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
2492 | initEReference(getAggregatedParameterSubstitution_Variable(), this.getVariable(), null, "variable", null, 0, 1, AggregatedParameterSubstitution.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
2493 | |||
2448 | // Create resource | 2494 | // Create resource |
2449 | createResource(eNS_URI); | 2495 | createResource(eNS_URI); |
2450 | } | 2496 | } |
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 25edee70..3fc7c298 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 | |||
@@ -328,6 +328,10 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl { | |||
328 | return createProjectedAggregateExpressionAdapter(); | 328 | return createProjectedAggregateExpressionAdapter(); |
329 | } | 329 | } |
330 | @Override | 330 | @Override |
331 | public Adapter caseAggregatedParameterSubstitution(AggregatedParameterSubstitution object) { | ||
332 | return createAggregatedParameterSubstitutionAdapter(); | ||
333 | } | ||
334 | @Override | ||
331 | public Adapter defaultCase(EObject object) { | 335 | public Adapter defaultCase(EObject object) { |
332 | return createEObjectAdapter(); | 336 | return createEObjectAdapter(); |
333 | } | 337 | } |
@@ -1258,6 +1262,20 @@ public class LogiclanguageAdapterFactory extends AdapterFactoryImpl { | |||
1258 | } | 1262 | } |
1259 | 1263 | ||
1260 | /** | 1264 | /** |
1265 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution <em>Aggregated Parameter Substitution</em>}'. | ||
1266 | * <!-- begin-user-doc --> | ||
1267 | * This default implementation returns null so that we can easily ignore cases; | ||
1268 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
1269 | * <!-- end-user-doc --> | ||
1270 | * @return the new adapter. | ||
1271 | * @see hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregatedParameterSubstitution | ||
1272 | * @generated | ||
1273 | */ | ||
1274 | public Adapter createAggregatedParameterSubstitutionAdapter() { | ||
1275 | return null; | ||
1276 | } | ||
1277 | |||
1278 | /** | ||
1261 | * Creates a new adapter for the default case. | 1279 | * Creates a new adapter for the default case. |
1262 | * <!-- begin-user-doc --> | 1280 | * <!-- begin-user-doc --> |
1263 | * This default implementation returns null. | 1281 | * This default implementation returns null. |
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 fc443484..ac821567 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 | |||
@@ -617,6 +617,12 @@ public class LogiclanguageSwitch<T> extends Switch<T> { | |||
617 | if (result == null) result = defaultCase(theEObject); | 617 | if (result == null) result = defaultCase(theEObject); |
618 | return result; | 618 | return result; |
619 | } | 619 | } |
620 | case LogiclanguagePackage.AGGREGATED_PARAMETER_SUBSTITUTION: { | ||
621 | AggregatedParameterSubstitution aggregatedParameterSubstitution = (AggregatedParameterSubstitution)theEObject; | ||
622 | T result = caseAggregatedParameterSubstitution(aggregatedParameterSubstitution); | ||
623 | if (result == null) result = defaultCase(theEObject); | ||
624 | return result; | ||
625 | } | ||
620 | default: return defaultCase(theEObject); | 626 | default: return defaultCase(theEObject); |
621 | } | 627 | } |
622 | } | 628 | } |
@@ -1597,6 +1603,21 @@ public class LogiclanguageSwitch<T> extends Switch<T> { | |||
1597 | } | 1603 | } |
1598 | 1604 | ||
1599 | /** | 1605 | /** |
1606 | * Returns the result of interpreting the object as an instance of '<em>Aggregated Parameter Substitution</em>'. | ||
1607 | * <!-- begin-user-doc --> | ||
1608 | * This implementation returns null; | ||
1609 | * returning a non-null result will terminate the switch. | ||
1610 | * <!-- end-user-doc --> | ||
1611 | * @param object the target of the switch. | ||
1612 | * @return the result of interpreting the object as an instance of '<em>Aggregated Parameter Substitution</em>'. | ||
1613 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
1614 | * @generated | ||
1615 | */ | ||
1616 | public T caseAggregatedParameterSubstitution(AggregatedParameterSubstitution object) { | ||
1617 | return null; | ||
1618 | } | ||
1619 | |||
1620 | /** | ||
1600 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | 1621 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. |
1601 | * <!-- begin-user-doc --> | 1622 | * <!-- begin-user-doc --> |
1602 | * This implementation returns null; | 1623 | * This implementation returns null; |
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 5673d66a..0a49e388 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 | |||
@@ -7805,7 +7805,7 @@ | |||
7805 | <styles xmi:type="notation:FilteringStyle" xmi:id="_rsImpm6WEemSyfDlsGAqLA"/> | 7805 | <styles xmi:type="notation:FilteringStyle" xmi:id="_rsImpm6WEemSyfDlsGAqLA"/> |
7806 | </children> | 7806 | </children> |
7807 | <styles xmi:type="notation:ShapeStyle" xmi:id="_rsImoW6WEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7807 | <styles xmi:type="notation:ShapeStyle" xmi:id="_rsImoW6WEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7808 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rsImom6WEemSyfDlsGAqLA" x="2085" y="363" width="135" height="40"/> | 7808 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_rsImom6WEemSyfDlsGAqLA" x="2280" y="365" width="135" height="40"/> |
7809 | </children> | 7809 | </children> |
7810 | <children xmi:type="notation:Node" xmi:id="_31nEcG6XEemSyfDlsGAqLA" type="2003" element="_309kMG6XEemSyfDlsGAqLA"> | 7810 | <children xmi:type="notation:Node" xmi:id="_31nEcG6XEemSyfDlsGAqLA" type="2003" element="_309kMG6XEemSyfDlsGAqLA"> |
7811 | <children xmi:type="notation:Node" xmi:id="_31nrgG6XEemSyfDlsGAqLA" type="5007"/> | 7811 | <children xmi:type="notation:Node" xmi:id="_31nrgG6XEemSyfDlsGAqLA" type="5007"/> |
@@ -7814,7 +7814,7 @@ | |||
7814 | <styles xmi:type="notation:FilteringStyle" xmi:id="_31nrg26XEemSyfDlsGAqLA"/> | 7814 | <styles xmi:type="notation:FilteringStyle" xmi:id="_31nrg26XEemSyfDlsGAqLA"/> |
7815 | </children> | 7815 | </children> |
7816 | <styles xmi:type="notation:ShapeStyle" xmi:id="_31nEcW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7816 | <styles xmi:type="notation:ShapeStyle" xmi:id="_31nEcW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7817 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_31nEcm6XEemSyfDlsGAqLA" x="2196" y="564" width="60" height="41"/> | 7817 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_31nEcm6XEemSyfDlsGAqLA" x="2391" y="566" width="60" height="41"/> |
7818 | </children> | 7818 | </children> |
7819 | <children xmi:type="notation:Node" xmi:id="_53F0AG6XEemSyfDlsGAqLA" type="2003" element="_52k2oG6XEemSyfDlsGAqLA"> | 7819 | <children xmi:type="notation:Node" xmi:id="_53F0AG6XEemSyfDlsGAqLA" type="2003" element="_52k2oG6XEemSyfDlsGAqLA"> |
7820 | <children xmi:type="notation:Node" xmi:id="_53F0A26XEemSyfDlsGAqLA" type="5007"/> | 7820 | <children xmi:type="notation:Node" xmi:id="_53F0A26XEemSyfDlsGAqLA" type="5007"/> |
@@ -7823,7 +7823,7 @@ | |||
7823 | <styles xmi:type="notation:FilteringStyle" xmi:id="_53F0Bm6XEemSyfDlsGAqLA"/> | 7823 | <styles xmi:type="notation:FilteringStyle" xmi:id="_53F0Bm6XEemSyfDlsGAqLA"/> |
7824 | </children> | 7824 | </children> |
7825 | <styles xmi:type="notation:ShapeStyle" xmi:id="_53F0AW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7825 | <styles xmi:type="notation:ShapeStyle" xmi:id="_53F0AW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7826 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_53F0Am6XEemSyfDlsGAqLA" x="2115" y="466" width="75" height="28"/> | 7826 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_53F0Am6XEemSyfDlsGAqLA" x="2310" y="468" width="75" height="28"/> |
7827 | </children> | 7827 | </children> |
7828 | <children xmi:type="notation:Node" xmi:id="_8nYKUG6XEemSyfDlsGAqLA" type="2003" element="_8mxtYG6XEemSyfDlsGAqLA"> | 7828 | <children xmi:type="notation:Node" xmi:id="_8nYKUG6XEemSyfDlsGAqLA" type="2003" element="_8mxtYG6XEemSyfDlsGAqLA"> |
7829 | <children xmi:type="notation:Node" xmi:id="_8nYxYG6XEemSyfDlsGAqLA" type="5007"/> | 7829 | <children xmi:type="notation:Node" xmi:id="_8nYxYG6XEemSyfDlsGAqLA" type="5007"/> |
@@ -7832,7 +7832,7 @@ | |||
7832 | <styles xmi:type="notation:FilteringStyle" xmi:id="_8nYxY26XEemSyfDlsGAqLA"/> | 7832 | <styles xmi:type="notation:FilteringStyle" xmi:id="_8nYxY26XEemSyfDlsGAqLA"/> |
7833 | </children> | 7833 | </children> |
7834 | <styles xmi:type="notation:ShapeStyle" xmi:id="_8nYKUW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7834 | <styles xmi:type="notation:ShapeStyle" xmi:id="_8nYKUW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7835 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8nYKUm6XEemSyfDlsGAqLA" x="2268" y="564" width="63" height="16"/> | 7835 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8nYKUm6XEemSyfDlsGAqLA" x="2463" y="566" width="63" height="16"/> |
7836 | </children> | 7836 | </children> |
7837 | <children xmi:type="notation:Node" xmi:id="_-vo3UG6XEemSyfDlsGAqLA" type="2003" element="_-vAlMG6XEemSyfDlsGAqLA"> | 7837 | <children xmi:type="notation:Node" xmi:id="_-vo3UG6XEemSyfDlsGAqLA" type="2003" element="_-vAlMG6XEemSyfDlsGAqLA"> |
7838 | <children xmi:type="notation:Node" xmi:id="_-vpeYG6XEemSyfDlsGAqLA" type="5007"/> | 7838 | <children xmi:type="notation:Node" xmi:id="_-vpeYG6XEemSyfDlsGAqLA" type="5007"/> |
@@ -7841,7 +7841,7 @@ | |||
7841 | <styles xmi:type="notation:FilteringStyle" xmi:id="_-vpeY26XEemSyfDlsGAqLA"/> | 7841 | <styles xmi:type="notation:FilteringStyle" xmi:id="_-vpeY26XEemSyfDlsGAqLA"/> |
7842 | </children> | 7842 | </children> |
7843 | <styles xmi:type="notation:ShapeStyle" xmi:id="_-vo3UW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7843 | <styles xmi:type="notation:ShapeStyle" xmi:id="_-vo3UW6XEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7844 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-vo3Um6XEemSyfDlsGAqLA" x="2340" y="564" width="60" height="16"/> | 7844 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-vo3Um6XEemSyfDlsGAqLA" x="2535" y="566" width="60" height="16"/> |
7845 | </children> | 7845 | </children> |
7846 | <children xmi:type="notation:Node" xmi:id="_9KcB0G6cEemSyfDlsGAqLA" type="2003" element="_9J4BIG6cEemSyfDlsGAqLA"> | 7846 | <children xmi:type="notation:Node" xmi:id="_9KcB0G6cEemSyfDlsGAqLA" type="2003" element="_9J4BIG6cEemSyfDlsGAqLA"> |
7847 | <children xmi:type="notation:Node" xmi:id="_9KcB026cEemSyfDlsGAqLA" type="5007"/> | 7847 | <children xmi:type="notation:Node" xmi:id="_9KcB026cEemSyfDlsGAqLA" type="5007"/> |
@@ -7854,7 +7854,16 @@ | |||
7854 | <styles xmi:type="notation:FilteringStyle" xmi:id="_9KcB1m6cEemSyfDlsGAqLA"/> | 7854 | <styles xmi:type="notation:FilteringStyle" xmi:id="_9KcB1m6cEemSyfDlsGAqLA"/> |
7855 | </children> | 7855 | </children> |
7856 | <styles xmi:type="notation:ShapeStyle" xmi:id="_9KcB0W6cEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> | 7856 | <styles xmi:type="notation:ShapeStyle" xmi:id="_9KcB0W6cEemSyfDlsGAqLA" fontName="Segoe UI" fontHeight="8"/> |
7857 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9KcB0m6cEemSyfDlsGAqLA" x="2196" y="466" width="183" height="53"/> | 7857 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_9KcB0m6cEemSyfDlsGAqLA" x="2391" y="468" width="183" height="53"/> |
7858 | </children> | ||
7859 | <children xmi:type="notation:Node" xmi:id="_qmVssKJeEemXzuA5M0BZIw" type="2003" element="_qkRQIKJeEemXzuA5M0BZIw"> | ||
7860 | <children xmi:type="notation:Node" xmi:id="_qmh58KJeEemXzuA5M0BZIw" type="5007"/> | ||
7861 | <children xmi:type="notation:Node" xmi:id="_qmihAKJeEemXzuA5M0BZIw" type="7004"> | ||
7862 | <styles xmi:type="notation:SortingStyle" xmi:id="_qmihAaJeEemXzuA5M0BZIw"/> | ||
7863 | <styles xmi:type="notation:FilteringStyle" xmi:id="_qmihAqJeEemXzuA5M0BZIw"/> | ||
7864 | </children> | ||
7865 | <styles xmi:type="notation:ShapeStyle" xmi:id="_qmVssaJeEemXzuA5M0BZIw" fontName="Segoe UI" fontHeight="8"/> | ||
7866 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qmVssqJeEemXzuA5M0BZIw" x="2028" y="367" width="219" height="41"/> | ||
7858 | </children> | 7867 | </children> |
7859 | <styles xmi:type="notation:DiagramStyle" xmi:id="_l6X5OrdnEeau1vMV3Bsx4w"/> | 7868 | <styles xmi:type="notation:DiagramStyle" xmi:id="_l6X5OrdnEeau1vMV3Bsx4w"/> |
7860 | <edges xmi:type="notation:Edge" xmi:id="_l6X5a7dnEeau1vMV3Bsx4w" type="4001" element="_l6Zt6bdnEeau1vMV3Bsx4w" source="_l6XR7LdnEeau1vMV3Bsx4w" target="_l6XR27dnEeau1vMV3Bsx4w"> | 7869 | <edges xmi:type="notation:Edge" xmi:id="_l6X5a7dnEeau1vMV3Bsx4w" type="4001" element="_l6Zt6bdnEeau1vMV3Bsx4w" source="_l6XR7LdnEeau1vMV3Bsx4w" target="_l6XR27dnEeau1vMV3Bsx4w"> |
@@ -9011,17 +9020,17 @@ | |||
9011 | </edges> | 9020 | </edges> |
9012 | <edges xmi:type="notation:Edge" xmi:id="_hKdI4G6cEemSyfDlsGAqLA" type="4001" element="_hJ8ymW6cEemSyfDlsGAqLA" source="_rsImoG6WEemSyfDlsGAqLA" target="_hTMLdIKhEeeAppuRs-roLg"> | 9021 | <edges xmi:type="notation:Edge" xmi:id="_hKdI4G6cEemSyfDlsGAqLA" type="4001" element="_hJ8ymW6cEemSyfDlsGAqLA" source="_rsImoG6WEemSyfDlsGAqLA" target="_hTMLdIKhEeeAppuRs-roLg"> |
9013 | <children xmi:type="notation:Node" xmi:id="_hKdv8G6cEemSyfDlsGAqLA" type="6001"> | 9022 | <children xmi:type="notation:Node" xmi:id="_hKdv8G6cEemSyfDlsGAqLA" type="6001"> |
9014 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv8W6cEemSyfDlsGAqLA" x="143" y="-10"/> | 9023 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv8W6cEemSyfDlsGAqLA" x="239" y="-10"/> |
9015 | </children> | 9024 | </children> |
9016 | <children xmi:type="notation:Node" xmi:id="_hKdv8m6cEemSyfDlsGAqLA" type="6002"> | 9025 | <children xmi:type="notation:Node" xmi:id="_hKdv8m6cEemSyfDlsGAqLA" type="6002"> |
9017 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv826cEemSyfDlsGAqLA" x="27"/> | 9026 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv826cEemSyfDlsGAqLA" x="-4"/> |
9018 | </children> | 9027 | </children> |
9019 | <children xmi:type="notation:Node" xmi:id="_hKdv9G6cEemSyfDlsGAqLA" type="6003"> | 9028 | <children xmi:type="notation:Node" xmi:id="_hKdv9G6cEemSyfDlsGAqLA" type="6003"> |
9020 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv9W6cEemSyfDlsGAqLA" x="136" y="5"/> | 9029 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hKdv9W6cEemSyfDlsGAqLA" x="165" y="5"/> |
9021 | </children> | 9030 | </children> |
9022 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_hKdI4W6cEemSyfDlsGAqLA" routing="Rectilinear"/> | 9031 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_hKdI4W6cEemSyfDlsGAqLA" routing="Rectilinear"/> |
9023 | <styles xmi:type="notation:FontStyle" xmi:id="_hKdI4m6cEemSyfDlsGAqLA" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | 9032 | <styles xmi:type="notation:FontStyle" xmi:id="_hKdI4m6cEemSyfDlsGAqLA" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> |
9024 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hKdI426cEemSyfDlsGAqLA" points="[15, 30, 720, -126]$[15, 228, 720, 72]$[-765, 228, -60, 72]$[-765, 204, -60, 48]"/> | 9033 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hKdI426cEemSyfDlsGAqLA" points="[15, 30, 915, -124]$[15, 226, 915, 72]$[-960, 226, -60, 72]$[-960, 202, -60, 48]"/> |
9025 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hKdv9m6cEemSyfDlsGAqLA" id="(0.0,0.23076923076923078)"/> | 9034 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hKdv9m6cEemSyfDlsGAqLA" id="(0.0,0.23076923076923078)"/> |
9026 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hKdv926cEemSyfDlsGAqLA" id="(0.6990291262135923,0.0)"/> | 9035 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hKdv926cEemSyfDlsGAqLA" id="(0.6990291262135923,0.0)"/> |
9027 | </edges> | 9036 | </edges> |
@@ -9105,6 +9114,38 @@ | |||
9105 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PSa65G6dEemSyfDlsGAqLA" id="(1.0172413793103448,0.0)"/> | 9114 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PSa65G6dEemSyfDlsGAqLA" id="(1.0172413793103448,0.0)"/> |
9106 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PSa65W6dEemSyfDlsGAqLA" id="(0.5,0.38235294117647056)"/> | 9115 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PSa65W6dEemSyfDlsGAqLA" id="(0.5,0.38235294117647056)"/> |
9107 | </edges> | 9116 | </edges> |
9117 | <edges xmi:type="notation:Edge" xmi:id="_uJz-AKJfEemXzuA5M0BZIw" type="4001" element="_uI5YDKJfEemXzuA5M0BZIw" source="_rsImoG6WEemSyfDlsGAqLA" target="_qmVssKJeEemXzuA5M0BZIw"> | ||
9118 | <children xmi:type="notation:Node" xmi:id="_uJ1zMKJfEemXzuA5M0BZIw" type="6001"> | ||
9119 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uJ1zMaJfEemXzuA5M0BZIw" x="4" y="32"/> | ||
9120 | </children> | ||
9121 | <children xmi:type="notation:Node" xmi:id="_uJ3BUKJfEemXzuA5M0BZIw" type="6002"> | ||
9122 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uJ3BUaJfEemXzuA5M0BZIw" x="7"/> | ||
9123 | </children> | ||
9124 | <children xmi:type="notation:Node" xmi:id="_uJ3oYKJfEemXzuA5M0BZIw" type="6003"> | ||
9125 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uJ3oYaJfEemXzuA5M0BZIw" x="-2"/> | ||
9126 | </children> | ||
9127 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_uJz-AaJfEemXzuA5M0BZIw" routing="Rectilinear"/> | ||
9128 | <styles xmi:type="notation:FontStyle" xmi:id="_uJz-AqJfEemXzuA5M0BZIw" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
9129 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uJz-A6JfEemXzuA5M0BZIw" points="[-133, 2, 252, -3]$[-168, 2, 217, -3]"/> | ||
9130 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uJ6rsKJfEemXzuA5M0BZIw" id="(1.0,0.48717948717948717)"/> | ||
9131 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uJ6rsaJfEemXzuA5M0BZIw" id="(0.0,0.5641025641025641)"/> | ||
9132 | </edges> | ||
9133 | <edges xmi:type="notation:Edge" xmi:id="__oNHgKJfEemXzuA5M0BZIw" type="4001" element="__nLz2aJfEemXzuA5M0BZIw" source="_qmVssKJeEemXzuA5M0BZIw" target="_l6XSGLdnEeau1vMV3Bsx4w"> | ||
9134 | <children xmi:type="notation:Node" xmi:id="__oNukKJfEemXzuA5M0BZIw" type="6001"> | ||
9135 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="__oNukaJfEemXzuA5M0BZIw" y="-10"/> | ||
9136 | </children> | ||
9137 | <children xmi:type="notation:Node" xmi:id="__oNukqJfEemXzuA5M0BZIw" type="6002"> | ||
9138 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="__oNuk6JfEemXzuA5M0BZIw" y="10"/> | ||
9139 | </children> | ||
9140 | <children xmi:type="notation:Node" xmi:id="__oNulKJfEemXzuA5M0BZIw" type="6003"> | ||
9141 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="__oNulaJfEemXzuA5M0BZIw" y="10"/> | ||
9142 | </children> | ||
9143 | <styles xmi:type="notation:ConnectorStyle" xmi:id="__oNHgaJfEemXzuA5M0BZIw" routing="Rectilinear"/> | ||
9144 | <styles xmi:type="notation:FontStyle" xmi:id="__oNHgqJfEemXzuA5M0BZIw" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
9145 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="__oNHg6JfEemXzuA5M0BZIw" points="[0, 0, 86, -62]$[0, 62, 86, 0]$[-86, 62, 0, 0]"/> | ||
9146 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="__oOVoKJfEemXzuA5M0BZIw" id="(0.6082949308755761,1.0)"/> | ||
9147 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="__oOVoaJfEemXzuA5M0BZIw" id="(1.0,0.3076923076923077)"/> | ||
9148 | </edges> | ||
9108 | </data> | 9149 | </data> |
9109 | </ownedAnnotationEntries> | 9150 | </ownedAnnotationEntries> |
9110 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l6ZIGbdnEeau1vMV3Bsx4w" name="Term" tooltipText="" outgoingEdges="_l6ZufbdnEeau1vMV3Bsx4w" incomingEdges="_l6Zt6bdnEeau1vMV3Bsx4w _l6Zt9bdnEeau1vMV3Bsx4w _l6Zt-bdnEeau1vMV3Bsx4w _l6Zt_bdnEeau1vMV3Bsx4w _l6ZuAbdnEeau1vMV3Bsx4w _l6ZuBbdnEeau1vMV3Bsx4w _l6ZuCbdnEeau1vMV3Bsx4w _l6ZuDbdnEeau1vMV3Bsx4w _l6ZuEbdnEeau1vMV3Bsx4w _l6ZuFbdnEeau1vMV3Bsx4w _l6ZuGbdnEeau1vMV3Bsx4w _l6ZuHbdnEeau1vMV3Bsx4w _l6ZuIbdnEeau1vMV3Bsx4w _l6ZuJbdnEeau1vMV3Bsx4w _l6ZuKbdnEeau1vMV3Bsx4w _l6ZuLbdnEeau1vMV3Bsx4w _l6ZuMbdnEeau1vMV3Bsx4w _l6ZuNbdnEeau1vMV3Bsx4w _l6ZuObdnEeau1vMV3Bsx4w _l6ZuPbdnEeau1vMV3Bsx4w _l6ZuQbdnEeau1vMV3Bsx4w _l6ZuRbdnEeau1vMV3Bsx4w _l6ZuhbdnEeau1vMV3Bsx4w _l6ZuibdnEeau1vMV3Bsx4w _l6ZunbdnEeau1vMV3Bsx4w _l6ZuqbdnEeau1vMV3Bsx4w _l6ZuwbdnEeau1vMV3Bsx4w _l6Zu3bdnEeau1vMV3Bsx4w _l6ZvHbdnEeau1vMV3Bsx4w _l6ZvIbdnEeau1vMV3Bsx4w _l6ZvJbdnEeau1vMV3Bsx4w _l6ZvKbdnEeau1vMV3Bsx4w _l6ZvZ7dnEeau1vMV3Bsx4w _kQZhsLd1Eeau1vMV3Bsx4w _BoaVwLqxEeau1vMV3Bsx4w _Vi5psIKgEeeAppuRs-roLg _YRIxkIKgEeeAppuRs-roLg _sGSk0IKlEeeAppuRs-roLg _za0wsm6WEemSyfDlsGAqLA" width="12" height="10"> | 9151 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l6ZIGbdnEeau1vMV3Bsx4w" name="Term" tooltipText="" outgoingEdges="_l6ZufbdnEeau1vMV3Bsx4w" incomingEdges="_l6Zt6bdnEeau1vMV3Bsx4w _l6Zt9bdnEeau1vMV3Bsx4w _l6Zt-bdnEeau1vMV3Bsx4w _l6Zt_bdnEeau1vMV3Bsx4w _l6ZuAbdnEeau1vMV3Bsx4w _l6ZuBbdnEeau1vMV3Bsx4w _l6ZuCbdnEeau1vMV3Bsx4w _l6ZuDbdnEeau1vMV3Bsx4w _l6ZuEbdnEeau1vMV3Bsx4w _l6ZuFbdnEeau1vMV3Bsx4w _l6ZuGbdnEeau1vMV3Bsx4w _l6ZuHbdnEeau1vMV3Bsx4w _l6ZuIbdnEeau1vMV3Bsx4w _l6ZuJbdnEeau1vMV3Bsx4w _l6ZuKbdnEeau1vMV3Bsx4w _l6ZuLbdnEeau1vMV3Bsx4w _l6ZuMbdnEeau1vMV3Bsx4w _l6ZuNbdnEeau1vMV3Bsx4w _l6ZuObdnEeau1vMV3Bsx4w _l6ZuPbdnEeau1vMV3Bsx4w _l6ZuQbdnEeau1vMV3Bsx4w _l6ZuRbdnEeau1vMV3Bsx4w _l6ZuhbdnEeau1vMV3Bsx4w _l6ZuibdnEeau1vMV3Bsx4w _l6ZunbdnEeau1vMV3Bsx4w _l6ZuqbdnEeau1vMV3Bsx4w _l6ZuwbdnEeau1vMV3Bsx4w _l6Zu3bdnEeau1vMV3Bsx4w _l6ZvHbdnEeau1vMV3Bsx4w _l6ZvIbdnEeau1vMV3Bsx4w _l6ZvJbdnEeau1vMV3Bsx4w _l6ZvKbdnEeau1vMV3Bsx4w _l6ZvZ7dnEeau1vMV3Bsx4w _kQZhsLd1Eeau1vMV3Bsx4w _BoaVwLqxEeau1vMV3Bsx4w _Vi5psIKgEeeAppuRs-roLg _YRIxkIKgEeeAppuRs-roLg _sGSk0IKlEeeAppuRs-roLg _za0wsm6WEemSyfDlsGAqLA" width="12" height="10"> |
@@ -9199,7 +9240,7 @@ | |||
9199 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | 9240 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> |
9200 | </ownedElements> | 9241 | </ownedElements> |
9201 | </ownedDiagramElements> | 9242 | </ownedDiagramElements> |
9202 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l6ZIL7dnEeau1vMV3Bsx4w" name="Variable" tooltipText="" outgoingEdges="_JfkfULd8Eeau1vMV3Bsx4w _e1jg0IKgEeeAppuRs-roLg" incomingEdges="_l6Zt8bdnEeau1vMV3Bsx4w" width="12" height="10"> | 9243 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_l6ZIL7dnEeau1vMV3Bsx4w" name="Variable" tooltipText="" outgoingEdges="_JfkfULd8Eeau1vMV3Bsx4w _e1jg0IKgEeeAppuRs-roLg" incomingEdges="_l6Zt8bdnEeau1vMV3Bsx4w __nLz2aJfEemXzuA5M0BZIw" width="12" height="10"> |
9203 | <target xmi:type="ecore:EClass" href="logiclanguage.ecore#//Variable"/> | 9244 | <target xmi:type="ecore:EClass" href="logiclanguage.ecore#//Variable"/> |
9204 | <semanticElements xmi:type="ecore:EClass" href="logiclanguage.ecore#//Variable"/> | 9245 | <semanticElements xmi:type="ecore:EClass" href="logiclanguage.ecore#//Variable"/> |
9205 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 9246 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -10473,7 +10514,7 @@ | |||
10473 | </ownedStyle> | 10514 | </ownedStyle> |
10474 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 10515 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
10475 | </ownedDiagramElements> | 10516 | </ownedDiagramElements> |
10476 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rrY_wG6WEemSyfDlsGAqLA" name="AggregateExpression" tooltipText="" outgoingEdges="_za0wsm6WEemSyfDlsGAqLA _hJ8ymW6cEemSyfDlsGAqLA" incomingEdges="_wovb6G6cEemSyfDlsGAqLA _OKfpkm6dEemSyfDlsGAqLA" width="12" height="10"> | 10517 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_rrY_wG6WEemSyfDlsGAqLA" name="AggregateExpression" tooltipText="" outgoingEdges="_za0wsm6WEemSyfDlsGAqLA _hJ8ymW6cEemSyfDlsGAqLA _uI5YDKJfEemXzuA5M0BZIw" incomingEdges="_wovb6G6cEemSyfDlsGAqLA _OKfpkm6dEemSyfDlsGAqLA" width="12" height="10"> |
10477 | <target xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregateExpression"/> | 10518 | <target xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregateExpression"/> |
10478 | <semanticElements xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregateExpression"/> | 10519 | <semanticElements xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregateExpression"/> |
10479 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 10520 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -10635,6 +10676,44 @@ | |||
10635 | </ownedStyle> | 10676 | </ownedStyle> |
10636 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 10677 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
10637 | </ownedDiagramElements> | 10678 | </ownedDiagramElements> |
10679 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_qkRQIKJeEemXzuA5M0BZIw" name="AggregatedParameterSubstitution" tooltipText="" outgoingEdges="__nLz2aJfEemXzuA5M0BZIw" incomingEdges="_uI5YDKJfEemXzuA5M0BZIw" width="12" height="10"> | ||
10680 | <target xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregatedParameterSubstitution"/> | ||
10681 | <semanticElements xmi:type="ecore:EClass" href="logiclanguage.ecore#//AggregatedParameterSubstitution"/> | ||
10682 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
10683 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
10684 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
10685 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_qkTFUKJeEemXzuA5M0BZIw" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
10686 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
10687 | </ownedStyle> | ||
10688 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
10689 | </ownedDiagramElements> | ||
10690 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_uI5YDKJfEemXzuA5M0BZIw" name="[0..*] parameterSubstitution" sourceNode="_rrY_wG6WEemSyfDlsGAqLA" targetNode="_qkRQIKJeEemXzuA5M0BZIw"> | ||
10691 | <target xmi:type="ecore:EReference" href="logiclanguage.ecore#//AggregateExpression/parameterSubstitution"/> | ||
10692 | <semanticElements xmi:type="ecore:EReference" href="logiclanguage.ecore#//AggregateExpression/parameterSubstitution"/> | ||
10693 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_uI6mIKJfEemXzuA5M0BZIw" description="_l6XRhLdnEeau1vMV3Bsx4w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
10694 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_uI6mIqJfEemXzuA5M0BZIw" showIcon="false"> | ||
10695 | <customFeatures>labelSize</customFeatures> | ||
10696 | </centerLabelStyle> | ||
10697 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_uI6mIaJfEemXzuA5M0BZIw" showIcon="false" labelColor="39,76,114"> | ||
10698 | <customFeatures>labelSize</customFeatures> | ||
10699 | </endLabelStyle> | ||
10700 | </ownedStyle> | ||
10701 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
10702 | </ownedDiagramElements> | ||
10703 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="__nLz2aJfEemXzuA5M0BZIw" name="[0..1] variable" sourceNode="_qkRQIKJeEemXzuA5M0BZIw" targetNode="_l6ZIL7dnEeau1vMV3Bsx4w"> | ||
10704 | <target xmi:type="ecore:EReference" href="logiclanguage.ecore#//AggregatedParameterSubstitution/variable"/> | ||
10705 | <semanticElements xmi:type="ecore:EReference" href="logiclanguage.ecore#//AggregatedParameterSubstitution/variable"/> | ||
10706 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="__nNB8KJfEemXzuA5M0BZIw" routingStyle="manhattan" strokeColor="0,0,0"> | ||
10707 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
10708 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="__nNB8qJfEemXzuA5M0BZIw" showIcon="false"> | ||
10709 | <customFeatures>labelSize</customFeatures> | ||
10710 | </centerLabelStyle> | ||
10711 | <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="__nNB8aJfEemXzuA5M0BZIw" showIcon="false" labelColor="39,76,114"> | ||
10712 | <customFeatures>labelSize</customFeatures> | ||
10713 | </endLabelStyle> | ||
10714 | </ownedStyle> | ||
10715 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
10716 | </ownedDiagramElements> | ||
10638 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 10717 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
10639 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_l6Zva7dnEeau1vMV3Bsx4w"/> | 10718 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_l6Zva7dnEeau1vMV3Bsx4w"/> |
10640 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | 10719 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> |
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 fdbc1c27..fb94b598 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 | |||
@@ -215,6 +215,8 @@ | |||
215 | <eClassifiers xsi:type="ecore:EClass" name="AggregateExpression" abstract="true" | 215 | <eClassifiers xsi:type="ecore:EClass" name="AggregateExpression" abstract="true" |
216 | eSuperTypes="#//Term"> | 216 | eSuperTypes="#//Term"> |
217 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//Relation"/> | 217 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//Relation"/> |
218 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameterSubstitution" | ||
219 | upperBound="-1" eType="#//AggregatedParameterSubstitution" containment="true"/> | ||
218 | </eClassifiers> | 220 | </eClassifiers> |
219 | <eClassifiers xsi:type="ecore:EClass" name="Sum" eSuperTypes="#//ProjectedAggregateExpression"/> | 221 | <eClassifiers xsi:type="ecore:EClass" name="Sum" eSuperTypes="#//ProjectedAggregateExpression"/> |
220 | <eClassifiers xsi:type="ecore:EClass" name="Count" eSuperTypes="#//AggregateExpression"/> | 222 | <eClassifiers xsi:type="ecore:EClass" name="Count" eSuperTypes="#//AggregateExpression"/> |
@@ -225,4 +227,7 @@ | |||
225 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectionIndex" lowerBound="1" | 227 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="projectionIndex" lowerBound="1" |
226 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> | 228 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> |
227 | </eClassifiers> | 229 | </eClassifiers> |
230 | <eClassifiers xsi:type="ecore:EClass" name="AggregatedParameterSubstitution"> | ||
231 | <eStructuralFeatures xsi:type="ecore:EReference" name="variable" eType="#//Variable"/> | ||
232 | </eClassifiers> | ||
228 | </ecore:EPackage> | 233 | </ecore:EPackage> |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel index 303080e7..cb14ae5b 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel | |||
@@ -168,6 +168,7 @@ | |||
168 | <genClasses ecoreClass="logiclanguage.ecore#//Pow"/> | 168 | <genClasses ecoreClass="logiclanguage.ecore#//Pow"/> |
169 | <genClasses image="false" ecoreClass="logiclanguage.ecore#//AggregateExpression"> | 169 | <genClasses image="false" ecoreClass="logiclanguage.ecore#//AggregateExpression"> |
170 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference logiclanguage.ecore#//AggregateExpression/relation"/> | 170 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference logiclanguage.ecore#//AggregateExpression/relation"/> |
171 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference logiclanguage.ecore#//AggregateExpression/parameterSubstitution"/> | ||
171 | </genClasses> | 172 | </genClasses> |
172 | <genClasses ecoreClass="logiclanguage.ecore#//Sum"/> | 173 | <genClasses ecoreClass="logiclanguage.ecore#//Sum"/> |
173 | <genClasses ecoreClass="logiclanguage.ecore#//Count"/> | 174 | <genClasses ecoreClass="logiclanguage.ecore#//Count"/> |
@@ -176,6 +177,9 @@ | |||
176 | <genClasses image="false" ecoreClass="logiclanguage.ecore#//ProjectedAggregateExpression"> | 177 | <genClasses image="false" ecoreClass="logiclanguage.ecore#//ProjectedAggregateExpression"> |
177 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute logiclanguage.ecore#//ProjectedAggregateExpression/projectionIndex"/> | 178 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute logiclanguage.ecore#//ProjectedAggregateExpression/projectionIndex"/> |
178 | </genClasses> | 179 | </genClasses> |
180 | <genClasses ecoreClass="logiclanguage.ecore#//AggregatedParameterSubstitution"> | ||
181 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference logiclanguage.ecore#//AggregatedParameterSubstitution/variable"/> | ||
182 | </genClasses> | ||
179 | </genPackages> | 183 | </genPackages> |
180 | <genPackages prefix="Logicproblem" basePackage="hu.bme.mit.inf.dslreasoner.logic.model" | 184 | <genPackages prefix="Logicproblem" basePackage="hu.bme.mit.inf.dslreasoner.logic.model" |
181 | disposableProviderFactory="true" ecorePackage="logicproblem.ecore#/"> | 185 | disposableProviderFactory="true" ecorePackage="logicproblem.ecore#/"> |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicProblemBuilder.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicProblemBuilder.xtend index f6bd9541..09bfbb39 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicProblemBuilder.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicProblemBuilder.xtend | |||
@@ -1,5 +1,6 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.logic.model.builder | 1 | package hu.bme.mit.inf.dslreasoner.logic.model.builder |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.AggregateExpression | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion | 4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion |
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference |
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | 6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference |
@@ -8,6 +9,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | |||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Function | 9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Function |
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | 10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference |
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | 11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory |
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ProjectedAggregateExpression | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.QuantifiedExpression | 13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.QuantifiedExpression |
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | 14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference |
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | 15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation |
@@ -46,16 +48,16 @@ class LogicProblemBuilderException extends Exception { | |||
46 | } | 48 | } |
47 | } | 49 | } |
48 | 50 | ||
49 | public class LogicProblemBuilder{ | 51 | class LogicProblemBuilder{ |
50 | val protected extension LogiclanguageFactory logicFactiory = LogiclanguageFactory.eINSTANCE | 52 | val protected extension LogiclanguageFactory logicFactiory = LogiclanguageFactory.eINSTANCE |
51 | val protected extension LogicproblemFactory problemFactory = LogicproblemFactory.eINSTANCE | 53 | val protected extension LogicproblemFactory problemFactory = LogicproblemFactory.eINSTANCE |
52 | val protected advancedConstructs = new LogicProblemBuilder_AdvancedConstructs(this) | 54 | val protected advancedConstructs = new LogicProblemBuilder_AdvancedConstructs(this) |
53 | 55 | ||
54 | def public createProblem(){ createLogicProblem } | 56 | def createProblem(){ createLogicProblem } |
55 | 57 | ||
56 | // Names | 58 | // Names |
57 | def protected String canonize(CharSequence name) { | 59 | def protected String canonize(CharSequence name) { |
58 | if(name == null) return "" | 60 | if(name === null) return "" |
59 | val result = name.toString.split("\\s+"); | 61 | val result = name.toString.split("\\s+"); |
60 | if(result.size == 1) { | 62 | if(result.size == 1) { |
61 | val element = result.get(0); | 63 | val element = result.get(0); |
@@ -82,23 +84,23 @@ public class LogicProblemBuilder{ | |||
82 | } | 84 | } |
83 | 85 | ||
84 | // Type builders | 86 | // Type builders |
85 | def public Element(CharSequence elementName) { return createDefinedElement => [x|x.name = elementName.canonize] } | 87 | def Element(CharSequence elementName) { return createDefinedElement => [x|x.name = elementName.canonize] } |
86 | def public Element() { return createDefinedElement } | 88 | def Element() { return createDefinedElement } |
87 | def public TypeDeclaration(CharSequence name, boolean isAbstract) { TypeDeclaration => [x | x.name = name.canonize x.isAbstract = isAbstract] } | 89 | def TypeDeclaration(CharSequence name, boolean isAbstract) { TypeDeclaration => [x | x.name = name.canonize x.isAbstract = isAbstract] } |
88 | def public TypeDeclaration() { createTypeDeclaration } | 90 | def TypeDeclaration() { createTypeDeclaration } |
89 | def public TypeDefinition(CharSequence name, boolean isAbstract, DefinedElement... elements) { TypeDefinition(name, isAbstract, elements as Iterable<DefinedElement>) } | 91 | def TypeDefinition(CharSequence name, boolean isAbstract, DefinedElement... elements) { TypeDefinition(name, isAbstract, elements as Iterable<DefinedElement>) } |
90 | def public TypeDefinition(CharSequence name, boolean isAbstract, Iterable<DefinedElement> elements) { createTypeDefinition => [x | x.name = name.canonize x.isAbstract = isAbstract x.elements += elements ] } | 92 | def TypeDefinition(CharSequence name, boolean isAbstract, Iterable<DefinedElement> elements) { createTypeDefinition => [x | x.name = name.canonize x.isAbstract = isAbstract x.elements += elements ] } |
91 | 93 | ||
92 | def public Supertype(Type subtype, Type supertype) { | 94 | def Supertype(Type subtype, Type supertype) { |
93 | subtype.supertypes+=supertype | 95 | subtype.supertypes+=supertype |
94 | } | 96 | } |
95 | def public SetSupertype(Type subtype, Type supertype, boolean value) { | 97 | def SetSupertype(Type subtype, Type supertype, boolean value) { |
96 | if(value) subtype.supertypes+=supertype | 98 | if(value) subtype.supertypes+=supertype |
97 | else subtype.subtypes-=supertype | 99 | else subtype.subtypes-=supertype |
98 | } | 100 | } |
99 | 101 | ||
100 | // Type add | 102 | // Type add |
101 | def public add(LogicProblem problem, Type type) { | 103 | def add(LogicProblem problem, Type type) { |
102 | problem.nameIfAnonymType(type) | 104 | problem.nameIfAnonymType(type) |
103 | problem.types+=type | 105 | problem.types+=type |
104 | if(type instanceof TypeDefinition) { | 106 | if(type instanceof TypeDefinition) { |
@@ -118,10 +120,10 @@ public class LogicProblemBuilder{ | |||
118 | element.name = typeDefinition.elements.map[it.name].generateUniqueName[i | '''type «i.toString»'''] | 120 | element.name = typeDefinition.elements.map[it.name].generateUniqueName[i | '''type «i.toString»'''] |
119 | } | 121 | } |
120 | 122 | ||
121 | def public LogicBool() { createBoolTypeReference } | 123 | def LogicBool() { createBoolTypeReference } |
122 | def public LogicInt() { createIntTypeReference } | 124 | def LogicInt() { createIntTypeReference } |
123 | def public LogicReal() { createRealTypeReference } | 125 | def LogicReal() { createRealTypeReference } |
124 | def public LogicString() { createStringTypeReference } | 126 | def LogicString() { createStringTypeReference } |
125 | def toTypeReference(TypeDescriptor descriptor) { | 127 | def toTypeReference(TypeDescriptor descriptor) { |
126 | if(descriptor instanceof TypeReference) { return EcoreUtil.copy(descriptor); } | 128 | if(descriptor instanceof TypeReference) { return EcoreUtil.copy(descriptor); } |
127 | else if(descriptor instanceof Type) { return createComplexTypeReference => [referred = descriptor]} | 129 | else if(descriptor instanceof Type) { return createComplexTypeReference => [referred = descriptor]} |
@@ -129,31 +131,31 @@ public class LogicProblemBuilder{ | |||
129 | } | 131 | } |
130 | 132 | ||
131 | // Variables | 133 | // Variables |
132 | def public createVar(CharSequence name, TypeDescriptor range) { | 134 | def createVar(CharSequence name, TypeDescriptor range) { |
133 | return createVariable => [it.name = name.canonize it.range = range.toTypeReference] | 135 | return createVariable => [it.name = name.canonize it.range = range.toTypeReference] |
134 | } | 136 | } |
135 | 137 | ||
136 | // Functions | 138 | // Functions |
137 | def public FunctionDescription ->(TypeDescriptor parameter, TypeDescriptor range) { return #[parameter] -> range } | 139 | def FunctionDescription ->(TypeDescriptor parameter, TypeDescriptor range) { return #[parameter] -> range } |
138 | def public FunctionDescription ->(Iterable<? extends TypeDescriptor> parameters, TypeDescriptor range) { return new FunctionDescription(parameters.map[toTypeReference], range.toTypeReference); } | 140 | def FunctionDescription ->(Iterable<? extends TypeDescriptor> parameters, TypeDescriptor range) { return new FunctionDescription(parameters.map[toTypeReference], range.toTypeReference); } |
139 | def public FunctionDeclaration(CharSequence name, FunctionDescription functionDescription) { FunctionDeclaration(name,functionDescription.range, functionDescription.parameters) } | 141 | def FunctionDeclaration(CharSequence name, FunctionDescription functionDescription) { FunctionDeclaration(name,functionDescription.range, functionDescription.parameters) } |
140 | def public FunctionDeclaration(FunctionDescription functionDescription) { FunctionDeclaration(functionDescription.range, functionDescription.parameters) } | 142 | def FunctionDeclaration(FunctionDescription functionDescription) { FunctionDeclaration(functionDescription.range, functionDescription.parameters) } |
141 | def public FunctionDeclaration(CharSequence name, TypeDescriptor range, TypeDescriptor... parameters) { FunctionDeclaration(name, range, parameters as Iterable<? extends TypeReference>) } | 143 | def FunctionDeclaration(CharSequence name, TypeDescriptor range, TypeDescriptor... parameters) { FunctionDeclaration(name, range, parameters as Iterable<? extends TypeReference>) } |
142 | def public FunctionDeclaration(TypeDescriptor range, TypeDescriptor... parameters) { FunctionDeclaration(range, parameters as Iterable<? extends TypeReference>) } | 144 | def FunctionDeclaration(TypeDescriptor range, TypeDescriptor... parameters) { FunctionDeclaration(range, parameters as Iterable<? extends TypeReference>) } |
143 | def public FunctionDeclaration(CharSequence name, TypeDescriptor range, Iterable<? extends TypeDescriptor> parameters) { return FunctionDeclaration(range,parameters) => [x|x.name = name.canonize] } | 145 | def FunctionDeclaration(CharSequence name, TypeDescriptor range, Iterable<? extends TypeDescriptor> parameters) { return FunctionDeclaration(range,parameters) => [x|x.name = name.canonize] } |
144 | def public FunctionDeclaration(TypeDescriptor range, Iterable<? extends TypeDescriptor> parameters) { | 146 | def FunctionDeclaration(TypeDescriptor range, Iterable<? extends TypeDescriptor> parameters) { |
145 | val function = createFunctionDeclaration | 147 | val function = createFunctionDeclaration |
146 | for(parameter : parameters) function.parameters+=parameter.toTypeReference | 148 | for(parameter : parameters) function.parameters+=parameter.toTypeReference |
147 | function.range = range.toTypeReference | 149 | function.range = range.toTypeReference |
148 | return function | 150 | return function |
149 | } | 151 | } |
150 | 152 | ||
151 | def public FunctionDefinition(CharSequence name, TypeDescriptor range, Function1<VariableContext, ? extends TermDescription> expression) { | 153 | def FunctionDefinition(CharSequence name, TypeDescriptor range, Function1<VariableContext, ? extends TermDescription> expression) { |
152 | val context = new VariableContext(this,logicFactiory) | 154 | val context = new VariableContext(this,logicFactiory) |
153 | val definition = expression.apply(context) | 155 | val definition = expression.apply(context) |
154 | return FunctionDefinition(name,range,context.variables,definition); | 156 | return FunctionDefinition(name,range,context.variables,definition); |
155 | } | 157 | } |
156 | def public FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<Variable> variables, TermDescription definition) { | 158 | def FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<Variable> variables, TermDescription definition) { |
157 | return createFunctionDefinition => [ | 159 | return createFunctionDefinition => [ |
158 | it.name = name.canonize | 160 | it.name = name.canonize |
159 | it.parameters += variables.map[it.range.toTypeReference] | 161 | it.parameters += variables.map[it.range.toTypeReference] |
@@ -162,23 +164,23 @@ public class LogicProblemBuilder{ | |||
162 | it.value = definition.toTerm | 164 | it.value = definition.toTerm |
163 | ] | 165 | ] |
164 | } | 166 | } |
165 | def public FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<TypeDescriptor> parameters, Map<List<Term>,Term> parametersToValue) { | 167 | def FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<TypeDescriptor> parameters, Map<List<Term>,Term> parametersToValue) { |
166 | return FunctionDefinition(name,range,parameters,parametersToValue,null) | 168 | return FunctionDefinition(name,range,parameters,parametersToValue,null) |
167 | } | 169 | } |
168 | def public FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<TypeDescriptor> parameters, Map<List<Term>,Term> parametersToValue, Term defaultValue) { | 170 | def FunctionDefinition(CharSequence name, TypeDescriptor range, Iterable<TypeDescriptor> parameters, Map<List<Term>,Term> parametersToValue, Term defaultValue) { |
169 | val parameterList = parameters.toList; | 171 | val parameterList = parameters.toList; |
170 | val variableList = (1..parameterList.size).map[index | '''param «index»'''.createVar(parameterList.get(index-1))].toList | 172 | val variableList = (1..parameterList.size).map[index | '''param «index»'''.createVar(parameterList.get(index-1))].toList |
171 | return FunctionDefinition(name,range,variableList,advancedConstructs.FunctionDefinitionBody(variableList,parametersToValue,defaultValue)) | 173 | return FunctionDefinition(name,range,variableList,advancedConstructs.FunctionDefinitionBody(variableList,parametersToValue,defaultValue)) |
172 | } | 174 | } |
173 | 175 | ||
174 | // Add function to a problem | 176 | // Add function to a problem |
175 | def public add(LogicProblem input, Function function) { | 177 | def add(LogicProblem input, Function function) { |
176 | input.nameIfAnonymFunction(function) | 178 | input.nameIfAnonymFunction(function) |
177 | input.checkFunction(function) | 179 | input.checkFunction(function) |
178 | input.functions += function | 180 | input.functions += function |
179 | return function | 181 | return function |
180 | } | 182 | } |
181 | def public add(LogicProblem input, FunctionDescription functionDescription) { input.add(FunctionDeclaration(functionDescription)) } | 183 | def add(LogicProblem input, FunctionDescription functionDescription) { input.add(FunctionDeclaration(functionDescription)) } |
182 | def protected nameIfAnonymFunction(LogicProblem problem, Function functionDeclaration) { | 184 | def protected nameIfAnonymFunction(LogicProblem problem, Function functionDeclaration) { |
183 | if(functionDeclaration.name.nullOrEmpty) { | 185 | if(functionDeclaration.name.nullOrEmpty) { |
184 | functionDeclaration.name = problem.functions.map[it.name].generateUniqueName[i | "function"+i] | 186 | functionDeclaration.name = problem.functions.map[it.name].generateUniqueName[i | "function"+i] |
@@ -199,15 +201,15 @@ public class LogicProblemBuilder{ | |||
199 | } | 201 | } |
200 | 202 | ||
201 | // Constants | 203 | // Constants |
202 | def public ConstantDeclaration(CharSequence name, TypeDescriptor type) { ConstantDeclaration(type) => [it.name = name.canonize] } | 204 | def ConstantDeclaration(CharSequence name, TypeDescriptor type) { ConstantDeclaration(type) => [it.name = name.canonize] } |
203 | def public ConstantDeclaration(TypeDescriptor type) { createConstantDeclaration => [it.type = type.toTypeReference] } | 205 | def ConstantDeclaration(TypeDescriptor type) { createConstantDeclaration => [it.type = type.toTypeReference] } |
204 | 206 | ||
205 | def public ConstantDefinition(CharSequence name, TypeDescriptor type, TermDescription value) { | 207 | def ConstantDefinition(CharSequence name, TypeDescriptor type, TermDescription value) { |
206 | createConstantDefinition => [it.name = name.canonize it.type = type.toTypeReference it.value = value.toTerm] | 208 | createConstantDefinition => [it.name = name.canonize it.type = type.toTypeReference it.value = value.toTerm] |
207 | } | 209 | } |
208 | 210 | ||
209 | // Add constant to a problem | 211 | // Add constant to a problem |
210 | def public add(LogicProblem problem, Constant constant) { | 212 | def add(LogicProblem problem, Constant constant) { |
211 | problem.nameIfAnonymConstant(constant); | 213 | problem.nameIfAnonymConstant(constant); |
212 | problem.checkConstant(constant) | 214 | problem.checkConstant(constant) |
213 | problem.constants += constant | 215 | problem.constants += constant |
@@ -226,10 +228,10 @@ public class LogicProblemBuilder{ | |||
226 | } | 228 | } |
227 | 229 | ||
228 | // Relations | 230 | // Relations |
229 | def public RelationDeclaration(CharSequence name, TypeDescriptor... parameters) { return RelationDeclaration(name, parameters as Iterable<? extends TypeReference>) } | 231 | def RelationDeclaration(CharSequence name, TypeDescriptor... parameters) { return RelationDeclaration(name, parameters as Iterable<? extends TypeReference>) } |
230 | def public RelationDeclaration(CharSequence name, Iterable<? extends TypeDescriptor> parameters) { return RelationDeclaration(parameters) => [x|x.name = name.canonize] } | 232 | def RelationDeclaration(CharSequence name, Iterable<? extends TypeDescriptor> parameters) { return RelationDeclaration(parameters) => [x|x.name = name.canonize] } |
231 | def public RelationDeclaration(TypeDescriptor... parameters) { RelationDeclaration( parameters as Iterable<? extends TypeReference>) } | 233 | def RelationDeclaration(TypeDescriptor... parameters) { RelationDeclaration( parameters as Iterable<? extends TypeReference>) } |
232 | def public RelationDeclaration(Iterable<? extends TypeDescriptor> parameters) { | 234 | def RelationDeclaration(Iterable<? extends TypeDescriptor> parameters) { |
233 | val relation = createRelationDeclaration | 235 | val relation = createRelationDeclaration |
234 | for(parameter : parameters) { | 236 | for(parameter : parameters) { |
235 | relation.parameters+=parameter.toTypeReference | 237 | relation.parameters+=parameter.toTypeReference |
@@ -237,12 +239,12 @@ public class LogicProblemBuilder{ | |||
237 | return relation | 239 | return relation |
238 | } | 240 | } |
239 | 241 | ||
240 | def public RelationDefinition(CharSequence name, Function1<VariableContext, ? extends TermDescription> expression) { | 242 | def RelationDefinition(CharSequence name, Function1<VariableContext, ? extends TermDescription> expression) { |
241 | val context = new VariableContext(this,logicFactiory); | 243 | val context = new VariableContext(this,logicFactiory); |
242 | val definition = expression.apply(context); | 244 | val definition = expression.apply(context); |
243 | return RelationDefinition(name,context.variables,definition) | 245 | return RelationDefinition(name,context.variables,definition) |
244 | } | 246 | } |
245 | def public RelationDefinition(CharSequence name, Iterable<Variable> variables, TermDescription definition) { | 247 | def RelationDefinition(CharSequence name, Iterable<Variable> variables, TermDescription definition) { |
246 | return createRelationDefinition => [ | 248 | return createRelationDefinition => [ |
247 | it.name = name.canonize | 249 | it.name = name.canonize |
248 | it.parameters += variables.map[it.range.toTypeReference] | 250 | it.parameters += variables.map[it.range.toTypeReference] |
@@ -250,7 +252,7 @@ public class LogicProblemBuilder{ | |||
250 | it.value = definition?.toTerm | 252 | it.value = definition?.toTerm |
251 | ] | 253 | ] |
252 | } | 254 | } |
253 | def public RelationDefinition(CharSequence name, Iterable<? extends TypeDescriptor> parameters, Iterable<? extends List<? extends TermDescription>> possibleValues) { | 255 | def RelationDefinition(CharSequence name, Iterable<? extends TypeDescriptor> parameters, Iterable<? extends List<? extends TermDescription>> possibleValues) { |
254 | val res = createRelationDefinition => [it.name = name.canonize] | 256 | val res = createRelationDefinition => [it.name = name.canonize] |
255 | val variableMap = new ArrayList(parameters.size) | 257 | val variableMap = new ArrayList(parameters.size) |
256 | var index = 0 | 258 | var index = 0 |
@@ -267,7 +269,7 @@ public class LogicProblemBuilder{ | |||
267 | } | 269 | } |
268 | 270 | ||
269 | // Add Relation to a problem | 271 | // Add Relation to a problem |
270 | def public add(LogicProblem input, Relation relation) { | 272 | def add(LogicProblem input, Relation relation) { |
271 | input.nameIfAnonymRelation(relation) | 273 | input.nameIfAnonymRelation(relation) |
272 | input.checkRelation(relation) | 274 | input.checkRelation(relation) |
273 | input.relations+=relation | 275 | input.relations+=relation |
@@ -293,17 +295,17 @@ public class LogicProblemBuilder{ | |||
293 | } | 295 | } |
294 | 296 | ||
295 | // Assertion | 297 | // Assertion |
296 | def public Assertion(TermDescription term) { | 298 | def Assertion(TermDescription term) { |
297 | val result = term.toTerm | 299 | val result = term.toTerm |
298 | result.nameAnonymVariables(Collections.EMPTY_LIST) | 300 | result.nameAnonymVariables(Collections.EMPTY_LIST) |
299 | createAssertion => [it.value = result] | 301 | createAssertion => [it.value = result] |
300 | } | 302 | } |
301 | def public Assertion(CharSequence name, TermDescription term) { | 303 | def Assertion(CharSequence name, TermDescription term) { |
302 | val result = term.toTerm | 304 | val result = term.toTerm |
303 | result.nameAnonymVariables(Collections.EMPTY_LIST) | 305 | result.nameAnonymVariables(Collections.EMPTY_LIST) |
304 | createAssertion => [it.value = result it.name=name.canonize] | 306 | createAssertion => [it.value = result it.name=name.canonize] |
305 | } | 307 | } |
306 | def public add(LogicProblem problem, Assertion assertion) { | 308 | def add(LogicProblem problem, Assertion assertion) { |
307 | if(assertion.name.nullOrEmpty) { | 309 | if(assertion.name.nullOrEmpty) { |
308 | val name = problem.assertions.map[name].generateUniqueName["assertion"+it] | 310 | val name = problem.assertions.map[name].generateUniqueName["assertion"+it] |
309 | assertion.name=name | 311 | assertion.name=name |
@@ -313,7 +315,7 @@ public class LogicProblemBuilder{ | |||
313 | return assertion | 315 | return assertion |
314 | } | 316 | } |
315 | 317 | ||
316 | def public add(LogicProblem problem, TermDescription term) { | 318 | def add(LogicProblem problem, TermDescription term) { |
317 | problem.add(Assertion(term)) | 319 | problem.add(Assertion(term)) |
318 | } | 320 | } |
319 | 321 | ||
@@ -329,7 +331,7 @@ public class LogicProblemBuilder{ | |||
329 | } | 331 | } |
330 | } | 332 | } |
331 | 333 | ||
332 | def public checkDefinition(EObject definition) { | 334 | def checkDefinition(EObject definition) { |
333 | /*for(value : definition.eAllContents.filter(SymbolicValue).toIterable) { | 335 | /*for(value : definition.eAllContents.filter(SymbolicValue).toIterable) { |
334 | var referred = value.symbolicReference | 336 | var referred = value.symbolicReference |
335 | if(referred instanceof Variable) { | 337 | if(referred instanceof Variable) { |
@@ -341,7 +343,7 @@ public class LogicProblemBuilder{ | |||
341 | } | 343 | } |
342 | 344 | ||
343 | // Containment | 345 | // Containment |
344 | def public ContainmentHierarchy( | 346 | def ContainmentHierarchy( |
345 | Iterable<? extends Type> typesInHierarchy, | 347 | Iterable<? extends Type> typesInHierarchy, |
346 | Iterable<? extends Function> containmentFunctions, | 348 | Iterable<? extends Function> containmentFunctions, |
347 | Iterable<? extends Relation> containmentRelations, | 349 | Iterable<? extends Relation> containmentRelations, |
@@ -355,7 +357,7 @@ public class LogicProblemBuilder{ | |||
355 | ] | 357 | ] |
356 | return result | 358 | return result |
357 | } | 359 | } |
358 | def public add(LogicProblem problem, ContainmentHierarchy hierarchy) { | 360 | def add(LogicProblem problem, ContainmentHierarchy hierarchy) { |
359 | problem.containmentHierarchies+=hierarchy | 361 | problem.containmentHierarchies+=hierarchy |
360 | return hierarchy | 362 | return hierarchy |
361 | } | 363 | } |
@@ -413,7 +415,7 @@ public class LogicProblemBuilder{ | |||
413 | return result; | 415 | return result; |
414 | } | 416 | } |
415 | 417 | ||
416 | def public Term toTerm(TermDescription term) { | 418 | def Term toTerm(TermDescription term) { |
417 | if(term instanceof Term) return term | 419 | if(term instanceof Term) return term |
418 | else if (term instanceof Variable) return createSymbolicValue => [symbolicReference = term] | 420 | else if (term instanceof Variable) return createSymbolicValue => [symbolicReference = term] |
419 | else if (term instanceof Constant) return term.call() | 421 | else if (term instanceof Constant) return term.call() |
@@ -421,74 +423,74 @@ public class LogicProblemBuilder{ | |||
421 | else throw new UnsupportedOperationException("Can not create reference for symbolic declaration " + term.class.name) | 423 | else throw new UnsupportedOperationException("Can not create reference for symbolic declaration " + term.class.name) |
422 | } | 424 | } |
423 | 425 | ||
424 | def public !(TermDescription term) { Not(term) } | 426 | def !(TermDescription term) { Not(term) } |
425 | def public Not(TermDescription term) { createNot => [operand = term.toTerm] } | 427 | def Not(TermDescription term) { createNot => [operand = term.toTerm] } |
426 | 428 | ||
427 | def public &&(TermDescription a, TermDescription b) { And(a,b) } | 429 | def &&(TermDescription a, TermDescription b) { And(a,b) } |
428 | def public And(TermDescription... terms) { return And(terms as Iterable<? extends TermDescription>) } | 430 | def And(TermDescription... terms) { return And(terms as Iterable<? extends TermDescription>) } |
429 | def public And(Iterable<? extends TermDescription> terms) { createAnd => [operands += terms.map[toTerm]] } | 431 | def And(Iterable<? extends TermDescription> terms) { createAnd => [operands += terms.map[toTerm]] } |
430 | 432 | ||
431 | def public ||(TermDescription a, TermDescription b) { Or(a,b) } | 433 | def ||(TermDescription a, TermDescription b) { Or(a,b) } |
432 | def public Or(TermDescription... terms) { Or(terms as Iterable<? extends TermDescription>) } | 434 | def Or(TermDescription... terms) { Or(terms as Iterable<? extends TermDescription>) } |
433 | def public Or(Iterable<? extends TermDescription> terms) { createOr => [operands += terms.map[toTerm]] } | 435 | def Or(Iterable<? extends TermDescription> terms) { createOr => [operands += terms.map[toTerm]] } |
434 | 436 | ||
435 | def public =>(TermDescription a, TermDescription b) { Impl(a,b) } | 437 | def =>(TermDescription a, TermDescription b) { Impl(a,b) } |
436 | def public Impl(TermDescription a, TermDescription b) { createImpl => [leftOperand = a.toTerm rightOperand = b.toTerm] } | 438 | def Impl(TermDescription a, TermDescription b) { createImpl => [leftOperand = a.toTerm rightOperand = b.toTerm] } |
437 | 439 | ||
438 | def public <=>(TermDescription a, TermDescription b) { Iff(a,b)} | 440 | def <=>(TermDescription a, TermDescription b) { Iff(a,b)} |
439 | def public Iff(TermDescription a, TermDescription b) { createIff =>[leftOperand=a.toTerm rightOperand=b.toTerm] } | 441 | def Iff(TermDescription a, TermDescription b) { createIff =>[leftOperand=a.toTerm rightOperand=b.toTerm] } |
440 | 442 | ||
441 | def public ITE(TermDescription condition, TermDescription ifTrue, TermDescription ifFalse) { | 443 | def ITE(TermDescription condition, TermDescription ifTrue, TermDescription ifFalse) { |
442 | createIfThenElse => [it.condition = condition.toTerm it.ifTrue = ifTrue.toTerm it.ifFalse = ifFalse.toTerm] | 444 | createIfThenElse => [it.condition = condition.toTerm it.ifTrue = ifTrue.toTerm it.ifFalse = ifFalse.toTerm] |
443 | } | 445 | } |
444 | 446 | ||
445 | def public >(TermDescription left, TermDescription right) { MoreThan(left,right)} | 447 | def >(TermDescription left, TermDescription right) { MoreThan(left,right)} |
446 | def public MoreThan(TermDescription left, TermDescription right) { createMoreThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 448 | def MoreThan(TermDescription left, TermDescription right) { createMoreThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
447 | 449 | ||
448 | def public <(TermDescription left, TermDescription right) { LessThan(left,right)} | 450 | def <(TermDescription left, TermDescription right) { LessThan(left,right)} |
449 | def public LessThan(TermDescription left, TermDescription right) { createLessThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 451 | def LessThan(TermDescription left, TermDescription right) { createLessThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
450 | 452 | ||
451 | def public <=(TermDescription left, TermDescription right) { LessOrEqual(left,right) } | 453 | def <=(TermDescription left, TermDescription right) { LessOrEqual(left,right) } |
452 | def public LessOrEqual(TermDescription left, TermDescription right) { createLessOrEqualThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 454 | def LessOrEqual(TermDescription left, TermDescription right) { createLessOrEqualThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
453 | 455 | ||
454 | def public >=(TermDescription left, TermDescription right) { MoreOrEqual(left,right) } | 456 | def >=(TermDescription left, TermDescription right) { MoreOrEqual(left,right) } |
455 | def public MoreOrEqual(TermDescription left, TermDescription right) { createMoreOrEqualThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 457 | def MoreOrEqual(TermDescription left, TermDescription right) { createMoreOrEqualThan => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
456 | 458 | ||
457 | def public ==(TermDescription left, TermDescription right) {Equals(left,right)} | 459 | def ==(TermDescription left, TermDescription right) {Equals(left,right)} |
458 | def public Equals(TermDescription left, TermDescription right) { createEquals => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 460 | def Equals(TermDescription left, TermDescription right) { createEquals => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
459 | 461 | ||
460 | def public !=(TermDescription left, TermDescription right) { Distinct(left,right) } | 462 | def !=(TermDescription left, TermDescription right) { Distinct(left,right) } |
461 | def public Distinct(TermDescription... terms) { return Distinct(terms as Iterable<? extends TermDescription>) } | 463 | def Distinct(TermDescription... terms) { return Distinct(terms as Iterable<? extends TermDescription>) } |
462 | def public Distinct(Iterable<? extends TermDescription> terms) { createDistinct => [operands += terms.map[toTerm]] } | 464 | def Distinct(Iterable<? extends TermDescription> terms) { createDistinct => [operands += terms.map[toTerm]] } |
463 | 465 | ||
464 | def public +(TermDescription left, TermDescription right) { Plus(left,right) } | 466 | def +(TermDescription left, TermDescription right) { Plus(left,right) } |
465 | def public Plus(TermDescription left, TermDescription right) { createPlus => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 467 | def Plus(TermDescription left, TermDescription right) { createPlus => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
466 | 468 | ||
467 | def public -(TermDescription left, TermDescription right) { Minus(left,right) } | 469 | def -(TermDescription left, TermDescription right) { Minus(left,right) } |
468 | def public Minus(TermDescription left, TermDescription right) { createMinus => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 470 | def Minus(TermDescription left, TermDescription right) { createMinus => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
469 | 471 | ||
470 | def public *(TermDescription left, TermDescription right) { Multiply(left,right) } | 472 | def *(TermDescription left, TermDescription right) { Multiply(left,right) } |
471 | def public Multiply(TermDescription left, TermDescription right) { createMultiply => [leftOperand=left.toTerm rightOperand=right.toTerm] } | 473 | def Multiply(TermDescription left, TermDescription right) { createMultiply => [leftOperand=left.toTerm rightOperand=right.toTerm] } |
472 | 474 | ||
473 | def public /(TermDescription left, TermDescription right) { Divide(left,right) } | 475 | def /(TermDescription left, TermDescription right) { Divide(left,right) } |
474 | def public Divide(TermDescription left, TermDescription right) { createDivison => [leftOperand = left.toTerm rightOperand = right.toTerm]} | 476 | def Divide(TermDescription left, TermDescription right) { createDivison => [leftOperand = left.toTerm rightOperand = right.toTerm]} |
475 | 477 | ||
476 | def public %(TermDescription left, TermDescription right) { Modulo(left,right) } | 478 | def %(TermDescription left, TermDescription right) { Modulo(left,right) } |
477 | def public Modulo(TermDescription left, TermDescription right) { createMod => [leftOperand = left.toTerm rightOperand = right.toTerm]} | 479 | def Modulo(TermDescription left, TermDescription right) { createMod => [leftOperand = left.toTerm rightOperand = right.toTerm]} |
478 | 480 | ||
479 | def public asTerm(boolean value) { createBoolLiteral => [x|x.value = value] } | 481 | def asTerm(boolean value) { createBoolLiteral => [x|x.value = value] } |
480 | def public asTerm(int value) { createIntLiteral => [x|x.value = value] } | 482 | def asTerm(int value) { createIntLiteral => [x|x.value = value] } |
481 | def public asTerm(double value) { BigDecimal.valueOf(value).asTerm } | 483 | def asTerm(double value) { BigDecimal.valueOf(value).asTerm } |
482 | def public asTerm(float value) { BigDecimal.valueOf(value).asTerm } | 484 | def asTerm(float value) { BigDecimal.valueOf(value).asTerm } |
483 | def public asTerm(BigDecimal value) { createRealLiteral => [x|x.value = value] } | 485 | def asTerm(BigDecimal value) { createRealLiteral => [x|x.value = value] } |
484 | def public asTerm(String value) { createStringLiteral => [x|x.value = value]} | 486 | def asTerm(String value) { createStringLiteral => [x|x.value = value]} |
485 | def public InstanceOf(TermDescription term, TypeDescriptor type) { | 487 | def InstanceOf(TermDescription term, TypeDescriptor type) { |
486 | createInstanceOf => [ | 488 | createInstanceOf => [ |
487 | it.value = term.toTerm | 489 | it.value = term.toTerm |
488 | it.range = type.toTypeReference | 490 | it.range = type.toTypeReference |
489 | ] | 491 | ] |
490 | } | 492 | } |
491 | def public transitiveClosure(Relation relation, TermDescription source, TermDescription target) { | 493 | def transitiveClosure(Relation relation, TermDescription source, TermDescription target) { |
492 | createTransitiveClosure => [ | 494 | createTransitiveClosure => [ |
493 | it.relation = relation | 495 | it.relation = relation |
494 | it.leftOperand = leftOperand | 496 | it.leftOperand = leftOperand |
@@ -498,38 +500,79 @@ public class LogicProblemBuilder{ | |||
498 | 500 | ||
499 | // QuantifiedExpressions | 501 | // QuantifiedExpressions |
500 | 502 | ||
501 | def public Forall(Function1<VariableContext, ? extends TermDescription> expression) { | 503 | def Forall(Function1<VariableContext, ? extends TermDescription> expression) { |
502 | val context = new VariableContext(this,logicFactiory) | 504 | val context = new VariableContext(this,logicFactiory) |
503 | val term = expression.apply(context) | 505 | val term = expression.apply(context) |
504 | return createForall => [x| x.quantifiedVariables+=context.variables x.expression = term.toTerm] | 506 | return createForall => [x| x.quantifiedVariables+=context.variables x.expression = term.toTerm] |
505 | } | 507 | } |
506 | def public Forall(TermDescription expression, Variable... variables) { | 508 | def Forall(TermDescription expression, Variable... variables) { |
507 | Forall(variables,expression) } | 509 | Forall(variables,expression) } |
508 | def public Forall(Iterable<? extends Variable> variables,TermDescription expression) { | 510 | def Forall(Iterable<? extends Variable> variables,TermDescription expression) { |
509 | val forallExpression = createForall | 511 | val forallExpression = createForall |
510 | for(variable : variables) forallExpression.quantifiedVariables += variable | 512 | for(variable : variables) forallExpression.quantifiedVariables += variable |
511 | forallExpression.expression = expression.toTerm | 513 | forallExpression.expression = expression.toTerm |
512 | return forallExpression | 514 | return forallExpression |
513 | } | 515 | } |
514 | 516 | ||
515 | def public Exists(Function1<VariableContext, ? extends TermDescription> expression) { | 517 | def Exists(Function1<VariableContext, ? extends TermDescription> expression) { |
516 | val context = new VariableContext(this,logicFactiory) | 518 | val context = new VariableContext(this,logicFactiory) |
517 | val term = expression.apply(context) | 519 | val term = expression.apply(context) |
518 | return createExists => [x| x.quantifiedVariables+=context.variables x.expression = term.toTerm] | 520 | return createExists => [x| x.quantifiedVariables+=context.variables x.expression = term.toTerm] |
519 | } | 521 | } |
520 | def public Exists(TermDescription expression, Variable... variables) { | 522 | def Exists(TermDescription expression, Variable... variables) { |
521 | Exists(variables,expression) } | 523 | Exists(variables,expression) } |
522 | def public Exists(Iterable<? extends Variable> variables, TermDescription expression) { | 524 | def Exists(Iterable<? extends Variable> variables, TermDescription expression) { |
523 | val existsExpression = createExists | 525 | val existsExpression = createExists |
524 | for(variable : variables) existsExpression.quantifiedVariables += variable | 526 | for(variable : variables) existsExpression.quantifiedVariables += variable |
525 | existsExpression.expression = expression.toTerm | 527 | existsExpression.expression = expression.toTerm |
526 | return existsExpression | 528 | return existsExpression |
527 | } | 529 | } |
528 | 530 | ||
531 | // AggregatedExpression | ||
532 | |||
533 | private def <T extends AggregateExpression> configureAggregateExpression(T expression, Relation referred, List<Variable> terms) { | ||
534 | if(terms.size != referred.parameters.size) { | ||
535 | throw new LogicProblemBuilderException( | ||
536 | '''The function called has «referred.parameters.size» parameters but it is called with «terms.size»!''') | ||
537 | } else { | ||
538 | expression.relation = referred | ||
539 | for(var i=0; i<referred.parameters.size;i++) { | ||
540 | val target = terms.get(i) | ||
541 | val substitution = createAggregatedParameterSubstitution => [it.variable = target] | ||
542 | expression.parameterSubstitution += substitution | ||
543 | } | ||
544 | return expression | ||
545 | } | ||
546 | } | ||
547 | private def <T extends ProjectedAggregateExpression> configureProjectedAggregateExpression(T expression, Relation referred, List<Variable> terms, int projection) { | ||
548 | if(projection < 0 || projection >= referred.parameters.size) { | ||
549 | throw new LogicProblemBuilderException( | ||
550 | '''The function called has «referred.parameters.size» parameters but it is called with «terms.size»!''') | ||
551 | } else { | ||
552 | val res = expression.configureAggregateExpression(referred, terms) | ||
553 | if(res.parameterSubstitution.get(projection) !== null) { | ||
554 | throw new LogicProblemBuilderException( | ||
555 | '''Projection over set variable!''') | ||
556 | } | ||
557 | val projectionType = referred.parameters.get(projection) | ||
558 | if(!(projectionType instanceof IntTypeReference || projectionType instanceof RealTypeReference)) { | ||
559 | throw new LogicProblemBuilderException('''Projection over nunnumeric parameter!''' | ||
560 | ) | ||
561 | } | ||
562 | res.projectionIndex = projection | ||
563 | return res | ||
564 | } | ||
565 | |||
566 | } | ||
567 | def Count(Relation referred, List<Variable> terms) { createCount.configureAggregateExpression(referred,terms) } | ||
568 | def Sum(Relation referred, List<Variable> terms, int projection) { createSum.configureProjectedAggregateExpression(referred,terms,projection) } | ||
569 | def Min(Relation referred, List<Variable> terms, int projection) { createMin.configureProjectedAggregateExpression(referred,terms,projection) } | ||
570 | def Max(Relation referred, List<Variable> terms, int projection) { createMax.configureProjectedAggregateExpression(referred,terms,projection) } | ||
571 | |||
529 | // Function calls | 572 | // Function calls |
530 | def public call(Function function, TermDescription... substitutions) { | 573 | def call(Function function, TermDescription... substitutions) { |
531 | call(function, substitutions as Iterable<? extends TermDescription>) } | 574 | call(function, substitutions as Iterable<? extends TermDescription>) } |
532 | def public call(Function function, Iterable<? extends TermDescription> substitutions) { | 575 | def call(Function function, Iterable<? extends TermDescription> substitutions) { |
533 | val functionReference = createSymbolicValue | 576 | val functionReference = createSymbolicValue |
534 | functionReference.symbolicReference=function | 577 | functionReference.symbolicReference=function |
535 | val List<TermDescription> l= new LinkedList() | 578 | val List<TermDescription> l= new LinkedList() |
@@ -546,8 +589,8 @@ public class LogicProblemBuilder{ | |||
546 | } | 589 | } |
547 | 590 | ||
548 | // Relation calls | 591 | // Relation calls |
549 | def public call(Relation relation, TermDescription... substitution) { relation.call(substitution as Iterable<? extends TermDescription>)} | 592 | def call(Relation relation, TermDescription... substitution) { relation.call(substitution as Iterable<? extends TermDescription>)} |
550 | def public call(Relation relation, Iterable<? extends TermDescription> substitution) { | 593 | def call(Relation relation, Iterable<? extends TermDescription> substitution) { |
551 | val relationReference = createSymbolicValue | 594 | val relationReference = createSymbolicValue |
552 | relationReference.symbolicReference = relation | 595 | relationReference.symbolicReference = relation |
553 | //println('''«relation.name»(«substitution.size»->«relation.parameters»)''') | 596 | //println('''«relation.name»(«substitution.size»->«relation.parameters»)''') |
@@ -567,11 +610,9 @@ public class LogicProblemBuilder{ | |||
567 | } | 610 | } |
568 | 611 | ||
569 | // constant evaluation | 612 | // constant evaluation |
570 | def public call(Constant constant) { | 613 | def call(Constant constant) { |
571 | val constantReference = createSymbolicValue | 614 | val constantReference = createSymbolicValue |
572 | constantReference.symbolicReference = constant | 615 | constantReference.symbolicReference = constant |
573 | return constantReference | 616 | return constantReference |
574 | } | 617 | } |
575 | |||
576 | |||
577 | } | 618 | } |