Skip to content
Snippets Groups Projects
Commit 043514f7 authored by Lukas Ladenberger's avatar Lukas Ladenberger
Browse files

Merge branch 'develop' of github.com:bendisposto/prob into develop

parents 3bc1c9cd fb41ab06
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/dependencies/xstream-1.2.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dependencies/answerparser-2.4.8-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dependencies/bparser-2.4.8-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dependencies/cliparser-2.4.8-SNAPSHOT.jar"/>
......
......@@ -102,4 +102,5 @@ Bundle-ClassPath: .,
lib/dependencies/ltlparser-2.4.8-SNAPSHOT.jar,
lib/dependencies/parserbase-2.4.8-SNAPSHOT.jar,
lib/dependencies/prologlib-2.4.8-SNAPSHOT.jar,
lib/dependencies/unicode-2.4.8-SNAPSHOT.jar
lib/dependencies/unicode-2.4.8-SNAPSHOT.jar,
lib/dependencies/xstream-1.2.2.jar
......@@ -4,6 +4,7 @@ bin.includes = META-INF/,\
plugin.xml,\
.,\
prob/,\
lib/
lib/,\
lib/dependencies/xstream-1.2.2.jar
......@@ -6,12 +6,19 @@
package de.prob.core;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.emf.common.command.Command;
import org.osgi.service.prefs.Preferences;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
import de.prob.core.command.IComposableCommand;
import de.prob.core.domainobjects.History;
import de.prob.core.domainobjects.MachineDescription;
......@@ -23,6 +30,8 @@ import de.prob.core.internal.AnimatorImpl;
import de.prob.core.internal.ServerTraceConnection;
import de.prob.core.internal.TraceConnectionProvider;
import de.prob.exceptions.ProBException;
import de.prob.model.eventb.Model;
/**
* Animator is a singleton Proxy used to communicate with ProB. The method
......@@ -337,4 +346,17 @@ public final class Animator {
public void sendUserInterruptSignal() {
if (implementation != null) implementation.sendUserInterruptSignal();
}
public static void serializeModel(Model model) {
XStream xstream = new XStream(new JettisonMappedXmlDriver());
String xml = xstream.toXML(model);
try {
FileWriter fw = new FileWriter("model.xml");
final BufferedWriter bw = new BufferedWriter(fw);
bw.write(xml);
bw.close();
} catch (IOException e1) {
System.out.println("could not create file");
}
}
}
......@@ -3,7 +3,13 @@ package de.prob.model.eventb;
import java.util.ArrayList;
import java.util.List;
import de.prob.model.representation.Label;
public class Model {
public List<Relationship> relationships = new ArrayList<Relationship>();
public void addRelationship(final Label from, final Label to) {
relationships.add(new Relationship(from, to));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment