From 78c806eebaf5b9d50b08768062755f0044cf107f Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Sun, 20 Aug 2017 01:55:38 +0200 Subject: Alloy Examples --- .../.classpath | 10 + .../.gitignore | 1 + .../.project | 40 ++ .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 25 + .../build.properties | 9 + .../examples/filesystem.als | 353 ++++++++++++++ .../model/FileSytem.aird | 362 +++++++++++++++ .../model/FileSytem.ecore | 32 ++ .../model/FileSytem.genmodel | 26 ++ .../dslreasoner/domains/alloyexamples/Ecore.vql | 29 ++ .../domains/alloyexamples/FileSystem.vql | 24 + .../plugin.properties | 4 + .../plugin.xml | 26 ++ .../dslreasoner/domains/alloyexamples/.gitignore | 36 ++ .../domains/alloyexamples/util/.gitignore | 32 ++ .../domains/alloyexamples/Filesystem/Dir.java | 42 ++ .../domains/alloyexamples/Filesystem/FSObject.java | 52 +++ .../domains/alloyexamples/Filesystem/File.java | 18 + .../alloyexamples/Filesystem/FileSystem.java | 70 +++ .../Filesystem/FilesystemFactory.java | 69 +++ .../Filesystem/FilesystemPackage.java | 511 +++++++++++++++++++++ .../domains/alloyexamples/Filesystem/Model.java | 69 +++ .../alloyexamples/Filesystem/impl/DirImpl.java | 165 +++++++ .../Filesystem/impl/FSObjectImpl.java | 194 ++++++++ .../alloyexamples/Filesystem/impl/FileImpl.java | 36 ++ .../Filesystem/impl/FileSystemImpl.java | 205 +++++++++ .../Filesystem/impl/FilesystemFactoryImpl.java | 128 ++++++ .../Filesystem/impl/FilesystemPackageImpl.java | 356 ++++++++++++++ .../alloyexamples/Filesystem/impl/ModelImpl.java | 221 +++++++++ .../Filesystem/util/FilesystemAdapterFactory.java | 192 ++++++++ .../Filesystem/util/FilesystemSwitch.java | 196 ++++++++ 32 files changed, 3540 insertions(+) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.classpath create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.project create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.settings/org.eclipse.jdt.core.prefs create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/build.properties create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/examples/filesystem.als create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.aird create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.ecore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.genmodel create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.properties create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/util/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java (limited to 'Domains') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.classpath b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.classpath new file mode 100644 index 00000000..3b808ec0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.project b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.project new file mode 100644 index 00000000..fe11e80b --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.project @@ -0,0 +1,40 @@ + + + hu.bme.mit.inf.dslreasoner.domains.alloyexamples + + + + + + org.eclipse.viatra.query.tooling.ui.projectbuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.viatra.query.projectnature + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.settings/org.eclipse.jdt.core.prefs b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF new file mode 100644 index 00000000..41726ae6 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.domains.alloyexamples;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: hu.bme.mit.inf.dslreasoner.domains.alloyexamples, + hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem, + hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl, + hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util, + hu.bme.mit.inf.dslreasoner.domains.alloyexamples.util +Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, + org.eclipse.viatra.query.runtime, + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.emf.emfstore.common, + com.google.guava, + org.eclipse.xtext.xbase.lib, + org.eclipse.xtend.lib, + org.eclipse.xtend.lib.macro +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Import-Package: org.apache.log4j diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/build.properties b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/build.properties new file mode 100644 index 00000000..a9ab8b56 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/build.properties @@ -0,0 +1,9 @@ +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/,\ + src-gen/ +output.. = bin/ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/examples/filesystem.als b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/examples/filesystem.als new file mode 100644 index 00000000..819f1247 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/examples/filesystem.als @@ -0,0 +1,353 @@ +// A file system object in the file system +abstract sig FSObject { } + +// File system objects must be either directories or files. +sig File, Dir extends FSObject { } + +// A File System +sig FileSystem { + root: Dir, + live: set FSObject, + contents: Dir lone-> FSObject, + parent: FSObject ->lone Dir +}{ + // root has no parent + no root.parent + // live objects are those reachable from the root + live = root.*contents + // contents only defined on live objects + contents in live->live + // parent is the inverse of contents + parent = ~contents +} + +run xrx1s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run xrx2s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run xrx3s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rxx4s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rxx5s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx6s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx7s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx8s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx9s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx10s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r11s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx12s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx13s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx14s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx15s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx16s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx17s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx18s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx19s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx20s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx21s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx22s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx23s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx24s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx25s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx26s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx27s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx28s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx29s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run rx30s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r1s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r2s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r3s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r4s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r5s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r6s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r7s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r8s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r9s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r10s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r11s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r12s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r13s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r14s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r15s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r16s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r17s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r18s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r19s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r20s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r21s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r22s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r23s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r24s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r25s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r26s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r27s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r28s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r29s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r30s5 {} for exactly 1 FileSystem, exactly 4 FSObject +run r1s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r2s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r3s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r4s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r5s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r6s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r7s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r8s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r9s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r10s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r11s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r12s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r13s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r14s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r15s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r16s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r17s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r18s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r19s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r20s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r21s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r22s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r23s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r24s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r25s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r26s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r27s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r28s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r29s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r30s10 {} for exactly 1 FileSystem, exactly 9 FSObject +run r1s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r2s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r3s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r4s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r5s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r6s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r7s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r8s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r9s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r10s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r11s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r12s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r13s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r14s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r15s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r16s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r17s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r18s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r19s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r20s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r21s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r22s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r23s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r24s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r25s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r26s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r27s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r28s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r29s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r30s15 {} for exactly 1 FileSystem, exactly 14 FSObject +run r1s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r2s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r3s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r4s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r5s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r6s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r7s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r8s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r9s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r10s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r11s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r12s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r13s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r14s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r15s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r16s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r17s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r18s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r19s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r20s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r21s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r22s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r23s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r24s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r25s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r26s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r27s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r28s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r29s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r30s20 {} for exactly 1 FileSystem, exactly 19 FSObject +run r1s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r2s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r3s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r4s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r5s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r6s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r7s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r8s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r9s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r10s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r11s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r12s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r13s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r14s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r15s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r16s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r17s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r18s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r19s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r20s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r21s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r22s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r23s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r24s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r25s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r26s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r27s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r28s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r29s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r30s25 {} for exactly 1 FileSystem, exactly 24 FSObject +run r1s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r2s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r3s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r4s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r5s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r6s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r7s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r8s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r9s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r10s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r11s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r12s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r13s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r14s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r15s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r16s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r17s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r18s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r19s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r20s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r21s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r22s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r23s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r24s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r25s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r26s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r27s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r28s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r29s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r30s30 {} for exactly 1 FileSystem, exactly 29 FSObject +run r1s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r2s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r3s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r4s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r5s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r6s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r7s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r8s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r9s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r10s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r11s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r12s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r13s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r14s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r15s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r16s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r17s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r18s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r19s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r20s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r21s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r22s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r23s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r24s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r25s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r26s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r27s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r28s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r29s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r30s35 {} for exactly 1 FileSystem, exactly 34 FSObject +run r1s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r2s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r3s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r4s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r5s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r6s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r7s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r8s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r9s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r10s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r11s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r12s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r13s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r14s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r15s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r16s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r17s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r18s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r19s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r20s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r21s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r22s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r23s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r24s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r25s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r26s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r27s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r28s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r29s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r30s40 {} for exactly 1 FileSystem, exactly 39 FSObject +run r1s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r2s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r3s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r4s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r5s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r6s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r7s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r8s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r9s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r10s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r11s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r12s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r13s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r14s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r15s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r16s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r17s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r18s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r19s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r20s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r21s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r22s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r23s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r24s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r25s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r26s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r27s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r28s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r29s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r30s45 {} for exactly 1 FileSystem, exactly 44 FSObject +run r1s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r2s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r3s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r4s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r5s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r6s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r7s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r8s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r9s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r10s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r11s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r12s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r13s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r14s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r15s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r16s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r17s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r18s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r19s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r20s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r21s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r22s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r23s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r24s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r25s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r26s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r27s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r28s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r29s50 {} for exactly 1 FileSystem, exactly 49 FSObject +run r30s50 {} for exactly 1 FileSystem, exactly 49 FSObject diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.aird new file mode 100644 index 00000000..4a9486e2 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.aird @@ -0,0 +1,362 @@ + + + + FileSytem.ecore + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + italic + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + italic + + + + + + + + + + + + italic + + + + + + + + + + + bold + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.ecore new file mode 100644 index 00000000..c928d2b0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.ecore @@ -0,0 +1,32 @@ + + + +
+ + + + + +
+ + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.genmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.genmodel new file mode 100644 index 00000000..355ac109 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/model/FileSytem.genmodel @@ -0,0 +1,26 @@ + + + FileSytem.ecore + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql new file mode 100644 index 00000000..78525a35 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Ecore.vql @@ -0,0 +1,29 @@ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples + +import epackage "http://www.eclipse.org/emf/2002/Ecore" + +pattern directSupertype(a: EClass, b:EClass) { + EClass.eSuperTypes(a,b); +} + +@Constraint(key={a}, severity="error", message="error") +pattern loopInInheritence(a: EClass) { + find directSupertype+(a,a); +} + +pattern opposite(a:EReference, b: EReference) { + EReference.eOpposite(a,b); +} +@Constraint(key={a}, severity="error", message="error") +pattern oppositeDifferentClass(a:EReference) { + EReference.eOpposite(a,b); + EReference.eContainingClass(a,aContaining); + EReference.eType(b,bTarget); + aContaining != bTarget; +} + +@Constraint(key={a}, severity="error", message="error") +pattern nonSymmetricOpposite(a:EReference, b:EReference) { + find opposite(a,b); + neg find opposite(b,a); +} \ No newline at end of file diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql new file mode 100644 index 00000000..719a9d96 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/patterns/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/FileSystem.vql @@ -0,0 +1,24 @@ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples + +import epackage "FS" + +pattern patternContent(o1: FSObject, o2: FSObject) { + Dir.contents(o1,o2); +} + +@QueryBasedFeature +pattern live(this: FileSystem, l: FSObject) { + FileSystem.root(this,l); +} or { + FileSystem.root(this,root); + find patternContent+(root,l); +} + +@Constraint(key={child}, severity="error", message="error") +pattern contentInNotLive(parent : Dir, child: FSObject) { + Dir.contents(parent,child); + neg find live(_,parent); +} or { + Dir.contents(parent,child); + neg find live(_,child); +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.properties b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.properties new file mode 100644 index 00000000..5c045a20 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = FileSytem Model +providerName = www.example.org diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml new file mode 100644 index 00000000..576aa06e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore new file mode 100644 index 00000000..9d608403 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/.gitignore @@ -0,0 +1,36 @@ +/.ContentInNotLiveMatch.java._trace +/.ContentInNotLiveMatcher.java._trace +/.DirectSupertypeMatch.java._trace +/.DirectSupertypeMatcher.java._trace +/.Ecore.java._trace +/.FileSystem.java._trace +/.LiveMatch.java._trace +/.LiveMatcher.java._trace +/.LoopInInheritenceMatch.java._trace +/.LoopInInheritenceMatcher.java._trace +/.NonSymmetricOppositeMatch.java._trace +/.NonSymmetricOppositeMatcher.java._trace +/.OppositeDifferentClassMatch.java._trace +/.OppositeDifferentClassMatcher.java._trace +/.OppositeMatch.java._trace +/.OppositeMatcher.java._trace +/.PatternContentMatch.java._trace +/.PatternContentMatcher.java._trace +/ContentInNotLiveMatch.java +/ContentInNotLiveMatcher.java +/DirectSupertypeMatch.java +/DirectSupertypeMatcher.java +/Ecore.java +/FileSystem.java +/LiveMatch.java +/LiveMatcher.java +/LoopInInheritenceMatch.java +/LoopInInheritenceMatcher.java +/NonSymmetricOppositeMatch.java +/NonSymmetricOppositeMatcher.java +/OppositeDifferentClassMatch.java +/OppositeDifferentClassMatcher.java +/OppositeMatch.java +/OppositeMatcher.java +/PatternContentMatch.java +/PatternContentMatcher.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/util/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/util/.gitignore new file mode 100644 index 00000000..4b17cd82 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/util/.gitignore @@ -0,0 +1,32 @@ +/.ContentInNotLiveProcessor.java._trace +/.ContentInNotLiveQuerySpecification.java._trace +/.DirectSupertypeProcessor.java._trace +/.DirectSupertypeQuerySpecification.java._trace +/.LiveProcessor.java._trace +/.LiveQuerySpecification.java._trace +/.LoopInInheritenceProcessor.java._trace +/.LoopInInheritenceQuerySpecification.java._trace +/.NonSymmetricOppositeProcessor.java._trace +/.NonSymmetricOppositeQuerySpecification.java._trace +/.OppositeDifferentClassProcessor.java._trace +/.OppositeDifferentClassQuerySpecification.java._trace +/.OppositeProcessor.java._trace +/.OppositeQuerySpecification.java._trace +/.PatternContentProcessor.java._trace +/.PatternContentQuerySpecification.java._trace +/ContentInNotLiveProcessor.java +/ContentInNotLiveQuerySpecification.java +/DirectSupertypeProcessor.java +/DirectSupertypeQuerySpecification.java +/LiveProcessor.java +/LiveQuerySpecification.java +/LoopInInheritenceProcessor.java +/LoopInInheritenceQuerySpecification.java +/NonSymmetricOppositeProcessor.java +/NonSymmetricOppositeQuerySpecification.java +/OppositeDifferentClassProcessor.java +/OppositeDifferentClassQuerySpecification.java +/OppositeProcessor.java +/OppositeQuerySpecification.java +/PatternContentProcessor.java +/PatternContentQuerySpecification.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java new file mode 100644 index 00000000..59900ac7 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Dir.java @@ -0,0 +1,42 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dir'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents Contents}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getDir() + * @model + * @generated + */ +public interface Dir extends FSObject { + /** + * Returns the value of the 'Contents' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent Parent}'. + * + *

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

+ * + * @return the value of the 'Contents' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getDir_Contents() + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getContents(); + +} // Dir diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java new file mode 100644 index 00000000..2cc4d454 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FSObject.java @@ -0,0 +1,52 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'FS Object'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent Parent}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFSObject() + * @model abstract="true" + * @generated + */ +public interface FSObject extends EObject { + + /** + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents Contents}'. + * + *

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

+ * + * @return the value of the 'Parent' container reference. + * @see #setParent(Dir) + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFSObject_Parent() + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents + * @model opposite="contents" transient="false" + * @generated + */ + Dir getParent(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent Parent}' container reference. + * + * + * @param value the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(Dir value); +} // FSObject diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java new file mode 100644 index 00000000..e765cbda --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/File.java @@ -0,0 +1,18 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + + +/** + * + * A representation of the model object 'File'. + * + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFile() + * @model + * @generated + */ +public interface File extends FSObject { + +} // File diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java new file mode 100644 index 00000000..1896e31e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FileSystem.java @@ -0,0 +1,70 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'File System'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot Root}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive Live}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem() + * @model + * @generated + */ +public interface FileSystem extends EObject { + /** + * Returns the value of the 'Root' containment reference. + * + *

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

+ * + * @return the value of the 'Root' containment reference. + * @see #setRoot(Dir) + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem_Root() + * @model containment="true" required="true" + * @generated + */ + Dir getRoot(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot Root}' containment reference. + * + * + * @param value the new value of the 'Root' containment reference. + * @see #getRoot() + * @generated + */ + void setRoot(Dir value); + + /** + * Returns the value of the 'Live' reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. + * + *

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

+ * + * @return the value of the 'Live' reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getFileSystem_Live() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live'" + * @generated + */ + EList getLive(); + +} // FileSystem diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java new file mode 100644 index 00000000..aaba633f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemFactory.java @@ -0,0 +1,69 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage + * @generated + */ +public interface FilesystemFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + FilesystemFactory eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemFactoryImpl.init(); + + /** + * Returns a new object of class 'File System'. + * + * + * @return a new object of class 'File System'. + * @generated + */ + FileSystem createFileSystem(); + + /** + * Returns a new object of class 'Dir'. + * + * + * @return a new object of class 'Dir'. + * @generated + */ + Dir createDir(); + + /** + * Returns a new object of class 'File'. + * + * + * @return a new object of class 'File'. + * @generated + */ + File createFile(); + + /** + * Returns a new object of class 'Model'. + * + * + * @return a new object of class 'Model'. + * @generated + */ + Model createModel(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + FilesystemPackage getFilesystemPackage(); + +} //FilesystemFactory diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java new file mode 100644 index 00000000..cad9293e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/FilesystemPackage.java @@ -0,0 +1,511 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" + * @generated + */ +public interface FilesystemPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "Filesystem"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "FS"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "FS"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + FilesystemPackage eINSTANCE = hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl.init(); + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl File System}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFileSystem() + * @generated + */ + int FILE_SYSTEM = 0; + + /** + * The feature id for the 'Root' containment reference. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM__ROOT = 0; + + /** + * The feature id for the 'Live' reference list. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM__LIVE = 1; + + /** + * The number of structural features of the 'File System' class. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'File System' class. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl FS Object}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFSObject() + * @generated + */ + int FS_OBJECT = 1; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FS_OBJECT__PARENT = 0; + + /** + * The number of structural features of the 'FS Object' class. + * + * + * @generated + * @ordered + */ + int FS_OBJECT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'FS Object' class. + * + * + * @generated + * @ordered + */ + int FS_OBJECT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl Dir}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getDir() + * @generated + */ + int DIR = 2; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int DIR__PARENT = FS_OBJECT__PARENT; + + /** + * The feature id for the 'Contents' containment reference list. + * + * + * @generated + * @ordered + */ + int DIR__CONTENTS = FS_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Dir' class. + * + * + * @generated + * @ordered + */ + int DIR_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Dir' class. + * + * + * @generated + * @ordered + */ + int DIR_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl File}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFile() + * @generated + */ + int FILE = 3; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FILE__PARENT = FS_OBJECT__PARENT; + + /** + * The number of structural features of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl Model}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getModel() + * @generated + */ + int MODEL = 4; + + /** + * The feature id for the 'Filesystems' containment reference. + * + * + * @generated + * @ordered + */ + int MODEL__FILESYSTEMS = 0; + + /** + * The feature id for the 'Other FS Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int MODEL__OTHER_FS_OBJECTS = 1; + + /** + * The number of structural features of the 'Model' class. + * + * + * @generated + * @ordered + */ + int MODEL_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Model' class. + * + * + * @generated + * @ordered + */ + int MODEL_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem File System}'. + * + * + * @return the meta object for class 'File System'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem + * @generated + */ + EClass getFileSystem(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot Root}'. + * + * + * @return the meta object for the containment reference 'Root'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getRoot() + * @see #getFileSystem() + * @generated + */ + EReference getFileSystem_Root(); + + /** + * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive Live}'. + * + * + * @return the meta object for the reference list 'Live'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem#getLive() + * @see #getFileSystem() + * @generated + */ + EReference getFileSystem_Live(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject FS Object}'. + * + * + * @return the meta object for class 'FS Object'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject + * @generated + */ + EClass getFSObject(); + + /** + * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent Parent}'. + * + * + * @return the meta object for the container reference 'Parent'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject#getParent() + * @see #getFSObject() + * @generated + */ + EReference getFSObject_Parent(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir Dir}'. + * + * + * @return the meta object for class 'Dir'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir + * @generated + */ + EClass getDir(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents Contents}'. + * + * + * @return the meta object for the containment reference list 'Contents'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir#getContents() + * @see #getDir() + * @generated + */ + EReference getDir_Contents(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File File}'. + * + * + * @return the meta object for class 'File'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File + * @generated + */ + EClass getFile(); + + /** + * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model Model}'. + * + * + * @return the meta object for class 'Model'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model + * @generated + */ + EClass getModel(); + + /** + * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems Filesystems}'. + * + * + * @return the meta object for the containment reference 'Filesystems'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems() + * @see #getModel() + * @generated + */ + EReference getModel_Filesystems(); + + /** + * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects Other FS Objects}'. + * + * + * @return the meta object for the containment reference list 'Other FS Objects'. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects() + * @see #getModel() + * @generated + */ + EReference getModel_OtherFSObjects(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + FilesystemFactory getFilesystemFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl File System}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFileSystem() + * @generated + */ + EClass FILE_SYSTEM = eINSTANCE.getFileSystem(); + + /** + * The meta object literal for the 'Root' containment reference feature. + * + * + * @generated + */ + EReference FILE_SYSTEM__ROOT = eINSTANCE.getFileSystem_Root(); + + /** + * The meta object literal for the 'Live' reference list feature. + * + * + * @generated + */ + EReference FILE_SYSTEM__LIVE = eINSTANCE.getFileSystem_Live(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl FS Object}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFSObject() + * @generated + */ + EClass FS_OBJECT = eINSTANCE.getFSObject(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference FS_OBJECT__PARENT = eINSTANCE.getFSObject_Parent(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl Dir}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getDir() + * @generated + */ + EClass DIR = eINSTANCE.getDir(); + + /** + * The meta object literal for the 'Contents' containment reference list feature. + * + * + * @generated + */ + EReference DIR__CONTENTS = eINSTANCE.getDir_Contents(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl File}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getFile() + * @generated + */ + EClass FILE = eINSTANCE.getFile(); + + /** + * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl Model}' class. + * + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FilesystemPackageImpl#getModel() + * @generated + */ + EClass MODEL = eINSTANCE.getModel(); + + /** + * The meta object literal for the 'Filesystems' containment reference feature. + * + * + * @generated + */ + EReference MODEL__FILESYSTEMS = eINSTANCE.getModel_Filesystems(); + + /** + * The meta object literal for the 'Other FS Objects' containment reference list feature. + * + * + * @generated + */ + EReference MODEL__OTHER_FS_OBJECTS = eINSTANCE.getModel_OtherFSObjects(); + + } + +} //FilesystemPackage diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java new file mode 100644 index 00000000..c67a3c8a --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/Model.java @@ -0,0 +1,69 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems Filesystems}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getOtherFSObjects Other FS Objects}
  • + *
+ * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel() + * @model + * @generated + */ +public interface Model extends EObject { + /** + * Returns the value of the 'Filesystems' containment reference. + * + *

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

+ * + * @return the value of the 'Filesystems' containment reference. + * @see #setFilesystems(FileSystem) + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel_Filesystems() + * @model containment="true" required="true" + * @generated + */ + FileSystem getFilesystems(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model#getFilesystems Filesystems}' containment reference. + * + * + * @param value the new value of the 'Filesystems' containment reference. + * @see #getFilesystems() + * @generated + */ + void setFilesystems(FileSystem value); + + /** + * Returns the value of the 'Other FS Objects' containment reference list. + * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject}. + * + *

+ * If the meaning of the 'Other FS Objects' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Other FS Objects' containment reference list. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#getModel_OtherFSObjects() + * @model containment="true" + * @generated + */ + EList getOtherFSObjects(); + +} // Model diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java new file mode 100644 index 00000000..62df04af --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/DirImpl.java @@ -0,0 +1,165 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dir'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.DirImpl#getContents Contents}
  • + *
+ * + * @generated + */ +public class DirImpl extends FSObjectImpl implements Dir { + /** + * The cached value of the '{@link #getContents() Contents}' containment reference list. + * + * + * @see #getContents() + * @generated + * @ordered + */ + protected EList contents; + + /** + * + * + * @generated + */ + protected DirImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilesystemPackage.Literals.DIR; + } + + /** + * + * + * @generated + */ + public EList getContents() { + if (contents == null) { + contents = new EObjectContainmentWithInverseEList(FSObject.class, this, FilesystemPackage.DIR__CONTENTS, FilesystemPackage.FS_OBJECT__PARENT); + } + return contents; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + return ((InternalEList)(InternalEList)getContents()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + return getContents(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + getContents().clear(); + getContents().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + getContents().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FilesystemPackage.DIR__CONTENTS: + return contents != null && !contents.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DirImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java new file mode 100644 index 00000000..c8e73b4e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FSObjectImpl.java @@ -0,0 +1,194 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'FS Object'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FSObjectImpl#getParent Parent}
  • + *
+ * + * @generated + */ +public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject { + /** + * + * + * @generated + */ + protected FSObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilesystemPackage.Literals.FS_OBJECT; + } + + /** + * + * + * @generated + */ + public Dir getParent() { + if (eContainerFeatureID() != FilesystemPackage.FS_OBJECT__PARENT) return null; + return (Dir)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newParent, FilesystemPackage.FS_OBJECT__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(Dir newParent) { + if (newParent != eInternalContainer() || (eContainerFeatureID() != FilesystemPackage.FS_OBJECT__PARENT && newParent != null)) { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, FilesystemPackage.DIR__CONTENTS, Dir.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FilesystemPackage.FS_OBJECT__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((Dir)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + return basicSetParent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case FilesystemPackage.FS_OBJECT__PARENT: + return eInternalContainer().eInverseRemove(this, FilesystemPackage.DIR__CONTENTS, Dir.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + return getParent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + setParent((Dir)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + setParent((Dir)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FilesystemPackage.FS_OBJECT__PARENT: + return getParent() != null; + } + return super.eIsSet(featureID); + } + +} //FSObjectImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java new file mode 100644 index 00000000..55cd8a23 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileImpl.java @@ -0,0 +1,36 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'File'. + * + * + * @generated + */ +public class FileImpl extends FSObjectImpl implements File { + /** + * + * + * @generated + */ + protected FileImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilesystemPackage.Literals.FILE; + } + +} //FileImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java new file mode 100644 index 00000000..adf30f3a --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FileSystemImpl.java @@ -0,0 +1,205 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'File System'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl#getRoot Root}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.FileSystemImpl#getLive Live}
  • + *
+ * + * @generated + */ +public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem { + /** + * The cached value of the '{@link #getRoot() Root}' containment reference. + * + * + * @see #getRoot() + * @generated + * @ordered + */ + protected Dir root; + + /** + * The cached setting delegate for the '{@link #getLive() Live}' reference list. + * + * + * @see #getLive() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate LIVE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)FilesystemPackage.Literals.FILE_SYSTEM__LIVE).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FileSystemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilesystemPackage.Literals.FILE_SYSTEM; + } + + /** + * + * + * @generated + */ + public Dir getRoot() { + return root; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) { + Dir oldRoot = root; + root = newRoot; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRoot(Dir newRoot) { + if (newRoot != root) { + NotificationChain msgs = null; + if (root != null) + msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.FILE_SYSTEM__ROOT, null, msgs); + if (newRoot != null) + msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.FILE_SYSTEM__ROOT, null, msgs); + msgs = basicSetRoot(newRoot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FilesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getLive() { + return (EList)LIVE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.FILE_SYSTEM__ROOT: + return basicSetRoot(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FilesystemPackage.FILE_SYSTEM__ROOT: + return getRoot(); + case FilesystemPackage.FILE_SYSTEM__LIVE: + return getLive(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FilesystemPackage.FILE_SYSTEM__ROOT: + setRoot((Dir)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FilesystemPackage.FILE_SYSTEM__ROOT: + setRoot((Dir)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FilesystemPackage.FILE_SYSTEM__ROOT: + return root != null; + case FilesystemPackage.FILE_SYSTEM__LIVE: + return LIVE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + } + return super.eIsSet(featureID); + } + +} //FileSystemImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java new file mode 100644 index 00000000..e40b0bd1 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemFactoryImpl.java @@ -0,0 +1,128 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class FilesystemFactoryImpl extends EFactoryImpl implements FilesystemFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static FilesystemFactory init() { + try { + FilesystemFactory theFilesystemFactory = (FilesystemFactory)EPackage.Registry.INSTANCE.getEFactory(FilesystemPackage.eNS_URI); + if (theFilesystemFactory != null) { + return theFilesystemFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new FilesystemFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public FilesystemFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case FilesystemPackage.FILE_SYSTEM: return createFileSystem(); + case FilesystemPackage.DIR: return createDir(); + case FilesystemPackage.FILE: return createFile(); + case FilesystemPackage.MODEL: return createModel(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public FileSystem createFileSystem() { + FileSystemImpl fileSystem = new FileSystemImpl(); + return fileSystem; + } + + /** + * + * + * @generated + */ + public Dir createDir() { + DirImpl dir = new DirImpl(); + return dir; + } + + /** + * + * + * @generated + */ + public File createFile() { + FileImpl file = new FileImpl(); + return file; + } + + /** + * + * + * @generated + */ + public Model createModel() { + ModelImpl model = new ModelImpl(); + return model; + } + + /** + * + * + * @generated + */ + public FilesystemPackage getFilesystemPackage() { + return (FilesystemPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static FilesystemPackage getPackage() { + return FilesystemPackage.eINSTANCE; + } + +} //FilesystemFactoryImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java new file mode 100644 index 00000000..87390fee --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/FilesystemPackageImpl.java @@ -0,0 +1,356 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemFactory; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class FilesystemPackageImpl extends EPackageImpl implements FilesystemPackage { + /** + * + * + * @generated + */ + private EClass fileSystemEClass = null; + + /** + * + * + * @generated + */ + private EClass fsObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass dirEClass = null; + + /** + * + * + * @generated + */ + private EClass fileEClass = null; + + /** + * + * + * @generated + */ + private EClass modelEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage#eNS_URI + * @see #init() + * @generated + */ + private FilesystemPackageImpl() { + super(eNS_URI, FilesystemFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link FilesystemPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static FilesystemPackage init() { + if (isInited) return (FilesystemPackage)EPackage.Registry.INSTANCE.getEPackage(FilesystemPackage.eNS_URI); + + // Obtain or create and register package + FilesystemPackageImpl theFilesystemPackage = (FilesystemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FilesystemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FilesystemPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theFilesystemPackage.createPackageContents(); + + // Initialize created meta-data + theFilesystemPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theFilesystemPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(FilesystemPackage.eNS_URI, theFilesystemPackage); + return theFilesystemPackage; + } + + /** + * + * + * @generated + */ + public EClass getFileSystem() { + return fileSystemEClass; + } + + /** + * + * + * @generated + */ + public EReference getFileSystem_Root() { + return (EReference)fileSystemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFileSystem_Live() { + return (EReference)fileSystemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFSObject() { + return fsObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getFSObject_Parent() { + return (EReference)fsObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDir() { + return dirEClass; + } + + /** + * + * + * @generated + */ + public EReference getDir_Contents() { + return (EReference)dirEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFile() { + return fileEClass; + } + + /** + * + * + * @generated + */ + public EClass getModel() { + return modelEClass; + } + + /** + * + * + * @generated + */ + public EReference getModel_Filesystems() { + return (EReference)modelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getModel_OtherFSObjects() { + return (EReference)modelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public FilesystemFactory getFilesystemFactory() { + return (FilesystemFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + fileSystemEClass = createEClass(FILE_SYSTEM); + createEReference(fileSystemEClass, FILE_SYSTEM__ROOT); + createEReference(fileSystemEClass, FILE_SYSTEM__LIVE); + + fsObjectEClass = createEClass(FS_OBJECT); + createEReference(fsObjectEClass, FS_OBJECT__PARENT); + + dirEClass = createEClass(DIR); + createEReference(dirEClass, DIR__CONTENTS); + + fileEClass = createEClass(FILE); + + modelEClass = createEClass(MODEL); + createEReference(modelEClass, MODEL__FILESYSTEMS); + createEReference(modelEClass, MODEL__OTHER_FS_OBJECTS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dirEClass.getESuperTypes().add(this.getFSObject()); + fileEClass.getESuperTypes().add(this.getFSObject()); + + // Initialize classes, features, and operations; add parameters + initEClass(fileSystemEClass, FileSystem.class, "FileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFileSystem_Root(), this.getDir(), null, "root", null, 1, 1, FileSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFileSystem_Live(), this.getFSObject(), null, "live", null, 0, -1, FileSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(fsObjectEClass, FSObject.class, "FSObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFSObject_Parent(), this.getDir(), this.getDir_Contents(), "parent", null, 0, 1, FSObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dirEClass, Dir.class, "Dir", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDir_Contents(), this.getFSObject(), this.getFSObject_Parent(), "contents", null, 0, -1, Dir.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModel_Filesystems(), this.getFileSystem(), null, "filesystems", null, 1, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModel_OtherFSObjects(), this.getFSObject(), null, "otherFSObjects", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (this, + source, + new String[] { + "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" + }); + } + + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation + (getFileSystem_Live(), + source, + new String[] { + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live" + }); + } + +} //FilesystemPackageImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java new file mode 100644 index 00000000..4c236e8e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/impl/ModelImpl.java @@ -0,0 +1,221 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage; +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl#getFilesystems Filesystems}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.impl.ModelImpl#getOtherFSObjects Other FS Objects}
  • + *
+ * + * @generated + */ +public class ModelImpl extends MinimalEObjectImpl.Container implements Model { + /** + * The cached value of the '{@link #getFilesystems() Filesystems}' containment reference. + * + * + * @see #getFilesystems() + * @generated + * @ordered + */ + protected FileSystem filesystems; + + /** + * The cached value of the '{@link #getOtherFSObjects() Other FS Objects}' containment reference list. + * + * + * @see #getOtherFSObjects() + * @generated + * @ordered + */ + protected EList otherFSObjects; + + /** + * + * + * @generated + */ + protected ModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilesystemPackage.Literals.MODEL; + } + + /** + * + * + * @generated + */ + public FileSystem getFilesystems() { + return filesystems; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFilesystems(FileSystem newFilesystems, NotificationChain msgs) { + FileSystem oldFilesystems = filesystems; + filesystems = newFilesystems; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilesystemPackage.MODEL__FILESYSTEMS, oldFilesystems, newFilesystems); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setFilesystems(FileSystem newFilesystems) { + if (newFilesystems != filesystems) { + NotificationChain msgs = null; + if (filesystems != null) + msgs = ((InternalEObject)filesystems).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.MODEL__FILESYSTEMS, null, msgs); + if (newFilesystems != null) + msgs = ((InternalEObject)newFilesystems).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilesystemPackage.MODEL__FILESYSTEMS, null, msgs); + msgs = basicSetFilesystems(newFilesystems, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FilesystemPackage.MODEL__FILESYSTEMS, newFilesystems, newFilesystems)); + } + + /** + * + * + * @generated + */ + public EList getOtherFSObjects() { + if (otherFSObjects == null) { + otherFSObjects = new EObjectContainmentEList(FSObject.class, this, FilesystemPackage.MODEL__OTHER_FS_OBJECTS); + } + return otherFSObjects; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FilesystemPackage.MODEL__FILESYSTEMS: + return basicSetFilesystems(null, msgs); + case FilesystemPackage.MODEL__OTHER_FS_OBJECTS: + return ((InternalEList)getOtherFSObjects()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FilesystemPackage.MODEL__FILESYSTEMS: + return getFilesystems(); + case FilesystemPackage.MODEL__OTHER_FS_OBJECTS: + return getOtherFSObjects(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FilesystemPackage.MODEL__FILESYSTEMS: + setFilesystems((FileSystem)newValue); + return; + case FilesystemPackage.MODEL__OTHER_FS_OBJECTS: + getOtherFSObjects().clear(); + getOtherFSObjects().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FilesystemPackage.MODEL__FILESYSTEMS: + setFilesystems((FileSystem)null); + return; + case FilesystemPackage.MODEL__OTHER_FS_OBJECTS: + getOtherFSObjects().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FilesystemPackage.MODEL__FILESYSTEMS: + return filesystems != null; + case FilesystemPackage.MODEL__OTHER_FS_OBJECTS: + return otherFSObjects != null && !otherFSObjects.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModelImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java new file mode 100644 index 00000000..dc87e685 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemAdapterFactory.java @@ -0,0 +1,192 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage + * @generated + */ +public class FilesystemAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static FilesystemPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public FilesystemAdapterFactory() { + if (modelPackage == null) { + modelPackage = FilesystemPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected FilesystemSwitch modelSwitch = + new FilesystemSwitch() { + @Override + public Adapter caseFileSystem(FileSystem object) { + return createFileSystemAdapter(); + } + @Override + public Adapter caseFSObject(FSObject object) { + return createFSObjectAdapter(); + } + @Override + public Adapter caseDir(Dir object) { + return createDirAdapter(); + } + @Override + public Adapter caseFile(File object) { + return createFileAdapter(); + } + @Override + public Adapter caseModel(Model object) { + return createModelAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem File System}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FileSystem + * @generated + */ + public Adapter createFileSystemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject FS Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FSObject + * @generated + */ + public Adapter createFSObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir Dir}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Dir + * @generated + */ + public Adapter createDirAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File File}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.File + * @generated + */ + public Adapter createFileAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.Model + * @generated + */ + public Adapter createModelAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //FilesystemAdapterFactory diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java new file mode 100644 index 00000000..ce2079c8 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/Filesystem/util/FilesystemSwitch.java @@ -0,0 +1,196 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.util; + +import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage + * @generated + */ +public class FilesystemSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static FilesystemPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public FilesystemSwitch() { + if (modelPackage == null) { + modelPackage = FilesystemPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case FilesystemPackage.FILE_SYSTEM: { + FileSystem fileSystem = (FileSystem)theEObject; + T result = caseFileSystem(fileSystem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FilesystemPackage.FS_OBJECT: { + FSObject fsObject = (FSObject)theEObject; + T result = caseFSObject(fsObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FilesystemPackage.DIR: { + Dir dir = (Dir)theEObject; + T result = caseDir(dir); + if (result == null) result = caseFSObject(dir); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FilesystemPackage.FILE: { + File file = (File)theEObject; + T result = caseFile(file); + if (result == null) result = caseFSObject(file); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FilesystemPackage.MODEL: { + Model model = (Model)theEObject; + T result = caseModel(model); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'File System'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File System'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFileSystem(FileSystem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FS Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FS Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFSObject(FSObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dir'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dir'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDir(Dir object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFile(File object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModel(Model object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //FilesystemSwitch -- cgit v1.2.3-54-g00ecf