mirror of
https://github.com/eMoflon/emoflon-neo.git
synced 2024-05-21 04:00:37 +00:00
Cleaned up dev and runtime workspaces, migrated to latest Eclipse version, updated PSFs
This commit is contained in:
parent
81ec74df2a
commit
4f298951e2
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="src-gen"/>
|
||||
<classpathentry kind="src" path="tgg-gen"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ClassInhHier2DB</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD_OPT {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CC {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -15,11 +17,11 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
@ -109,11 +111,11 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CO {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -43,7 +45,6 @@ grammar ClassInhHier2DB_CO {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
|
@ -53,6 +54,7 @@ grammar ClassInhHier2DB_CO {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD_OPT {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_GEN {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,40 +2,42 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_MI {
|
||||
|
||||
PackageToDatabaseRule
|
||||
PackageToDatabaseRule_1
|
||||
PackageToDatabaseRule_3
|
||||
PackageToDatabaseRule_5
|
||||
|
||||
ClassToTableRule
|
||||
ClassToTableRule_1
|
||||
ClassToTableRule_2
|
||||
ClassToTableRule_3
|
||||
ClassToTableRule_7
|
||||
ClassToTableRule_16
|
||||
ClassToTableRule_17
|
||||
ClassToTableRule_25
|
||||
|
||||
SubClassToTableRule
|
||||
SubClassToTableRule_1
|
||||
SubClassToTableRule_4
|
||||
SubClassToTableRule_5
|
||||
SubClassToTableRule_8
|
||||
SubClassToTableRule_9
|
||||
SubClassToTableRule_12
|
||||
SubClassToTableRule_13
|
||||
|
||||
AttributeToColumnRule
|
||||
AttributeToColumnRule_1
|
||||
AttributeToColumnRule_4
|
||||
AttributeToColumnRule_5
|
||||
AttributeToColumnRule_7
|
||||
AttributeToColumnRule_8
|
||||
AttributeToColumnRule_9
|
||||
AttributeToColumnRule_25
|
||||
rules {
|
||||
|
||||
PackageToDatabaseRule
|
||||
PackageToDatabaseRule_1
|
||||
PackageToDatabaseRule_3
|
||||
PackageToDatabaseRule_5
|
||||
|
||||
ClassToTableRule
|
||||
ClassToTableRule_1
|
||||
ClassToTableRule_2
|
||||
ClassToTableRule_3
|
||||
ClassToTableRule_7
|
||||
ClassToTableRule_16
|
||||
ClassToTableRule_17
|
||||
ClassToTableRule_25
|
||||
|
||||
SubClassToTableRule
|
||||
SubClassToTableRule_1
|
||||
SubClassToTableRule_4
|
||||
SubClassToTableRule_5
|
||||
SubClassToTableRule_8
|
||||
SubClassToTableRule_9
|
||||
SubClassToTableRule_12
|
||||
SubClassToTableRule_13
|
||||
|
||||
AttributeToColumnRule
|
||||
AttributeToColumnRule_1
|
||||
AttributeToColumnRule_4
|
||||
AttributeToColumnRule_5
|
||||
AttributeToColumnRule_7
|
||||
AttributeToColumnRule_8
|
||||
AttributeToColumnRule_9
|
||||
AttributeToColumnRule_25
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -43,12 +45,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -63,12 +65,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -134,7 +136,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -148,6 +149,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -174,7 +176,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -188,6 +189,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -214,7 +216,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -225,6 +226,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -251,7 +253,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -262,6 +263,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -321,7 +323,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -335,6 +336,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -358,7 +360,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -372,6 +373,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -724,12 +726,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -764,12 +766,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -804,12 +806,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -841,12 +843,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -911,12 +913,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -948,12 +950,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import org.emoflon.neo.cypher.models.*;
|
|||
|
||||
public class API_Common {
|
||||
// Default values (might have to be changed)
|
||||
public static final String PLATFORM_PLUGIN_URI = "/C:/Users/admin/git/emoflon-neo/";
|
||||
public static final String NEOCORE_URI_INSTALLED = "/C:/Users/admin/git/emoflon-neo/org.emoflon.neo.neocore/";
|
||||
public static final String PLATFORM_PLUGIN_URI = "/Users/anthonyanjorin/git/emoflon-neo/";
|
||||
public static final String NEOCORE_URI_INSTALLED = "/Users/anthonyanjorin/git/emoflon-neo/org.emoflon.neo.neocore/";
|
||||
public static final String PLATFORM_RESOURCE_URI = "../";
|
||||
|
||||
public static NeoCoreBuilder createBuilder() {
|
||||
return new NeoCoreBuilder("bolt://localhost:7687", "neo4j", "test", -5.0, 0.0, -1.0);
|
||||
return new NeoCoreBuilder("bolt://localhost:7687", "neo4j", "test", -5.0, 5.0, -1.0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ClassInhHier2DB_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ClassInhHier2DB_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.classinhhier2db.API_Common;
|
|||
import org.emoflon.neo.api.classinhhier2db.API_ClassInhHier2DB;
|
||||
import org.emoflon.neo.api.classinhhier2db.tgg.API_ClassInhHier2DB_CC;
|
||||
import org.emoflon.neo.api.classinhhier2db.tgg.API_ClassInhHier2DB_GEN;
|
||||
import org.emoflon.neo.api.classinhhier2db.metamodels.API_ClassInheritanceHierarchy;
|
||||
import org.emoflon.neo.api.classinhhier2db.metamodels.API_Database;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.CCReprocessor;
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ClassInhHier2DB_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ClassInhHier2DB_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.classinhhier2db.API_Common;
|
|||
import org.emoflon.neo.api.classinhhier2db.API_ClassInhHier2DB;
|
||||
import org.emoflon.neo.api.classinhhier2db.tgg.API_ClassInhHier2DB_FWD_OPT;
|
||||
import org.emoflon.neo.api.classinhhier2db.tgg.API_ClassInhHier2DB_GEN;
|
||||
import org.emoflon.neo.api.classinhhier2db.metamodels.API_ClassInheritanceHierarchy;
|
||||
import org.emoflon.neo.api.classinhhier2db.metamodels.API_Database;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.FWD_OPTReprocessor;
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_BWD_OPT {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CC {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -15,11 +17,11 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
@ -109,11 +111,11 @@ grammar ClassInhHier2DB_CC {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
}
|
||||
|
||||
table:Table {
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_CO {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -43,7 +45,6 @@ grammar ClassInhHier2DB_CO {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
}
|
||||
|
||||
db:DB {
|
||||
|
@ -53,6 +54,7 @@ grammar ClassInhHier2DB_CO {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_FWD_OPT {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
|
|
@ -2,12 +2,14 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_GEN {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
rules {
|
||||
PackageToDatabaseRule
|
||||
ClassToTableRule
|
||||
SubClassToTableRule
|
||||
AttributeToColumnRule
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
++classpackage:ClassPackage {
|
||||
.enamespace := <__srcModelName>
|
||||
|
|
|
@ -2,40 +2,42 @@ import "platform:/resource/ClassInhHier2DB/src/metamodels/ClassInheritanceHierar
|
|||
import "platform:/resource/ClassInhHier2DB/src/metamodels/Database.msl"
|
||||
|
||||
grammar ClassInhHier2DB_MI {
|
||||
|
||||
PackageToDatabaseRule
|
||||
PackageToDatabaseRule_1
|
||||
PackageToDatabaseRule_3
|
||||
PackageToDatabaseRule_5
|
||||
|
||||
ClassToTableRule
|
||||
ClassToTableRule_1
|
||||
ClassToTableRule_2
|
||||
ClassToTableRule_3
|
||||
ClassToTableRule_7
|
||||
ClassToTableRule_16
|
||||
ClassToTableRule_17
|
||||
ClassToTableRule_25
|
||||
|
||||
SubClassToTableRule
|
||||
SubClassToTableRule_1
|
||||
SubClassToTableRule_4
|
||||
SubClassToTableRule_5
|
||||
SubClassToTableRule_8
|
||||
SubClassToTableRule_9
|
||||
SubClassToTableRule_12
|
||||
SubClassToTableRule_13
|
||||
|
||||
AttributeToColumnRule
|
||||
AttributeToColumnRule_1
|
||||
AttributeToColumnRule_4
|
||||
AttributeToColumnRule_5
|
||||
AttributeToColumnRule_7
|
||||
AttributeToColumnRule_8
|
||||
AttributeToColumnRule_9
|
||||
AttributeToColumnRule_25
|
||||
rules {
|
||||
|
||||
PackageToDatabaseRule
|
||||
PackageToDatabaseRule_1
|
||||
PackageToDatabaseRule_3
|
||||
PackageToDatabaseRule_5
|
||||
|
||||
ClassToTableRule
|
||||
ClassToTableRule_1
|
||||
ClassToTableRule_2
|
||||
ClassToTableRule_3
|
||||
ClassToTableRule_7
|
||||
ClassToTableRule_16
|
||||
ClassToTableRule_17
|
||||
ClassToTableRule_25
|
||||
|
||||
SubClassToTableRule
|
||||
SubClassToTableRule_1
|
||||
SubClassToTableRule_4
|
||||
SubClassToTableRule_5
|
||||
SubClassToTableRule_8
|
||||
SubClassToTableRule_9
|
||||
SubClassToTableRule_12
|
||||
SubClassToTableRule_13
|
||||
|
||||
AttributeToColumnRule
|
||||
AttributeToColumnRule_1
|
||||
AttributeToColumnRule_4
|
||||
AttributeToColumnRule_5
|
||||
AttributeToColumnRule_7
|
||||
AttributeToColumnRule_8
|
||||
AttributeToColumnRule_9
|
||||
AttributeToColumnRule_25
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule PackageToDatabaseRule {
|
||||
classpackage:ClassPackage {
|
||||
.enamespace : <__srcModelName>
|
||||
|
@ -43,12 +45,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -63,12 +65,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "PackageToDatabase"
|
||||
}
|
||||
.name : db::title
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
db:DB {
|
||||
.enamespace : <__trgModelName>
|
||||
.title : classpackage::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -134,7 +136,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -148,6 +149,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -174,7 +176,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -188,6 +189,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -214,7 +216,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -225,6 +226,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -251,7 +253,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -262,6 +263,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -321,7 +323,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -335,6 +336,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -358,7 +360,6 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "ClazzToTable"
|
||||
}
|
||||
.name : table::heading
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -372,6 +373,7 @@ grammar ClassInhHier2DB_MI {
|
|||
|
||||
table:Table {
|
||||
.enamespace : <__trgModelName>
|
||||
.heading : clazz::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -724,12 +726,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_ex_ : true
|
||||
}
|
||||
|
||||
|
@ -764,12 +766,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -804,12 +806,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -841,12 +843,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -911,12 +913,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ : "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
@ -948,12 +950,12 @@ grammar ClassInhHier2DB_MI {
|
|||
{
|
||||
._type_ := "AttributeToColumn"
|
||||
}
|
||||
.name : column::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
column:Column {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : attribute::name
|
||||
~_cr_ : true
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
@ -32,7 +21,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
CompanyToIT,
|
||||
CompanyToIT,
|
||||
org.apache.commons.lang,
|
||||
org.emoflon.neo.neocore
|
||||
org.emoflon.neo.neocore,
|
||||
junit-jupiter-api;bundle-version="5.9.0"
|
||||
Export-Package: metamodels,
|
||||
models,
|
||||
org.emoflon.neo.api.companytoit,
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.CompanyToIT_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.CompanyToIT_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.companytoit.API_Common;
|
|||
import org.emoflon.neo.api.companytoit.API_CompanyToIT;
|
||||
import org.emoflon.neo.api.companytoit.tgg.API_CompanyToIT_CC;
|
||||
import org.emoflon.neo.api.companytoit.tgg.API_CompanyToIT_GEN;
|
||||
import org.emoflon.neo.api.companytoit.metamodels.API_Company;
|
||||
import org.emoflon.neo.api.companytoit.metamodels.API_IT;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.CCReprocessor;
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.CompanyToIT_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.CompanyToIT_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.companytoit.API_Common;
|
|||
import org.emoflon.neo.api.companytoit.API_CompanyToIT;
|
||||
import org.emoflon.neo.api.companytoit.tgg.API_CompanyToIT_FWD_OPT;
|
||||
import org.emoflon.neo.api.companytoit.tgg.API_CompanyToIT_GEN;
|
||||
import org.emoflon.neo.api.companytoit.metamodels.API_Company;
|
||||
import org.emoflon.neo.api.companytoit.metamodels.API_IT;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.FWD_OPTReprocessor;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.CompanyToIT_Constrained_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.CompanyToIT_Constrained_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.companytoit_constrained.API_Common;
|
|||
import org.emoflon.neo.api.companytoit_constrained.API_CompanyToIT_Constrained;
|
||||
import org.emoflon.neo.api.companytoit_constrained.tgg.API_CompanyToIT_Constrained_FWD_OPT;
|
||||
import org.emoflon.neo.api.companytoit_constrained.tgg.API_CompanyToIT_Constrained_GEN;
|
||||
import org.emoflon.neo.api.companytoit_constrained.metamodels.API_Company;
|
||||
import org.emoflon.neo.api.companytoit_constrained.metamodels.API_IT;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.FWD_OPTReprocessor;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
source.. = src/,\
|
||||
src-gen/,\
|
||||
tgg-gen/
|
||||
tgg-gen/,\
|
||||
xtend-gen/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ExtType2Doc_ConcSync_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ExtType2Doc_ConcSync_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.exttype2doc_concsync.API_Common;
|
|||
import org.emoflon.neo.api.exttype2doc_concsync.API_ExtType2Doc_ConcSync;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.tgg.API_ExtType2Doc_ConcSync_CC;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.tgg.API_ExtType2Doc_ConcSync_GEN;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.metamodels.API_ExtTypeModel;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.metamodels.API_ExtDocModel;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.CCReprocessor;
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ExtType2Doc_ConcSync_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ExtType2Doc_ConcSync_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.exttype2doc_concsync.API_Common;
|
|||
import org.emoflon.neo.api.exttype2doc_concsync.API_ExtType2Doc_ConcSync;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.tgg.API_ExtType2Doc_ConcSync_FWD_OPT;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.tgg.API_ExtType2Doc_ConcSync_GEN;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.metamodels.API_ExtDocModel;
|
||||
import org.emoflon.neo.api.exttype2doc_concsync.metamodels.API_ExtTypeModel;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.FWD_OPTReprocessor;
|
||||
|
|
1
examples/ExtType2Doc_ConcSync/xtend-gen/run/emf/modelimport/.gitignore
vendored
Normal file
1
examples/ExtType2Doc_ConcSync/xtend-gen/run/emf/modelimport/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/EMFImportToENeo.java
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ExtType2Doc_LookAhead_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ExtType2Doc_LookAhead_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.exttype2doc_lookahead.API_Common;
|
|||
import org.emoflon.neo.api.exttype2doc_lookahead.API_ExtType2Doc_LookAhead;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.tgg.API_ExtType2Doc_LookAhead_CC;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.tgg.API_ExtType2Doc_LookAhead_GEN;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.metamodels.API_ExtTypeModel;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.metamodels.API_ExtDocModel;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.CCReprocessor;
|
||||
|
|
|
@ -3,7 +3,6 @@ package run;
|
|||
import static run.ExtType2Doc_LookAhead_GEN_Run.SRC_MODEL_NAME;
|
||||
import static run.ExtType2Doc_LookAhead_GEN_Run.TRG_MODEL_NAME;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
|
@ -12,10 +11,7 @@ import org.emoflon.neo.api.exttype2doc_lookahead.API_Common;
|
|||
import org.emoflon.neo.api.exttype2doc_lookahead.API_ExtType2Doc_LookAhead;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.tgg.API_ExtType2Doc_LookAhead_FWD_OPT;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.tgg.API_ExtType2Doc_LookAhead_GEN;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.metamodels.API_ExtDocModel;
|
||||
import org.emoflon.neo.api.exttype2doc_lookahead.metamodels.API_ExtTypeModel;
|
||||
import org.emoflon.neo.cypher.models.NeoCoreBuilder;
|
||||
import org.emoflon.neo.engine.api.constraints.IConstraint;
|
||||
import org.emoflon.neo.engine.modules.NeoGenerator;
|
||||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.engine.modules.matchreprocessors.FWD_OPTReprocessor;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -1,6 +1,8 @@
|
|||
#
|
||||
#Fri Nov 22 15:17:44 CET 2019
|
||||
bin.includes=META-INF/, bin/
|
||||
bin.includes = META-INF/,\
|
||||
bin/,\
|
||||
.
|
||||
source.. = src/,\
|
||||
src-gen,\
|
||||
tgg-gen/
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -1,6 +1,8 @@
|
|||
#
|
||||
#Fri Nov 22 15:17:44 CET 2019
|
||||
bin.includes=META-INF/, bin/
|
||||
bin.includes = META-INF/,\
|
||||
bin/,\
|
||||
.
|
||||
source.. = src/,\
|
||||
src-gen,\
|
||||
tgg-gen/
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -1,5 +1,7 @@
|
|||
#
|
||||
#Mon Sep 09 20:32:53 CEST 2019
|
||||
bin.includes=META-INF/, bin/
|
||||
bin.includes = META-INF/,\
|
||||
bin/,\
|
||||
.
|
||||
source..=src/, src-gen
|
||||
output..=bin/
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -1,6 +1,8 @@
|
|||
#
|
||||
#Wed Dec 04 20:17:40 CET 2019
|
||||
bin.includes=META-INF/, bin/
|
||||
bin.includes = META-INF/,\
|
||||
bin/,\
|
||||
.
|
||||
source.. = src/,\
|
||||
src-gen,\
|
||||
tgg-gen/
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -8,19 +8,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: CompanyToIT
|
||||
Bundle-SymbolicName: CompanyToIT
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
||||
org.eclipse.xtext;bundle-version="2.16.0",
|
||||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
org.emoflon.neo.neo4j.adapter;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine.modules;bundle-version="1.0.0",
|
||||
org.emoflon.neo.victory.adapter;bundle-version="1.0.0",
|
||||
org.emoflon.victory.ui;bundle-version="1.0.0",
|
||||
org.apache.commons.lang,
|
||||
CompanyToIT,
|
||||
CompanyToIT,
|
||||
org.apache.commons.lang,
|
||||
org.emoflon.neo.neocore
|
||||
Export-Package: metamodels,
|
||||
models,
|
||||
org.emoflon.neo.api.companytoit,
|
||||
org.emoflon.neo.api.companytoit.metamodels,
|
||||
org.emoflon.neo.api.companytoit.models,
|
||||
org.emoflon.neo.api.companytoit.run,
|
||||
org.emoflon.neo.api.companytoit.tgg,
|
||||
run
|
||||
Automatic-Module-Name: CompanyToIT
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-13
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -6,24 +6,12 @@ Bundle-Version: 1.0.0.qualifier
|
|||
Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
||||
org.eclipse.xtext;bundle-version="2.16.0",
|
||||
org.emoflon.neo.emsl;bundle-version="1.0.0";visibility:=reexport,
|
||||
org.emoflon.neo.neo4j.adapter;bundle-version="1.0.0";visibility:=reex
|
||||
port,
|
||||
org.emoflon.neo.neo4j.adapter;bundle-version="1.0.0";visibility:=reexport,
|
||||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0";visibility:=reexport,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0";visibility:=reexport,
|
||||
org.emoflon.neo.engine.modules;bundle-version="1.0.0",
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -11,20 +11,9 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.emoflon.neo.engine.modules;bundle-version="1.0.0",
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.neocore;bundle-version="1.0.0",
|
||||
|
@ -45,7 +34,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
CompanyToIT,
|
||||
org.emoflon.neo.neocore,
|
||||
org.apache.commons.lang,
|
||||
org.apache.log4j
|
||||
org.apache.log4j,
|
||||
junit-jupiter-api;bundle-version="5.9.0"
|
||||
Automatic-Module-Name: TestSuite
|
||||
Export-Package: org.emoflon.neo.api.testsuitegt,
|
||||
org.emoflon.neo.example,
|
||||
|
|
|
@ -87,6 +87,7 @@ public abstract class ENeoTest {
|
|||
logger.info("Database cleared.");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void expectMatches(NeoPatternAccess<?, ?> p, Number no) {
|
||||
assertThat(p.pattern().countMatches(), is(no));
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.emoflon.neo.engine.api.rules.IRule;
|
|||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class ChessTests extends ENeoTest {
|
||||
|
||||
private API_FigureMoves figureMoves = new API_FigureMoves(builder);
|
||||
|
|
|
@ -5,8 +5,6 @@ import org.eclipse.emf.ecore.resource.Resource;
|
|||
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
|
||||
import org.emoflon.neo.emf.Neo4jImporter;
|
||||
import org.emoflon.neo.emsl.ui.internal.EmslActivator;
|
||||
import org.emoflon.neo.emsl.util.EMSLUtil;
|
||||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -8,6 +8,7 @@ import org.emoflon.neo.example.ENeoTest;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class OrganigramPatterns extends ENeoTest {
|
||||
private API_Organigram entities = new API_Organigram(builder);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ public class PacManPatterns extends ENeoTest {
|
|||
expectSingleMatch(entities.getPattern_PacManOnField());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void test_GhostOnField() {
|
||||
assertThat(entities.getPattern_GhostOnField().pattern().countMatches(), is(2));
|
||||
|
|
|
@ -39,6 +39,7 @@ public class SheRememberedCaterpillarsPatterns extends ENeoTest {
|
|||
expectSingleMatch(entities.getPattern_StandingInFrontOfBridge());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testColouredThingsOnPlatforms() {
|
||||
assertThat(entities.getPattern_ColouredThingOnPlatform().pattern().countMatches(), is(2));
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.emoflon.neo.example.ENeoTest;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SokobanPatterns extends ENeoTest {
|
||||
|
||||
private API_SokobanPatternsRulesConstraints entities = new API_SokobanPatternsRulesConstraints(builder);
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
|
@ -12,19 +12,8 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
org.apache.log4j;bundle-version="1.2.15",
|
||||
org.apache.commons.logging;bundle-version="1.2.0",
|
||||
org.junit,
|
||||
org.junit.jupiter.api,
|
||||
org.junit.jupiter.engine,
|
||||
org.junit.jupiter.migrationsupport,
|
||||
org.junit.jupiter.params,
|
||||
org.junit.platform.commons,
|
||||
org.junit.platform.engine,
|
||||
org.junit.platform.launcher,
|
||||
org.junit.platform.runner,
|
||||
org.junit.platform.suite.api,
|
||||
org.junit.vintage.engine,
|
||||
org.hamcrest.core,
|
||||
org.opentest4j,
|
||||
org.apiguardian,
|
||||
org.emoflon.neo.emf;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine;bundle-version="1.0.0",
|
||||
org.emoflon.neo.engine.modules;bundle-version="1.0.0",
|
||||
|
@ -54,5 +43,6 @@ Require-Bundle: org.eclipse.emf.common;bundle-version="2.15.0",
|
|||
JavaToDoc,
|
||||
JavaToDocSLE,
|
||||
ClassInhHier2DB,
|
||||
TestSuiteGT
|
||||
TestSuiteGT,
|
||||
junit-jupiter-api;bundle-version="5.9.0"
|
||||
Import-Package: org.eclipse.core.commands
|
||||
|
|
|
@ -8,7 +8,6 @@ import org.emoflon.neo.api.classinhhier2db.API_ClassInhHier2DB;
|
|||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.emoflon.neo.api.classinhhier2db.run.ClassInhHier2DB_CC_Run;
|
||||
import org.emoflon.neo.api.classinhhier2db.run.ClassInhHier2DB_CO_Run;
|
||||
import org.emoflon.neo.api.classinhhier2db.run.ClassInhHier2DB_FWD_OPT_Run;
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.emoflon.neo.api.companytoit.run.CompanyToIT_FWD_OPT_Run;
|
|||
|
||||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.emoflon.neo.api.companytoit.run.CompanyToIT_CC_Run;
|
||||
import org.emoflon.neo.api.companytoit.run.CompanyToIT_CO_Run;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.emoflon.neo.api.familiestopersons.API_SonOfExistingFamilyToMale;
|
|||
import org.emoflon.neo.api.familiestopersons.API_Families2Persons;
|
||||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.emoflon.neo.api.familiestopersons.run.FamiliesToPersons_CC_Run;
|
||||
import org.emoflon.neo.api.familiestopersons.run.FamiliesToPersons_CO_Run;
|
||||
import org.emoflon.neo.api.familiestopersons.run.FamiliesToPersons_BWD_OPT_Run;
|
||||
|
|
|
@ -4,7 +4,6 @@ import org.eclipse.emf.common.util.URI;
|
|||
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
|
||||
import org.emoflon.neo.emf.Neo4jImporter;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class EcoreTest {
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.emoflon.neo.engine.ilp.ILPProblem.Objective;
|
|||
import org.emoflon.neo.engine.ilp.MOEAProblem;
|
||||
import org.emoflon.neo.engine.modules.ilp.MOEAWrapper;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class MOEATest {
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.emoflon.neo.api.javatodocsle.API_JavaToDocSLE;
|
|||
import org.emoflon.neo.engine.modules.ilp.ILPFactory.SupportedILPSolver;
|
||||
import org.emoflon.neo.example.ENeoTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.emoflon.neo.api.javatodocsle.run.JavaToDocSLE_CC_Run;
|
||||
import org.emoflon.neo.api.javatodocsle.run.JavaToDocSLE_CO_Run;
|
||||
|
||||
|
|
|
@ -1,176 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
tripleGrammar CompanyToIT {
|
||||
source {
|
||||
Company
|
||||
}
|
||||
|
||||
target {
|
||||
IT
|
||||
}
|
||||
|
||||
correspondence {
|
||||
Company <- CompanyToIT -> IT
|
||||
Admin <- AdminToRouter -> Router
|
||||
Employee <- EmployeeToPC -> PC
|
||||
Employee <- EmployeeToLaptop -> Laptop
|
||||
}
|
||||
|
||||
rules {
|
||||
CompanyToITRule
|
||||
AdminToRouterRule
|
||||
EmployeeToPCRule
|
||||
EmployeeToLaptopRule
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule CompanyToITRule : CompanyToIT {
|
||||
source {
|
||||
++ ceo : CEO {
|
||||
.name := <ceoName>
|
||||
}
|
||||
++ company : Company {
|
||||
.name := <companyName>
|
||||
++ -ceo-> ceo
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
++ it : IT {
|
||||
.name := <companyName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ company <-:CompanyToIT-> it
|
||||
}
|
||||
} forbid src(companyNameIsTaken)
|
||||
|
||||
pattern companyNameIsTaken {
|
||||
company : Company {
|
||||
.name : <companyName>
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule AdminToRouterRule : CompanyToIT {
|
||||
source {
|
||||
company : Company {
|
||||
-ceo-> ceo
|
||||
++ -admin-> admin
|
||||
}
|
||||
ceo : CEO
|
||||
++ admin : Admin {
|
||||
.name := <adminName>
|
||||
++ -ceo-> ceo
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
++ router : Router {
|
||||
.name := <adminName>
|
||||
++ -network-> network
|
||||
}
|
||||
it : IT {
|
||||
++ -network-> network
|
||||
++ -router-> router
|
||||
}
|
||||
++ network : Network {
|
||||
.name := <adminName>
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ admin <-:AdminToRouter-> router
|
||||
company <-:CompanyToIT-> it
|
||||
}
|
||||
} forbid src(AlreadyHasAnAdmin)
|
||||
|
||||
pattern AlreadyHasAnAdmin {
|
||||
company:Company {
|
||||
-admin->other
|
||||
}
|
||||
|
||||
other:Admin {
|
||||
-ceo->ceo
|
||||
}
|
||||
|
||||
ceo:CEO
|
||||
}
|
||||
|
||||
abstract tripleRule EmployeeToDevice : CompanyToIT {
|
||||
source {
|
||||
admin : Admin {
|
||||
-ceo-> ceo
|
||||
}
|
||||
company : Company {
|
||||
-admin-> admin
|
||||
++ -employee-> employee
|
||||
-ceo-> ceo
|
||||
}
|
||||
ceo : CEO {
|
||||
++ -employee-> employee
|
||||
}
|
||||
++ employee : Employee {
|
||||
.name := <employeeName>
|
||||
}
|
||||
}
|
||||
|
||||
target {
|
||||
network : Network
|
||||
|
||||
it : IT {
|
||||
-router-> router
|
||||
-network-> network
|
||||
}
|
||||
|
||||
router : Router {
|
||||
-network-> network
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
admin <-:AdminToRouter-> router
|
||||
company <-:CompanyToIT-> it
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule EmployeeToPCRule : CompanyToIT -> EmployeeToDevice {
|
||||
source {
|
||||
++ employee : Employee
|
||||
}
|
||||
|
||||
target {
|
||||
++ computer : PC {
|
||||
.name := <pcName>
|
||||
}
|
||||
|
||||
network : Network {
|
||||
++ -pc-> $computer
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ employee <-:EmployeeToPC-> computer
|
||||
}
|
||||
}
|
||||
|
||||
tripleRule EmployeeToLaptopRule : CompanyToIT -> EmployeeToDevice {
|
||||
source {
|
||||
++ employee : Employee
|
||||
}
|
||||
|
||||
target {
|
||||
++ computer : Laptop {
|
||||
.name := <laptopName>
|
||||
}
|
||||
|
||||
network : Network {
|
||||
++ -laptop-> $computer
|
||||
}
|
||||
}
|
||||
|
||||
correspondence {
|
||||
++ employee <-:EmployeeToLaptop-> computer
|
||||
}
|
||||
}
|
|
@ -1,530 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_BWD {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->f::row+1
|
||||
.col : 0
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : b::-fields->f::row+1
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : 0
|
||||
.col : b::-fields->f::col+1
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->f::col+1
|
||||
.row : 0
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->ur::col
|
||||
.row : b::-fields->bl::row
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-fields->bl
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->ur
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-right->ur
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->bl::row
|
||||
.col : b::-fields->ur::col
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-fields->bl
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-fields->ur
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-right->ur
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,412 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_BWD_OPT {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->f::row+1
|
||||
.col : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->f::row+1
|
||||
.col : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->f::col+1
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->f::col+1
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->bl::row
|
||||
.col : b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->bl::row
|
||||
.col : b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,412 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_CC {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.row : 0
|
||||
.col : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->f::col+1
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : 0
|
||||
.col : b::-fields->f::col+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->bl::row
|
||||
.col : b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->ur::col
|
||||
.row : b::-fields->bl::row
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,412 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_CO {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
-corr->board
|
||||
{
|
||||
._type_ : "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
-corr->board
|
||||
{
|
||||
._type_ : "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
board:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->nf
|
||||
{
|
||||
.row : 0
|
||||
.col : 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->f::row+1
|
||||
.col : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : 0
|
||||
.row : b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->f::col+1
|
||||
.row : 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
-fields->nf
|
||||
{
|
||||
.row : 0
|
||||
.col : b::-fields->f::col+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.col : b::-fields->ur::col
|
||||
.row : b::-fields->bl::row
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->nf
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
-fields->nf
|
||||
{
|
||||
.row : b::-fields->bl::row
|
||||
.col : b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
nf:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
.endPos : false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,602 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_FWD {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-firstEntry->e
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstColAllRowsEndNAC
|
||||
|
||||
constraint FirstColAllRowsEndNAC = forbid FirstColAllRowsEnd_NoDoubleBottom
|
||||
|
||||
pattern FirstColAllRowsEnd_NoDoubleBottom {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-firstEntry->e
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstColAllRowsNormalNAC
|
||||
|
||||
constraint FirstColAllRowsNormalNAC = forbid FirstColAllRowsNormal_NoDoubleBottom
|
||||
|
||||
pattern FirstColAllRowsNormal_NoDoubleBottom {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := b::-fields->f::col+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstRowAllColsEndNAC
|
||||
|
||||
constraint FirstRowAllColsEndNAC = forbid FirstRowAllColsEnd_NoDoubleRight
|
||||
|
||||
pattern FirstRowAllColsEnd_NoDoubleRight {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := b::-fields->f::col+1
|
||||
.row := 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstRowAllColsNormalNAC
|
||||
|
||||
constraint FirstRowAllColsNormalNAC = forbid FirstRowAllColsNormal_NoDoubleRight
|
||||
|
||||
pattern FirstRowAllColsNormal_NoDoubleRight {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.row := b::-fields->bl::row
|
||||
.col := b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when AllOtherFieldsEndNAC
|
||||
|
||||
constraint AllOtherFieldsEndNAC = AllOtherFieldsEnd_NoDoubleBottomTooNAC && AllOtherFieldsEnd_NoDoubleRightTooNAC
|
||||
|
||||
constraint AllOtherFieldsEnd_NoDoubleBottomTooNAC = forbid AllOtherFieldsEnd_NoDoubleBottomToo
|
||||
|
||||
pattern AllOtherFieldsEnd_NoDoubleBottomToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
ur : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
|
||||
}
|
||||
constraint AllOtherFieldsEnd_NoDoubleRightTooNAC = forbid AllOtherFieldsEnd_NoDoubleRightToo
|
||||
|
||||
pattern AllOtherFieldsEnd_NoDoubleRightToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
bl : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.row := b::-fields->bl::row
|
||||
.col := b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when AllOtherFieldsNormalNAC
|
||||
|
||||
constraint AllOtherFieldsNormalNAC = AllOtherFieldsNormal_NoDoubleBottomTooNAC && AllOtherFieldsNormal_NoDoubleRightTooNAC
|
||||
|
||||
constraint AllOtherFieldsNormal_NoDoubleBottomTooNAC = forbid AllOtherFieldsNormal_NoDoubleBottomToo
|
||||
|
||||
pattern AllOtherFieldsNormal_NoDoubleBottomToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
ur : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
|
||||
}
|
||||
constraint AllOtherFieldsNormal_NoDoubleRightTooNAC = forbid AllOtherFieldsNormal_NoDoubleRightToo
|
||||
|
||||
pattern AllOtherFieldsNormal_NoDoubleRightToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
bl : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
|
||||
}
|
|
@ -1,412 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_FWD_OPT {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
row:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
nr:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := b::-fields->f::col+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := b::-fields->f::col+1
|
||||
.row := 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
ne:End {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.col := b::-fields->ur::col
|
||||
.row := b::-fields->bl::row
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
ne:Normal {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.row := b::-fields->bl::row
|
||||
.col := b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,512 +0,0 @@
|
|||
import "platform:/resource/SokobanLanguage/src/metamodels/SokobanLanguage.msl"
|
||||
|
||||
grammar SokobanImportExport_GEN {
|
||||
BoardEndEntryRule
|
||||
BoardNormalEntryRule
|
||||
FirstColAllRowsEnd
|
||||
FirstColAllRowsNormal
|
||||
FirstRowAllColsEnd
|
||||
FirstRowAllColsNormal
|
||||
AllOtherFieldsEnd
|
||||
AllOtherFieldsNormal
|
||||
}
|
||||
|
||||
rule BoardEndEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule BoardNormalEntryRule {
|
||||
++sokBoard:sokobanExchangeFormat.Board {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstRow->row
|
||||
++-corr->board
|
||||
{
|
||||
._type_ := "BoardToBoard"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++row:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
++board:SokobanLanguage.Board {
|
||||
.enamespace := <__trgModelName>
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := 0
|
||||
}
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule FirstColAllRowsEnd {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := 0
|
||||
.row := b::-fields->f::row+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstColAllRowsEndNAC
|
||||
|
||||
constraint FirstColAllRowsEndNAC = forbid FirstColAllRowsEnd_NoDoubleBottom
|
||||
|
||||
pattern FirstColAllRowsEnd_NoDoubleBottom {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstColAllRowsNormal {
|
||||
r:Row {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->nr
|
||||
-firstEntry->e
|
||||
}
|
||||
|
||||
++nr:Row {
|
||||
.enamespace := <__srcModelName>
|
||||
++-firstEntry->ne
|
||||
}
|
||||
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.col : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.row := b::-fields->f::row+1
|
||||
.col := 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstColAllRowsNormalNAC
|
||||
|
||||
constraint FirstColAllRowsNormalNAC = forbid FirstColAllRowsNormal_NoDoubleBottom
|
||||
|
||||
pattern FirstColAllRowsNormal_NoDoubleBottom {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstRowAllColsEnd {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.col := b::-fields->f::col+1
|
||||
.row := 0
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstRowAllColsEndNAC
|
||||
|
||||
constraint FirstRowAllColsEndNAC = forbid FirstRowAllColsEnd_NoDoubleRight
|
||||
|
||||
pattern FirstRowAllColsEnd_NoDoubleRight {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule FirstRowAllColsNormal {
|
||||
e:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->f
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->f
|
||||
{
|
||||
.row : 0
|
||||
}
|
||||
++-fields->nf
|
||||
{
|
||||
.row := 0
|
||||
.col := b::-fields->f::col+1
|
||||
}
|
||||
}
|
||||
|
||||
f:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when FirstRowAllColsNormalNAC
|
||||
|
||||
constraint FirstRowAllColsNormalNAC = forbid FirstRowAllColsNormal_NoDoubleRight
|
||||
|
||||
pattern FirstRowAllColsNormal_NoDoubleRight {
|
||||
f : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule AllOtherFieldsEnd {
|
||||
++ne:End {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.col := b::-fields->ur::col
|
||||
.row := b::-fields->bl::row
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := true
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when AllOtherFieldsEndNAC
|
||||
|
||||
constraint AllOtherFieldsEndNAC = AllOtherFieldsEnd_NoDoubleBottomTooNAC && AllOtherFieldsEnd_NoDoubleRightTooNAC
|
||||
|
||||
constraint AllOtherFieldsEnd_NoDoubleBottomTooNAC = forbid AllOtherFieldsEnd_NoDoubleBottomToo
|
||||
|
||||
pattern AllOtherFieldsEnd_NoDoubleBottomToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
ur : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
|
||||
}
|
||||
constraint AllOtherFieldsEnd_NoDoubleRightTooNAC = forbid AllOtherFieldsEnd_NoDoubleRightToo
|
||||
|
||||
pattern AllOtherFieldsEnd_NoDoubleRightToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
bl : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule AllOtherFieldsNormal {
|
||||
++ne:Normal {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->nf
|
||||
{
|
||||
._type_ := "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
ble:Entry {
|
||||
.enamespace : <__srcModelName>
|
||||
++-next->ne
|
||||
-corr->bl
|
||||
{
|
||||
._type_ : "EntryToField"
|
||||
}
|
||||
}
|
||||
|
||||
b:SokobanLanguage.Board {
|
||||
.enamespace : <__trgModelName>
|
||||
-fields->ul
|
||||
++-fields->nf
|
||||
{
|
||||
.row := b::-fields->bl::row
|
||||
.col := b::-fields->ur::col
|
||||
}
|
||||
-fields->bl
|
||||
-fields->ur
|
||||
}
|
||||
|
||||
ul:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->bl
|
||||
-right->ur
|
||||
}
|
||||
|
||||
++nf:Field {
|
||||
.enamespace := <__trgModelName>
|
||||
.endPos := false
|
||||
}
|
||||
|
||||
bl:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-right->nf
|
||||
}
|
||||
|
||||
ur:Field {
|
||||
.enamespace : <__trgModelName>
|
||||
++-bottom->nf
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when AllOtherFieldsNormalNAC
|
||||
|
||||
constraint AllOtherFieldsNormalNAC = AllOtherFieldsNormal_NoDoubleBottomTooNAC && AllOtherFieldsNormal_NoDoubleRightTooNAC
|
||||
|
||||
constraint AllOtherFieldsNormal_NoDoubleBottomTooNAC = forbid AllOtherFieldsNormal_NoDoubleBottomToo
|
||||
|
||||
pattern AllOtherFieldsNormal_NoDoubleBottomToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
ur : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-bottom->other
|
||||
}
|
||||
|
||||
}
|
||||
constraint AllOtherFieldsNormal_NoDoubleRightTooNAC = forbid AllOtherFieldsNormal_NoDoubleRightToo
|
||||
|
||||
pattern AllOtherFieldsNormal_NoDoubleRightToo {
|
||||
other : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
bl : Field {
|
||||
.enamespace : <__trgModelName>
|
||||
-right->other
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,283 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
grammar CompanyToIT_BWD {
|
||||
CompanyToITRule
|
||||
AdminToRouterRule
|
||||
EmployeeToPCRule
|
||||
EmployeeToLaptopRule
|
||||
}
|
||||
|
||||
rule CompanyToITRule {
|
||||
++ceo:CEO {
|
||||
.enamespace := <__srcModelName>
|
||||
.name := <ceoName>
|
||||
}
|
||||
|
||||
++company:Company {
|
||||
.enamespace := <__srcModelName>
|
||||
++-ceo->ceo
|
||||
++-corr->it
|
||||
{
|
||||
._type_ := "CompanyToIT"
|
||||
}
|
||||
.name := it::name
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when CompanyToITRuleNAC
|
||||
|
||||
constraint CompanyToITRuleNAC = forbid CompanyToITRule_companyNameIsTaken
|
||||
|
||||
pattern CompanyToITRule_companyNameIsTaken {
|
||||
company : Company {
|
||||
.enamespace : <__srcModelName>
|
||||
.name : it::name
|
||||
}
|
||||
|
||||
it : IT {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
}
|
||||
|
||||
rule AdminToRouterRule {
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
++-admin->admin
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
++admin:Admin {
|
||||
.enamespace := <__srcModelName>
|
||||
++-ceo->ceo
|
||||
++-corr->router
|
||||
{
|
||||
._type_ := "AdminToRouter"
|
||||
}
|
||||
.name := network::name
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
.name : network::name
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
-router->router
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
} when AdminToRouterRuleNAC
|
||||
|
||||
constraint AdminToRouterRuleNAC = forbid AdminToRouterRule_AlreadyHasAnAdmin
|
||||
|
||||
pattern AdminToRouterRule_AlreadyHasAnAdmin {
|
||||
company : Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->other
|
||||
}
|
||||
other : Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
}
|
||||
ceo : CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rule EmployeeToPCRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
++-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
++-employee->employee
|
||||
}
|
||||
|
||||
++employee:Employee {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToPC"
|
||||
}
|
||||
.name := <employeeName>
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
computer:PC {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-pc->computer
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToLaptopRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
++-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
++-employee->employee
|
||||
}
|
||||
|
||||
++employee:Employee {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToLaptop"
|
||||
}
|
||||
.name := <employeeName>
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
computer:Laptop {
|
||||
.enamespace : <__trgModelName>
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
-network->network
|
||||
{
|
||||
~_tr_ : true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-laptop->computer
|
||||
{
|
||||
~_tr_ : false
|
||||
~_tr_ := true
|
||||
}
|
||||
~_tr_ : true
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,200 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
grammar CompanyToIT_BWD_OPT {
|
||||
CompanyToITRule
|
||||
AdminToRouterRule
|
||||
EmployeeToPCRule
|
||||
EmployeeToLaptopRule
|
||||
}
|
||||
|
||||
rule CompanyToITRule {
|
||||
++ceo:CEO {
|
||||
.enamespace := <__srcModelName>
|
||||
.name := <ceoName>
|
||||
}
|
||||
|
||||
++company:Company {
|
||||
.enamespace := <__srcModelName>
|
||||
++-ceo->ceo
|
||||
++-corr->it
|
||||
{
|
||||
._type_ := "CompanyToIT"
|
||||
}
|
||||
.name := it::name
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AdminToRouterRule {
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
++-admin->admin
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
++admin:Admin {
|
||||
.enamespace := <__srcModelName>
|
||||
++-ceo->ceo
|
||||
++-corr->router
|
||||
{
|
||||
._type_ := "AdminToRouter"
|
||||
}
|
||||
.name := router::name
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
-router->router
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : router::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToPCRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
++-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
++-employee->employee
|
||||
}
|
||||
|
||||
++employee:Employee {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToPC"
|
||||
}
|
||||
.name := <employeeName>
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:PC {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-pc->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToLaptopRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
++-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
++-employee->employee
|
||||
}
|
||||
|
||||
++employee:Employee {
|
||||
.enamespace := <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToLaptop"
|
||||
}
|
||||
.name := <employeeName>
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:Laptop {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-laptop->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
grammar CompanyToIT_CC {
|
||||
CompanyToITRule
|
||||
AdminToRouterRule
|
||||
EmployeeToPCRule
|
||||
EmployeeToLaptopRule
|
||||
}
|
||||
|
||||
rule CompanyToITRule {
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
++-corr->it
|
||||
{
|
||||
._type_ := "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : company::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AdminToRouterRule {
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-admin->admin
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
++-corr->router
|
||||
{
|
||||
._type_ := "AdminToRouter"
|
||||
}
|
||||
.name : router::name
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
-router->router
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : router::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToPCRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
-employee->employee
|
||||
}
|
||||
|
||||
employee:Employee {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToPC"
|
||||
}
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:PC {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-pc->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToLaptopRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
-employee->employee
|
||||
}
|
||||
|
||||
employee:Employee {
|
||||
.enamespace : <__srcModelName>
|
||||
++-corr->computer
|
||||
{
|
||||
._type_ := "EmployeeToLaptop"
|
||||
}
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:Laptop {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-laptop->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,197 +0,0 @@
|
|||
import "platform:/resource/CompanyToIT/src/metamodels/Company.msl"
|
||||
import "platform:/resource/CompanyToIT/src/metamodels/IT.msl"
|
||||
|
||||
grammar CompanyToIT_CO {
|
||||
CompanyToITRule
|
||||
AdminToRouterRule
|
||||
EmployeeToPCRule
|
||||
EmployeeToLaptopRule
|
||||
}
|
||||
|
||||
rule CompanyToITRule {
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : company::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule AdminToRouterRule {
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-admin->admin
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
}
|
||||
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
.name : router::name
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
-router->router
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
.name : router::name
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToPCRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
-employee->employee
|
||||
}
|
||||
|
||||
employee:Employee {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->computer
|
||||
{
|
||||
._type_ : "EmployeeToPC"
|
||||
}
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:PC {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-pc->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rule EmployeeToLaptopRule {
|
||||
admin:Admin {
|
||||
.enamespace : <__srcModelName>
|
||||
-ceo->ceo
|
||||
-corr->router
|
||||
{
|
||||
._type_ : "AdminToRouter"
|
||||
}
|
||||
}
|
||||
|
||||
company:Company {
|
||||
.enamespace : <__srcModelName>
|
||||
-admin->admin
|
||||
-employee->employee
|
||||
-ceo->ceo
|
||||
-corr->it
|
||||
{
|
||||
._type_ : "CompanyToIT"
|
||||
}
|
||||
}
|
||||
|
||||
ceo:CEO {
|
||||
.enamespace : <__srcModelName>
|
||||
-employee->employee
|
||||
}
|
||||
|
||||
employee:Employee {
|
||||
.enamespace : <__srcModelName>
|
||||
-corr->computer
|
||||
{
|
||||
._type_ : "EmployeeToLaptop"
|
||||
}
|
||||
}
|
||||
|
||||
router:Router {
|
||||
.enamespace : <__trgModelName>
|
||||
-network->network
|
||||
}
|
||||
|
||||
computer:Laptop {
|
||||
.enamespace : <__trgModelName>
|
||||
}
|
||||
|
||||
it:IT {
|
||||
.enamespace : <__trgModelName>
|
||||
-router->router
|
||||
-network->network
|
||||
}
|
||||
|
||||
network:Network {
|
||||
.enamespace : <__trgModelName>
|
||||
-laptop->computer
|
||||
}
|
||||
|
||||
attributeConstraints {
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue