cpp-d1064d
[cross.git] / i686-linux-gnu-4.7 / usr / share / doc / libpplv4-13 / README.swiprolog
1 # Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
2 # Copyright (C) 2010-2013 BUGSENG srl (http://bugseng.com)
3 #
4 # This file is free software; as a special exception the author gives
5 # unlimited permission to copy and/or distribute it, with or without
6 # modifications, as long as this notice is preserved.
7 #
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 # PURPOSE.
12
13 The SWI-Prolog interface to the Parma Polyhedra Library (PPL) is
14 available both as a statically linked module or as a dynamically
15 linked one.  Only SWI-Prolog version 5.6.0 and later versions are
16 supported.
17
18
19 The `ppl_pl' Executable
20 -----------------------
21
22 The `ppl_pl' executable is simply the SWI-Prolog shell with the PPL
23 statically linked: from within `ppl_pl' all the services of the
24 library are available without further action.
25 Notice that, in case the PPL was configured with the
26 `--disable-static' option, in order to use `ppl_pl' you must make sure
27 your linker looks into the `<prefix>/lib/ppl' directory, where
28 <prefix> is the root of your installation (`/usr' or `/usr/local' in
29 most cases).
30
31
32 Loading the SWI-Prolog Interface Dynamically
33 --------------------------------------------
34
35 In order to dynamically load the library from SWI-Prolog you should
36 simply load `<prefix>/lib/ppl/ppl_swiprolog.pl'.
37 This will invoke `ppl_initialize/0' and `ppl_finalize/0'
38 automatically.  Alternatively, you can load the library directly with
39
40     :- load_foreign_library('<prefix>/lib/ppl/libppl_swiprolog.so').
41
42 This will call `ppl_initialize/0' automatically.  Analogously,
43
44     :- unload_foreign_library('<prefix>/lib/ppl/libppl_swiprolog.so').
45
46 will, as part of the unload process, invoke `ppl_finalize/0'.
47
48 Notice that, for dynamic linking to work, you should have configured
49 the library with the `--enable-shared' option (on most platforms this
50 is the default).