Difference between revisions of "SMT Solvers Plug-in Developer Support"

From Event-B
Jump to navigationJump to search
imported>Tommy
m
imported>Laurent
(Added link to perf application)
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{TOCright}}
 
{{TOCright}}
  
==Installation from the sources==
+
== Installation from the sources ==
You will need to:
+
To start developping the sources of the SMT Solvers plug-in, you will need to:
* Install the Eclipse Platform.
+
* Install an Eclipse Platform (to be used as the IDE for the developpment of the SMT Solvers plug-in sources).
* Install the Subclipse plug-in to use SVN in Eclipse.
+
* Clone the Rodin sources and import them into Eclipse or set a Rodin Platform as a ''target platform''.
* Download Rodin sources into Eclipse.
+
* Clone the SMT plug-in sources and import them into Eclipse.
* Download SMT plug-in sources into Eclipse.
+
* Optionnally, install custom SMT solvers if you want to use some.
** Install veriT if you want to use it (instead of ppTrans) to translate Event-B to SMT-LIB.
 
* Install the SMT solvers you want to use.
 
  
=== Installing the Eclipse Platform ===
+
== Installing the Eclipse Platform ==
Download Eclipse Classic (SDK) or Eclipse for RCP and RAP Developers at http://www.eclipse.org/downloads/ <br/>
+
If you don't have an Eclipse development platform for Java and Eclipse plug-ins installed, then :
Install it [http://wiki.eclipse.org/FAQ_Where_do_I_get_and_install_Eclipse%3F].
+
* Download Eclipse Classic (SDK) or Eclipse for RCP and RAP Developers at http://www.eclipse.org/downloads/ <br/>
 +
* Install it [http://wiki.eclipse.org/FAQ_Where_do_I_get_and_install_Eclipse%3F].
  
=== Get the Rodin sources ===
+
== Get a Rodin host plaform ==
 +
There are two possibilities:
 +
* OPTION 1: Develop with the latest sources of the platform (developpment branch).
 +
* OPTION 2: Use a target platform.
  
 +
=== Use a Rodin platform running from the Rodin sources ===
 
Rodin Core sources are available from a Git repository on Sourceforge.  
 
Rodin Core sources are available from a Git repository on Sourceforge.  
  
Line 23: Line 26:
  
 
Then, from Eclipse, check out all projects of this cloned repository (i.e. use ''File > Import... > Existing projects in workspace'').
 
Then, from Eclipse, check out all projects of this cloned repository (i.e. use ''File > Import... > Existing projects in workspace'').
 +
 +
=== Use a Rodin target platfom ===
 +
You can also use a predefined target platform to be used as an host for the SMT Solvers plug-in you will develop.
 +
To get more information about this, please read [http://wiki.event-b.org/index.php/Using_Rodin_as_Target_Platform].
 +
  
 
=== Downloading the SMT Plug-in Sources ===
 
=== Downloading the SMT Plug-in Sources ===
Line 32: Line 40:
  
 
Then, from Eclipse, check out all projects of this cloned repository (i.e. use ''File > Import... > Existing projects in workspace'').
 
Then, from Eclipse, check out all projects of this cloned repository (i.e. use ''File > Import... > Existing projects in workspace'').
 +
The folling plug-ins are necessary to run the SMT Solvers plug-in:
 +
''org.eventb.smt''
 +
''org.eventb.smt-feature''
 +
''org.eventb.smt.core''
 +
''org.eventb.smt.core.performance''
 +
''org.eventb.smt.core.tests''
 +
''org.eventb.smt.cvc3''
 +
''org.eventb.smt.cvc3.linux''
 +
''org.eventb.smt.cvc3.macosx''
 +
''org.eventb.smt.cvc3.win32''
 +
''org.eventb.smt.help''
 +
''org.eventb.smt.releng''
 +
''org.eventb.smt.ui''
 +
''org.eventb.smt.verit''
 +
''org.eventb.smt.verit.linux''
 +
''org.eventb.smt.verit.macosx''
 +
''org.eventb.smt.verit.win32''
  
 
== Launch configuration ==
 
== Launch configuration ==
Line 51: Line 76:
 
Close the Rodin Platform. Back in the Eclipse Platform, go to the Run Configuration: ''Run > Run Configurations...''.
 
Close the Rodin Platform. Back in the Eclipse Platform, go to the Run Configuration: ''Run > Run Configurations...''.
  
Select the ''Rodin.product'' configuration, and go to the ''Plug-ins'' tab. Check all the SMT Plug-ins except ''org.eventb.smt.core.tests'' and ''org.eventb.smt.ui.tests''.
+
Select the ''Rodin.product'' configuration, and go to the ''Plug-ins'' tab. <br/>
 +
Check all the SMT Plug-ins except :
 +
* ''org.eventb.smt.core.tests'' and
 +
* ''org.eventb.smt.ui.tests''.
  
[[Image:Plug-ins to select.png|525px]]
+
[[Image:SMT_Solvers_Dev_Plug-ins_to_select.png|600px]]
 +
 
 +
NB: You actually just need only one project containing the binaries of CVC3 and VeriT.
 +
Hence, you just need to select one project which corresponds to your platform from :
 +
* org.eventb.smt.cvc3.linux,
 +
* org.eventb.smt.cvc3.win32,
 +
* org.eventb.smt.cvc3.macosx.
 +
and one project from :
 +
* org.eventb.smt.verit.linux,
 +
* org.eventb.smt.verit.win32,
 +
* org.eventb.smt.verit.macosx.
  
 
Now, you can launch the Rodin platform extended with the SMT plug-in.
 
Now, you can launch the Rodin platform extended with the SMT plug-in.
Line 59: Line 97:
 
=== SMT solvers settings ===
 
=== SMT solvers settings ===
 
''See [[SMT_Solvers_Plug-in#SMT_solvers_settings]].''
 
''See [[SMT_Solvers_Plug-in#SMT_solvers_settings]].''
 +
 +
== Measuring Performance ==
 +
 +
There exists an Eclipse Application for measuring the performance of SMT solvers.  Its usage is described at [[SMT Plug-in Performance]].
  
 
[[Category:Plugin]]
 
[[Category:Plugin]]
[[Category:User documentation]]
+
[[Category:Developer documentation]]

Latest revision as of 14:34, 19 May 2014

For user support, see SMT Solvers Plug-in

Installation from the sources

To start developping the sources of the SMT Solvers plug-in, you will need to:

  • Install an Eclipse Platform (to be used as the IDE for the developpment of the SMT Solvers plug-in sources).
  • Clone the Rodin sources and import them into Eclipse or set a Rodin Platform as a target platform.
  • Clone the SMT plug-in sources and import them into Eclipse.
  • Optionnally, install custom SMT solvers if you want to use some.

Installing the Eclipse Platform

If you don't have an Eclipse development platform for Java and Eclipse plug-ins installed, then :

Get a Rodin host plaform

There are two possibilities:

  • OPTION 1: Develop with the latest sources of the platform (developpment branch).
  • OPTION 2: Use a target platform.

Use a Rodin platform running from the Rodin sources

Rodin Core sources are available from a Git repository on Sourceforge.

To use these sources, invoke the following command locally : git clone http://git.code.sf.net/p/rodin-b-sharp/rodincore rodin-b-sharp-rodincore

Then, from Eclipse, check out all projects of this cloned repository (i.e. use File > Import... > Existing projects in workspace).

Use a Rodin target platfom

You can also use a predefined target platform to be used as an host for the SMT Solvers plug-in you will develop. To get more information about this, please read [2].


Downloading the SMT Plug-in Sources

SMT plug-in sources are availbable from a Git repository on Sourceforge.

To start your developpement of the SMT plug-in, invoke the following command locally : git clone http://git.code.sf.net/p/rodin-b-sharp/smt rodin-b-sharp-smt

Then, from Eclipse, check out all projects of this cloned repository (i.e. use File > Import... > Existing projects in workspace). The folling plug-ins are necessary to run the SMT Solvers plug-in: org.eventb.smt org.eventb.smt-feature org.eventb.smt.core org.eventb.smt.core.performance org.eventb.smt.core.tests org.eventb.smt.cvc3 org.eventb.smt.cvc3.linux org.eventb.smt.cvc3.macosx org.eventb.smt.cvc3.win32 org.eventb.smt.help org.eventb.smt.releng org.eventb.smt.ui org.eventb.smt.verit org.eventb.smt.verit.linux org.eventb.smt.verit.macosx org.eventb.smt.verit.win32

Launch configuration

To run a Rodin platform, from the sources in the developpment workspace, you'll need to create an Eclipse launch configuration:

  • Launch the Rodin platform as to set the default Run Configuration.
  • Add the SMT plug-ins to this configuration.
  • Set the SMT solvers you want to use within Rodin.

Launching the Rodin Platform

Once we have downloaded the Rodin sources, and built it within Eclipse, we can launch the Rodin platform.

Enter the org.rodinp.platform project and right-clic Rodin.product file then choose Run As... > Eclipse Application.

Run As EclipseApp.png

The Rodin platform is launched and ready.

Adding the SMT plug-ins to the Run Configuration

Close the Rodin Platform. Back in the Eclipse Platform, go to the Run Configuration: Run > Run Configurations....

Select the Rodin.product configuration, and go to the Plug-ins tab.
Check all the SMT Plug-ins except :

  • org.eventb.smt.core.tests and
  • org.eventb.smt.ui.tests.

SMT Solvers Dev Plug-ins to select.png

NB: You actually just need only one project containing the binaries of CVC3 and VeriT. Hence, you just need to select one project which corresponds to your platform from :

  • org.eventb.smt.cvc3.linux,
  • org.eventb.smt.cvc3.win32,
  • org.eventb.smt.cvc3.macosx.

and one project from :

  • org.eventb.smt.verit.linux,
  • org.eventb.smt.verit.win32,
  • org.eventb.smt.verit.macosx.

Now, you can launch the Rodin platform extended with the SMT plug-in.

SMT solvers settings

See SMT_Solvers_Plug-in#SMT_solvers_settings.

Measuring Performance

There exists an Eclipse Application for measuring the performance of SMT solvers. Its usage is described at SMT Plug-in Performance.