diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator')
15 files changed, 1235 insertions, 702 deletions
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/.settings/org.eclipse.wst.validation.prefs b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 00000000..b0a80408 --- /dev/null +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/.settings/org.eclipse.wst.validation.prefs | |||
@@ -0,0 +1,10 @@ | |||
1 | DELEGATES_PREFERENCE=delegateValidatorList | ||
2 | USER_BUILD_PREFERENCE=enabledBuildValidatorList | ||
3 | USER_MANUAL_PREFERENCE=enabledManualValidatorList | ||
4 | USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.701.v201810290944 | ||
5 | eclipse.preferences.version=1 | ||
6 | override=true | ||
7 | suspend=false | ||
8 | vals/org.eclipse.wst.xml.core.xml/global=FF03 | ||
9 | vals/org.eclipse.wst.xsd.core.xsd/global=FF02162org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator | ||
10 | vf.version=3 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/META-INF/MANIFEST.MF b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/META-INF/MANIFEST.MF index 71eeb2c4..eacce276 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/META-INF/MANIFEST.MF +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/META-INF/MANIFEST.MF | |||
@@ -19,7 +19,8 @@ Require-Bundle: com.google.guava, | |||
19 | org.eclipse.viatra.addon.validation.core;bundle-version="2.1.2", | 19 | org.eclipse.viatra.addon.validation.core;bundle-version="2.1.2", |
20 | org.eclipse.collections;bundle-version="9.2.0", | 20 | org.eclipse.collections;bundle-version="9.2.0", |
21 | org.eclipse.viatra.query.runtime.localsearch;bundle-version="2.1.2", | 21 | org.eclipse.viatra.query.runtime.localsearch;bundle-version="2.1.2", |
22 | org.apache.log4j;bundle-version="1.2.15" | 22 | org.apache.log4j;bundle-version="1.2.15", |
23 | github-graph;bundle-version="0.1.0" | ||
23 | Export-Package: ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app, | 24 | Export-Package: ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app, |
24 | ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.distance, | 25 | ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.distance, |
25 | ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.graph, | 26 | ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.graph, |
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/LoopInInheritenceConstraint0.java b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/LoopInInheritenceConstraint0.java new file mode 100644 index 00000000..c31e59e7 --- /dev/null +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/LoopInInheritenceConstraint0.java | |||
@@ -0,0 +1,79 @@ | |||
1 | /** | ||
2 | Generated from platform:/resource/SocialNetwork_plugin/queries/queries/Ecore.vql | ||
3 | */ | ||
4 | package constraints.ecore; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.HashMap; | ||
8 | import java.util.HashSet; | ||
9 | import java.util.List; | ||
10 | import java.util.Map; | ||
11 | import java.util.Set; | ||
12 | |||
13 | import org.eclipse.viatra.addon.validation.core.api.IConstraintSpecification; | ||
14 | import org.eclipse.viatra.addon.validation.core.api.Severity; | ||
15 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
16 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
17 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
18 | |||
19 | import ecore.LoopInInheritence; | ||
20 | |||
21 | public class LoopInInheritenceConstraint0 implements IConstraintSpecification { | ||
22 | |||
23 | private LoopInInheritence querySpecification; | ||
24 | |||
25 | public LoopInInheritenceConstraint0() { | ||
26 | querySpecification = LoopInInheritence.instance(); | ||
27 | } | ||
28 | |||
29 | @Override | ||
30 | public String getMessageFormat() { | ||
31 | return "error"; | ||
32 | } | ||
33 | |||
34 | |||
35 | @Override | ||
36 | public Map<String,Object> getKeyObjects(IPatternMatch signature) { | ||
37 | Map<String,Object> map = new HashMap<>(); | ||
38 | map.put("a",signature.get("a")); | ||
39 | return map; | ||
40 | } | ||
41 | |||
42 | @Override | ||
43 | public List<String> getKeyNames() { | ||
44 | List<String> keyNames = Arrays.asList( | ||
45 | "a" | ||
46 | ); | ||
47 | return keyNames; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | public List<String> getPropertyNames() { | ||
52 | List<String> propertyNames = Arrays.asList( | ||
53 | ); | ||
54 | return propertyNames; | ||
55 | } | ||
56 | |||
57 | @Override | ||
58 | public Set<List<String>> getSymmetricPropertyNames() { | ||
59 | Set<List<String>> symmetricPropertyNamesSet = new HashSet<>(); | ||
60 | return symmetricPropertyNamesSet; | ||
61 | } | ||
62 | |||
63 | @Override | ||
64 | public Set<List<String>> getSymmetricKeyNames() { | ||
65 | Set<List<String>> symmetricKeyNamesSet = new HashSet<>(); | ||
66 | return symmetricKeyNamesSet; | ||
67 | } | ||
68 | |||
69 | @Override | ||
70 | public Severity getSeverity() { | ||
71 | return Severity.ERROR; | ||
72 | } | ||
73 | |||
74 | @Override | ||
75 | public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> getQuerySpecification() { | ||
76 | return querySpecification; | ||
77 | } | ||
78 | |||
79 | } | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/NonSymmetricOppositeConstraint0.java b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/NonSymmetricOppositeConstraint0.java new file mode 100644 index 00000000..29b35552 --- /dev/null +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/NonSymmetricOppositeConstraint0.java | |||
@@ -0,0 +1,80 @@ | |||
1 | /** | ||
2 | Generated from platform:/resource/SocialNetwork_plugin/queries/queries/Ecore.vql | ||
3 | */ | ||
4 | package constraints.ecore; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.HashMap; | ||
8 | import java.util.HashSet; | ||
9 | import java.util.List; | ||
10 | import java.util.Map; | ||
11 | import java.util.Set; | ||
12 | |||
13 | import org.eclipse.viatra.addon.validation.core.api.IConstraintSpecification; | ||
14 | import org.eclipse.viatra.addon.validation.core.api.Severity; | ||
15 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
16 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
17 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
18 | |||
19 | import ecore.NonSymmetricOpposite; | ||
20 | |||
21 | public class NonSymmetricOppositeConstraint0 implements IConstraintSpecification { | ||
22 | |||
23 | private NonSymmetricOpposite querySpecification; | ||
24 | |||
25 | public NonSymmetricOppositeConstraint0() { | ||
26 | querySpecification = NonSymmetricOpposite.instance(); | ||
27 | } | ||
28 | |||
29 | @Override | ||
30 | public String getMessageFormat() { | ||
31 | return "error"; | ||
32 | } | ||
33 | |||
34 | |||
35 | @Override | ||
36 | public Map<String,Object> getKeyObjects(IPatternMatch signature) { | ||
37 | Map<String,Object> map = new HashMap<>(); | ||
38 | map.put("a",signature.get("a")); | ||
39 | return map; | ||
40 | } | ||
41 | |||
42 | @Override | ||
43 | public List<String> getKeyNames() { | ||
44 | List<String> keyNames = Arrays.asList( | ||
45 | "a" | ||
46 | ); | ||
47 | return keyNames; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | public List<String> getPropertyNames() { | ||
52 | List<String> propertyNames = Arrays.asList( | ||
53 | "b" | ||
54 | ); | ||
55 | return propertyNames; | ||
56 | } | ||
57 | |||
58 | @Override | ||
59 | public Set<List<String>> getSymmetricPropertyNames() { | ||
60 | Set<List<String>> symmetricPropertyNamesSet = new HashSet<>(); | ||
61 | return symmetricPropertyNamesSet; | ||
62 | } | ||
63 | |||
64 | @Override | ||
65 | public Set<List<String>> getSymmetricKeyNames() { | ||
66 | Set<List<String>> symmetricKeyNamesSet = new HashSet<>(); | ||
67 | return symmetricKeyNamesSet; | ||
68 | } | ||
69 | |||
70 | @Override | ||
71 | public Severity getSeverity() { | ||
72 | return Severity.ERROR; | ||
73 | } | ||
74 | |||
75 | @Override | ||
76 | public IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> getQuerySpecification() { | ||
77 | return querySpecification; | ||
78 | } | ||
79 | |||
80 | } | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/MoreThenFiveSuperTypesConstraint0.java b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/OppositeDifferentClassConstraint0.java index 5243b104..9ef4e35e 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/MoreThenFiveSuperTypesConstraint0.java +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/constraints/ecore/OppositeDifferentClassConstraint0.java | |||
@@ -1,5 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | Generated from platform:/resource/SocialNetwork_plugin/queries/queries/ecore_pattern.vql | 2 | Generated from platform:/resource/SocialNetwork_plugin/queries/queries/Ecore.vql |
3 | */ | 3 | */ |
4 | package constraints.ecore; | 4 | package constraints.ecore; |
5 | 5 | ||
@@ -16,14 +16,14 @@ import org.eclipse.viatra.query.runtime.api.IPatternMatch; | |||
16 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | 16 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; |
17 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | 17 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; |
18 | 18 | ||
19 | import ecore.MoreThenFiveSuperTypes; | 19 | import ecore.OppositeDifferentClass; |
20 | 20 | ||
21 | public class MoreThenFiveSuperTypesConstraint0 implements IConstraintSpecification { | 21 | public class OppositeDifferentClassConstraint0 implements IConstraintSpecification { |
22 | 22 | ||
23 | private MoreThenFiveSuperTypes querySpecification; | 23 | private OppositeDifferentClass querySpecification; |
24 | 24 | ||
25 | public MoreThenFiveSuperTypesConstraint0() { | 25 | public OppositeDifferentClassConstraint0() { |
26 | querySpecification = MoreThenFiveSuperTypes.instance(); | 26 | querySpecification = OppositeDifferentClass.instance(); |
27 | } | 27 | } |
28 | 28 | ||
29 | @Override | 29 | @Override |
@@ -35,14 +35,14 @@ public class MoreThenFiveSuperTypesConstraint0 implements IConstraintSpecificati | |||
35 | @Override | 35 | @Override |
36 | public Map<String,Object> getKeyObjects(IPatternMatch signature) { | 36 | public Map<String,Object> getKeyObjects(IPatternMatch signature) { |
37 | Map<String,Object> map = new HashMap<>(); | 37 | Map<String,Object> map = new HashMap<>(); |
38 | map.put("c",signature.get("c")); | 38 | map.put("a",signature.get("a")); |
39 | return map; | 39 | return map; |
40 | } | 40 | } |
41 | 41 | ||
42 | @Override | 42 | @Override |
43 | public List<String> getKeyNames() { | 43 | public List<String> getKeyNames() { |
44 | List<String> keyNames = Arrays.asList( | 44 | List<String> keyNames = Arrays.asList( |
45 | "c" | 45 | "a" |
46 | ); | 46 | ); |
47 | return keyNames; | 47 | return keyNames; |
48 | } | 48 | } |
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/Ecore_pattern.java b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/Ecore_pattern.java deleted file mode 100644 index 6da94486..00000000 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/Ecore_pattern.java +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /** | ||
2 | * Generated from platform:/resource/SocialNetwork_plugin/queries/ecore/ecore_pattern.vql | ||
3 | */ | ||
4 | package ecore; | ||
5 | |||
6 | import ecore.MoreThenFiveSuperTypes; | ||
7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
8 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | ||
9 | |||
10 | /** | ||
11 | * A pattern group formed of all public patterns defined in ecore_pattern.vql. | ||
12 | * | ||
13 | * <p>Use the static instance as any {@link interface org.eclipse.viatra.query.runtime.api.IQueryGroup}, to conveniently prepare | ||
14 | * a VIATRA Query engine for matching all patterns originally defined in file ecore_pattern.vql, | ||
15 | * in order to achieve better performance than one-by-one on-demand matcher initialization. | ||
16 | * | ||
17 | * <p> From package ecore, the group contains the definition of the following patterns: <ul> | ||
18 | * <li>moreThenFiveSuperTypes</li> | ||
19 | * </ul> | ||
20 | * | ||
21 | * @see IQueryGroup | ||
22 | * | ||
23 | */ | ||
24 | @SuppressWarnings("all") | ||
25 | public final class Ecore_pattern extends BaseGeneratedPatternGroup { | ||
26 | /** | ||
27 | * Access the pattern group. | ||
28 | * | ||
29 | * @return the singleton instance of the group | ||
30 | * @throws ViatraQueryRuntimeException if there was an error loading the generated code of pattern specifications | ||
31 | * | ||
32 | */ | ||
33 | public static Ecore_pattern instance() { | ||
34 | if (INSTANCE == null) { | ||
35 | INSTANCE = new Ecore_pattern(); | ||
36 | } | ||
37 | return INSTANCE; | ||
38 | } | ||
39 | |||
40 | private static Ecore_pattern INSTANCE; | ||
41 | |||
42 | private Ecore_pattern() { | ||
43 | querySpecifications.add(MoreThenFiveSuperTypes.instance()); | ||
44 | } | ||
45 | |||
46 | public MoreThenFiveSuperTypes getMoreThenFiveSuperTypes() { | ||
47 | return MoreThenFiveSuperTypes.instance(); | ||
48 | } | ||
49 | |||
50 | public MoreThenFiveSuperTypes.Matcher getMoreThenFiveSuperTypes(final ViatraQueryEngine engine) { | ||
51 | return MoreThenFiveSuperTypes.Matcher.on(engine); | ||
52 | } | ||
53 | } | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/MoreThenFiveSuperTypes.java b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/MoreThenFiveSuperTypes.java deleted file mode 100644 index da64d899..00000000 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/constraints/ecore/MoreThenFiveSuperTypes.java +++ /dev/null | |||
@@ -1,621 +0,0 @@ | |||
1 | /** | ||
2 | * Generated from platform:/resource/SocialNetwork_plugin/queries/ecore/ecore_pattern.vql | ||
3 | */ | ||
4 | package ecore; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.Collection; | ||
8 | import java.util.Collections; | ||
9 | import java.util.LinkedHashSet; | ||
10 | import java.util.List; | ||
11 | import java.util.Objects; | ||
12 | import java.util.Optional; | ||
13 | import java.util.Set; | ||
14 | import java.util.function.Consumer; | ||
15 | import java.util.stream.Collectors; | ||
16 | import java.util.stream.Stream; | ||
17 | import org.apache.log4j.Logger; | ||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
20 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
21 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
22 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
23 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; | ||
24 | import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; | ||
25 | import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; | ||
26 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
27 | import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; | ||
28 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
29 | import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator; | ||
30 | import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; | ||
31 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
32 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
33 | import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; | ||
34 | import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference; | ||
35 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; | ||
36 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
37 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation; | ||
38 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter; | ||
39 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
40 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
41 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
42 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
43 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | ||
44 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
45 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | ||
46 | |||
47 | /** | ||
48 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | ||
49 | * | ||
50 | * <p>Original source: | ||
51 | * <code><pre> | ||
52 | * {@literal @}Constraint(severity="error", message="error", key = {c}) | ||
53 | * pattern moreThenFiveSuperTypes(c: EClass){ | ||
54 | * m == count EClass.eSuperTypes(c,_); | ||
55 | * check(m {@literal >}= 5); | ||
56 | * } | ||
57 | * </pre></code> | ||
58 | * | ||
59 | * @see Matcher | ||
60 | * @see Match | ||
61 | * | ||
62 | */ | ||
63 | @SuppressWarnings("all") | ||
64 | public final class MoreThenFiveSuperTypes extends BaseGeneratedEMFQuerySpecification<MoreThenFiveSuperTypes.Matcher> { | ||
65 | /** | ||
66 | * Pattern-specific match representation of the ecore.moreThenFiveSuperTypes pattern, | ||
67 | * to be used in conjunction with {@link Matcher}. | ||
68 | * | ||
69 | * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. | ||
70 | * Each instance is a (possibly partial) substitution of pattern parameters, | ||
71 | * usable to represent a match of the pattern in the result of a query, | ||
72 | * or to specify the bound (fixed) input parameters when issuing a query. | ||
73 | * | ||
74 | * @see Matcher | ||
75 | * | ||
76 | */ | ||
77 | public static abstract class Match extends BasePatternMatch { | ||
78 | private EClass fC; | ||
79 | |||
80 | private static List<String> parameterNames = makeImmutableList("c"); | ||
81 | |||
82 | private Match(final EClass pC) { | ||
83 | this.fC = pC; | ||
84 | } | ||
85 | |||
86 | @Override | ||
87 | public Object get(final String parameterName) { | ||
88 | if ("c".equals(parameterName)) return this.fC; | ||
89 | return null; | ||
90 | } | ||
91 | |||
92 | public EClass getC() { | ||
93 | return this.fC; | ||
94 | } | ||
95 | |||
96 | @Override | ||
97 | public boolean set(final String parameterName, final Object newValue) { | ||
98 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
99 | if ("c".equals(parameterName) ) { | ||
100 | this.fC = (EClass) newValue; | ||
101 | return true; | ||
102 | } | ||
103 | return false; | ||
104 | } | ||
105 | |||
106 | public void setC(final EClass pC) { | ||
107 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
108 | this.fC = pC; | ||
109 | } | ||
110 | |||
111 | @Override | ||
112 | public String patternName() { | ||
113 | return "ecore.moreThenFiveSuperTypes"; | ||
114 | } | ||
115 | |||
116 | @Override | ||
117 | public List<String> parameterNames() { | ||
118 | return MoreThenFiveSuperTypes.Match.parameterNames; | ||
119 | } | ||
120 | |||
121 | @Override | ||
122 | public Object[] toArray() { | ||
123 | return new Object[]{fC}; | ||
124 | } | ||
125 | |||
126 | @Override | ||
127 | public MoreThenFiveSuperTypes.Match toImmutable() { | ||
128 | return isMutable() ? newMatch(fC) : this; | ||
129 | } | ||
130 | |||
131 | @Override | ||
132 | public String prettyPrint() { | ||
133 | StringBuilder result = new StringBuilder(); | ||
134 | result.append("\"c\"=" + prettyPrintValue(fC)); | ||
135 | return result.toString(); | ||
136 | } | ||
137 | |||
138 | @Override | ||
139 | public int hashCode() { | ||
140 | return Objects.hash(fC); | ||
141 | } | ||
142 | |||
143 | @Override | ||
144 | public boolean equals(final Object obj) { | ||
145 | if (this == obj) | ||
146 | return true; | ||
147 | if (obj == null) { | ||
148 | return false; | ||
149 | } | ||
150 | if ((obj instanceof MoreThenFiveSuperTypes.Match)) { | ||
151 | MoreThenFiveSuperTypes.Match other = (MoreThenFiveSuperTypes.Match) obj; | ||
152 | return Objects.equals(fC, other.fC); | ||
153 | } else { | ||
154 | // this should be infrequent | ||
155 | if (!(obj instanceof IPatternMatch)) { | ||
156 | return false; | ||
157 | } | ||
158 | IPatternMatch otherSig = (IPatternMatch) obj; | ||
159 | return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | @Override | ||
164 | public MoreThenFiveSuperTypes specification() { | ||
165 | return MoreThenFiveSuperTypes.instance(); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * Returns an empty, mutable match. | ||
170 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
171 | * | ||
172 | * @return the empty match. | ||
173 | * | ||
174 | */ | ||
175 | public static MoreThenFiveSuperTypes.Match newEmptyMatch() { | ||
176 | return new Mutable(null); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * Returns a mutable (partial) match. | ||
181 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
182 | * | ||
183 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
184 | * @return the new, mutable (partial) match object. | ||
185 | * | ||
186 | */ | ||
187 | public static MoreThenFiveSuperTypes.Match newMutableMatch(final EClass pC) { | ||
188 | return new Mutable(pC); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * Returns a new (partial) match. | ||
193 | * This can be used e.g. to call the matcher with a partial match. | ||
194 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
195 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
196 | * @return the (partial) match object. | ||
197 | * | ||
198 | */ | ||
199 | public static MoreThenFiveSuperTypes.Match newMatch(final EClass pC) { | ||
200 | return new Immutable(pC); | ||
201 | } | ||
202 | |||
203 | private static final class Mutable extends MoreThenFiveSuperTypes.Match { | ||
204 | Mutable(final EClass pC) { | ||
205 | super(pC); | ||
206 | } | ||
207 | |||
208 | @Override | ||
209 | public boolean isMutable() { | ||
210 | return true; | ||
211 | } | ||
212 | } | ||
213 | |||
214 | private static final class Immutable extends MoreThenFiveSuperTypes.Match { | ||
215 | Immutable(final EClass pC) { | ||
216 | super(pC); | ||
217 | } | ||
218 | |||
219 | @Override | ||
220 | public boolean isMutable() { | ||
221 | return false; | ||
222 | } | ||
223 | } | ||
224 | } | ||
225 | |||
226 | /** | ||
227 | * Generated pattern matcher API of the ecore.moreThenFiveSuperTypes pattern, | ||
228 | * providing pattern-specific query methods. | ||
229 | * | ||
230 | * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, | ||
231 | * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. | ||
232 | * | ||
233 | * <p>Matches of the pattern will be represented as {@link Match}. | ||
234 | * | ||
235 | * <p>Original source: | ||
236 | * <code><pre> | ||
237 | * {@literal @}Constraint(severity="error", message="error", key = {c}) | ||
238 | * pattern moreThenFiveSuperTypes(c: EClass){ | ||
239 | * m == count EClass.eSuperTypes(c,_); | ||
240 | * check(m {@literal >}= 5); | ||
241 | * } | ||
242 | * </pre></code> | ||
243 | * | ||
244 | * @see Match | ||
245 | * @see MoreThenFiveSuperTypes | ||
246 | * | ||
247 | */ | ||
248 | public static class Matcher extends BaseMatcher<MoreThenFiveSuperTypes.Match> { | ||
249 | /** | ||
250 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
251 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
252 | * | ||
253 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
254 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
255 | * | ||
256 | */ | ||
257 | public static MoreThenFiveSuperTypes.Matcher on(final ViatraQueryEngine engine) { | ||
258 | // check if matcher already exists | ||
259 | Matcher matcher = engine.getExistingMatcher(querySpecification()); | ||
260 | if (matcher == null) { | ||
261 | matcher = (Matcher)engine.getMatcher(querySpecification()); | ||
262 | } | ||
263 | return matcher; | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
268 | * @return an initialized matcher | ||
269 | * @noreference This method is for internal matcher initialization by the framework, do not call it manually. | ||
270 | * | ||
271 | */ | ||
272 | public static MoreThenFiveSuperTypes.Matcher create() { | ||
273 | return new Matcher(); | ||
274 | } | ||
275 | |||
276 | private static final int POSITION_C = 0; | ||
277 | |||
278 | private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(MoreThenFiveSuperTypes.Matcher.class); | ||
279 | |||
280 | /** | ||
281 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
282 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
283 | * | ||
284 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
285 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
286 | * | ||
287 | */ | ||
288 | private Matcher() { | ||
289 | super(querySpecification()); | ||
290 | } | ||
291 | |||
292 | /** | ||
293 | * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. | ||
294 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
295 | * @return matches represented as a Match object. | ||
296 | * | ||
297 | */ | ||
298 | public Collection<MoreThenFiveSuperTypes.Match> getAllMatches(final EClass pC) { | ||
299 | return rawStreamAllMatches(new Object[]{pC}).collect(Collectors.toSet()); | ||
300 | } | ||
301 | |||
302 | /** | ||
303 | * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. | ||
304 | * </p> | ||
305 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
306 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
307 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
308 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
309 | * @return a stream of matches represented as a Match object. | ||
310 | * | ||
311 | */ | ||
312 | public Stream<MoreThenFiveSuperTypes.Match> streamAllMatches(final EClass pC) { | ||
313 | return rawStreamAllMatches(new Object[]{pC}); | ||
314 | } | ||
315 | |||
316 | /** | ||
317 | * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
318 | * Neither determinism nor randomness of selection is guaranteed. | ||
319 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
320 | * @return a match represented as a Match object, or null if no match is found. | ||
321 | * | ||
322 | */ | ||
323 | public Optional<MoreThenFiveSuperTypes.Match> getOneArbitraryMatch(final EClass pC) { | ||
324 | return rawGetOneArbitraryMatch(new Object[]{pC}); | ||
325 | } | ||
326 | |||
327 | /** | ||
328 | * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, | ||
329 | * under any possible substitution of the unspecified parameters (if any). | ||
330 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
331 | * @return true if the input is a valid (partial) match of the pattern. | ||
332 | * | ||
333 | */ | ||
334 | public boolean hasMatch(final EClass pC) { | ||
335 | return rawHasMatch(new Object[]{pC}); | ||
336 | } | ||
337 | |||
338 | /** | ||
339 | * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. | ||
340 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
341 | * @return the number of pattern matches found. | ||
342 | * | ||
343 | */ | ||
344 | public int countMatches(final EClass pC) { | ||
345 | return rawCountMatches(new Object[]{pC}); | ||
346 | } | ||
347 | |||
348 | /** | ||
349 | * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
350 | * Neither determinism nor randomness of selection is guaranteed. | ||
351 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
352 | * @param processor the action that will process the selected match. | ||
353 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked | ||
354 | * | ||
355 | */ | ||
356 | public boolean forOneArbitraryMatch(final EClass pC, final Consumer<? super MoreThenFiveSuperTypes.Match> processor) { | ||
357 | return rawForOneArbitraryMatch(new Object[]{pC}, processor); | ||
358 | } | ||
359 | |||
360 | /** | ||
361 | * Returns a new (partial) match. | ||
362 | * This can be used e.g. to call the matcher with a partial match. | ||
363 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
364 | * @param pC the fixed value of pattern parameter c, or null if not bound. | ||
365 | * @return the (partial) match object. | ||
366 | * | ||
367 | */ | ||
368 | public MoreThenFiveSuperTypes.Match newMatch(final EClass pC) { | ||
369 | return MoreThenFiveSuperTypes.Match.newMatch(pC); | ||
370 | } | ||
371 | |||
372 | /** | ||
373 | * Retrieve the set of values that occur in matches for c. | ||
374 | * @return the Set of all values or empty set if there are no matches | ||
375 | * | ||
376 | */ | ||
377 | protected Stream<EClass> rawStreamAllValuesOfc(final Object[] parameters) { | ||
378 | return rawStreamAllValues(POSITION_C, parameters).map(EClass.class::cast); | ||
379 | } | ||
380 | |||
381 | /** | ||
382 | * Retrieve the set of values that occur in matches for c. | ||
383 | * @return the Set of all values or empty set if there are no matches | ||
384 | * | ||
385 | */ | ||
386 | public Set<EClass> getAllValuesOfc() { | ||
387 | return rawStreamAllValuesOfc(emptyArray()).collect(Collectors.toSet()); | ||
388 | } | ||
389 | |||
390 | /** | ||
391 | * Retrieve the set of values that occur in matches for c. | ||
392 | * @return the Set of all values or empty set if there are no matches | ||
393 | * | ||
394 | */ | ||
395 | public Stream<EClass> streamAllValuesOfc() { | ||
396 | return rawStreamAllValuesOfc(emptyArray()); | ||
397 | } | ||
398 | |||
399 | @Override | ||
400 | protected MoreThenFiveSuperTypes.Match tupleToMatch(final Tuple t) { | ||
401 | try { | ||
402 | return MoreThenFiveSuperTypes.Match.newMatch((EClass) t.get(POSITION_C)); | ||
403 | } catch(ClassCastException e) { | ||
404 | LOGGER.error("Element(s) in tuple not properly typed!",e); | ||
405 | return null; | ||
406 | } | ||
407 | } | ||
408 | |||
409 | @Override | ||
410 | protected MoreThenFiveSuperTypes.Match arrayToMatch(final Object[] match) { | ||
411 | try { | ||
412 | return MoreThenFiveSuperTypes.Match.newMatch((EClass) match[POSITION_C]); | ||
413 | } catch(ClassCastException e) { | ||
414 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
415 | return null; | ||
416 | } | ||
417 | } | ||
418 | |||
419 | @Override | ||
420 | protected MoreThenFiveSuperTypes.Match arrayToMatchMutable(final Object[] match) { | ||
421 | try { | ||
422 | return MoreThenFiveSuperTypes.Match.newMutableMatch((EClass) match[POSITION_C]); | ||
423 | } catch(ClassCastException e) { | ||
424 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
425 | return null; | ||
426 | } | ||
427 | } | ||
428 | |||
429 | /** | ||
430 | * @return the singleton instance of the query specification of this pattern | ||
431 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
432 | * | ||
433 | */ | ||
434 | public static IQuerySpecification<MoreThenFiveSuperTypes.Matcher> querySpecification() { | ||
435 | return MoreThenFiveSuperTypes.instance(); | ||
436 | } | ||
437 | } | ||
438 | |||
439 | private MoreThenFiveSuperTypes() { | ||
440 | super(GeneratedPQuery.INSTANCE); | ||
441 | } | ||
442 | |||
443 | /** | ||
444 | * @return the singleton instance of the query specification | ||
445 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
446 | * | ||
447 | */ | ||
448 | public static MoreThenFiveSuperTypes instance() { | ||
449 | try{ | ||
450 | return LazyHolder.INSTANCE; | ||
451 | } catch (ExceptionInInitializerError err) { | ||
452 | throw processInitializerError(err); | ||
453 | } | ||
454 | } | ||
455 | |||
456 | @Override | ||
457 | protected MoreThenFiveSuperTypes.Matcher instantiate(final ViatraQueryEngine engine) { | ||
458 | return MoreThenFiveSuperTypes.Matcher.on(engine); | ||
459 | } | ||
460 | |||
461 | @Override | ||
462 | public MoreThenFiveSuperTypes.Matcher instantiate() { | ||
463 | return MoreThenFiveSuperTypes.Matcher.create(); | ||
464 | } | ||
465 | |||
466 | @Override | ||
467 | public MoreThenFiveSuperTypes.Match newEmptyMatch() { | ||
468 | return MoreThenFiveSuperTypes.Match.newEmptyMatch(); | ||
469 | } | ||
470 | |||
471 | @Override | ||
472 | public MoreThenFiveSuperTypes.Match newMatch(final Object... parameters) { | ||
473 | return MoreThenFiveSuperTypes.Match.newMatch((org.eclipse.emf.ecore.EClass) parameters[0]); | ||
474 | } | ||
475 | |||
476 | /** | ||
477 | * Inner class allowing the singleton instance of {@link JvmGenericType: ecore.MoreThenFiveSuperTypes (visibility: PUBLIC, simpleName: MoreThenFiveSuperTypes, identifier: ecore.MoreThenFiveSuperTypes, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: ecore) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created | ||
478 | * <b>not</b> at the class load time of the outer class, | ||
479 | * but rather at the first call to {@link JvmGenericType: ecore.MoreThenFiveSuperTypes (visibility: PUBLIC, simpleName: MoreThenFiveSuperTypes, identifier: ecore.MoreThenFiveSuperTypes, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: ecore) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. | ||
480 | * | ||
481 | * <p> This workaround is required e.g. to support recursion. | ||
482 | * | ||
483 | */ | ||
484 | private static class LazyHolder { | ||
485 | private static final MoreThenFiveSuperTypes INSTANCE = new MoreThenFiveSuperTypes(); | ||
486 | |||
487 | /** | ||
488 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
489 | * This initialization order is required to support indirect recursion. | ||
490 | * | ||
491 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
492 | * | ||
493 | */ | ||
494 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
495 | |||
496 | public static Object ensureInitialized() { | ||
497 | INSTANCE.ensureInitializedInternal(); | ||
498 | return null; | ||
499 | } | ||
500 | } | ||
501 | |||
502 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
503 | private static final MoreThenFiveSuperTypes.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
504 | |||
505 | private final PParameter parameter_c = new PParameter("c", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT); | ||
506 | |||
507 | private final List<PParameter> parameters = Arrays.asList(parameter_c); | ||
508 | |||
509 | private class Embedded_1_EClass_eSuperTypes extends BaseGeneratedEMFPQuery { | ||
510 | private final PParameter parameter_p0 = new PParameter("p0", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT); | ||
511 | |||
512 | private final PParameter parameter_p1 = new PParameter("p1", "org.eclipse.emf.ecore.EClass", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EClass")), PParameterDirection.INOUT); | ||
513 | |||
514 | private final List<PParameter> embeddedParameters = Arrays.asList(parameter_p0, parameter_p1); | ||
515 | |||
516 | public Embedded_1_EClass_eSuperTypes() { | ||
517 | super(PVisibility.EMBEDDED); | ||
518 | } | ||
519 | |||
520 | @Override | ||
521 | public String getFullyQualifiedName() { | ||
522 | return GeneratedPQuery.this.getFullyQualifiedName() + "$Embedded_1_EClass_eSuperTypes"; | ||
523 | } | ||
524 | |||
525 | @Override | ||
526 | public List<PParameter> getParameters() { | ||
527 | return embeddedParameters; | ||
528 | } | ||
529 | |||
530 | @Override | ||
531 | public Set<PBody> doGetContainedBodies() { | ||
532 | PBody body = new PBody(this); | ||
533 | PVariable var_p0 = body.getOrCreateVariableByName("p0"); | ||
534 | PVariable var_p1 = body.getOrCreateVariableByName("p1"); | ||
535 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
536 | new ExportedParameter(body, var_p0, parameter_p0), | ||
537 | new ExportedParameter(body, var_p1, parameter_p1) | ||
538 | )); | ||
539 | // EClass.eSuperTypes(c,_) | ||
540 | new TypeConstraint(body, Tuples.flatTupleOf(var_p0), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"))); | ||
541 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
542 | new TypeConstraint(body, Tuples.flatTupleOf(var_p0, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass", "eSuperTypes"))); | ||
543 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"))); | ||
544 | new Equality(body, var__virtual_0_, var_p1); | ||
545 | return Collections.singleton(body); | ||
546 | } | ||
547 | } | ||
548 | |||
549 | private GeneratedPQuery() { | ||
550 | super(PVisibility.PUBLIC); | ||
551 | } | ||
552 | |||
553 | @Override | ||
554 | public String getFullyQualifiedName() { | ||
555 | return "ecore.moreThenFiveSuperTypes"; | ||
556 | } | ||
557 | |||
558 | @Override | ||
559 | public List<String> getParameterNames() { | ||
560 | return Arrays.asList("c"); | ||
561 | } | ||
562 | |||
563 | @Override | ||
564 | public List<PParameter> getParameters() { | ||
565 | return parameters; | ||
566 | } | ||
567 | |||
568 | @Override | ||
569 | public Set<PBody> doGetContainedBodies() { | ||
570 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
571 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
572 | { | ||
573 | PBody body = new PBody(this); | ||
574 | PVariable var_c = body.getOrCreateVariableByName("c"); | ||
575 | PVariable var_m = body.getOrCreateVariableByName("m"); | ||
576 | PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); | ||
577 | new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"))); | ||
578 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
579 | new ExportedParameter(body, var_c, parameter_c) | ||
580 | )); | ||
581 | // m == count EClass.eSuperTypes(c,_) | ||
582 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
583 | new PatternMatchCounter(body, Tuples.flatTupleOf(var_c, var___0_), new MoreThenFiveSuperTypes.GeneratedPQuery.Embedded_1_EClass_eSuperTypes(), var__virtual_0_); | ||
584 | new Equality(body, var_m, var__virtual_0_); | ||
585 | // check(m >= 5) | ||
586 | new ExpressionEvaluation(body, new IExpressionEvaluator() { | ||
587 | |||
588 | @Override | ||
589 | public String getShortDescription() { | ||
590 | return "Expression evaluation from pattern moreThenFiveSuperTypes"; | ||
591 | } | ||
592 | |||
593 | @Override | ||
594 | public Iterable<String> getInputParameterNames() { | ||
595 | return Arrays.asList("m");} | ||
596 | |||
597 | @Override | ||
598 | public Object evaluateExpression(IValueProvider provider) throws Exception { | ||
599 | Integer m = (Integer) provider.getValue("m"); | ||
600 | return evaluateExpression_1_1(m); | ||
601 | } | ||
602 | }, null); | ||
603 | bodies.add(body); | ||
604 | } | ||
605 | { | ||
606 | PAnnotation annotation = new PAnnotation("Constraint"); | ||
607 | annotation.addAttribute("severity", "error"); | ||
608 | annotation.addAttribute("message", "error"); | ||
609 | annotation.addAttribute("key", Arrays.asList(new Object[] { | ||
610 | new ParameterReference("c") | ||
611 | })); | ||
612 | addAnnotation(annotation); | ||
613 | } | ||
614 | return bodies; | ||
615 | } | ||
616 | } | ||
617 | |||
618 | private static boolean evaluateExpression_1_1(final Integer m) { | ||
619 | return ((m).intValue() >= 5); | ||
620 | } | ||
621 | } | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/ecore.ecore b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/ecore.ecore new file mode 100644 index 00000000..e7dc2768 --- /dev/null +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/ecore.ecore | |||
@@ -0,0 +1,1016 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="ecore" nsURI="http://www.eclipse.org/emf/2002/Ecore" nsPrefix="ecore"> | ||
4 | <eClassifiers xsi:type="ecore:EClass" name="EAnnotation" eSuperTypes="#//EModelElement"> | ||
5 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
6 | <details key="name" value="EAnnotation"/> | ||
7 | <details key="kind" value="elementOnly"/> | ||
8 | </eAnnotations> | ||
9 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
10 | <details key="constraints" value="WellFormedSourceURI"/> | ||
11 | </eAnnotations> | ||
12 | <eStructuralFeatures xsi:type="ecore:EReference" name="details" upperBound="-1" | ||
13 | eType="#//EStringToStringMapEntry" containment="true" resolveProxies="false"> | ||
14 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
15 | <details key="kind" value="element"/> | ||
16 | <details key="name" value="details"/> | ||
17 | </eAnnotations> | ||
18 | </eStructuralFeatures> | ||
19 | <eStructuralFeatures xsi:type="ecore:EReference" name="contents" upperBound="-1" | ||
20 | eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject" containment="true" | ||
21 | resolveProxies="false"> | ||
22 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
23 | <details key="kind" value="element"/> | ||
24 | <details key="name" value="contents"/> | ||
25 | </eAnnotations> | ||
26 | </eStructuralFeatures> | ||
27 | <eStructuralFeatures xsi:type="ecore:EReference" name="references" upperBound="-1" | ||
28 | eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"> | ||
29 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
30 | <details key="kind" value="attribute"/> | ||
31 | <details key="name" value="references"/> | ||
32 | </eAnnotations> | ||
33 | </eStructuralFeatures> | ||
34 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="source" eType="#//EString"> | ||
35 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
36 | <details key="kind" value="attribute"/> | ||
37 | <details key="name" value="source"/> | ||
38 | </eAnnotations> | ||
39 | </eStructuralFeatures> | ||
40 | <eStructuralFeatures xsi:type="ecore:EReference" name="eModelElement" eType="#//EModelElement" | ||
41 | transient="true" eOpposite="#//EModelElement/eAnnotations"/> | ||
42 | </eClassifiers> | ||
43 | <eClassifiers xsi:type="ecore:EClass" name="EAttribute" eSuperTypes="#//EStructuralFeature"> | ||
44 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
45 | <details key="name" value="EAttribute"/> | ||
46 | <details key="kind" value="elementOnly"/> | ||
47 | </eAnnotations> | ||
48 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
49 | <details key="constraints" value="ConsistentTransient"/> | ||
50 | </eAnnotations> | ||
51 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAttributeType" lowerBound="1" | ||
52 | eType="#//EDataType" changeable="false" volatile="true" transient="true" derived="true"> | ||
53 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
54 | <details key="kind" value="attribute"/> | ||
55 | <details key="name" value="eAttributeType"/> | ||
56 | </eAnnotations> | ||
57 | </eStructuralFeatures> | ||
58 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" eType="#//EBoolean"> | ||
59 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
60 | <details key="kind" value="attribute"/> | ||
61 | <details key="name" value="iD"/> | ||
62 | </eAnnotations> | ||
63 | </eStructuralFeatures> | ||
64 | </eClassifiers> | ||
65 | <eClassifiers xsi:type="ecore:EDataType" name="EBigDecimal" instanceClassName="java.math.BigDecimal"> | ||
66 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
67 | <details key="name" value="EBigDecimal"/> | ||
68 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#decimal"/> | ||
69 | </eAnnotations> | ||
70 | </eClassifiers> | ||
71 | <eClassifiers xsi:type="ecore:EDataType" name="EBigInteger" instanceClassName="java.math.BigInteger"> | ||
72 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
73 | <details key="name" value="EBigInteger"/> | ||
74 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#integer"/> | ||
75 | </eAnnotations> | ||
76 | </eClassifiers> | ||
77 | <eClassifiers xsi:type="ecore:EDataType" name="EBoolean" instanceClassName="boolean"> | ||
78 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
79 | <details key="name" value="EBoolean"/> | ||
80 | </eAnnotations> | ||
81 | </eClassifiers> | ||
82 | <eClassifiers xsi:type="ecore:EDataType" name="EBooleanObject" instanceClassName="java.lang.Boolean"> | ||
83 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
84 | <details key="name" value="EBoolean:Object"/> | ||
85 | <details key="baseType" value="EBoolean"/> | ||
86 | </eAnnotations> | ||
87 | </eClassifiers> | ||
88 | <eClassifiers xsi:type="ecore:EDataType" name="EByte" instanceClassName="byte"> | ||
89 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
90 | <details key="name" value="EByte"/> | ||
91 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#byte"/> | ||
92 | </eAnnotations> | ||
93 | </eClassifiers> | ||
94 | <eClassifiers xsi:type="ecore:EDataType" name="EByteArray" instanceClassName="byte[]"> | ||
95 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
96 | <details key="name" value="EByteArray"/> | ||
97 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#hexBinary"/> | ||
98 | </eAnnotations> | ||
99 | </eClassifiers> | ||
100 | <eClassifiers xsi:type="ecore:EDataType" name="EByteObject" instanceClassName="java.lang.Byte"> | ||
101 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
102 | <details key="name" value="EByte:Object"/> | ||
103 | <details key="baseType" value="EByte"/> | ||
104 | </eAnnotations> | ||
105 | </eClassifiers> | ||
106 | <eClassifiers xsi:type="ecore:EDataType" name="EChar" instanceClassName="char"> | ||
107 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
108 | <details key="name" value="EChar"/> | ||
109 | </eAnnotations> | ||
110 | </eClassifiers> | ||
111 | <eClassifiers xsi:type="ecore:EDataType" name="ECharacterObject" instanceClassName="java.lang.Character"> | ||
112 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
113 | <details key="name" value="EChar:Object"/> | ||
114 | <details key="baseType" value="EChar"/> | ||
115 | </eAnnotations> | ||
116 | </eClassifiers> | ||
117 | <eClassifiers xsi:type="ecore:EClass" name="EClass" eSuperTypes="#//EClassifier"> | ||
118 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
119 | <details key="name" value="EClass"/> | ||
120 | <details key="kind" value="elementOnly"/> | ||
121 | </eAnnotations> | ||
122 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
123 | <details key="constraints" value="InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures"/> | ||
124 | </eAnnotations> | ||
125 | <eOperations name="isSuperTypeOf" eType="#//EBoolean"> | ||
126 | <eParameters name="someClass" eType="#//EClass"/> | ||
127 | </eOperations> | ||
128 | <eOperations name="getFeatureCount" eType="#//EInt"/> | ||
129 | <eOperations name="getEStructuralFeature" eType="#//EStructuralFeature"> | ||
130 | <eParameters name="featureID" eType="#//EInt"/> | ||
131 | </eOperations> | ||
132 | <eOperations name="getFeatureID" eType="#//EInt"> | ||
133 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
134 | </eOperations> | ||
135 | <eOperations name="getEStructuralFeature" eType="#//EStructuralFeature"> | ||
136 | <eParameters name="featureName" eType="#//EString"/> | ||
137 | </eOperations> | ||
138 | <eOperations name="getOperationCount" eType="#//EInt"/> | ||
139 | <eOperations name="getEOperation" eType="#//EOperation"> | ||
140 | <eParameters name="operationID" eType="#//EInt"/> | ||
141 | </eOperations> | ||
142 | <eOperations name="getOperationID" eType="#//EInt"> | ||
143 | <eParameters name="operation" eType="#//EOperation"/> | ||
144 | </eOperations> | ||
145 | <eOperations name="getOverride" eType="#//EOperation"> | ||
146 | <eParameters name="operation" eType="#//EOperation"/> | ||
147 | </eOperations> | ||
148 | <eStructuralFeatures xsi:type="ecore:EReference" name="eOperations" upperBound="-1" | ||
149 | eType="#//EOperation" containment="true" resolveProxies="false" eOpposite="#//EOperation/eContainingClass"> | ||
150 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
151 | <details key="kind" value="element"/> | ||
152 | <details key="name" value="eOperations"/> | ||
153 | </eAnnotations> | ||
154 | </eStructuralFeatures> | ||
155 | <eStructuralFeatures xsi:type="ecore:EReference" name="eStructuralFeatures" upperBound="-1" | ||
156 | eType="#//EStructuralFeature" containment="true" resolveProxies="false" eOpposite="#//EStructuralFeature/eContainingClass"> | ||
157 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
158 | <details key="kind" value="element"/> | ||
159 | <details key="name" value="eStructuralFeatures"/> | ||
160 | </eAnnotations> | ||
161 | </eStructuralFeatures> | ||
162 | <eStructuralFeatures xsi:type="ecore:EReference" name="eGenericSuperTypes" upperBound="-1" | ||
163 | eType="#//EGenericType" unsettable="true" containment="true" resolveProxies="false"> | ||
164 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
165 | <details key="kind" value="element"/> | ||
166 | <details key="name" value="eGenericSuperTypes"/> | ||
167 | </eAnnotations> | ||
168 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
169 | <details key="suppressedIsSetVisibility" value="true"/> | ||
170 | <details key="suppressedUnsetVisibility" value="true"/> | ||
171 | </eAnnotations> | ||
172 | </eStructuralFeatures> | ||
173 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract" eType="#//EBoolean"> | ||
174 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
175 | <details key="kind" value="attribute"/> | ||
176 | <details key="name" value="abstract"/> | ||
177 | </eAnnotations> | ||
178 | </eStructuralFeatures> | ||
179 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllAttributes" upperBound="-1" | ||
180 | eType="#//EAttribute" changeable="false" volatile="true" transient="true" | ||
181 | derived="true"> | ||
182 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
183 | <details key="kind" value="attribute"/> | ||
184 | <details key="name" value="eAllAttributes"/> | ||
185 | </eAnnotations> | ||
186 | </eStructuralFeatures> | ||
187 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllContainments" upperBound="-1" | ||
188 | eType="#//EReference" changeable="false" volatile="true" transient="true" | ||
189 | derived="true"> | ||
190 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
191 | <details key="kind" value="attribute"/> | ||
192 | <details key="name" value="eAllContainments"/> | ||
193 | </eAnnotations> | ||
194 | </eStructuralFeatures> | ||
195 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllGenericSuperTypes" | ||
196 | upperBound="-1" eType="#//EGenericType" changeable="false" volatile="true" | ||
197 | transient="true" derived="true"> | ||
198 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
199 | <details key="kind" value="attribute"/> | ||
200 | <details key="name" value="eAllGenericSuperTypes"/> | ||
201 | </eAnnotations> | ||
202 | </eStructuralFeatures> | ||
203 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllOperations" upperBound="-1" | ||
204 | eType="#//EOperation" changeable="false" volatile="true" transient="true" | ||
205 | derived="true"> | ||
206 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
207 | <details key="kind" value="attribute"/> | ||
208 | <details key="name" value="eAllOperations"/> | ||
209 | </eAnnotations> | ||
210 | </eStructuralFeatures> | ||
211 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllReferences" upperBound="-1" | ||
212 | eType="#//EReference" changeable="false" volatile="true" transient="true" | ||
213 | derived="true"> | ||
214 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
215 | <details key="kind" value="attribute"/> | ||
216 | <details key="name" value="eAllReferences"/> | ||
217 | </eAnnotations> | ||
218 | </eStructuralFeatures> | ||
219 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllStructuralFeatures" | ||
220 | upperBound="-1" eType="#//EStructuralFeature" changeable="false" volatile="true" | ||
221 | transient="true" derived="true"> | ||
222 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
223 | <details key="kind" value="attribute"/> | ||
224 | <details key="name" value="eAllStructuralFeatures"/> | ||
225 | </eAnnotations> | ||
226 | </eStructuralFeatures> | ||
227 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAllSuperTypes" upperBound="-1" | ||
228 | eType="#//EClass" changeable="false" volatile="true" transient="true" derived="true"> | ||
229 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
230 | <details key="kind" value="attribute"/> | ||
231 | <details key="name" value="eAllSuperTypes"/> | ||
232 | </eAnnotations> | ||
233 | </eStructuralFeatures> | ||
234 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAttributes" upperBound="-1" | ||
235 | eType="#//EAttribute" changeable="false" volatile="true" transient="true" | ||
236 | derived="true"> | ||
237 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
238 | <details key="kind" value="attribute"/> | ||
239 | <details key="name" value="eAttributes"/> | ||
240 | </eAnnotations> | ||
241 | </eStructuralFeatures> | ||
242 | <eStructuralFeatures xsi:type="ecore:EReference" name="eIDAttribute" eType="#//EAttribute" | ||
243 | changeable="false" volatile="true" transient="true" derived="true" resolveProxies="false"> | ||
244 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
245 | <details key="kind" value="attribute"/> | ||
246 | <details key="name" value="eIDAttribute"/> | ||
247 | </eAnnotations> | ||
248 | </eStructuralFeatures> | ||
249 | <eStructuralFeatures xsi:type="ecore:EReference" name="eReferences" upperBound="-1" | ||
250 | eType="#//EReference" changeable="false" volatile="true" transient="true" | ||
251 | derived="true"> | ||
252 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
253 | <details key="kind" value="attribute"/> | ||
254 | <details key="name" value="eReferences"/> | ||
255 | </eAnnotations> | ||
256 | </eStructuralFeatures> | ||
257 | <eStructuralFeatures xsi:type="ecore:EReference" name="eSuperTypes" upperBound="-1" | ||
258 | eType="#//EClass" unsettable="true"> | ||
259 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
260 | <details key="kind" value="attribute"/> | ||
261 | <details key="name" value="eSuperTypes"/> | ||
262 | </eAnnotations> | ||
263 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
264 | <details key="suppressedIsSetVisibility" value="true"/> | ||
265 | <details key="suppressedUnsetVisibility" value="true"/> | ||
266 | </eAnnotations> | ||
267 | </eStructuralFeatures> | ||
268 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="interface" eType="#//EBoolean"> | ||
269 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
270 | <details key="kind" value="attribute"/> | ||
271 | <details key="name" value="interface"/> | ||
272 | </eAnnotations> | ||
273 | </eStructuralFeatures> | ||
274 | </eClassifiers> | ||
275 | <eClassifiers xsi:type="ecore:EClass" name="EClassifier" abstract="true" eSuperTypes="#//ENamedElement"> | ||
276 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
277 | <details key="name" value="EClassifier"/> | ||
278 | <details key="kind" value="elementOnly"/> | ||
279 | </eAnnotations> | ||
280 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
281 | <details key="constraints" value="WellFormedInstanceTypeName UniqueTypeParameterNames"/> | ||
282 | </eAnnotations> | ||
283 | <eOperations name="isInstance" eType="#//EBoolean"> | ||
284 | <eParameters name="object" eType="#//EJavaObject"/> | ||
285 | </eOperations> | ||
286 | <eOperations name="getClassifierID" eType="#//EInt"/> | ||
287 | <eStructuralFeatures xsi:type="ecore:EReference" name="eTypeParameters" upperBound="-1" | ||
288 | eType="#//ETypeParameter" containment="true"> | ||
289 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
290 | <details key="kind" value="element"/> | ||
291 | <details key="name" value="eTypeParameters"/> | ||
292 | </eAnnotations> | ||
293 | </eStructuralFeatures> | ||
294 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValue" eType="#//EJavaObject" | ||
295 | changeable="false" volatile="true" transient="true" derived="true"> | ||
296 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
297 | <details key="kind" value="attribute"/> | ||
298 | <details key="name" value="defaultValue"/> | ||
299 | </eAnnotations> | ||
300 | </eStructuralFeatures> | ||
301 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="instanceClass" changeable="false" | ||
302 | volatile="true" transient="true" derived="true"> | ||
303 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
304 | <details key="kind" value="attribute"/> | ||
305 | <details key="name" value="instanceClass"/> | ||
306 | </eAnnotations> | ||
307 | <eGenericType eClassifier="#//EJavaClass"> | ||
308 | <eTypeArguments/> | ||
309 | </eGenericType> | ||
310 | </eStructuralFeatures> | ||
311 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="instanceClassName" eType="#//EString" | ||
312 | volatile="true" unsettable="true"> | ||
313 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
314 | <details key="kind" value="attribute"/> | ||
315 | <details key="name" value="instanceClassName"/> | ||
316 | </eAnnotations> | ||
317 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
318 | <details key="suppressedIsSetVisibility" value="true"/> | ||
319 | <details key="suppressedUnsetVisibility" value="true"/> | ||
320 | </eAnnotations> | ||
321 | </eStructuralFeatures> | ||
322 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="instanceTypeName" eType="#//EString" | ||
323 | volatile="true" unsettable="true"> | ||
324 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
325 | <details key="kind" value="attribute"/> | ||
326 | <details key="name" value="instanceTypeName"/> | ||
327 | </eAnnotations> | ||
328 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
329 | <details key="suppressedIsSetVisibility" value="true"/> | ||
330 | <details key="suppressedUnsetVisibility" value="true"/> | ||
331 | </eAnnotations> | ||
332 | </eStructuralFeatures> | ||
333 | <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" eType="#//EPackage" | ||
334 | transient="true" eOpposite="#//EPackage/eClassifiers"/> | ||
335 | </eClassifiers> | ||
336 | <eClassifiers xsi:type="ecore:EClass" name="EDataType" eSuperTypes="#//EClassifier"> | ||
337 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
338 | <details key="name" value="EDataType"/> | ||
339 | <details key="kind" value="elementOnly"/> | ||
340 | </eAnnotations> | ||
341 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="serializable" eType="#//EBoolean" | ||
342 | defaultValueLiteral="true"> | ||
343 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
344 | <details key="kind" value="attribute"/> | ||
345 | <details key="name" value="serializable"/> | ||
346 | </eAnnotations> | ||
347 | </eStructuralFeatures> | ||
348 | </eClassifiers> | ||
349 | <eClassifiers xsi:type="ecore:EDataType" name="EDate" instanceClassName="java.util.Date"> | ||
350 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
351 | <details key="name" value="EDate"/> | ||
352 | </eAnnotations> | ||
353 | </eClassifiers> | ||
354 | <eClassifiers xsi:type="ecore:EDataType" name="EDiagnosticChain" instanceClassName="org.eclipse.emf.common.util.DiagnosticChain" | ||
355 | serializable="false"> | ||
356 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
357 | <details key="name" value="EDiagnosticChain"/> | ||
358 | </eAnnotations> | ||
359 | </eClassifiers> | ||
360 | <eClassifiers xsi:type="ecore:EDataType" name="EDouble" instanceClassName="double"> | ||
361 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
362 | <details key="name" value="EDouble"/> | ||
363 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#double"/> | ||
364 | </eAnnotations> | ||
365 | </eClassifiers> | ||
366 | <eClassifiers xsi:type="ecore:EDataType" name="EDoubleObject" instanceClassName="java.lang.Double"> | ||
367 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
368 | <details key="name" value="EDouble:Object"/> | ||
369 | <details key="baseType" value="EDouble"/> | ||
370 | </eAnnotations> | ||
371 | </eClassifiers> | ||
372 | <eClassifiers xsi:type="ecore:EDataType" name="EEList" instanceClassName="org.eclipse.emf.common.util.EList" | ||
373 | serializable="false"> | ||
374 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
375 | <details key="name" value="EEList"/> | ||
376 | </eAnnotations> | ||
377 | <eTypeParameters name="E"/> | ||
378 | </eClassifiers> | ||
379 | <eClassifiers xsi:type="ecore:EClass" name="EEnum" eSuperTypes="#//EDataType"> | ||
380 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
381 | <details key="name" value="EEnum"/> | ||
382 | <details key="kind" value="elementOnly"/> | ||
383 | </eAnnotations> | ||
384 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
385 | <details key="constraints" value="UniqueEnumeratorNames UniqueEnumeratorLiterals"/> | ||
386 | </eAnnotations> | ||
387 | <eOperations name="getEEnumLiteral" eType="#//EEnumLiteral"> | ||
388 | <eParameters name="name" eType="#//EString"/> | ||
389 | </eOperations> | ||
390 | <eOperations name="getEEnumLiteral" eType="#//EEnumLiteral"> | ||
391 | <eParameters name="value" eType="#//EInt"/> | ||
392 | </eOperations> | ||
393 | <eOperations name="getEEnumLiteralByLiteral" eType="#//EEnumLiteral"> | ||
394 | <eParameters name="literal" eType="#//EString"/> | ||
395 | </eOperations> | ||
396 | <eStructuralFeatures xsi:type="ecore:EReference" name="eLiterals" upperBound="-1" | ||
397 | eType="#//EEnumLiteral" containment="true" resolveProxies="false" eOpposite="#//EEnumLiteral/eEnum"> | ||
398 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
399 | <details key="kind" value="element"/> | ||
400 | <details key="name" value="eLiterals"/> | ||
401 | </eAnnotations> | ||
402 | </eStructuralFeatures> | ||
403 | </eClassifiers> | ||
404 | <eClassifiers xsi:type="ecore:EDataType" name="EEnumerator" instanceClassName="org.eclipse.emf.common.util.Enumerator" | ||
405 | serializable="false"> | ||
406 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
407 | <details key="name" value="EEnumerator"/> | ||
408 | </eAnnotations> | ||
409 | </eClassifiers> | ||
410 | <eClassifiers xsi:type="ecore:EClass" name="EEnumLiteral" eSuperTypes="#//ENamedElement"> | ||
411 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
412 | <details key="name" value="EEnumLiteral"/> | ||
413 | <details key="kind" value="elementOnly"/> | ||
414 | </eAnnotations> | ||
415 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="instance" eType="#//EEnumerator" | ||
416 | transient="true"> | ||
417 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
418 | <details key="kind" value="attribute"/> | ||
419 | <details key="name" value="instance"/> | ||
420 | </eAnnotations> | ||
421 | </eStructuralFeatures> | ||
422 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="literal" eType="#//EString"> | ||
423 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
424 | <details key="kind" value="attribute"/> | ||
425 | <details key="name" value="literal"/> | ||
426 | </eAnnotations> | ||
427 | </eStructuralFeatures> | ||
428 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//EInt"> | ||
429 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
430 | <details key="kind" value="attribute"/> | ||
431 | <details key="name" value="value"/> | ||
432 | </eAnnotations> | ||
433 | </eStructuralFeatures> | ||
434 | <eStructuralFeatures xsi:type="ecore:EReference" name="eEnum" eType="#//EEnum" | ||
435 | transient="true" eOpposite="#//EEnum/eLiterals"/> | ||
436 | </eClassifiers> | ||
437 | <eClassifiers xsi:type="ecore:EClass" name="EFactory" eSuperTypes="#//EModelElement"> | ||
438 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
439 | <details key="name" value="EFactory"/> | ||
440 | <details key="kind" value="elementOnly"/> | ||
441 | </eAnnotations> | ||
442 | <eOperations name="create" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"> | ||
443 | <eParameters name="eClass" eType="#//EClass"/> | ||
444 | </eOperations> | ||
445 | <eOperations name="createFromString" eType="#//EJavaObject"> | ||
446 | <eParameters name="eDataType" eType="#//EDataType"/> | ||
447 | <eParameters name="literalValue" eType="#//EString"/> | ||
448 | </eOperations> | ||
449 | <eOperations name="convertToString" eType="#//EString"> | ||
450 | <eParameters name="eDataType" eType="#//EDataType"/> | ||
451 | <eParameters name="instanceValue" eType="#//EJavaObject"/> | ||
452 | </eOperations> | ||
453 | <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" lowerBound="1" | ||
454 | eType="#//EPackage" transient="true" resolveProxies="false"> | ||
455 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
456 | <details key="kind" value="attribute"/> | ||
457 | <details key="name" value="ePackage"/> | ||
458 | </eAnnotations> | ||
459 | </eStructuralFeatures> | ||
460 | </eClassifiers> | ||
461 | <eClassifiers xsi:type="ecore:EDataType" name="EFeatureMap" instanceClassName="org.eclipse.emf.ecore.util.FeatureMap" | ||
462 | serializable="false"> | ||
463 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
464 | <details key="name" value="EFeatureMap"/> | ||
465 | </eAnnotations> | ||
466 | </eClassifiers> | ||
467 | <eClassifiers xsi:type="ecore:EDataType" name="EFeatureMapEntry" instanceClassName="org.eclipse.emf.ecore.util.FeatureMap$Entry" | ||
468 | serializable="false"> | ||
469 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
470 | <details key="name" value="EFeatureMapEntry"/> | ||
471 | </eAnnotations> | ||
472 | </eClassifiers> | ||
473 | <eClassifiers xsi:type="ecore:EDataType" name="EFloat" instanceClassName="float"> | ||
474 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
475 | <details key="name" value="EFloat"/> | ||
476 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#float"/> | ||
477 | </eAnnotations> | ||
478 | </eClassifiers> | ||
479 | <eClassifiers xsi:type="ecore:EDataType" name="EFloatObject" instanceClassName="java.lang.Float"> | ||
480 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
481 | <details key="name" value="EFloat:Object"/> | ||
482 | <details key="baseType" value="EFloat"/> | ||
483 | </eAnnotations> | ||
484 | </eClassifiers> | ||
485 | <eClassifiers xsi:type="ecore:EClass" name="EGenericType"> | ||
486 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
487 | <details key="name" value="EGenericType"/> | ||
488 | <details key="kind" value="elementOnly"/> | ||
489 | </eAnnotations> | ||
490 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
491 | <details key="constraints" value="ConsistentType ConsistentBounds ConsistentArguments"/> | ||
492 | </eAnnotations> | ||
493 | <eStructuralFeatures xsi:type="ecore:EReference" name="eUpperBound" eType="#//EGenericType" | ||
494 | containment="true" resolveProxies="false"> | ||
495 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
496 | <details key="kind" value="element"/> | ||
497 | <details key="name" value="eUpperBound"/> | ||
498 | </eAnnotations> | ||
499 | </eStructuralFeatures> | ||
500 | <eStructuralFeatures xsi:type="ecore:EReference" name="eTypeArguments" upperBound="-1" | ||
501 | eType="#//EGenericType" containment="true" resolveProxies="false"> | ||
502 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
503 | <details key="kind" value="element"/> | ||
504 | <details key="name" value="eTypeArguments"/> | ||
505 | </eAnnotations> | ||
506 | </eStructuralFeatures> | ||
507 | <eStructuralFeatures xsi:type="ecore:EReference" name="eLowerBound" eType="#//EGenericType" | ||
508 | containment="true" resolveProxies="false"> | ||
509 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
510 | <details key="kind" value="element"/> | ||
511 | <details key="name" value="eLowerBound"/> | ||
512 | </eAnnotations> | ||
513 | </eStructuralFeatures> | ||
514 | <eStructuralFeatures xsi:type="ecore:EReference" name="eClassifier" eType="#//EClassifier"> | ||
515 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
516 | <details key="kind" value="attribute"/> | ||
517 | <details key="name" value="eClassifier"/> | ||
518 | </eAnnotations> | ||
519 | </eStructuralFeatures> | ||
520 | <eStructuralFeatures xsi:type="ecore:EReference" name="eRawType" lowerBound="1" | ||
521 | eType="#//EClassifier" changeable="false" transient="true" derived="true"> | ||
522 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
523 | <details key="kind" value="attribute"/> | ||
524 | <details key="name" value="eRawType"/> | ||
525 | </eAnnotations> | ||
526 | </eStructuralFeatures> | ||
527 | <eStructuralFeatures xsi:type="ecore:EReference" name="eTypeParameter" eType="#//ETypeParameter" | ||
528 | resolveProxies="false"> | ||
529 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
530 | <details key="kind" value="attribute"/> | ||
531 | <details key="name" value="eTypeParameter"/> | ||
532 | </eAnnotations> | ||
533 | </eStructuralFeatures> | ||
534 | </eClassifiers> | ||
535 | <eClassifiers xsi:type="ecore:EDataType" name="EInt" instanceClassName="int"> | ||
536 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
537 | <details key="name" value="EInt"/> | ||
538 | </eAnnotations> | ||
539 | </eClassifiers> | ||
540 | <eClassifiers xsi:type="ecore:EDataType" name="EIntegerObject" instanceClassName="java.lang.Integer"> | ||
541 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
542 | <details key="name" value="EInt:Object"/> | ||
543 | <details key="baseType" value="EInt"/> | ||
544 | </eAnnotations> | ||
545 | </eClassifiers> | ||
546 | <eClassifiers xsi:type="ecore:EDataType" name="EInvocationTargetException" instanceClassName="java.lang.reflect.InvocationTargetException" | ||
547 | serializable="false"> | ||
548 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
549 | <details key="name" value="EInvocationTargetException"/> | ||
550 | </eAnnotations> | ||
551 | </eClassifiers> | ||
552 | <eClassifiers xsi:type="ecore:EDataType" name="EJavaClass" instanceClassName="java.lang.Class"> | ||
553 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
554 | <details key="name" value="EJavaClass"/> | ||
555 | </eAnnotations> | ||
556 | <eTypeParameters name="T"/> | ||
557 | </eClassifiers> | ||
558 | <eClassifiers xsi:type="ecore:EDataType" name="EJavaObject" instanceClassName="java.lang.Object"> | ||
559 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
560 | <details key="name" value="EJavaObject"/> | ||
561 | </eAnnotations> | ||
562 | </eClassifiers> | ||
563 | <eClassifiers xsi:type="ecore:EDataType" name="ELong" instanceClassName="long"> | ||
564 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
565 | <details key="name" value="ELong"/> | ||
566 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#long"/> | ||
567 | </eAnnotations> | ||
568 | </eClassifiers> | ||
569 | <eClassifiers xsi:type="ecore:EDataType" name="ELongObject" instanceClassName="java.lang.Long"> | ||
570 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
571 | <details key="name" value="ELong:Object"/> | ||
572 | <details key="baseType" value="ELong"/> | ||
573 | </eAnnotations> | ||
574 | </eClassifiers> | ||
575 | <eClassifiers xsi:type="ecore:EDataType" name="EMap" instanceClassName="java.util.Map" | ||
576 | serializable="false"> | ||
577 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
578 | <details key="name" value="EMap"/> | ||
579 | </eAnnotations> | ||
580 | <eTypeParameters name="K"/> | ||
581 | <eTypeParameters name="V"/> | ||
582 | </eClassifiers> | ||
583 | <eClassifiers xsi:type="ecore:EClass" name="EModelElement" abstract="true"> | ||
584 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
585 | <details key="name" value="EModelElement"/> | ||
586 | <details key="kind" value="elementOnly"/> | ||
587 | </eAnnotations> | ||
588 | <eOperations name="getEAnnotation" eType="#//EAnnotation"> | ||
589 | <eParameters name="source" eType="#//EString"/> | ||
590 | </eOperations> | ||
591 | <eStructuralFeatures xsi:type="ecore:EReference" name="eAnnotations" upperBound="-1" | ||
592 | eType="#//EAnnotation" containment="true" resolveProxies="false" eOpposite="#//EAnnotation/eModelElement"> | ||
593 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
594 | <details key="kind" value="element"/> | ||
595 | <details key="name" value="eAnnotations"/> | ||
596 | </eAnnotations> | ||
597 | </eStructuralFeatures> | ||
598 | </eClassifiers> | ||
599 | <eClassifiers xsi:type="ecore:EClass" name="ENamedElement" abstract="true" eSuperTypes="#//EModelElement"> | ||
600 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
601 | <details key="name" value="ENamedElement"/> | ||
602 | <details key="kind" value="elementOnly"/> | ||
603 | </eAnnotations> | ||
604 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
605 | <details key="constraints" value="WellFormedName"/> | ||
606 | </eAnnotations> | ||
607 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="#//EString"> | ||
608 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
609 | <details key="kind" value="attribute"/> | ||
610 | <details key="name" value="name"/> | ||
611 | </eAnnotations> | ||
612 | </eStructuralFeatures> | ||
613 | </eClassifiers> | ||
614 | <eClassifiers xsi:type="ecore:EClass" name="EObject"> | ||
615 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
616 | <details key="name" value="EObject"/> | ||
617 | <details key="kind" value="empty"/> | ||
618 | </eAnnotations> | ||
619 | <eOperations name="eClass" eType="#//EClass"/> | ||
620 | <eOperations name="eIsProxy" eType="#//EBoolean"/> | ||
621 | <eOperations name="eResource" eType="#//EResource"/> | ||
622 | <eOperations name="eContainer" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/> | ||
623 | <eOperations name="eContainingFeature" eType="#//EStructuralFeature"/> | ||
624 | <eOperations name="eContainmentFeature" eType="#//EReference"/> | ||
625 | <eOperations name="eContents"> | ||
626 | <eGenericType eClassifier="#//EEList"> | ||
627 | <eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/> | ||
628 | </eGenericType> | ||
629 | </eOperations> | ||
630 | <eOperations name="eAllContents"> | ||
631 | <eGenericType eClassifier="#//ETreeIterator"> | ||
632 | <eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/> | ||
633 | </eGenericType> | ||
634 | </eOperations> | ||
635 | <eOperations name="eCrossReferences"> | ||
636 | <eGenericType eClassifier="#//EEList"> | ||
637 | <eTypeArguments eClassifier="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/> | ||
638 | </eGenericType> | ||
639 | </eOperations> | ||
640 | <eOperations name="eGet" eType="#//EJavaObject"> | ||
641 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
642 | </eOperations> | ||
643 | <eOperations name="eGet" eType="#//EJavaObject"> | ||
644 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
645 | <eParameters name="resolve" eType="#//EBoolean"/> | ||
646 | </eOperations> | ||
647 | <eOperations name="eSet"> | ||
648 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
649 | <eParameters name="newValue" eType="#//EJavaObject"/> | ||
650 | </eOperations> | ||
651 | <eOperations name="eIsSet" eType="#//EBoolean"> | ||
652 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
653 | </eOperations> | ||
654 | <eOperations name="eUnset"> | ||
655 | <eParameters name="feature" eType="#//EStructuralFeature"/> | ||
656 | </eOperations> | ||
657 | <eOperations name="eInvoke" eType="#//EJavaObject" eExceptions="#//EInvocationTargetException"> | ||
658 | <eParameters name="operation" eType="#//EOperation"/> | ||
659 | <eParameters name="arguments"> | ||
660 | <eGenericType eClassifier="#//EEList"> | ||
661 | <eTypeArguments/> | ||
662 | </eGenericType> | ||
663 | </eParameters> | ||
664 | </eOperations> | ||
665 | </eClassifiers> | ||
666 | <eClassifiers xsi:type="ecore:EClass" name="EOperation" eSuperTypes="#//ETypedElement"> | ||
667 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
668 | <details key="name" value="EOperation"/> | ||
669 | <details key="kind" value="elementOnly"/> | ||
670 | </eAnnotations> | ||
671 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
672 | <details key="constraints" value="UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid"/> | ||
673 | </eAnnotations> | ||
674 | <eOperations name="getOperationID" eType="#//EInt"/> | ||
675 | <eOperations name="isOverrideOf" eType="#//EBoolean"> | ||
676 | <eParameters name="someOperation" eType="#//EOperation"/> | ||
677 | </eOperations> | ||
678 | <eStructuralFeatures xsi:type="ecore:EReference" name="eTypeParameters" upperBound="-1" | ||
679 | eType="#//ETypeParameter" containment="true"> | ||
680 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
681 | <details key="kind" value="element"/> | ||
682 | <details key="name" value="eTypeParameters"/> | ||
683 | </eAnnotations> | ||
684 | </eStructuralFeatures> | ||
685 | <eStructuralFeatures xsi:type="ecore:EReference" name="eParameters" upperBound="-1" | ||
686 | eType="#//EParameter" containment="true" resolveProxies="false" eOpposite="#//EParameter/eOperation"> | ||
687 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
688 | <details key="kind" value="element"/> | ||
689 | <details key="name" value="eParameters"/> | ||
690 | </eAnnotations> | ||
691 | </eStructuralFeatures> | ||
692 | <eStructuralFeatures xsi:type="ecore:EReference" name="eGenericExceptions" upperBound="-1" | ||
693 | eType="#//EGenericType" unsettable="true" containment="true" resolveProxies="false"> | ||
694 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
695 | <details key="kind" value="element"/> | ||
696 | <details key="name" value="eGenericExceptions"/> | ||
697 | </eAnnotations> | ||
698 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
699 | <details key="suppressedIsSetVisibility" value="true"/> | ||
700 | <details key="suppressedUnsetVisibility" value="true"/> | ||
701 | </eAnnotations> | ||
702 | </eStructuralFeatures> | ||
703 | <eStructuralFeatures xsi:type="ecore:EReference" name="eExceptions" upperBound="-1" | ||
704 | eType="#//EClassifier" unsettable="true"> | ||
705 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
706 | <details key="kind" value="attribute"/> | ||
707 | <details key="name" value="eExceptions"/> | ||
708 | </eAnnotations> | ||
709 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
710 | <details key="suppressedIsSetVisibility" value="true"/> | ||
711 | <details key="suppressedUnsetVisibility" value="true"/> | ||
712 | </eAnnotations> | ||
713 | </eStructuralFeatures> | ||
714 | <eStructuralFeatures xsi:type="ecore:EReference" name="eContainingClass" eType="#//EClass" | ||
715 | transient="true" eOpposite="#//EClass/eOperations"/> | ||
716 | </eClassifiers> | ||
717 | <eClassifiers xsi:type="ecore:EClass" name="EPackage" eSuperTypes="#//ENamedElement"> | ||
718 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
719 | <details key="name" value="EPackage"/> | ||
720 | <details key="kind" value="elementOnly"/> | ||
721 | </eAnnotations> | ||
722 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
723 | <details key="constraints" value="WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs"/> | ||
724 | </eAnnotations> | ||
725 | <eOperations name="getEClassifier" eType="#//EClassifier"> | ||
726 | <eParameters name="name" eType="#//EString"/> | ||
727 | </eOperations> | ||
728 | <eStructuralFeatures xsi:type="ecore:EReference" name="eClassifiers" upperBound="-1" | ||
729 | eType="#//EClassifier" containment="true" eOpposite="#//EClassifier/ePackage"> | ||
730 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
731 | <details key="kind" value="element"/> | ||
732 | <details key="name" value="eClassifiers"/> | ||
733 | </eAnnotations> | ||
734 | </eStructuralFeatures> | ||
735 | <eStructuralFeatures xsi:type="ecore:EReference" name="eSubpackages" upperBound="-1" | ||
736 | eType="#//EPackage" containment="true" eOpposite="#//EPackage/eSuperPackage"> | ||
737 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
738 | <details key="kind" value="element"/> | ||
739 | <details key="name" value="eSubpackages"/> | ||
740 | </eAnnotations> | ||
741 | </eStructuralFeatures> | ||
742 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="nsPrefix" eType="#//EString"> | ||
743 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
744 | <details key="kind" value="attribute"/> | ||
745 | <details key="name" value="nsPrefix"/> | ||
746 | </eAnnotations> | ||
747 | </eStructuralFeatures> | ||
748 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="nsURI" eType="#//EString"> | ||
749 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
750 | <details key="kind" value="attribute"/> | ||
751 | <details key="name" value="nsURI"/> | ||
752 | </eAnnotations> | ||
753 | </eStructuralFeatures> | ||
754 | <eStructuralFeatures xsi:type="ecore:EReference" name="eSuperPackage" eType="#//EPackage" | ||
755 | transient="true" eOpposite="#//EPackage/eSubpackages"/> | ||
756 | </eClassifiers> | ||
757 | <eClassifiers xsi:type="ecore:EClass" name="EParameter" eSuperTypes="#//ETypedElement"> | ||
758 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
759 | <details key="name" value="EParameter"/> | ||
760 | <details key="kind" value="elementOnly"/> | ||
761 | </eAnnotations> | ||
762 | <eStructuralFeatures xsi:type="ecore:EReference" name="eOperation" eType="#//EOperation" | ||
763 | transient="true" eOpposite="#//EOperation/eParameters"/> | ||
764 | </eClassifiers> | ||
765 | <eClassifiers xsi:type="ecore:EClass" name="EReference" eSuperTypes="#//EStructuralFeature"> | ||
766 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
767 | <details key="name" value="EReference"/> | ||
768 | <details key="kind" value="elementOnly"/> | ||
769 | </eAnnotations> | ||
770 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
771 | <details key="constraints" value="ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer"/> | ||
772 | </eAnnotations> | ||
773 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="container" eType="#//EBoolean" | ||
774 | changeable="false" volatile="true" transient="true" derived="true"> | ||
775 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
776 | <details key="kind" value="attribute"/> | ||
777 | <details key="name" value="container"/> | ||
778 | </eAnnotations> | ||
779 | </eStructuralFeatures> | ||
780 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="containment" eType="#//EBoolean"> | ||
781 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
782 | <details key="kind" value="attribute"/> | ||
783 | <details key="name" value="containment"/> | ||
784 | </eAnnotations> | ||
785 | </eStructuralFeatures> | ||
786 | <eStructuralFeatures xsi:type="ecore:EReference" name="eKeys" upperBound="-1" | ||
787 | eType="#//EAttribute"> | ||
788 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
789 | <details key="kind" value="attribute"/> | ||
790 | <details key="name" value="eKeys"/> | ||
791 | </eAnnotations> | ||
792 | </eStructuralFeatures> | ||
793 | <eStructuralFeatures xsi:type="ecore:EReference" name="eOpposite" eType="#//EReference"> | ||
794 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
795 | <details key="kind" value="attribute"/> | ||
796 | <details key="name" value="eOpposite"/> | ||
797 | </eAnnotations> | ||
798 | </eStructuralFeatures> | ||
799 | <eStructuralFeatures xsi:type="ecore:EReference" name="eReferenceType" lowerBound="1" | ||
800 | eType="#//EClass" changeable="false" volatile="true" transient="true" derived="true"> | ||
801 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
802 | <details key="kind" value="attribute"/> | ||
803 | <details key="name" value="eReferenceType"/> | ||
804 | </eAnnotations> | ||
805 | </eStructuralFeatures> | ||
806 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="resolveProxies" eType="#//EBoolean" | ||
807 | defaultValueLiteral="true"> | ||
808 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
809 | <details key="kind" value="attribute"/> | ||
810 | <details key="name" value="resolveProxies"/> | ||
811 | </eAnnotations> | ||
812 | </eStructuralFeatures> | ||
813 | </eClassifiers> | ||
814 | <eClassifiers xsi:type="ecore:EDataType" name="EResource" instanceClassName="org.eclipse.emf.ecore.resource.Resource" | ||
815 | serializable="false"> | ||
816 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
817 | <details key="name" value="EResource"/> | ||
818 | </eAnnotations> | ||
819 | </eClassifiers> | ||
820 | <eClassifiers xsi:type="ecore:EDataType" name="EResourceSet" instanceClassName="org.eclipse.emf.ecore.resource.ResourceSet" | ||
821 | serializable="false"> | ||
822 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
823 | <details key="name" value="EResourceSet"/> | ||
824 | </eAnnotations> | ||
825 | </eClassifiers> | ||
826 | <eClassifiers xsi:type="ecore:EDataType" name="EShort" instanceClassName="short"> | ||
827 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
828 | <details key="name" value="EShort"/> | ||
829 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#short"/> | ||
830 | </eAnnotations> | ||
831 | </eClassifiers> | ||
832 | <eClassifiers xsi:type="ecore:EDataType" name="EShortObject" instanceClassName="java.lang.Short"> | ||
833 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
834 | <details key="name" value="EShort:Object"/> | ||
835 | <details key="baseType" value="EShort"/> | ||
836 | </eAnnotations> | ||
837 | </eClassifiers> | ||
838 | <eClassifiers xsi:type="ecore:EDataType" name="EString" instanceClassName="java.lang.String"> | ||
839 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
840 | <details key="name" value="EString"/> | ||
841 | <details key="baseType" value="http://www.eclipse.org/emf/2003/XMLType#string"/> | ||
842 | </eAnnotations> | ||
843 | </eClassifiers> | ||
844 | <eClassifiers xsi:type="ecore:EClass" name="EStringToStringMapEntry" instanceClassName="java.util.Map$Entry"> | ||
845 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
846 | <details key="name" value="EStringToStringMapEntry"/> | ||
847 | <details key="kind" value="empty"/> | ||
848 | </eAnnotations> | ||
849 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="#//EString"> | ||
850 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
851 | <details key="kind" value="attribute"/> | ||
852 | <details key="name" value="key"/> | ||
853 | </eAnnotations> | ||
854 | </eStructuralFeatures> | ||
855 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//EString"> | ||
856 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
857 | <details key="kind" value="attribute"/> | ||
858 | <details key="name" value="value"/> | ||
859 | </eAnnotations> | ||
860 | </eStructuralFeatures> | ||
861 | </eClassifiers> | ||
862 | <eClassifiers xsi:type="ecore:EClass" name="EStructuralFeature" abstract="true" | ||
863 | eSuperTypes="#//ETypedElement"> | ||
864 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
865 | <details key="name" value="EStructuralFeature"/> | ||
866 | <details key="kind" value="elementOnly"/> | ||
867 | </eAnnotations> | ||
868 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
869 | <details key="constraints" value="ValidDefaultValueLiteral"/> | ||
870 | </eAnnotations> | ||
871 | <eOperations name="getFeatureID" eType="#//EInt"/> | ||
872 | <eOperations name="getContainerClass"> | ||
873 | <eGenericType eClassifier="#//EJavaClass"> | ||
874 | <eTypeArguments/> | ||
875 | </eGenericType> | ||
876 | </eOperations> | ||
877 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="changeable" eType="#//EBoolean" | ||
878 | defaultValueLiteral="true"> | ||
879 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
880 | <details key="kind" value="attribute"/> | ||
881 | <details key="name" value="changeable"/> | ||
882 | </eAnnotations> | ||
883 | </eStructuralFeatures> | ||
884 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValue" eType="#//EJavaObject" | ||
885 | changeable="false" volatile="true" transient="true" derived="true"> | ||
886 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
887 | <details key="kind" value="attribute"/> | ||
888 | <details key="name" value="defaultValue"/> | ||
889 | </eAnnotations> | ||
890 | </eStructuralFeatures> | ||
891 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValueLiteral" eType="#//EString"> | ||
892 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
893 | <details key="kind" value="attribute"/> | ||
894 | <details key="name" value="defaultValueLiteral"/> | ||
895 | </eAnnotations> | ||
896 | </eStructuralFeatures> | ||
897 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="derived" eType="#//EBoolean"> | ||
898 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
899 | <details key="kind" value="attribute"/> | ||
900 | <details key="name" value="derived"/> | ||
901 | </eAnnotations> | ||
902 | </eStructuralFeatures> | ||
903 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="transient" eType="#//EBoolean"> | ||
904 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
905 | <details key="kind" value="attribute"/> | ||
906 | <details key="name" value="transient"/> | ||
907 | </eAnnotations> | ||
908 | </eStructuralFeatures> | ||
909 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="unsettable" eType="#//EBoolean"> | ||
910 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
911 | <details key="kind" value="attribute"/> | ||
912 | <details key="name" value="unsettable"/> | ||
913 | </eAnnotations> | ||
914 | </eStructuralFeatures> | ||
915 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="volatile" eType="#//EBoolean"> | ||
916 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
917 | <details key="kind" value="attribute"/> | ||
918 | <details key="name" value="volatile"/> | ||
919 | </eAnnotations> | ||
920 | </eStructuralFeatures> | ||
921 | <eStructuralFeatures xsi:type="ecore:EReference" name="eContainingClass" eType="#//EClass" | ||
922 | transient="true" eOpposite="#//EClass/eStructuralFeatures"/> | ||
923 | </eClassifiers> | ||
924 | <eClassifiers xsi:type="ecore:EDataType" name="ETreeIterator" instanceClassName="org.eclipse.emf.common.util.TreeIterator" | ||
925 | serializable="false"> | ||
926 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
927 | <details key="name" value="ETreeIterator"/> | ||
928 | </eAnnotations> | ||
929 | <eTypeParameters name="E"/> | ||
930 | </eClassifiers> | ||
931 | <eClassifiers xsi:type="ecore:EClass" name="ETypedElement" abstract="true" eSuperTypes="#//ENamedElement"> | ||
932 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
933 | <details key="name" value="ETypedElement"/> | ||
934 | <details key="kind" value="elementOnly"/> | ||
935 | </eAnnotations> | ||
936 | <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> | ||
937 | <details key="constraints" value="ValidLowerBound ValidUpperBound ConsistentBounds ValidType"/> | ||
938 | </eAnnotations> | ||
939 | <eStructuralFeatures xsi:type="ecore:EReference" name="eGenericType" eType="#//EGenericType" | ||
940 | volatile="true" unsettable="true" containment="true" resolveProxies="false"> | ||
941 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
942 | <details key="kind" value="element"/> | ||
943 | <details key="name" value="eGenericType"/> | ||
944 | </eAnnotations> | ||
945 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
946 | <details key="suppressedIsSetVisibility" value="true"/> | ||
947 | <details key="suppressedUnsetVisibility" value="true"/> | ||
948 | </eAnnotations> | ||
949 | </eStructuralFeatures> | ||
950 | <eStructuralFeatures xsi:type="ecore:EReference" name="eType" eType="#//EClassifier" | ||
951 | volatile="true" unsettable="true"> | ||
952 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
953 | <details key="kind" value="attribute"/> | ||
954 | <details key="name" value="eType"/> | ||
955 | </eAnnotations> | ||
956 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
957 | <details key="suppressedIsSetVisibility" value="true"/> | ||
958 | <details key="suppressedUnsetVisibility" value="true"/> | ||
959 | </eAnnotations> | ||
960 | </eStructuralFeatures> | ||
961 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="lowerBound" eType="#//EInt"> | ||
962 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
963 | <details key="kind" value="attribute"/> | ||
964 | <details key="name" value="lowerBound"/> | ||
965 | </eAnnotations> | ||
966 | </eStructuralFeatures> | ||
967 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="many" eType="#//EBoolean" | ||
968 | changeable="false" volatile="true" transient="true" derived="true"> | ||
969 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
970 | <details key="kind" value="attribute"/> | ||
971 | <details key="name" value="many"/> | ||
972 | </eAnnotations> | ||
973 | </eStructuralFeatures> | ||
974 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="ordered" eType="#//EBoolean" | ||
975 | defaultValueLiteral="true"> | ||
976 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
977 | <details key="kind" value="attribute"/> | ||
978 | <details key="name" value="ordered"/> | ||
979 | </eAnnotations> | ||
980 | </eStructuralFeatures> | ||
981 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="required" eType="#//EBoolean" | ||
982 | changeable="false" volatile="true" transient="true" derived="true"> | ||
983 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
984 | <details key="kind" value="attribute"/> | ||
985 | <details key="name" value="required"/> | ||
986 | </eAnnotations> | ||
987 | </eStructuralFeatures> | ||
988 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="unique" eType="#//EBoolean" | ||
989 | defaultValueLiteral="true"> | ||
990 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
991 | <details key="kind" value="attribute"/> | ||
992 | <details key="name" value="unique"/> | ||
993 | </eAnnotations> | ||
994 | </eStructuralFeatures> | ||
995 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="upperBound" eType="#//EInt" | ||
996 | defaultValueLiteral="1"> | ||
997 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
998 | <details key="kind" value="attribute"/> | ||
999 | <details key="name" value="upperBound"/> | ||
1000 | </eAnnotations> | ||
1001 | </eStructuralFeatures> | ||
1002 | </eClassifiers> | ||
1003 | <eClassifiers xsi:type="ecore:EClass" name="ETypeParameter" eSuperTypes="#//ENamedElement"> | ||
1004 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
1005 | <details key="name" value="ETypeParameter"/> | ||
1006 | <details key="kind" value="elementOnly"/> | ||
1007 | </eAnnotations> | ||
1008 | <eStructuralFeatures xsi:type="ecore:EReference" name="eBounds" upperBound="-1" | ||
1009 | eType="#//EGenericType" containment="true" resolveProxies="false"> | ||
1010 | <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> | ||
1011 | <details key="kind" value="element"/> | ||
1012 | <details key="name" value="eBounds"/> | ||
1013 | </eAnnotations> | ||
1014 | </eStructuralFeatures> | ||
1015 | </eClassifiers> | ||
1016 | </ecore:EPackage> | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend index 2add9f0e..dfde6593 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend | |||
@@ -18,9 +18,9 @@ import org.eclipse.emf.ecore.EReference | |||
18 | class Main { | 18 | class Main { |
19 | var static Domain d = Domain.Yakindumm; | 19 | var static Domain d = Domain.Yakindumm; |
20 | val static String suffix = '.xmi' | 20 | val static String suffix = '.xmi' |
21 | val static String OUTPUT_FOLDER = "Inputs/yakindumm/human/humanInput100/"; | 21 | val static String OUTPUT_FOLDER = "Inputs/measurement2/yakindu/Alloy/"; |
22 | val static String INPUT_FOLDER = "outputs/Human/"; | 22 | val static String INPUT_FOLDER = "outputs/measurement2/yakindu/Alloy/"; |
23 | val static int NUM_RUNS = 100; | 23 | val static int NUM_RUNS = 1; |
24 | 24 | ||
25 | static class RWInformation{ | 25 | static class RWInformation{ |
26 | public var String inputFolder; | 26 | public var String inputFolder; |
@@ -37,7 +37,6 @@ class Main { | |||
37 | def static void main(String[] args){ | 37 | def static void main(String[] args){ |
38 | //init model | 38 | //init model |
39 | var EPackage metamodel; | 39 | var EPackage metamodel; |
40 | |||
41 | //init viatra engine for the violation checker | 40 | //init viatra engine for the violation checker |
42 | ReteEngine.getClass(); | 41 | ReteEngine.getClass(); |
43 | 42 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend index 4c9246d1..697b2639 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend | |||
@@ -162,9 +162,11 @@ class PartialInterpretationMetricDistance { | |||
162 | def double[] calculateFeature(int step, int violations){ | 162 | def double[] calculateFeature(int step, int violations){ |
163 | var features = newDoubleArrayOfSize(2); | 163 | var features = newDoubleArrayOfSize(2); |
164 | //constant term | 164 | //constant term |
165 | features.set(0, 1); | 165 | features.set(0, 1); //a |
166 | features.set(0, Math.sqrt(step) + 30) | 166 | features.set(0, Math.sqrt(step) + 30) // b |
167 | features.set(1, 1.0 / (step + 30) ); | 167 | features.set(1, 1.0 / (step + 30) );// c |
168 | |||
169 | |||
168 | // features.set(2, violations); | 170 | // features.set(2, violations); |
169 | // features.set(3, Math.pow(violations, 2)); | 171 | // features.set(3, Math.pow(violations, 2)); |
170 | 172 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/GraphStatistic.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/GraphStatistic.xtend index af05a1cd..31788bb2 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/GraphStatistic.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/GraphStatistic.xtend | |||
@@ -186,5 +186,9 @@ class GraphStatistic { | |||
186 | return outgoingEdges; | 186 | return outgoingEdges; |
187 | } | 187 | } |
188 | 188 | ||
189 | def HashMap<String, Multimap<EObject, EObject>> incomingEdges(){ | ||
190 | return incomingEdges; | ||
191 | } | ||
192 | |||
189 | } | 193 | } |
190 | 194 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/GraphReader.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/GraphReader.xtend index 858113e9..053e0da3 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/GraphReader.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/GraphReader.xtend | |||
@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | |||
22 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | 22 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl |
23 | import org.eclipse.emf.ecore.EGenericType | 23 | import org.eclipse.emf.ecore.EGenericType |
24 | import org.eclipse.emf.ecore.EStructuralFeature | 24 | import org.eclipse.emf.ecore.EStructuralFeature |
25 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.metrics.TypedClusteringCoefficientMetric | ||
25 | 26 | ||
26 | class GraphReader{ | 27 | class GraphReader{ |
27 | val ResourceSet resSet = new ResourceSetImpl(); | 28 | val ResourceSet resSet = new ResourceSetImpl(); |
@@ -58,8 +59,6 @@ class GraphReader{ | |||
58 | var count = 1 | 59 | var count = 1 |
59 | //check all files in the directory with suffix | 60 | //check all files in the directory with suffix |
60 | for(String name : dir.list.filter[it| it.endsWith(suffix)]){ | 61 | for(String name : dir.list.filter[it| it.endsWith(suffix)]){ |
61 | println(name) | ||
62 | println(count) | ||
63 | val file = new File(name); | 62 | val file = new File(name); |
64 | val roots = readModel(EObject, path, file.name); | 63 | val roots = readModel(EObject, path, file.name); |
65 | //add a list of metrics | 64 | //add a list of metrics |
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/RepMetricsReader.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/RepMetricsReader.xtend index 06e88efc..2e7be586 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/RepMetricsReader.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/io/RepMetricsReader.xtend | |||
@@ -2,6 +2,7 @@ package ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.io | |||
2 | 2 | ||
3 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app.Domain | 3 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app.Domain |
4 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.metrics.MetricSampleGroup | 4 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.metrics.MetricSampleGroup |
5 | import github.impl.GithubPackageImpl | ||
5 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl.YakindummPackageImpl | 6 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl.YakindummPackageImpl |
6 | import java.util.HashMap | 7 | import java.util.HashMap |
7 | import org.eclipse.emf.ecore.EReference | 8 | import org.eclipse.emf.ecore.EReference |
@@ -19,7 +20,7 @@ class RepMetricsReader { | |||
19 | }else if (d == Domain.Ecore){ | 20 | }else if (d == Domain.Ecore){ |
20 | reader = new GraphReader(EcorePackageImpl.eINSTANCE, '.ecore'); | 21 | reader = new GraphReader(EcorePackageImpl.eINSTANCE, '.ecore'); |
21 | }else if (d == Domain.Github){ | 22 | }else if (d == Domain.Github){ |
22 | // Initialize the reader with github package | 23 | reader = new GraphReader(GithubPackageImpl.eINSTANCE, '.githubmodel') |
23 | } | 24 | } |
24 | 25 | ||
25 | domain = d; | 26 | domain = d; |
@@ -58,6 +59,13 @@ class RepMetricsReader { | |||
58 | nodeTypeSamples.put('EGenericType', 0.002014098690835851); | 59 | nodeTypeSamples.put('EGenericType', 0.002014098690835851); |
59 | nodeTypeSamples.put('EOperation', 0.009415911379657605); | 60 | nodeTypeSamples.put('EOperation', 0.009415911379657605); |
60 | nodeTypeSamples.put('ETypeParameter', 0.0007049345417925478); | 61 | nodeTypeSamples.put('ETypeParameter', 0.0007049345417925478); |
62 | }else if (d == Domain.Github){ | ||
63 | nodeTypeSamples.put('Project', 0.012636538873420432); | ||
64 | nodeTypeSamples.put('Commit', 0.5525808524309276); | ||
65 | nodeTypeSamples.put('User', 0.05847076461769116); | ||
66 | nodeTypeSamples.put('Issue', 0.12743628185907047); | ||
67 | nodeTypeSamples.put('PullRequest', 0.07560505461554937); | ||
68 | nodeTypeSamples.put('IssueEvent', 0.17327050760334123); | ||
61 | } | 69 | } |
62 | 70 | ||
63 | 71 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/metrics/TypedClusteringCoefficientMetric.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/metrics/TypedClusteringCoefficientMetric.xtend index 93f5ccd4..0b6d61c6 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/metrics/TypedClusteringCoefficientMetric.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/metrics/TypedClusteringCoefficientMetric.xtend | |||
@@ -4,6 +4,7 @@ import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.graph.GraphStatis | |||
4 | import java.text.DecimalFormat | 4 | import java.text.DecimalFormat |
5 | import java.util.ArrayList | 5 | import java.util.ArrayList |
6 | import java.util.HashMap | 6 | import java.util.HashMap |
7 | import java.util.HashSet | ||
7 | import org.eclipse.emf.ecore.EObject | 8 | import org.eclipse.emf.ecore.EObject |
8 | 9 | ||
9 | class TypedClusteringCoefficientMetric extends Metric { | 10 | class TypedClusteringCoefficientMetric extends Metric { |
@@ -18,7 +19,9 @@ class TypedClusteringCoefficientMetric extends Metric { | |||
18 | //calculate the metric distribution | 19 | //calculate the metric distribution |
19 | g.allNodes.forEach[n| | 20 | g.allNodes.forEach[n| |
20 | var coef = calculateTCC1(n, g); | 21 | var coef = calculateTCC1(n, g); |
21 | 22 | if(coef > 0){ | |
23 | println(n); | ||
24 | } | ||
22 | //format number to String | 25 | //format number to String |
23 | val value = formatter.format(coef); | 26 | val value = formatter.format(coef); |
24 | if(!map.containsKey(value)){ | 27 | if(!map.containsKey(value)){ |
@@ -61,15 +64,20 @@ class TypedClusteringCoefficientMetric extends Metric { | |||
61 | var triangles = 0; | 64 | var triangles = 0; |
62 | 65 | ||
63 | for(type1 : g.allTypes){ | 66 | for(type1 : g.allTypes){ |
64 | val type1EdgeTargetNodes = g.outgoingEdges.get(type1).values; | 67 | val typed1RelatedOfN = new HashSet<EObject>(g.outgoingEdges.get(type1).get(n)); |
68 | val type1EdgeSourceNodesOfN = new HashSet<EObject>(g.incomingEdges.get(type1).get(n)); | ||
69 | |||
70 | typed1RelatedOfN.addAll(type1EdgeSourceNodesOfN); | ||
71 | |||
72 | |||
65 | 73 | ||
66 | // number of wedges | 74 | // number of wedges |
67 | val d = type1EdgeTargetNodes.size | 75 | val d = typed1RelatedOfN.size |
68 | wedges += d * (d-1) | 76 | wedges += d * (d-1) // we will also count each closed triangle twice |
69 | 77 | ||
70 | // pairs of neighbors | 78 | // pairs of neighbors |
71 | for (n1: type1EdgeTargetNodes) { | 79 | for (n1: typed1RelatedOfN) { |
72 | for (n2: type1EdgeTargetNodes) { | 80 | for (n2: typed1RelatedOfN) { |
73 | for(type2 : g.allTypes){ | 81 | for(type2 : g.allTypes){ |
74 | if ((type1 != type2) && | 82 | if ((type1 != type2) && |
75 | (g.outgoingEdges.get(type2).containsEntry(n1, n2) || | 83 | (g.outgoingEdges.get(type2).containsEntry(n1, n2) || |
@@ -81,10 +89,11 @@ class TypedClusteringCoefficientMetric extends Metric { | |||
81 | } | 89 | } |
82 | } | 90 | } |
83 | } | 91 | } |
92 | |||
84 | if (wedges == 0.0) { | 93 | if (wedges == 0.0) { |
85 | return 0.0 | 94 | return 0.0 |
86 | } else { | 95 | } else { |
87 | return triangles/wedges | 96 | return (triangles as double)/wedges |
88 | } | 97 | } |
89 | } | 98 | } |
90 | } \ No newline at end of file | 99 | } \ No newline at end of file |
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/validation/ViolationCheck.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/validation/ViolationCheck.xtend index 3c98bb1c..4db5f940 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/validation/ViolationCheck.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/validation/ViolationCheck.xtend | |||
@@ -2,7 +2,7 @@ package ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.validation | |||
2 | 2 | ||
3 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app.Domain | 3 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app.Domain |
4 | import com.google.common.reflect.ClassPath | 4 | import com.google.common.reflect.ClassPath |
5 | import ecore.Ecore_pattern | 5 | import ecore.Ecore |
6 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns | 6 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns |
7 | import java.util.ArrayList | 7 | import java.util.ArrayList |
8 | import org.eclipse.emf.ecore.EObject | 8 | import org.eclipse.emf.ecore.EObject |
@@ -23,7 +23,7 @@ class ViolationCheck { | |||
23 | } | 23 | } |
24 | 24 | ||
25 | var constriants = loadConstraints(packageName); | 25 | var constriants = loadConstraints(packageName); |
26 | var collections = new ConstraintCollection(constriants, Ecore_pattern.instance); | 26 | var collections = new ConstraintCollection(constriants, Ecore.instance); |
27 | collections.addModel(root); | 27 | collections.addModel(root); |
28 | var results = collections.calculateViolations(); | 28 | var results = collections.calculateViolations(); |
29 | if(results.size > 0){ | 29 | if(results.size > 0){ |