aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/VIATRA-Solver
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszka@SEMERATH-LAPTOP>2017-07-13 14:16:59 +0200
committerLibravatar OszkarSemerath <oszka@SEMERATH-LAPTOP>2017-07-13 14:16:59 +0200
commitb8694fcd581b19161f72f0da288bf72e922455a8 (patch)
treef760dc03812cf5327243d1fcedc24b96f58c583d /Solvers/VIATRA-Solver
parentThe test runners now ignore every folder beginning with "output*" (diff)
downloadVIATRA-Generator-b8694fcd581b19161f72f0da288bf72e922455a8.tar.gz
VIATRA-Generator-b8694fcd581b19161f72f0da288bf72e922455a8.tar.zst
VIATRA-Generator-b8694fcd581b19161f72f0da288bf72e922455a8.zip
Repaired dependency
Diffstat (limited to 'Solvers/VIATRA-Solver')
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/.classpath2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/pom.xml15
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/PartialInterpretation2Graphviz.xtend5
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/Test.xtend3
4 files changed, 22 insertions, 3 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/.classpath b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/.classpath
index a49f7d1e..0a5954ed 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/.classpath
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/.classpath
@@ -9,7 +9,7 @@
9 </attributes> 9 </attributes>
10 </classpathentry> 10 </classpathentry>
11 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> 11 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
12 <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> 12 <classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
13 <attributes> 13 <attributes>
14 <attribute name="maven.pomderived" value="true"/> 14 <attribute name="maven.pomderived" value="true"/>
15 </attributes> 15 </attributes>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/pom.xml b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/pom.xml
index ac745ad3..11262177 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/pom.xml
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/pom.xml
@@ -9,7 +9,22 @@
9 <groupId>guru.nidi</groupId> 9 <groupId>guru.nidi</groupId>
10 <artifactId>graphviz-java</artifactId> 10 <artifactId>graphviz-java</artifactId>
11 <version>0.2.1</version> 11 <version>0.2.1</version>
12 <exclusions>
13 <exclusion>
14 <groupId>com.eclipsesource.j2v8</groupId>
15 <artifactId>j2v8_macosx_x86_64</artifactId>
16 </exclusion>
17 <exclusion>
18 <groupId>com.eclipsesource.j2v8</groupId>
19 <artifactId>j2v8_linux_x86_64</artifactId>
20 </exclusion>
21 </exclusions>
12 </dependency> 22 </dependency>
23<!-- <dependency> -->
24<!-- <groupId>com.eclipsesource.j2v8</groupId> -->
25<!-- <artifactId>j2v8_win32_x86_64</artifactId> -->
26<!-- <version>4.6.0</version> -->
27<!-- </dependency> -->
13 <dependency> 28 <dependency>
14 <groupId>org.slf4j</groupId> 29 <groupId>org.slf4j</groupId>
15 <artifactId>slf4j-nop</artifactId> 30 <artifactId>slf4j-nop</artifactId>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/PartialInterpretation2Graphviz.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/PartialInterpretation2Graphviz.xtend
index a4baeadb..81dd97b1 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/PartialInterpretation2Graphviz.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/PartialInterpretation2Graphviz.xtend
@@ -33,6 +33,8 @@ import guru.nidi.graphviz.engine.Engine
33import guru.nidi.graphviz.attribute.Records 33import guru.nidi.graphviz.attribute.Records
34import guru.nidi.graphviz.attribute.Attributes 34import guru.nidi.graphviz.attribute.Attributes
35import java.util.List 35import java.util.List
36import guru.nidi.graphviz.engine.GraphvizEngine
37import guru.nidi.graphviz.engine.GraphvizV8Engine
36 38
37class GraphvizVisualisation implements PartialInterpretationVisualiser { 39class GraphvizVisualisation implements PartialInterpretationVisualiser {
38 40
@@ -196,7 +198,7 @@ class GraphvizVisualisation implements PartialInterpretationVisualiser {
196 } 198 }
197 protected def typePredicateColor(Set<Type> types) { types.averageColor } 199 protected def typePredicateColor(Set<Type> types) { types.averageColor }
198 protected def typePredicateColor(String name) { 200 protected def typePredicateColor(String name) {
199 val Random random = new Random(name.hashCode+1) 201 val Random random = new Random(name.hashCode)
200 val rangePicker = [|random.nextInt(128)+128] 202 val rangePicker = [|random.nextInt(128)+128]
201 return #[rangePicker.apply(), rangePicker.apply(), rangePicker.apply()] 203 return #[rangePicker.apply(), rangePicker.apply(), rangePicker.apply()]
202 } 204 }
@@ -232,6 +234,7 @@ class GraphvisVisualisation implements PartialInterpretationVisualisation {
232 234
233 override writeToFile(ReasonerWorkspace workspace, String name) { 235 override writeToFile(ReasonerWorkspace workspace, String name) {
234 val path = '''«workspace.workspaceURI.toFileString»/«name».png''' 236 val path = '''«workspace.workspaceURI.toFileString»/«name».png'''
237 Graphviz.useEngine(new GraphvizV8Engine());
235 Graphviz.fromGraph(graph)//.engine(Engine::NEATO) 238 Graphviz.fromGraph(graph)//.engine(Engine::NEATO)
236 .render(Format.PNG).toFile(new File(path)); 239 .render(Format.PNG).toFile(new File(path));
237 } 240 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/Test.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/Test.xtend
index 75187c26..428973a4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/Test.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/src/hu/bme/mit/inf/dslreasoner/visualisation/pi2graphviz/Test.xtend
@@ -7,7 +7,8 @@ import org.eclipse.emf.ecore.resource.Resource
7import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl 7import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl
8 8
9class Test { 9class Test {
10 def static void main(String[] args) { 10 def static void main(String[] args) {
11 println("xxx")
11 val workspace = new FileSystemWorkspace("input/","") 12 val workspace = new FileSystemWorkspace("input/","")
12 13
13 PartialinterpretationPackage.eINSTANCE.eClass 14 PartialinterpretationPackage.eINSTANCE.eClass