You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

305 lines
19 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
PRISM Manual | InstallingPRISM / Instructions
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="prism, probabilistic, symbolic, model, checker, verification, birmingham, oxford, parker, norman, kwiatkowska">
<link rel="icon" href="../pub/skins/offline/images/p16.ico" type="image/x-icon">
<link rel="shortcut icon" href="../pub/skins/offline/images/p16.ico" type="image/x-icon">
<!--HTMLHeader--><style type='text/css'><!--
ul, ol, pre, dl, p { margin-top:0px; margin-bottom:0px; }
code.escaped { white-space: nowrap; }
.vspace { margin-top:1.33em; }
.indent { margin-left:40px; }
.outdent { margin-left:40px; text-indent:-40px; }
a.createlinktext { text-decoration:none; border-bottom:1px dotted gray; }
a.createlink { text-decoration:none; position:relative; top:-0.5em;
font-weight:bold; font-size:smaller; border-bottom:none; }
img { border:0px; }
.editconflict { color:green;
font-style:italic; margin-top:1.33em; margin-bottom:1.33em; }
table.markup { border:2px dotted #ccf; width:90%; }
td.markup1, td.markup2 { padding-left:10px; padding-right:10px; }
table.vert td.markup1 { border-bottom:1px solid #ccf; }
table.horiz td.markup1 { width:23em; border-right:1px solid #ccf; }
table.markup caption { text-align:left; }
div.faq p, div.faq pre { margin-left:2em; }
div.faq p.question { margin:1em 0 0.75em 0; font-weight:bold; }
div.faqtoc div.faq * { display:none; }
div.faqtoc div.faq p.question
{ display:block; font-weight:normal; margin:0.5em 0 0.5em 20px; line-height:normal; }
div.faqtoc div.faq p.question * { display:inline; }
.frame
{ border:1px solid #cccccc; padding:4px; background-color:#f9f9f9; }
.lfloat { float:left; margin-right:0.5em; }
.rfloat { float:right; margin-left:0.5em; }
a.varlink { text-decoration:none; }
.sourceblocklink {
text-align: right;
font-size: smaller;
}
.sourceblocktext {
padding: 0.5em;
border: 1px solid #808080;
color: #000000;
background-color: #f1f0ed;
}
.sourceblocktext div {
font-family: monospace;
font-size: small;
line-height: 1;
height: 1%;
}
.sourceblocktext div.head,
.sourceblocktext div.foot {
font: italic medium serif;
padding: 0.5em;
}
--></style> <meta name='robots' content='index,follow' />
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/base.css">
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/prism.css">
<link type="text/css" rel="stylesheet" href="../pub/skins/offline/css/prismmanual.css">
</head>
<body text="#000000" bgcolor="#ffffff">
<div id="layout-maincontainer">
<div id="layout-main">
<div id="prism-mainbox">
<!-- ============================================================================= -->
<!--PageHeaderFmt-->
<!--/PageHeaderFmt-->
<!--PageTitleFmt-->
<div id="prism-man-title">
<p><a class='wikilink' href='Main.html'>Installing PRISM</a> /
</p><h1>Instructions</h1>
</div>
<!--PageText-->
<div id='wikitext'>
<h3>Prerequisites</h3>
<p>PRISM is known to run on Linux, Windows and Mac OS X, including 64-bit variants of these operating systems.
</p>
<p class='vspace'>You will need <strong>Java</strong>, version 8 or above. The tool is known to compile and run with both the <a class='urllink' href='http://www.oracle.com/technetwork/java/javase/downloads/index.html'>Oracle</a> and <a class='urllink' href='http://openjdk.java.net/'>OpenJDK</a> versions of Java. To run binary versions of PRISM, you only need the Java Runtime Environment (JRE), not the full Java Development Kit (JDK).
</p>
<p class='vspace'>To compile PRISM from source, you need the Java Development Kit (JDK), GNU make and a C/C++ compiler (e.g. gcc/g++). For compilation under Windows, you will need Cygwin. See below for more information:
</p>
<div class='vspace'></div><ul><li><a href='Main.html#windows'>Installation on Windows</a>
</li><li><a href='Main.html#binaries'>Installation of Linux/Mac binary versions</a>
</li><li><a href='Main.html#source'>Building PRISM from source (non-Windows)</a>
</li><li><a href='Main.html#cygwin'>Building PRISM from source on Windows using Cygwin</a>
</li><li><a href='Main.html#msys'>Building PRISM from source on Windows using MSYS</a>
</li></ul><p class='vspace'>If you are installing on a completely fresh operating system installation (e.g. in a virtual machine), you may find the following scripts useful,
which install the required dependencies and PRISM itself. They can be found in the <code>prism/etc/scripts</code> directory:
</p>
<div class='vspace'></div><ul><li><a class='urllink' href='https://raw.githubusercontent.com/prismmodelchecker/prism/master/prism/etc/scripts/prism-install-ubuntu'>script to build on a clean install of Ubuntu</a>
</li><li><a class='urllink' href='https://raw.githubusercontent.com/prismmodelchecker/prism/master/prism/etc/scripts/prism-install-rhel'>script to build on clean install of RHEL/CentOS/etc Linux</a>
</li></ul><div class='vspace'></div><hr />
<p class='vspace'><a name='windows' id='windows'></a>
<a name='windows64' id='windows64'></a>
</p><h3>Installation on Windows</h3>
<p>To install PRISM on Windows, just run the self-extracting installer which you <a class='urllink' href='http://www.prismmodelchecker.org/download.php'>downloaded</a>. You do <strong>not</strong> need administrator privileges for this, just write-access to the directory chosen for installation.
</p>
<p class='vspace'>If requested, the installer will place shortcuts to run PRISM on the desktop and/or start menu. If not, you can run by PRISM double-clicking the file <code>xprism.bat</code> (which may just appear as <code>xprism</code>) in the <code>bin</code> folder of your PRISM folder. If nothing happens, the most likely explanation is that Java is not installed or not in your path. To check, open a command prompt window, navigate to the PRISM directory, type <code>cd bin</code>, then <code>xprism.bat</code> and examine the resulting error. If you want to create shortcuts to <code>xprism.bat</code> manually, you will find some PRISM icons in the <code>etc</code> folder.
</p>
<p class='vspace'>If you wish to use the command-line version of PRISM on Windows, open a command prompt window and type for example:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock1'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;">cd "c:\Program Files\prism-4.5-win\bin"</span><br/>
<span style="font-weight:bold;">prism ..\prism-examples\simple\dice\dice.pm</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=1' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>You can also edit the file <code>bin\prism.bat</code> to allow it to be run from any location. See the instructions within the file for further details.
</p>
<p class='vspace'><strong>Problems?</strong> See the section "<a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>''.
</p>
<div class='vspace'></div><hr />
<p class='vspace'><a name='binaries' id='binaries'></a>
</p><h3>Installation of Linux/Mac binary versions</h3>
<p>To ensure compatibility, we recommend that you compile PRISM from source on non-Windows platforms. See below for instructions. However, we do <a class='urllink' href='http://www.prismmodelchecker.org/download.php'>provide</a> pre-compiled binary distributions for Linux and Mac OS X.
</p>
<p class='vspace'>To install a binary distribution, unpack the tarred/zipped PRISM distribution into a suitable location, enter the directory and run the <code>install.sh</code> script, e.g.:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock2'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;">gunzip prism-4.5-linux64.tar.gz</span><br/>
<span style="font-weight:bold;">tar xf prism-4.5-linux64.tar</span><br/>
<span style="font-weight:bold;">cd prism-4.5-linux64</span><br/>
<span style="font-weight:bold;">./install.sh</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=2' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>You do not need to be root to install PRISM. The install script simply makes some small customisations to the scripts used to launch PRISM. The PRISM distribution is self-contained and can be freely moved/renamed, however if you do so you will need to re-run <code>./install.sh</code> afterwards.
</p>
<p class='vspace'>To run PRISM, execute either the <code>xprism</code> or <code>prism</code> script (for the graphical user interface or command-line version, respectively). These can be found in the <code>bin</code> directory. These scripts are designed to be run from anywhere and you can easily create symbolic links or aliases to them. If you want icons to create desktop shortcuts to PRISM, you can find some in the <code>etc</code> directory.
</p>
<p class='vspace'><strong>Problems?</strong> See the section "<a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>''.
</p>
<div class='vspace'></div><hr />
<p class='vspace'><a name='source' id='source'></a>
</p><h3>Building PRISM from source (non-Windows)</h3>
<p>To compile PRISM form source code, you will need:
</p>
<div class='vspace'></div><ul><li>GNU make (sometimes called gmake)
</li><li>a C/C++ compiler (e.g. gcc/g++)
</li><li>a Java Development Kit, version 8 or above
</li></ul><p class='vspace'>To check that you have the development kit, type <code>javac</code>. If you get an error message that <code>javac</code> cannot be found, you probably do not have the JDK installed (or your path is not set up correctly). To check what version you have, type <code>javac -version</code>.
</p>
<p class='vspace'>Hopefully, you can build PRISM simply by entering the PRISM directory and running <code>make</code>, e.g.:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock3'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;">gunzip prism-4.5-src.tar.gz</span><br/>
<span style="font-weight:bold;">tar xf prism-4.5-src.tar</span><br/>
<span style="font-weight:bold;">cd prism-4.5-src/prism</span><br/>
<span style="font-weight:bold;">make</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=3' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>For this process to complete correctly, PRISM needs to be able to determine both the operating system you are using and the location of your Java distribution. If there is a problem with either of these, you will see an error message and will need to specify one or both of these manually, such as in these examples:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock4'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;"> </span><br/>
<span style="font-weight:bold;">make OSTYPE=linux</span><br/>
<span style="font-weight:bold;">make JAVA_DIR=/usr/java/jdk1.8.0</span><br/>
<span style="font-weight:bold;">make OSTYPE=cygwin JAVA_DIR="/cygdrive/c/Program Files/Java/jdk1.8.0"</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=4' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>Note the use of double quotes for the case where the directory contains a space. If you don't know the location of your Java installation, try typing <code>which javac</code>. If the result is e.g. <code>/usr/java/jdk1.8.0/bin/javac</code> then your Java directory is <code>/usr/java/jdk1.8.0</code>. Sometimes <code>javac</code> will be a symbolic link, in which case use "<code>ls -l</code>" to determine the actual location.
</p>
<p class='vspace'>It is also possible to to set the environment variables <code>OSTYPE</code> and <code>JAVA_DIR</code> directly or edit their values in the Makefile directly. Note that even when you specify <code>JAVA_DIR</code> explicitly (in either way), PRISM still uses the versions of <code>javac</code> (and <code>javah</code>) that are in your path so make sure this is set up correctly.
</p>
<p class='vspace'><strong>64-bit OSs</strong>
</p>
<p class='vspace'>PRISM should also detect when it is running on a 64-bit architecture, and building will work as above. If this does not work for some reason, you can override detection by setting <code>ARCH</code> to either <code>amd64</code> (for AMD/Intel 64) or <code>ia64</code> (for Itanium). For example:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock5'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;"> </span><br/>
<span style="font-weight:bold;">make ARCH=amd64</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=5' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>If you have problems building a 64-bit version of PRISM, one option is to instead compile and run a 32-bit version of PRISM. To do this, you need to:
</p>
<div class='vspace'></div><ol><li>Make sure you are using a 32-bit version of Java
<div class='vspace'></div></li><li>Override detection of the 64-bit architecture when building:
</li></ol><div class='vspace'></div>
<div class='sourceblock ' id='sourceblock6'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;"> </span><br/>
<span style="font-weight:bold;">make clean_all</span><br/>
<span style="font-weight:bold;">make ARCH=</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=6' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'><strong>Problems?</strong> See the section "<a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>''.
</p>
<div class='vspace'></div><hr />
<p class='vspace'><a name='cygwin' id='cygwin'></a>
</p><h3>Building PRISM from source on Windows using Cygwin</h3>
<p>The compilation of PRISM currently relies on a Unix-like environment. On Windows, this can be achieved using the <a class='urllink' href='http://www.cygwin.com/'>Cygwin</a> development environment (or alternatively using <a class='urllink' href='http://www.mingw.org/'>MSYS</a> - see below). Once Cygwin is installed, first ensure you have the following installed:
</p><ul><li><code>make</code>
</li><li><code>mingw64-i686-gcc-g++</code> (or <code>mingw64-x86_64-gcc-g++</code> for 64-bit Windows)
</li><li><code>binutils</code>
</li><li><code>dos2unix</code>
</li></ul><p>Then proceed as described in the previous section. Note that the PRISM compilation process uses the <a class='urllink' href='http://www.mingw.org/'>MinGW</a> libraries so that the final result is independent of Cygwin at run-time.
</p>
<p class='vspace'>One thing to note: make sure you unzip the PRISM distribution from within Cygwin (e.g. using <code>tar xfz prism-XXX-src.tar.gz</code>). Don't use a Windows program (Winzip, etc.) since this can cause problems.
</p>
<p class='vspace'>If you use git to checkout the PRISM repository, we recommend that you use the version of git provided by Cygwin.
If you use a native Windows version of git, you may want to disable the Unix-to-Windows line-ending conversion, e.g., via
</p>
<div class='vspace'></div><ul><li><code>git config --global core.autocrlf false</code>
</li></ul><p class='vspace'><strong>Problems?</strong> See the section "<a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>''.
</p>
<div class='vspace'></div><hr />
<p class='vspace'><a name='msys' id='msys'></a>
</p><h3>Building PRISM from source on Windows using MSYS</h3>
<p>Compiling from source in <a class='urllink' href='http://www.mingw.org/'>MSYS</a> is less obvious as this environment is currently not directly supported in the makefile. Additionally, MSYS does not handle symlinks in the same way as cygwin does. The first problem is fixed by providing a OSTYPE variable to the makefile, whereas the second problem currently has to be solved manually.
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock7'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;"> </span><br/>
<span style="font-weight:bold;">make OSTYPE=cygwin </span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=7' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'>At some point it will fail, saying that it cannot find the CUDD library, this is due to the failing symlinks. You can solve this as follows:
</p>
<div class='vspace'></div>
<div class='sourceblock ' id='sourceblock8'>
<div class='sourceblocktext'><div class="shell"><span style="font-weight:bold;"> </span><br/>
<span style="font-weight:bold;">cd cudd/</span><br/>
<span style="font-weight:bold;">rmdir lib/ </span><br/>
<span style="font-weight:bold;">./setup.sh</span><br/>
<span style="font-weight:bold;">cd ..</span><br/>
<span style="font-weight:bold;">make OSTYPE=cygwin </span><br/>
<span style="font-weight:bold;">./install.sh</span><br/>
</div></div>
<div class='sourceblocklink'><a href='http://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions?action=sourceblock&amp;num=8' type='text/plain'>[&#036;[Get Code]]</a></div>
</div>
<p class='vspace'><strong>Problems?</strong> See the section "<a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>''.
</p>
</div>
<!--PageFooterFmt-->
<div id='prism-man-footer'>
</div>
<!--/PageFooterFmt-->
<!-- ============================================================================= -->
</div> <!-- id="prism-mainbox" -->
</div> <!-- id="layout-main" -->
</div> <!-- id="layout-maincontainer" -->
<div id="layout-leftcol">
<div id="prism-navbar2">
<h3><a class='wikilink' href='../Main/Main.html'>PRISM Manual</a></h3>
<p><strong><a class='wikilink' href='Main.html'>Installing PRISM</a></strong>
</p><ul><li><a class='selflink' href='Main.html'>Instructions</a>
</li><li><a class='wikilink' href='CommonProblemsAndQuestions.html'>Common Problems And Questions</a>
</li></ul><p>[ <a class='wikilink' href='AllOnOnePage.html'>View all</a> ]
</p>
</div> <!-- id="prism-navbar2" -->
</div> <!-- id="layout-leftcol" -->
</body>
</html>