<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/eventb2sql/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 28 Nov 2015 16:51:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/eventb2sql/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v32
+++ v33
@@ -96,13 +96,14 @@
 2. Download and unpack  http://users.dickinson.edu/~wahlst/eventb2sql/AndroidExample.zip.  Copy the files in &lt;code&gt;AndroidExample/java&lt;/code&gt; to the &lt;code&gt;app/src/main/java/edu/dickinson/socialnetwork&lt;/code&gt; directory in your new project.
 3. Copy the files in &lt;code&gt;AndroidExample/layout&lt;/code&gt; to the &lt;code&gt;app/src/main/res/layout&lt;/code&gt; directory in your new project.
 4. Copy the file in &lt;code&gt;AndroidExample/manifest&lt;/code&gt; to the &lt;code&gt;app/src/main&lt;/code&gt; directory in your new project.
-5. Copy eventB2SQL.jar to the &lt;code&gt;app/libs&lt;/code&gt; directory of your project (if you haven't already done so)
-6. From the Build menu in Android Studio, select &lt;code&gt;Rebuild Project&lt;/code&gt;
-7. Run the project.
-8. In your device or emulator, click the &lt;code&gt;CREATE DATABASE&lt;/code&gt; button to create the database.
-9. Enter a person's name or content of a post before clicking &lt;code&gt;ADD PERSON&lt;/code&gt; or &lt;code&gt;ADD CONTENT&lt;/code&gt;.
-10. Use the &lt;code&gt;CREATE ACCOUNT&lt;/code&gt; button to create accounts.
-11. The entire current state of the network is always displayed on the app.
+5. Copy eventB2SQL.jar to the &lt;code&gt;app/libs&lt;/code&gt; directory of your project (if you haven't already done so).
+6. Set up the &lt;code&gt;SocialNetworking&lt;/code&gt; project in Rodin as described in the previous section, and translate machine &lt;code&gt;ref0_abstract&lt;/code&gt; to SQLite (Android).  Place the generated code in the &lt;code&gt;app/src/main/java/edu/dickinson/socialnetwork&lt;/code&gt; directory in your Android Studio project, and enter &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt; as the package.  (Note that AndroidExample.zip already contains a translation, so you can skip this step if you wish.)
+7. From the Build menu in Android Studio, select &lt;code&gt;Rebuild Project&lt;/code&gt;
+8. Run the project.
+9. In your device or emulator, click the &lt;code&gt;CREATE DATABASE&lt;/code&gt; button to create the database.
+10. Enter a person's name or content of a post before clicking &lt;code&gt;ADD PERSON&lt;/code&gt; or &lt;code&gt;ADD CONTENT&lt;/code&gt;.
+11. Use the &lt;code&gt;CREATE ACCOUNT&lt;/code&gt; button to create accounts.
+12. The entire current state of the network is always displayed on the app.

 ![app interface](http://users.dickinson.edu/~wahlst/eventb2sql/network.png)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:51:51 -0000</pubDate><guid>https://sourceforge.net0e5acf636fa1bca0ede861609503793abb8ac396</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v31
+++ v32
@@ -97,8 +97,7 @@
 3. Copy the files in &lt;code&gt;AndroidExample/layout&lt;/code&gt; to the &lt;code&gt;app/src/main/res/layout&lt;/code&gt; directory in your new project.
 4. Copy the file in &lt;code&gt;AndroidExample/manifest&lt;/code&gt; to the &lt;code&gt;app/src/main&lt;/code&gt; directory in your new project.
 5. Copy eventB2SQL.jar to the &lt;code&gt;app/libs&lt;/code&gt; directory of your project (if you haven't already done so)
-6. From the Build menu in Android Studio, select 
-   &lt;code&gt;Rebuild Project&lt;/code&gt;
+6. From the Build menu in Android Studio, select &lt;code&gt;Rebuild Project&lt;/code&gt;
 7. Run the project.
 8. In your device or emulator, click the &lt;code&gt;CREATE DATABASE&lt;/code&gt; button to create the database.
 9. Enter a person's name or content of a post before clicking &lt;code&gt;ADD PERSON&lt;/code&gt; or &lt;code&gt;ADD CONTENT&lt;/code&gt;.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:45:46 -0000</pubDate><guid>https://sourceforge.net15ff3bc98e49cf791c82d7af947d22272d545086</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v30
+++ v31
@@ -92,7 +92,7 @@
 9. Run class &lt;code&gt;SocialNetworkCaller&lt;/code&gt;.  Note that you should create three users before using the transmit option.

 ##Android##
-1. Create a new Android Studio project called &lt;code&gt;SocialNetwork&lt;code&gt; with a blank main activity in package &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt;.
+1. Create a new Android Studio project called &lt;code&gt;SocialNetwork&lt;/code&gt; with a blank main activity in package &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt;.
 2. Download and unpack  http://users.dickinson.edu/~wahlst/eventb2sql/AndroidExample.zip.  Copy the files in &lt;code&gt;AndroidExample/java&lt;/code&gt; to the &lt;code&gt;app/src/main/java/edu/dickinson/socialnetwork&lt;/code&gt; directory in your new project.
 3. Copy the files in &lt;code&gt;AndroidExample/layout&lt;/code&gt; to the &lt;code&gt;app/src/main/res/layout&lt;/code&gt; directory in your new project.
 4. Copy the file in &lt;code&gt;AndroidExample/manifest&lt;/code&gt; to the &lt;code&gt;app/src/main&lt;/code&gt; directory in your new project.
&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;code&gt;&lt;code&gt;
&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:45:03 -0000</pubDate><guid>https://sourceforge.net572aa5e1e4d9b4fdce874f6e0cfb3aae5e9cb7ff</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v29
+++ v30
@@ -10,8 +10,8 @@
 http://users.dickinson.edu/~wahlst/EventB2SQL-update

 select EventB2SQL and click Next.
-5. On the Install Details page, click Next again, then accept the (empty) license agreement.
-6.  Click Finish, and then OK at the security warning. 
+5. On the &lt;code&gt;Install Details&lt;/code&gt; page, click &lt;code&gt;Next&lt;/code&gt; again, then accept the (empty) license agreement.
+6.  Click &lt;code&gt;Finish&lt;/code&gt;, and then &lt;code&gt;OK&lt;/code&gt; at the security warning. 
 #Generating Code#
 From the Event-B Explorer pane in Rodin, right-click on the machine that you wish to translate and select the translation target:

@@ -20,80 +20,79 @@
 * Translate to SQLite (Android)
 * Translate to MySQL (PHP)

-The first three options generate Java code, while the fourth generates PHP.  For all four options, the generated code is placed in the generated_sql directory within the Rodin project by default, but this can be edited in the "Output FIle" pop-up.  For the three Java options, the user can then enter a package for the generated class.  For all options, the generated code consists of a single class with the same name as the machine.  
+The first three options generate Java code, while the fourth generates PHP.  For all four options, the generated code is placed in the &lt;code&gt;generated_sql&lt;/code&gt; directory within the Rodin project by default, but this can be edited in the "Output File" pop-up.  For the three Java options, the user can then enter a package for the generated class.  For all options, the generated code consists of a single class with the same name as the machine.  
 #Using the Generated Code#
 ##MySQL (JDBC)##

 1.  Install MySQL Connector/J: http://dev.mysql.com/downloads/connector/j/ and add the jar file to your classpath (if you have not already done so).
-2. Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
-3. Within MySQL, create a new database and a user with full permissions on that database (or choose an existing database and user).  The rest of this section assumes that the database is called eventb, the user is ebuser and the password is pass.
-4. Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work:
+2. Download &lt;code&gt;eventB2SQL.jar&lt;/code&gt;: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
+3. Within MySQL, create a new database and a user with full permissions on that database (or choose an existing database and user).  The rest of this section assumes that the database is called &lt;code&gt;eventb&lt;/code&gt;, the user is &lt;code&gt;ebuser&lt;/code&gt; and the password is &lt;code&gt;pass&lt;/code&gt;.
+4. Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is &lt;code&gt;Test.java&lt;/code&gt;, machine &lt;code&gt;Test&lt;/code&gt; uses no carrier sets, and you named your database and user as mentioned above, the following should work:

-    &amp;gt;Class.forName("com.mysql.jdbc.Driver");
+    &amp;gt;&lt;code&gt;Class.forName("com.mysql.jdbc.Driver");
     Connection con;
     con = DriverManager.getConnection("jdbc:mysql://localhost/eventb?&amp;amp;autoDeserialize=true", "ebuser", "pass");
     Test test = new Test(con);
     test.createTables();
-    test.INITIALISATION();
+    test.INITIALISATION();&lt;/code&gt;

-5. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
+5. The &lt;code&gt;createTables&lt;/code&gt; method should be called only once (to create the database tables used by the implementation), while &lt;code&gt;INITIALISATION&lt;/code&gt; can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the &lt;code&gt;createTables&lt;/code&gt; method takes additional parameters containing the initial values of each of those sets.
 6. Add more code to call the methods in the generated class as desired. 
 ##SQLite (JDBC)##
 1.  Download the jar file containing the JDBC driver for SQLite: https://bitbucket.org/xerial/sqlite-jdbc/downloads and add it to your classpath (if you have not already done so).
-2.  Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
-4.  Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work (note that the database is stored in file sample.db):
+2.  Download &lt;code&gt;eventB2SQL.jar&lt;/code&gt;: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
+4.  Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is &lt;code&gt;Test.java&lt;/code&gt;, machine &lt;code&gt;Test&lt;/code&gt; uses no carrier sets, and you named your database and user as mentioned above, the following should work (note that the database is stored in file &lt;code&gt;sample.db&lt;/code&gt;):

-    &amp;gt;Class.forName("org.sqlite.JDBC");
+    &amp;gt;&lt;code&gt;Class.forName("org.sqlite.JDBC");
     Connection con;
     con = DriverManager.getConnection("jdbc:sqlite:sample.db");
     Test test = new Test(con);
     test.createTables();
-    test.INITIALISATION();
+    test.INITIALISATION();&lt;/code&gt;

-5. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
+5. The &lt;code&gt;createTables&lt;/code&gt; method should be called only once (to create the database tables used by the implementation), while &lt;code&gt;INITIALISATION&lt;/code&gt; can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the &lt;code&gt;createTables&lt;/code&gt; method takes additional parameters containing the initial values of each of those sets.
 6. Add more code to call the methods in the generated class as desired. 
 ##SQLite (Android)##
-1.  Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar
-2.  Copy eventB2SQL.jar to the app/libs directory of your Android Studio project.
-3.  From the Build menu in Android Studio, select Rebuild Project (so the project finds the jar that you copied in the previous step).
+1.  Download &lt;code&gt;eventB2SQL.jar&lt;/code&gt;: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar
+2.  Copy &lt;code&gt;eventB2SQL.jar&lt;/code&gt; to the &lt;code&gt;app/libs&lt;/code&gt; directory of your Android Studio project.
+3.  From the &lt;code&gt;Build&lt;/code&gt; menu in Android Studio, select &lt;code&gt;Rebuild Project&lt;/code&gt; (so the project finds the jar that you copied in the previous step).
 4.  Place the code generated by EventB2SQL in the appropriate package in the Java source of your Android Studio project.
 5.  The constructor for the generated class takes the context for your application as a parameter.  This can be obtained by calling:

-     &amp;gt;this.getApplicationContext()
+     &amp;gt;&lt;code&gt;this.getApplicationContext()&lt;/code&gt;

-6.  After creating an instance, use it to call the createTables, INITIALISATION and other methods in the generated class as specified in the previous two sections.
+6.  After creating an instance, use it to call the &lt;code&gt;createTables&lt;/code&gt;, &lt;code&gt;INITIALISATION&lt;/code&gt; and other methods in the generated class as specified in the previous two sections.

 ##MySQL (PHP PDO)##
 1. If the model you generated PHP code for contains any carrier sets, implement a PHP classes for each with exactly the same name and include those classes in your application.
-2.  The constructor for the generated class takes a database connection as a parameter.   If you have created a MySQL database and user as specified in the MySQL (JDBC) section above and translated a machine called Test, the following should work:
+2.  The constructor for the generated class takes a database connection as a parameter.   If you have created a MySQL database and user as specified in the MySQL (JDBC) section above and translated a machine called &lt;code&gt;Test&lt;/code&gt;, the following should work:

-    &amp;gt;    $con = new PDO("mysql:host=localhost;dbname=eventb",
-               "ebuser",
-               "pass", array(PDO::ATTR_EMULATE_PREPARES =&amp;gt; false,
+    &amp;gt; &lt;code&gt;$con = new PDO("mysql:host=localhost;dbname=eventb", "ebuser", "pass",
+                             array(PDO::ATTR_EMULATE_PREPARES =&amp;gt; false,
                              PDO::ATTR_ERRMODE =&amp;gt; PDO::ERRMODE_EXCEPTION));
     $tst = new Test($con);
     $tst-&amp;gt;dropTables();
     $tst-&amp;gt;createTables();
-    $tst-&amp;gt;INITIALISATION();
+    $tst-&amp;gt;INITIALISATION();&lt;/code&gt;

-4. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
+4. The &lt;code&gt;createTables&lt;/code&gt; method should be called only once (to create the database tables used by the implementation), while &lt;code&gt;INITIALISATION&lt;/code&gt; can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the &lt;code&gt;createTables&lt;/code&gt; method takes additional parameters containing the initial values of each of those sets (as arrays).
 5. Add more code to call the methods in the generated class as desired. 

 #Social Networking Example#
 ##Java (non-Android)##
-1. Download http://users.dickinson.edu/~wahlst/eventb2sql/SocialNetworkCaller.zip and either import it into an Eclipse project or unzip it (if you will compile and   run the example from the command line or another IDE).
-2. Add eventB2SQL.jar and the appropriate database driver jar file  to your Build Path/CLASSPATH as described above.
+1. Download http://users.dickinson.edu/~wahlst/eventb2sql/SocialNetworkCaller.zip and either import it into an Eclipse project or unzip it (if you will compile and run the example from the command line or another IDE).
+2. Add &lt;code&gt;eventB2SQL.jar&lt;/code&gt; and the appropriate database driver jar file  to your Build Path/CLASSPATH as described above.
 3. Download http://users.dickinson.edu/~wahlst/eventb2sql/SocialNetworking.zip and unzip it in your Rodin workspace.
-4. Start Rodin and create an Event-B project called SocialNetworking.  Rodin will create the project using the files from the previous step.
+4. Start Rodin and create an Event-B project called &lt;code&gt;SocialNetworking&lt;/code&gt;.  Rodin will create the project using the files from the previous step.
 5. Refresh your new project.
-6. Translate the machine ref0_abstract as described above, entering the path to place ref0_abstract.java into the directory containing the files from Step 1.
-7. If using Eclipse, refresh your project so that Eclipse will recognize ref0_abstract.java.
-8. In the main method of class SocialNetworkCaller, set variable SQLite to true if you are using SQLite, and false if you are using MySQL.  If you are using MySQL, adjust the database name, database user and password to match your setup.
-9. Run class SocialNetworkCaller.  Note that you should create three users before using the transmit option.
+6. Translate the machine &lt;code&gt;ref0_abstract&lt;/code&gt; as described above, entering the path to place &lt;code&gt;ref0_abstract.java&lt;/code&gt; into the directory containing the files from Step 1.
+7. If using Eclipse, refresh your project so that Eclipse will recognize &lt;code&gt;ref0_abstract.java&lt;/code&gt;.
+8. In the main method of class &lt;code&gt;SocialNetworkCaller&lt;/code&gt;, set variable &lt;code&gt;SQLite&lt;/code&gt; to true if you are using SQLite, and false if you are using MySQL.  If you are using MySQL, adjust the database name, database user and password to match your setup.
+9. Run class &lt;code&gt;SocialNetworkCaller&lt;/code&gt;.  Note that you should create three users before using the transmit option.

 ##Android##
-1. Create a new Android Studio project called SocialNetwork with a blank main activity in package &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt;.
+1. Create a new Android Studio project called &lt;code&gt;SocialNetwork&lt;code&gt; with a blank main activity in package &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt;.
 2. Download and unpack  http://users.dickinson.edu/~wahlst/eventb2sql/AndroidExample.zip.  Copy the files in &lt;code&gt;AndroidExample/java&lt;/code&gt; to the &lt;code&gt;app/src/main/java/edu/dickinson/socialnetwork&lt;/code&gt; directory in your new project.
 3. Copy the files in &lt;code&gt;AndroidExample/layout&lt;/code&gt; to the &lt;code&gt;app/src/main/res/layout&lt;/code&gt; directory in your new project.
 4. Copy the file in &lt;code&gt;AndroidExample/manifest&lt;/code&gt; to the &lt;code&gt;app/src/main&lt;/code&gt; directory in your new project.
&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;code&gt;&lt;code&gt;
&lt;/code&gt;&lt;/code&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:33:34 -0000</pubDate><guid>https://sourceforge.net8b68615eb382509a86434c31a28c346c606b87b0</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v28
+++ v29
@@ -92,5 +92,22 @@
 8. In the main method of class SocialNetworkCaller, set variable SQLite to true if you are using SQLite, and false if you are using MySQL.  If you are using MySQL, adjust the database name, database user and password to match your setup.
 9. Run class SocialNetworkCaller.  Note that you should create three users before using the transmit option.

+##Android##
+1. Create a new Android Studio project called SocialNetwork with a blank main activity in package &lt;code&gt;edu.dickinson.socialnetwork&lt;/code&gt;.
+2. Download and unpack  http://users.dickinson.edu/~wahlst/eventb2sql/AndroidExample.zip.  Copy the files in &lt;code&gt;AndroidExample/java&lt;/code&gt; to the &lt;code&gt;app/src/main/java/edu/dickinson/socialnetwork&lt;/code&gt; directory in your new project.
+3. Copy the files in &lt;code&gt;AndroidExample/layout&lt;/code&gt; to the &lt;code&gt;app/src/main/res/layout&lt;/code&gt; directory in your new project.
+4. Copy the file in &lt;code&gt;AndroidExample/manifest&lt;/code&gt; to the &lt;code&gt;app/src/main&lt;/code&gt; directory in your new project.
+5. Copy eventB2SQL.jar to the &lt;code&gt;app/libs&lt;/code&gt; directory of your project (if you haven't already done so)
+6. From the Build menu in Android Studio, select 
+   &lt;code&gt;Rebuild Project&lt;/code&gt;
+7. Run the project.
+8. In your device or emulator, click the &lt;code&gt;CREATE DATABASE&lt;/code&gt; button to create the database.
+9. Enter a person's name or content of a post before clicking &lt;code&gt;ADD PERSON&lt;/code&gt; or &lt;code&gt;ADD CONTENT&lt;/code&gt;.
+10. Use the &lt;code&gt;CREATE ACCOUNT&lt;/code&gt; button to create accounts.
+11. The entire current state of the network is always displayed on the app.
+
+![app interface](http://users.dickinson.edu/~wahlst/eventb2sql/network.png)
+
+
 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:22:16 -0000</pubDate><guid>https://sourceforge.net9926d21a5fcd86e6db0016db055ef7b9379ad80f</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v27
+++ v28
@@ -80,5 +80,17 @@
 4. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
 5. Add more code to call the methods in the generated class as desired.

+#Social Networking Example#
+##Java (non-Android)##
+1. Download http://users.dickinson.edu/~wahlst/eventb2sql/SocialNetworkCaller.zip and either import it into an Eclipse project or unzip it (if you will compile and   run the example from the command line or another IDE).
+2. Add eventB2SQL.jar and the appropriate database driver jar file  to your Build Path/CLASSPATH as described above.
+3. Download http://users.dickinson.edu/~wahlst/eventb2sql/SocialNetworking.zip and unzip it in your Rodin workspace.
+4. Start Rodin and create an Event-B project called SocialNetworking.  Rodin will create the project using the files from the previous step.
+5. Refresh your new project.
+6. Translate the machine ref0_abstract as described above, entering the path to place ref0_abstract.java into the directory containing the files from Step 1.
+7. If using Eclipse, refresh your project so that Eclipse will recognize ref0_abstract.java.
+8. In the main method of class SocialNetworkCaller, set variable SQLite to true if you are using SQLite, and false if you are using MySQL.  If you are using MySQL, adjust the database name, database user and password to match your setup.
+9. Run class SocialNetworkCaller.  Note that you should create three users before using the transmit option.
+
 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Sat, 28 Nov 2015 16:15:55 -0000</pubDate><guid>https://sourceforge.net2fd49aaf781d2e2adb477f2bf9930b494a8e8072</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v26
+++ v27
@@ -20,7 +20,7 @@
 * Translate to SQLite (Android)
 * Translate to MySQL (PHP)

-The first three options generate Java code, while the fourth generates PHP.  For all four options, the generated code is placed in the generated_sql directory within the Rodin project by default, but this can be edited in the "Output FIle" pop-up.  For the three Java options, the user can then enter a package for the generated class. 
+The first three options generate Java code, while the fourth generates PHP.  For all four options, the generated code is placed in the generated_sql directory within the Rodin project by default, but this can be edited in the "Output FIle" pop-up.  For the three Java options, the user can then enter a package for the generated class.  For all options, the generated code consists of a single class with the same name as the machine.  
 #Using the Generated Code#
 ##MySQL (JDBC)##

@@ -62,11 +62,23 @@

      &amp;gt;this.getApplicationContext()

-6.  The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
-7. Add more code to call the methods in the generated class as desired. 
+6.  After creating an instance, use it to call the createTables, INITIALISATION and other methods in the generated class as specified in the previous two sections.

-##MySQL (PHP)##
-The wiki uses [Markdown](/p/eventb2sql/wiki/markdown_syntax/) syntax.
+##MySQL (PHP PDO)##
+1. If the model you generated PHP code for contains any carrier sets, implement a PHP classes for each with exactly the same name and include those classes in your application.
+2.  The constructor for the generated class takes a database connection as a parameter.   If you have created a MySQL database and user as specified in the MySQL (JDBC) section above and translated a machine called Test, the following should work:
+
+    &amp;gt;    $con = new PDO("mysql:host=localhost;dbname=eventb",
+               "ebuser",
+               "pass", array(PDO::ATTR_EMULATE_PREPARES =&amp;gt; false,
+                             PDO::ATTR_ERRMODE =&amp;gt; PDO::ERRMODE_EXCEPTION));
+    $tst = new Test($con);
+    $tst-&amp;gt;dropTables();
+    $tst-&amp;gt;createTables();
+    $tst-&amp;gt;INITIALISATION();
+
+4. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
+5. Add more code to call the methods in the generated class as desired. 

 [[members limit=20]]
 [[download_button]]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Fri, 27 Nov 2015 19:20:56 -0000</pubDate><guid>https://sourceforge.net6a6b863a9f393504fd58e3981232edd1a5695b1a</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v25
+++ v26
@@ -28,11 +28,10 @@
 2. Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
 3. Within MySQL, create a new database and a user with full permissions on that database (or choose an existing database and user).  The rest of this section assumes that the database is called eventb, the user is ebuser and the password is pass.
 4. Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work:
-    &amp;gt;
+
     &amp;gt;Class.forName("com.mysql.jdbc.Driver");
     Connection con;
     con = DriverManager.getConnection("jdbc:mysql://localhost/eventb?&amp;amp;autoDeserialize=true", "ebuser", "pass");
-     &amp;gt;
     Test test = new Test(con);
     test.createTables();
     test.INITIALISATION();
@@ -45,10 +44,9 @@
 2.  Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
 4.  Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work (note that the database is stored in file sample.db):

-    Class.forName("org.sqlite.JDBC");
+    &amp;gt;Class.forName("org.sqlite.JDBC");
     Connection con;
     con = DriverManager.getConnection("jdbc:sqlite:sample.db");
-       
     Test test = new Test(con);
     test.createTables();
     test.INITIALISATION();
@@ -62,7 +60,7 @@
 4.  Place the code generated by EventB2SQL in the appropriate package in the Java source of your Android Studio project.
 5.  The constructor for the generated class takes the context for your application as a parameter.  This can be obtained by calling:

-     this.getApplicationContext()
+     &amp;gt;this.getApplicationContext()

 6.  The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
 7. Add more code to call the methods in the generated class as desired. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Fri, 27 Nov 2015 19:04:31 -0000</pubDate><guid>https://sourceforge.netab0edeec100d58d0e805644f72c9c5c017b4e54b</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v24
+++ v25
@@ -28,14 +28,15 @@
 2. Download eventB2SQL.jar: http://users.dickinson.edu/~wahlst/eventb2sql/eventB2SQL.jar and add it to your classpath.
 3. Within MySQL, create a new database and a user with full permissions on that database (or choose an existing database and user).  The rest of this section assumes that the database is called eventb, the user is ebuser and the password is pass.
 4. Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work:
-
+    &amp;gt;
     &amp;gt;Class.forName("com.mysql.jdbc.Driver");
     Connection con;
     con = DriverManager.getConnection("jdbc:mysql://localhost/eventb?&amp;amp;autoDeserialize=true", "ebuser", "pass");
-        
+     &amp;gt;
     Test test = new Test(con);
     test.createTables();
     test.INITIALISATION();
+

 5. The createTables method should be called only once (to create the database tables used by the implementation), while INITIALISATION can be called at any point to reset machine variables to their initial values. If machine that you translated sees any contexts that use given sets, the createTables method takes additional parameters containing the initial values of each of those sets.
 6. Add more code to call the methods in the generated class as desired. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Fri, 27 Nov 2015 19:03:35 -0000</pubDate><guid>https://sourceforge.net8bfe5dc6db3a3f0f6e1e12b4d7a1de1b439d1dbe</guid></item><item><title>Home modified by Tim Wahls</title><link>https://sourceforge.net/p/eventb2sql/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v23
+++ v24
@@ -29,7 +29,7 @@
 3. Within MySQL, create a new database and a user with full permissions on that database (or choose an existing database and user).  The rest of this section assumes that the database is called eventb, the user is ebuser and the password is pass.
 4. Write a driver program to use the class generated by EventB2SQL. Note that the constructor for the generated class takes a database connection as its parameter. If your generated class is Test.java, machine Test uses no carrier sets, and you named your database and user as mentioned above, the following should work:

-    Class.forName("com.mysql.jdbc.Driver");
+    &amp;gt;Class.forName("com.mysql.jdbc.Driver");
     Connection con;
     con = DriverManager.getConnection("jdbc:mysql://localhost/eventb?&amp;amp;autoDeserialize=true", "ebuser", "pass");

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Wahls</dc:creator><pubDate>Fri, 27 Nov 2015 19:02:53 -0000</pubDate><guid>https://sourceforge.net57e637e82e9511ba991d5116752fcab86e160936</guid></item></channel></rss>