Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 245804 | Differences between
and this patch

Collapse All | Expand All

(-)./apron/lgpl.texi (+556 lines)
Line 0 Link Here
1
@center Version 2.1, February 1999
2
3
@display
4
Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
5
51 Franklin St -- Fifth Floor, Boston, MA 02110-1301, USA
6
7
Everyone is permitted to copy and distribute verbatim copies
8
of this license document, but changing it is not allowed.
9
10
[This is the first released version of the Lesser GPL.  It also counts
11
as the successor of the GNU Library Public License, version 2, hence the
12
version number 2.1.]
13
@end display
14
15
@subheading Preamble
16
17
  The licenses for most software are designed to take away your
18
freedom to share and change it.  By contrast, the GNU General Public
19
Licenses are intended to guarantee your freedom to share and change
20
free software---to make sure the software is free for all its users.
21
22
  This license, the Lesser General Public License, applies to some
23
specially designated software---typically libraries---of the Free
24
Software Foundation and other authors who decide to use it.  You can use
25
it too, but we suggest you first think carefully about whether this
26
license or the ordinary General Public License is the better strategy to
27
use in any particular case, based on the explanations below.
28
29
  When we speak of free software, we are referring to freedom of use,
30
not price.  Our General Public Licenses are designed to make sure that
31
you have the freedom to distribute copies of free software (and charge
32
for this service if you wish); that you receive source code or can get
33
it if you want it; that you can change the software and use pieces of it
34
in new free programs; and that you are informed that you can do these
35
things.
36
37
  To protect your rights, we need to make restrictions that forbid
38
distributors to deny you these rights or to ask you to surrender these
39
rights.  These restrictions translate to certain responsibilities for
40
you if you distribute copies of the library or if you modify it.
41
42
  For example, if you distribute copies of the library, whether gratis
43
or for a fee, you must give the recipients all the rights that we gave
44
you.  You must make sure that they, too, receive or can get the source
45
code.  If you link other code with the library, you must provide
46
complete object files to the recipients, so that they can relink them
47
with the library after making changes to the library and recompiling
48
it.  And you must show them these terms so they know their rights.
49
50
  We protect your rights with a two-step method: (1) we copyright the
51
library, and (2) we offer you this license, which gives you legal
52
permission to copy, distribute and/or modify the library.
53
54
  To protect each distributor, we want to make it very clear that
55
there is no warranty for the free library.  Also, if the library is
56
modified by someone else and passed on, the recipients should know
57
that what they have is not the original version, so that the original
58
author's reputation will not be affected by problems that might be
59
introduced by others.
60
61
  Finally, software patents pose a constant threat to the existence of
62
any free program.  We wish to make sure that a company cannot
63
effectively restrict the users of a free program by obtaining a
64
restrictive license from a patent holder.  Therefore, we insist that
65
any patent license obtained for a version of the library must be
66
consistent with the full freedom of use specified in this license.
67
68
  Most GNU software, including some libraries, is covered by the
69
ordinary GNU General Public License.  This license, the GNU Lesser
70
General Public License, applies to certain designated libraries, and
71
is quite different from the ordinary General Public License.  We use
72
this license for certain libraries in order to permit linking those
73
libraries into non-free programs.
74
75
  When a program is linked with a library, whether statically or using
76
a shared library, the combination of the two is legally speaking a
77
combined work, a derivative of the original library.  The ordinary
78
General Public License therefore permits such linking only if the
79
entire combination fits its criteria of freedom.  The Lesser General
80
Public License permits more lax criteria for linking other code with
81
the library.
82
83
  We call this license the @dfn{Lesser} General Public License because it
84
does @emph{Less} to protect the user's freedom than the ordinary General
85
Public License.  It also provides other free software developers Less
86
of an advantage over competing non-free programs.  These disadvantages
87
are the reason we use the ordinary General Public License for many
88
libraries.  However, the Lesser license provides advantages in certain
89
special circumstances.
90
91
  For example, on rare occasions, there may be a special need to
92
encourage the widest possible use of a certain library, so that it becomes
93
a de-facto standard.  To achieve this, non-free programs must be
94
allowed to use the library.  A more frequent case is that a free
95
library does the same job as widely used non-free libraries.  In this
96
case, there is little to gain by limiting the free library to free
97
software only, so we use the Lesser General Public License.
98
99
  In other cases, permission to use a particular library in non-free
100
programs enables a greater number of people to use a large body of
101
free software.  For example, permission to use the GNU C Library in
102
non-free programs enables many more people to use the whole GNU
103
operating system, as well as its variant, the GNU/Linux operating
104
system.
105
106
  Although the Lesser General Public License is Less protective of the
107
users' freedom, it does ensure that the user of a program that is
108
linked with the Library has the freedom and the wherewithal to run
109
that program using a modified version of the Library.
110
111
  The precise terms and conditions for copying, distribution and
112
modification follow.  Pay close attention to the difference between a
113
``work based on the library'' and a ``work that uses the library''.  The
114
former contains code derived from the library, whereas the latter must
115
be combined with the library in order to run.
116
117
@subheading TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
118
119
@enumerate 0
120
@item
121
This License Agreement applies to any software library or other program
122
which contains a notice placed by the copyright holder or other
123
authorized party saying it may be distributed under the terms of this
124
Lesser General Public License (also called ``this License'').  Each
125
licensee is addressed as ``you''.
126
127
  A ``library'' means a collection of software functions and/or data
128
prepared so as to be conveniently linked with application programs
129
(which use some of those functions and data) to form executables.
130
131
  The ``Library'', below, refers to any such software library or work
132
which has been distributed under these terms.  A ``work based on the
133
Library'' means either the Library or any derivative work under
134
copyright law: that is to say, a work containing the Library or a
135
portion of it, either verbatim or with modifications and/or translated
136
straightforwardly into another language.  (Hereinafter, translation is
137
included without limitation in the term ``modification''.)
138
139
  ``Source code'' for a work means the preferred form of the work for
140
making modifications to it.  For a library, complete source code means
141
all the source code for all modules it contains, plus any associated
142
interface definition files, plus the scripts used to control compilation
143
and installation of the library.
144
145
  Activities other than copying, distribution and modification are not
146
covered by this License; they are outside its scope.  The act of
147
running a program using the Library is not restricted, and output from
148
such a program is covered only if its contents constitute a work based
149
on the Library (independent of the use of the Library in a tool for
150
writing it).  Whether that is true depends on what the Library does
151
and what the program that uses the Library does.
152
153
@item
154
You may copy and distribute verbatim copies of the Library's
155
complete source code as you receive it, in any medium, provided that
156
you conspicuously and appropriately publish on each copy an
157
appropriate copyright notice and disclaimer of warranty; keep intact
158
all the notices that refer to this License and to the absence of any
159
warranty; and distribute a copy of this License along with the
160
Library.
161
162
  You may charge a fee for the physical act of transferring a copy,
163
and you may at your option offer warranty protection in exchange for a
164
fee.
165
166
@item
167
You may modify your copy or copies of the Library or any portion
168
of it, thus forming a work based on the Library, and copy and
169
distribute such modifications or work under the terms of Section 1
170
above, provided that you also meet all of these conditions:
171
172
@enumerate a
173
@item
174
The modified work must itself be a software library.
175
176
@item
177
You must cause the files modified to carry prominent notices
178
stating that you changed the files and the date of any change.
179
180
@item
181
You must cause the whole of the work to be licensed at no
182
charge to all third parties under the terms of this License.
183
184
@item
185
If a facility in the modified Library refers to a function or a
186
table of data to be supplied by an application program that uses
187
the facility, other than as an argument passed when the facility
188
is invoked, then you must make a good faith effort to ensure that,
189
in the event an application does not supply such function or
190
table, the facility still operates, and performs whatever part of
191
its purpose remains meaningful.
192
193
(For example, a function in a library to compute square roots has
194
a purpose that is entirely well-defined independent of the
195
application.  Therefore, Subsection 2d requires that any
196
application-supplied function or table used by this function must
197
be optional: if the application does not supply it, the square
198
root function must still compute square roots.)
199
@end enumerate
200
201
These requirements apply to the modified work as a whole.  If
202
identifiable sections of that work are not derived from the Library,
203
and can be reasonably considered independent and separate works in
204
themselves, then this License, and its terms, do not apply to those
205
sections when you distribute them as separate works.  But when you
206
distribute the same sections as part of a whole which is a work based
207
on the Library, the distribution of the whole must be on the terms of
208
this License, whose permissions for other licensees extend to the
209
entire whole, and thus to each and every part regardless of who wrote
210
it.
211
212
Thus, it is not the intent of this section to claim rights or contest
213
your rights to work written entirely by you; rather, the intent is to
214
exercise the right to control the distribution of derivative or
215
collective works based on the Library.
216
217
In addition, mere aggregation of another work not based on the Library
218
with the Library (or with a work based on the Library) on a volume of
219
a storage or distribution medium does not bring the other work under
220
the scope of this License.
221
222
@item
223
You may opt to apply the terms of the ordinary GNU General Public
224
License instead of this License to a given copy of the Library.  To do
225
this, you must alter all the notices that refer to this License, so
226
that they refer to the ordinary GNU General Public License, version 2,
227
instead of to this License.  (If a newer version than version 2 of the
228
ordinary GNU General Public License has appeared, then you can specify
229
that version instead if you wish.)  Do not make any other change in
230
these notices.
231
232
  Once this change is made in a given copy, it is irreversible for
233
that copy, so the ordinary GNU General Public License applies to all
234
subsequent copies and derivative works made from that copy.
235
236
  This option is useful when you wish to copy part of the code of
237
the Library into a program that is not a library.
238
239
@item
240
You may copy and distribute the Library (or a portion or
241
derivative of it, under Section 2) in object code or executable form
242
under the terms of Sections 1 and 2 above provided that you accompany
243
it with the complete corresponding machine-readable source code, which
244
must be distributed under the terms of Sections 1 and 2 above on a
245
medium customarily used for software interchange.
246
247
  If distribution of object code is made by offering access to copy
248
from a designated place, then offering equivalent access to copy the
249
source code from the same place satisfies the requirement to
250
distribute the source code, even though third parties are not
251
compelled to copy the source along with the object code.
252
253
@item
254
A program that contains no derivative of any portion of the
255
Library, but is designed to work with the Library by being compiled or
256
linked with it, is called a ``work that uses the Library''.  Such a
257
work, in isolation, is not a derivative work of the Library, and
258
therefore falls outside the scope of this License.
259
260
  However, linking a ``work that uses the Library'' with the Library
261
creates an executable that is a derivative of the Library (because it
262
contains portions of the Library), rather than a ``work that uses the
263
library''.  The executable is therefore covered by this License.
264
Section 6 states terms for distribution of such executables.
265
266
  When a ``work that uses the Library'' uses material from a header file
267
that is part of the Library, the object code for the work may be a
268
derivative work of the Library even though the source code is not.
269
Whether this is true is especially significant if the work can be
270
linked without the Library, or if the work is itself a library.  The
271
threshold for this to be true is not precisely defined by law.
272
273
  If such an object file uses only numerical parameters, data
274
structure layouts and accessors, and small macros and small inline
275
functions (ten lines or less in length), then the use of the object
276
file is unrestricted, regardless of whether it is legally a derivative
277
work.  (Executables containing this object code plus portions of the
278
Library will still fall under Section 6.)
279
280
  Otherwise, if the work is a derivative of the Library, you may
281
distribute the object code for the work under the terms of Section 6.
282
Any executables containing that work also fall under Section 6,
283
whether or not they are linked directly with the Library itself.
284
285
@item
286
As an exception to the Sections above, you may also combine or
287
link a ``work that uses the Library'' with the Library to produce a
288
work containing portions of the Library, and distribute that work
289
under terms of your choice, provided that the terms permit
290
modification of the work for the customer's own use and reverse
291
engineering for debugging such modifications.
292
293
  You must give prominent notice with each copy of the work that the
294
Library is used in it and that the Library and its use are covered by
295
this License.  You must supply a copy of this License.  If the work
296
during execution displays copyright notices, you must include the
297
copyright notice for the Library among them, as well as a reference
298
directing the user to the copy of this License.  Also, you must do one
299
of these things:
300
301
@enumerate a
302
@item
303
Accompany the work with the complete corresponding
304
machine-readable source code for the Library including whatever
305
changes were used in the work (which must be distributed under
306
Sections 1 and 2 above); and, if the work is an executable linked
307
with the Library, with the complete machine-readable ``work that
308
uses the Library'', as object code and/or source code, so that the
309
user can modify the Library and then relink to produce a modified
310
executable containing the modified Library.  (It is understood
311
that the user who changes the contents of definitions files in the
312
Library will not necessarily be able to recompile the application
313
to use the modified definitions.)
314
315
@item
316
Use a suitable shared library mechanism for linking with the Library.  A
317
suitable mechanism is one that (1) uses at run time a copy of the
318
library already present on the user's computer system, rather than
319
copying library functions into the executable, and (2) will operate
320
properly with a modified version of the library, if the user installs
321
one, as long as the modified version is interface-compatible with the
322
version that the work was made with.
323
324
@item
325
Accompany the work with a written offer, valid for at
326
least three years, to give the same user the materials
327
specified in Subsection 6a, above, for a charge no more
328
than the cost of performing this distribution.
329
330
@item
331
If distribution of the work is made by offering access to copy
332
from a designated place, offer equivalent access to copy the above
333
specified materials from the same place.
334
335
@item
336
Verify that the user has already received a copy of these
337
materials or that you have already sent this user a copy.
338
@end enumerate
339
340
  For an executable, the required form of the ``work that uses the
341
Library'' must include any data and utility programs needed for
342
reproducing the executable from it.  However, as a special exception,
343
the materials to be distributed need not include anything that is
344
normally distributed (in either source or binary form) with the major
345
components (compiler, kernel, and so on) of the operating system on
346
which the executable runs, unless that component itself accompanies the
347
executable.
348
349
  It may happen that this requirement contradicts the license
350
restrictions of other proprietary libraries that do not normally
351
accompany the operating system.  Such a contradiction means you cannot
352
use both them and the Library together in an executable that you
353
distribute.
354
355
@item
356
You may place library facilities that are a work based on the
357
Library side-by-side in a single library together with other library
358
facilities not covered by this License, and distribute such a combined
359
library, provided that the separate distribution of the work based on
360
the Library and of the other library facilities is otherwise
361
permitted, and provided that you do these two things:
362
363
@enumerate a
364
@item
365
Accompany the combined library with a copy of the same work
366
based on the Library, uncombined with any other library
367
facilities.  This must be distributed under the terms of the
368
Sections above.
369
370
@item
371
Give prominent notice with the combined library of the fact
372
that part of it is a work based on the Library, and explaining
373
where to find the accompanying uncombined form of the same work.
374
@end enumerate
375
376
@item
377
You may not copy, modify, sublicense, link with, or distribute
378
the Library except as expressly provided under this License.  Any
379
attempt otherwise to copy, modify, sublicense, link with, or
380
distribute the Library is void, and will automatically terminate your
381
rights under this License.  However, parties who have received copies,
382
or rights, from you under this License will not have their licenses
383
terminated so long as such parties remain in full compliance.
384
385
@item
386
You are not required to accept this License, since you have not
387
signed it.  However, nothing else grants you permission to modify or
388
distribute the Library or its derivative works.  These actions are
389
prohibited by law if you do not accept this License.  Therefore, by
390
modifying or distributing the Library (or any work based on the
391
Library), you indicate your acceptance of this License to do so, and
392
all its terms and conditions for copying, distributing or modifying
393
the Library or works based on it.
394
395
@item
396
Each time you redistribute the Library (or any work based on the
397
Library), the recipient automatically receives a license from the
398
original licensor to copy, distribute, link with or modify the Library
399
subject to these terms and conditions.  You may not impose any further
400
restrictions on the recipients' exercise of the rights granted herein.
401
You are not responsible for enforcing compliance by third parties with
402
this License.
403
404
@item
405
If, as a consequence of a court judgment or allegation of patent
406
infringement or for any other reason (not limited to patent issues),
407
conditions are imposed on you (whether by court order, agreement or
408
otherwise) that contradict the conditions of this License, they do not
409
excuse you from the conditions of this License.  If you cannot
410
distribute so as to satisfy simultaneously your obligations under this
411
License and any other pertinent obligations, then as a consequence you
412
may not distribute the Library at all.  For example, if a patent
413
license would not permit royalty-free redistribution of the Library by
414
all those who receive copies directly or indirectly through you, then
415
the only way you could satisfy both it and this License would be to
416
refrain entirely from distribution of the Library.
417
418
If any portion of this section is held invalid or unenforceable under any
419
particular circumstance, the balance of the section is intended to apply,
420
and the section as a whole is intended to apply in other circumstances.
421
422
It is not the purpose of this section to induce you to infringe any
423
patents or other property right claims or to contest validity of any
424
such claims; this section has the sole purpose of protecting the
425
integrity of the free software distribution system which is
426
implemented by public license practices.  Many people have made
427
generous contributions to the wide range of software distributed
428
through that system in reliance on consistent application of that
429
system; it is up to the author/donor to decide if he or she is willing
430
to distribute software through any other system and a licensee cannot
431
impose that choice.
432
433
This section is intended to make thoroughly clear what is believed to
434
be a consequence of the rest of this License.
435
436
@item
437
If the distribution and/or use of the Library is restricted in
438
certain countries either by patents or by copyrighted interfaces, the
439
original copyright holder who places the Library under this License may add
440
an explicit geographical distribution limitation excluding those countries,
441
so that distribution is permitted only in or among countries not thus
442
excluded.  In such case, this License incorporates the limitation as if
443
written in the body of this License.
444
445
@item
446
The Free Software Foundation may publish revised and/or new
447
versions of the Lesser General Public License from time to time.
448
Such new versions will be similar in spirit to the present version,
449
but may differ in detail to address new problems or concerns.
450
451
Each version is given a distinguishing version number.  If the Library
452
specifies a version number of this License which applies to it and
453
``any later version'', you have the option of following the terms and
454
conditions either of that version or of any later version published by
455
the Free Software Foundation.  If the Library does not specify a
456
license version number, you may choose any version ever published by
457
the Free Software Foundation.
458
459
@item
460
If you wish to incorporate parts of the Library into other free
461
programs whose distribution conditions are incompatible with these,
462
write to the author to ask for permission.  For software which is
463
copyrighted by the Free Software Foundation, write to the Free
464
Software Foundation; we sometimes make exceptions for this.  Our
465
decision will be guided by the two goals of preserving the free status
466
of all derivatives of our free software and of promoting the sharing
467
and reuse of software generally.
468
469
@iftex
470
@heading NO WARRANTY
471
@end iftex
472
@ifinfo
473
@center NO WARRANTY
474
@end ifinfo
475
476
@item
477
BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
478
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
479
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
480
OTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
481
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
482
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
483
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
484
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
485
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
486
487
@item
488
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
489
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
490
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
491
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
492
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
493
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
494
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
495
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
496
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
497
DAMAGES.
498
@end enumerate
499
500
@iftex
501
@heading END OF TERMS AND CONDITIONS
502
@end iftex
503
@ifinfo
504
@center END OF TERMS AND CONDITIONS
505
@end ifinfo
506
507
@page
508
@subheading How to Apply These Terms to Your New Libraries
509
510
  If you develop a new library, and you want it to be of the greatest
511
possible use to the public, we recommend making it free software that
512
everyone can redistribute and change.  You can do so by permitting
513
redistribution under these terms (or, alternatively, under the terms of the
514
ordinary General Public License).
515
516
  To apply these terms, attach the following notices to the library.  It is
517
safest to attach them to the start of each source file to most effectively
518
convey the exclusion of warranty; and each file should have at least the
519
``copyright'' line and a pointer to where the full notice is found.
520
521
@smallexample
522
@var{one line to give the library's name and an idea of what it does.}
523
Copyright (C) @var{year}  @var{name of author}
524
525
This library is free software; you can redistribute it and/or modify it
526
under the terms of the GNU Lesser General Public License as published by
527
the Free Software Foundation; either version 2.1 of the License, or (at
528
your option) any later version.
529
530
This library is distributed in the hope that it will be useful, but
531
WITHOUT ANY WARRANTY; without even the implied warranty of
532
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
533
Lesser General Public License for more details.
534
535
You should have received a copy of the GNU Lesser General Public
536
License along with this library; if not, write to the Free Software
537
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
538
USA.
539
@end smallexample
540
541
Also add information on how to contact you by electronic and paper mail.
542
543
You should also get your employer (if you work as a programmer) or your
544
school, if any, to sign a ``copyright disclaimer'' for the library, if
545
necessary.  Here is a sample; alter the names:
546
547
@smallexample
548
Yoyodyne, Inc., hereby disclaims all copyright interest in the library
549
`Frob' (a library for tweaking knobs) written by James Random Hacker.
550
551
@var{signature of Ty Coon}, 1 April 1990
552
Ty Coon, President of Vice
553
@end smallexample
554
555
That's all there is to it!
556
(-)./apron/rationale.texi (+647 lines)
Line 0 Link Here
1
2
@menu
3
* General choices::             
4
* Functionalities of the interface at level 0::  
5
* Functionalities of the interface at level 1::  
6
@end menu
7
8
@c ===================================================================
9
@node General choices, Functionalities of the interface at level 0, APRON Rationale and Functionalities, APRON Rationale and Functionalities
10
@section General choices
11
@c ===================================================================
12
13
@menu
14
* Interface levels::            
15
* Programming language::        
16
* Compatibility with threads::  
17
* Interruptions::               
18
* Memory management::           
19
* Programming style::           
20
* Number representation::       
21
@end menu
22
23
@c -------------------------------------------------------------------
24
@node Interface levels, Programming language, General choices, General choices
25
@subsubheading Interface levels
26
27
There are two main goals for the APRON interface: efficiency of the
28
implementations, and ease of use for the user. In addition, code
29
duplication between libraries should be avoided. As a consequence, two
30
levels were identified:
31
@table @emph
32
@item Level 0 
33
Choices are guided by the efficiency and the precision of the operations;
34
@item Level 1
35
Choices are guided by ease of use, and code factorization.
36
@end table
37
38
The level 0 is directly connected to the underlying (existing)
39
library. It includes all the operations that are specific to an
40
abstract domain and whose code cannot be shared. The interface should
41
be minimal, @emph{unless} there is a strong algorithmical advantage to
42
include a combination of more basic operations.
43
44
The higher levels offers additional functionalities that are shared by
45
all the library connected to the level 0. For instance:
46
47
@itemize
48
@item
49
managing correspondance between numerical dimensions and names
50
(characters strings or more generally references);
51
@item
52
abstraction of non linear expressions in interval linear expressions;
53
@item
54
automatic call to redimensioning and permutation operations for
55
computing
56
@iftex 
57
@tex
58
$P(x,y)\sqcap Q(y,z)$
59
@end tex 
60
@end iftex
61
@ifnottex
62
P(x,y)/\Q(y,z).
63
@end ifnottex
64
@end itemize
65
66
Combination of abstract domain is possible at the level 0. One can
67
implement for instance the cartesian or reduced product of two
68
different abstract domains, the decomposition of abstract values into
69
a product of values of smaller dimensionality, ...
70
71
@c -------------------------------------------------------------------
72
@node Programming language, Compatibility with threads, Interface levels, General choices
73
@subsubheading Programming language
74
75
The reference version of the interface is the C version of the interface:
76
77
@itemize
78
@item
79
C can be easily interfaced with most programming languages;
80
@item
81
Most of the existing libraries implementing abstract domains for
82
numerical variables are programmed in C or C++.
83
@end itemize
84
85
An @sc{OCaml} version is already available. The interface between
86
OCaml and C is even generic and any libraries can benefit from it by
87
providing the glue for just one function (see XX).
88
89
@c -------------------------------------------------------------------
90
@node Compatibility with threads, Interruptions, Programming language, General choices
91
@subsubheading Compatibility with threads
92
93
In order to ensure compatibility with multithreading programming, a
94
context is explicitly passed to functions in order to ensure the
95
following points:
96
97
@itemize
98
@item
99
the transmission of data specific to each library (non-standard
100
options, workspace, ...);
101
@item
102
the transmission of standard options (selection of algorithms and their
103
precision inside a library);
104
@item
105
the management of exceptions (implemented as error codes in the C
106
interface) (@code{not_implemented}, @code{invalid_argument},
107
@code{overflow}, @code{timeout}, @code{out_of_space}).
108
@end itemize
109
110
@c -------------------------------------------------------------------
111
@node Interruptions, Memory management, Compatibility with threads, General choices
112
@subsubheading Interruptions
113
114
Interruptions mechanism is have possible for different cases:
115
@table @code
116
@item timeout
117
if the execution time for an operation exceeds some bound;
118
@item out_of_space
119
if the space consumption for an operation exceeds some bound;
120
@item overflow
121
if the magnitude or the space usage of manipulated numbers exceeds some bound;
122
@item not_implemented
123
if the operation is actually not implemented by the underlying library;
124
@item invalid_argument
125
if the arguments do not follow the requirements of an operation.
126
@end table
127
128
@quotation 
129
For instance, in a convex polyhedra library, the @code{out_of_space}
130
exception allows to abort an operation is the result appears to have
131
too many constraints and/or generators. If this happens, one can redo
132
the operation with another (less precise) algorithm. The
133
@code{overflow} may be useful when effective overflows are encountered
134
with machine integers or when multiprecision rational numbers have too
135
large numerators and denominators. The @code{not_implemented}
136
exception allows for a library to be linked to the interface even if
137
it does not provide some operation of the interface.
138
@end quotation
139
140
When an interruption occurs, the function should still return a
141
correct result, in the abstract interpretation sense: it should be a
142
correct approximation, usable for next operations in the program. The
143
top value is always a correct approximation.
144
145
@c -------------------------------------------------------------------
146
@node Memory management, Programming style, Interruptions, General choices
147
@subsubheading Memory management
148
149
Memory is managed differently depending on the programming language. Currently:
150
151
@itemize
152
@item
153
No automatic garbage collection in the C interface
154
@item
155
Use of the @sc{OCaml} runtime garbage collector in the @sc{OCaml} interface
156
@end itemize
157
158
@c -------------------------------------------------------------------
159
@node Programming style, Number representation, Memory management, General choices
160
@subsubheading Programming style
161
162
Both functional and imperative (i.e., side-effect) signatures are
163
supported for operations. This allows to optimize the memory
164
allocation and to use whichever version is more convenient for an user
165
and the used programming language.
166
167
@c -------------------------------------------------------------------
168
@node Number representation,  , Programming style, General choices
169
@subsubheading Number representation
170
171
Inside a specific library, any number representation may be used
172
(floating-point numbers, machine integers, multiprecision
173
integers/rationals, ...). Existing libraries often offers the
174
possibility to select different representations.
175
176
However, in the interface, this representation should be normalized
177
and independent of underlying libraries, without being restrictive
178
either. As a consequence, the interface offers the choiced between
179
180
@itemize
181
@item GMP multiprecision rationals (which implements exact arithmetic);
182
@item and machine floating-point numbers (@code{double}).
183
@end itemize
184
185
@c ===================================================================
186
@node Functionalities of the interface at level 0, Functionalities of the interface at level 1, General choices, APRON Rationale and Functionalities
187
@section Functionalities of the interface at level 0
188
@c ===================================================================
189
190
@menu
191
* Representation of an abstract value::  
192
* Semantics of an abstract value::  
193
* Dimensions::                  
194
* Other datatypes::             
195
* Control of internal representation::  
196
* Printing::                    
197
* Serializaton/Deserialization::  
198
* Constructors::                
199
* Tests::                       
200
* Property extraction::         
201
* Lattice operations::          
202
* Assignement and Substitutions::  
203
* Operations on dimensions::    
204
* Other operations::            
205
@end menu
206
207
208
@c -------------------------------------------------------------------
209
@node Representation of an abstract value, Semantics of an abstract value, Functionalities of the interface at level 0, Functionalities of the interface at level 0
210
@subsubheading Representation of an abstract value
211
212
At the level 0 of the interface, an abstract value is a structure
213
@verbatim
214
struct ap_abstract0_t {
215
  ap_manager_t *manager; /* Explicit context */
216
  void         *value;   /* Abstract value representation
217
			    (only known by the underlying library) */
218
}
219
@end verbatim
220
The context is allocated by the underlying library, and contains an
221
array of function pointers pointing to the function of the underlying
222
library. Hence, it indicates the effective type of an abstract value.
223
224
The validity of the arguments of the functions called through the
225
interface is checked before the call to effective functions. In case
226
of problem, an @code{invalid_argument} exception is raised.
227
228
@c -------------------------------------------------------------------
229
@node Semantics of an abstract value, Dimensions, Representation of an abstract value, Functionalities of the interface at level 0
230
@subsubheading Semantics of an abstract value
231
232
The semantics of an abstract value is a subset
233
@iftex 
234
@tex
235
$$X\subseteq {\cal N}^p\times{\cal R}^q$$
236
@end tex 
237
@end iftex
238
@ifnottex
239
@quotation
240
X of N^p x R^q
241
@end quotation
242
@end ifnottex
243
244
@noindent Abstract values are typed according to their dimensionality
245
(p,q).
246
247
@c -------------------------------------------------------------------
248
@node Dimensions, Other datatypes, Semantics of an abstract value, Functionalities of the interface at level 0
249
@subsubheading Dimensions
250
Dimensions are numbered from 0 to p+q-1 and are typed either as
251
integer or real, depending on their rank w.r.t. the dimensionality of
252
the abstract value.
253
254
@quotation Note
255
Taking into account or not the fact that some dimensions are integers
256
is left to underlying libraries. Treating them as real is still a
257
correct approximation. The behaviour of the libraries in this regard
258
may also depend on some options.
259
@end quotation
260
261
@c -------------------------------------------------------------------
262
@node Other datatypes, Control of internal representation, Dimensions, Functionalities of the interface at level 0
263
@subsubheading Other datatypes
264
265
In addition to abstract values, the interface also manipulates the
266
following main datatypes:
267
@table @emph
268
@item scalar (number)
269
Either GMP multiprecision rationals or C @code{double}.
270
@item interval
271
composed of 2 scalar numbers. With rationals, plus (resp minus) infinity is represented by 1/0 (resp -1/0). With @code{double}, the IEEE754 is assumed and the corresponding standard representation is used.
272
@item coefficient
273
which is either a scalar or an interval.
274
@item (interval) linear expression
275
The term linear is used even if the proper term should rather be
276
affine.  A linear expression is a linear expression in the common
277
sense, using only scalar numbers. A quasi-linear expression is a
278
linear expression where the constant coefficient is an interval. An
279
interval linear expression is a linear expression where any
280
coefficient may be an interval. In order to have a unique datatype for
281
these variations, we introduced the notion of coefficient described
282
above.
283
@item ``linear'' constraints 
284
``Linear'' constraints includes proper linear constraints, linear
285
constraints in which the expression can be possibly an interval linear
286
expression, linear equalities modulo a number, and linear disequalities.
287
@item generators
288
A generator system for a subset of @math{X\subseteq R^n} is a finite
289
set of vectors, among which one distinguishes @emph{points}
290
@math{p_0,\ldots,p_m} and @emph{rays} @math{r_0,\ldots,r_n}, that
291
generates @math{X}:
292
@iftex 
293
@tex
294
$$X=\{ \lambda_0 \vec{p_0} + \ldots \lambda_m \vec{p_m} + \mu_0 \vec{r_0} +\ldots + \mu_n \vec{r_n} ~|~ \sum_i \lambda_i = 1 ~\wedge~ \forall j: \mu_j\geq 0 \}$$
295
@end tex 
296
@end iftex
297
@ifnottex
298
@quotation
299
X = @{ lambda0 p0 +...+ lambdaM pM + mu0 r0 +...+ muN rN | lambda0 +...+ lambdaN = 1 and forall J : muJ >= 0 @}
300
@end quotation
301
@end ifnottex
302
The APRON datatype for generators distinguishes points (sum of
303
coefficients equal to one), rays (positive coefficients), lines (or
304
bidirectional rays, with unconstrainted coefficients), integer rays
305
(integer positive coefficients) and integer lines (integer
306
coefficients).
307
@end table
308
309
@c -------------------------------------------------------------------
310
@node Control of internal representation, Printing, Other datatypes, Functionalities of the interface at level 0
311
@subsubheading Control of internal representation
312
313
We identified several notions:
314
315
@itemize
316
@item
317
Canonical form
318
@item
319
Minimal form (in term of space)
320
@item
321
Approximation notion left to the underlying library (taking into
322
account integers or not, ...).
323
@end itemize
324
325
@c -------------------------------------------------------------------
326
@node Printing, Serializaton/Deserialization, Control of internal representation, Functionalities of the interface at level 0
327
@subsubheading Printing
328
329
There are two printing operations:
330
331
@itemize
332
@item
333
Printing of an abstract value;
334
@item
335
Printing the difference between two abstract values.
336
@end itemize
337
338
@noindent The printing format is library dependent. However, the conversion of
339
abstract values to constraints (see below) allows a form of
340
standardized printing for abstract values.
341
342
@c -------------------------------------------------------------------
343
@node Serializaton/Deserialization, Constructors, Printing, Functionalities of the interface at level 0
344
@subsubheading Serializaton/Deserialization
345
346
Serialization and deserialization of abstract values to a memory
347
buffer is offered. It is entirely managed by the underlying
348
library. In particular, it is up to it to check that a value read from
349
the memory buffer has the right format and has not been written by a
350
different library.
351
352
Serialization is done to a memory buffer instead of to a file
353
descriptor because this mechanism is more general and is needed for
354
interfacing with languages like @sc{OCaml}.
355
356
@c -------------------------------------------------------------------
357
@node Constructors, Tests, Serializaton/Deserialization, Functionalities of the interface at level 0
358
@subsubheading Constructors
359
360
Four basic constructors are offered:
361
362
@itemize
363
@item
364
bottom (empty) and top (universe) values (with a specified dimensionality);
365
@item
366
abstraction of a bounding box;
367
@item
368
abstraction of conjunction of linear constraints (in the broad sense).
369
@end itemize
370
371
@c -------------------------------------------------------------------
372
@node Tests, Property extraction, Constructors, Functionalities of the interface at level 0
373
@subsubheading Tests
374
375
Predicates are offered for testing
376
@itemize
377
@item
378
emptiness and universality of an abstract value:
379
@item
380
inclusion and equality of two abstract values;
381
@item
382
inclusion of a dimension into an interval given an abstract value;
383
@iftex
384
@tex
385
$${\it abs}(\vec{x}) \models x_i \in I ~~ ?$$
386
@end tex
387
@end iftex
388
@item
389
satisfaction of a linear constraint by the abstract value.
390
@iftex
391
@tex
392
$${\it abs}(\vec{x}) \models {\it cons}(\vec{x}) ~~ {\tt or} ~~ {\it abs}(\vec{x}) \Rightarrow {\it cons}(\vec{x}) ~~ ?$$
393
@end tex
394
@end iftex
395
@end itemize
396
397
@c -------------------------------------------------------------------
398
@node Property extraction, Lattice operations, Tests, Functionalities of the interface at level 0
399
@subsubheading Property extraction
400
401
Some properties may be inferred given an abstract values:
402
403
@itemize
404
@item Interval of variation of a dimension in an abstract value;
405
@iftex
406
@tex
407
$$\bigcap\{ I ~|~ {\it abs}(\vec{x}) \models x_i\in I\}$$
408
@end tex
409
@end iftex
410
411
@item Interval of variation of a linear expression in an abstract value;
412
@iftex
413
@tex
414
$$\bigcap\{ I ~|~ {\it abs}(\vec{x}) \models {\it expr}(\vec{x})\in I\}$$
415
@end tex
416
@end iftex
417
@item Conversion to a bounding box
418
@iftex
419
@tex
420
$$\bigcap\{ B ~|~ {\it abs}(\vec{x}) \subseteq B \}$$
421
@end tex
422
@end iftex
423
@item Conversion to a set of linear constraints (in the broad sense).
424
@end itemize
425
426
@noindent Notice that the second operation implements linear programming if it
427
is exact. The third operation is not minimal, as it can be implemented
428
using the first one, but it was convenient to include it. But the
429
fourth operation is minimal and cannot be implemented using the second
430
one, as the number of linear expression is infinite.
431
432
@c -------------------------------------------------------------------
433
@node Lattice operations, Assignement and Substitutions, Property extraction, Functionalities of the interface at level 0
434
@subsubheading Lattice operations
435
436
@itemize
437
@item
438
Least upper bound and greatest lower bound of two abstract values, and of arrays of abstract values;
439
@item
440
Intersection with one or several linear constraints;
441
@iftex
442
@tex
443
$$\alpha\left(\gamma({\it abs}(\vec{x})) \cap \bigcap_i {\it cons}_i(\vec{x})\right)$$
444
@end tex
445
@end iftex
446
@item
447
Addition of rays (for instance for implement generalized time elapse
448
operator in linear hybrid systems).
449
@iftex
450
@tex
451
$$\alpha\left(\left\{ \vec{x} + \sum_i \lambda_i \vec{r}_i ~|~ \vec{x}\in\gamma({\it abs}), \lambda_i\geq 0\right\}\right)$$
452
@end tex
453
@end iftex
454
@end itemize
455
456
@c -------------------------------------------------------------------
457
@node Assignement and Substitutions, Operations on dimensions, Lattice operations, Functionalities of the interface at level 0
458
@subsubheading Assignement and Substitutions
459
460
@itemize
461
@item
462
of a dimension by a (interval) linear expression
463
@iftex
464
@tex
465
466
Assignement:
467
$$\alpha\left(\biggl(
468
\exists x_i: \Bigl(\gamma({\it abs}(\vec{x})) \cap x_i'={\it expr}(\vec{x})\Bigr)\biggr)[x_i\leftarrow x_i']\right)$$
469
Substitution:
470
$$\alpha\biggl(
471
\exists x_i': \Bigl(\gamma({\it abs}(\vec{x}))[x_i'\leftarrow x_i] \cap x_i'={\it expr}(\vec{x})\Bigr)\biggr)$$
472
473
@end tex
474
@end iftex
475
@item
476
in parallel of several dimensions by several (interval) linear expressions
477
@iftex
478
@tex
479
480
Assignement:
481
$$\alpha\left(\biggl(
482
\exists \vec{x}: \Bigl(\gamma({\it abs}(\vec{x})) \cap \bigcap_i x_i'={\it expr}_i(\vec{x})\Bigr)\biggr)[\vec{x}\leftarrow \vec{x'}]\right)$$
483
Substitution:
484
$$\alpha\biggl(
485
\exists \vec{x'}: \Bigl(\gamma({\it abs}(\vec{x'})) \cap \bigcap_i x_i'={\it expr}(\vec{x})\Bigr)\biggr)$$
486
487
@end tex
488
@end iftex
489
@end itemize
490
491
@noindent Parallel assignement and substitution ar enot minimal operations, but
492
for some abstract domains implementing them directly results in more
493
efficient or more precise operations.
494
495
@c -------------------------------------------------------------------
496
@node Operations on dimensions, Other operations, Assignement and Substitutions, Functionalities of the interface at level 0
497
@subsubheading Operations on dimensions
498
499
@itemize
500
@item
501
Projection/Elimination of one or several dimensions with constant
502
dimensionality;
503
@iftex
504
@tex
505
506
Elimination: $$\exists x_i:{\it abs}(\vec{x})$$
507
508
Projection: $$(\exists x_i:{\it abs}(\vec{x}))\cap x_i=0$$
509
@end tex
510
@end iftex
511
@item
512
Addition/Removal/Permutation of dimensions with corresponding change
513
of dimensionality (with the exception of permutation). These
514
operations allows to resize abstract values, and reorganize
515
dimensions.
516
@item
517
Expansion and folding of dimensions. This is useful for the
518
abstraction of arrays, where a dimension may represent several
519
variables.
520
@iftex
521
@tex
522
523
Expansion of $i$ into $i$, $j_1$, $j_2$ assuming $x_{j_1}$, $x_{j_2}$ are new dimensions:
524
$${\it abs}(\vec{x}) \sqcap {\it abs}(\vec{x})[x_{j_1}\leftarrow x_i] \sqcap {\it abs}(\vec{x})[x_{j_2}\leftarrow x_i] ...
525
$$
526
Folding of $j_0$ and $j_1$ into $j_0$:
527
$$(\exists x_{j_1}:{\it abs}(\vec{x})) \sqcup (\exists x_{j_0}:{\it abs}(\vec{x})[x_{j_0}\leftarrow x_{j_1}] 
528
$$
529
@end tex
530
@end iftex
531
532
533
@end itemize
534
535
@c -------------------------------------------------------------------
536
@node Other operations,  , Operations on dimensions, Functionalities of the interface at level 0
537
@subsubheading Other operations
538
539
Widening, either simple or with threshold, is offered. A generic
540
widening with threshold function is offered in the interface.
541
542
Topological closure (i.e., relaxation of strict inequalities) is
543
offered.
544
545
@c ===================================================================
546
@node Functionalities of the interface at level 1,  , Functionalities of the interface at level 0, APRON Rationale and Functionalities
547
@section Functionalities of the interface at level 1
548
@c ===================================================================
549
550
We focus on the changes brought by the level 1 w.r.t. the level 0.
551
552
@menu
553
* Variables and Environments::  
554
* Semantics and Representation of an abstract value::  
555
* Operations on environments::  
556
* Dynamic typing w.r.t. environments::  
557
* Operations on variables in abstract values::  
558
@end menu
559
560
@c -------------------------------------------------------------------
561
@node Variables and Environments, Semantics and Representation of an abstract value, Functionalities of the interface at level 1, Functionalities of the interface at level 1
562
@subsubheading Variables
563
564
Dimensions are replaced by @emph{variables}.
565
566
In the C interface, variables are defined by a generic type
567
(@code{char*}, structured type, ...), equipped with the operations
568
@code{compare}, @code{copy}, @code{free}, @code{to_string}. In the
569
@sc{OCaml}, for technical reasons, the type is just the @code{string}
570
type.
571
572
@emph{Environments} manages the correspondance between the numerical
573
dimensions of level 0 and the variables of level 1.
574
575
@c -------------------------------------------------------------------
576
@node Semantics and Representation of an abstract value, Operations on environments, Variables and Environments, Functionalities of the interface at level 1
577
@subsubheading Semantics and Representation of an abstract value
578
579
The semantics of an abstract value is a subset
580
@iftex 
581
@tex
582
$$X\subseteq V\rightarrow ({\cal N}\cup{\cal R})$$
583
@end tex 
584
@end iftex
585
@ifnottex
586
@quotation
587
X -> (N+R).
588
@end quotation
589
@end ifnottex
590
where @math{X} is a set of variables.
591
@noindent
592
Abstract values are typed according to their environment.
593
594
It is represented by a structure
595
@verbatim
596
struct ap_abstract1_t {
597
  ap_abstract0_t    *abstract0;
598
  ap_environment_t  *env;
599
};
600
@end verbatim
601
Other datatypes of level 0 are extend in the same way. For instance,
602
@verbatim
603
struct ap_linexpr1_t {
604
  ap_linexpr0_t    *linexpr0;
605
  ap_environment_t *env;
606
};
607
@end verbatim
608
609
@c -------------------------------------------------------------------
610
@node Operations on environments, Dynamic typing w.r.t. environments, Semantics and Representation of an abstract value, Functionalities of the interface at level 1
611
@subsubheading Operations on environments
612
613
@itemize
614
@item creation, merging, destruction
615
@item addition/removal/renaming of variables
616
@end itemize
617
618
@c -------------------------------------------------------------------
619
@node Dynamic typing w.r.t. environments, Operations on variables in abstract values, Operations on environments, Functionalities of the interface at level 1
620
@subsubheading Dynamic typing w.r.t. environments
621
622
For binary operations on abstract values, the environments should be
623
the same.
624
625
For operations involving an abstract value and an other datatype
626
(expression, constraint, ...), one checks that the environment of
627
the expression is a subenvironment of the environment of the abstract
628
value, and one resize if necessary.
629
630
@c -------------------------------------------------------------------
631
@node Operations on variables in abstract values,  , Dynamic typing w.r.t. environments, Functionalities of the interface at level 1
632
@subsubheading Operations on variables in abstract values
633
634
Operations on dimensions are lifted to operations on variables:
635
636
@itemize
637
@item
638
Projection/Elimination of one or several variables with constant
639
environment;
640
@item
641
Addition/Removal/Renaming of variables with corresponding change
642
of environment;
643
@item
644
Change of environment (possibly combining removal and addition of variables);
645
@item
646
Expansion and folding of variables. 
647
@end itemize
(-)./mlapronidl/index.html (+215 lines)
Line 0 Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html>
3
<head>
4
<link rel="stylesheet" href="style.css" type="text/css">
5
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
6
<link rel="Start" href="index.html">
7
<link title="Index of types" rel=Appendix href="index_types.html">
8
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
9
<link title="Index of values" rel=Appendix href="index_values.html">
10
<link title="Index of modules" rel=Appendix href="index_modules.html">
11
<link title="Scalar" rel="Chapter" href="Scalar.html">
12
<link title="Interval" rel="Chapter" href="Interval.html">
13
<link title="Coeff" rel="Chapter" href="Coeff.html">
14
<link title="Var" rel="Chapter" href="Var.html">
15
<link title="Environment" rel="Chapter" href="Environment.html">
16
<link title="Linexpr1" rel="Chapter" href="Linexpr1.html">
17
<link title="Lincons1" rel="Chapter" href="Lincons1.html">
18
<link title="Generator1" rel="Chapter" href="Generator1.html">
19
<link title="Texpr1" rel="Chapter" href="Texpr1.html">
20
<link title="Tcons1" rel="Chapter" href="Tcons1.html">
21
<link title="Abstract1" rel="Chapter" href="Abstract1.html">
22
<link title="Dim" rel="Chapter" href="Dim.html">
23
<link title="Linexpr0" rel="Chapter" href="Linexpr0.html">
24
<link title="Lincons0" rel="Chapter" href="Lincons0.html">
25
<link title="Generator0" rel="Chapter" href="Generator0.html">
26
<link title="Texpr0" rel="Chapter" href="Texpr0.html">
27
<link title="Tcons0" rel="Chapter" href="Tcons0.html">
28
<link title="Manager" rel="Chapter" href="Manager.html">
29
<link title="Abstract0" rel="Chapter" href="Abstract0.html">
30
<link title="Box" rel="Chapter" href="Box.html">
31
<link title="Oct" rel="Chapter" href="Oct.html">
32
<link title="Polka" rel="Chapter" href="Polka.html">
33
<link title="Ppl" rel="Chapter" href="Ppl.html">
34
<link title="PolkaGrid" rel="Chapter" href="PolkaGrid.html">
35
<link title="Mpz" rel="Chapter" href="Mpz.html">
36
<link title="Mpq" rel="Chapter" href="Mpq.html">
37
<link title="Mpf" rel="Chapter" href="Mpf.html">
38
<link title="Mpfr" rel="Chapter" href="Mpfr.html">
39
<link title="Gmp_random" rel="Chapter" href="Gmp_random.html"><title></title>
40
<link title="Mpzf" rel="Chapter" href="Mpzf.html">
41
<link title="Mpqf" rel="Chapter" href="Mpqf.html">
42
<link title="Mpftf" rel="Chapter" href="Mpftf.html">
43
</head>
44
<body>
45
<center><h1></h1></center>
46
<a href="index_types.html">Index of types</a><br>
47
<a href="index_exceptions.html">Index of exceptions</a><br>
48
<a href="index_values.html">Index of values</a><br>
49
<a href="index_modules.html">Index of modules</a><br>
50
<br/><br>
51
52
<h1>Managers</h1>
53
54
Managers are allocated by abstract domains and defines the
55
effective type of abstract values. Information about compilation
56
and linking is provided in modules implementing a specific
57
abstract domain.
58
59
<table class="indextable">
60
<tr><td><a href="Manager.html">Manager</a></td><td><div class="info">
61
APRON Managers
62
</div>
63
</td></tr>
64
<tr><td><a href="Box.html">Box</a></td><td><div class="info">
65
BOX: intervals abstract domain
66
</div>
67
</td></tr>
68
<tr><td><a href="Oct.html">Oct</a></td><td><div class="info">
69
OCT: octagon abstract domain.
70
</div>
71
</td></tr>
72
<tr><td><a href="Polka.html">Polka</a></td><td><div class="info">
73
POLKA: Convex Polyhedra and Linear Equalities abstract domain
74
</div>
75
</td></tr>
76
<tr><td><a href="Ppl.html">PPL</a></td><td><div class="info">
77
PPL: Convex Polyhedra and Linear Congruences abstract domain
78
</div>
79
</td></tr>
80
<tr><td><a href="PolkaGrid.html">PolkaGrid</a></td><td><div class="info">
81
PolkaGrid: reduced product of (NewPolka) Convex Polyhedra and (PPL) Linear Congruences abstract domain
82
</div>
83
</td></tr>
84
</table>
85
86
<h1>Coefficients</h1>
87
<table class="indextable">
88
<tr><td><a href="Scalar.html">Scalar</a></td><td><div class="info">
89
APRON Scalar numbers.
90
</div>
91
</td></tr>
92
<tr><td><a href="Interval.html">Interval</a></td><td><div class="info">
93
APRON Intervals on scalars
94
</div>
95
</td></tr>
96
<tr><td><a href="Coeff.html">Coeff</a></td><td><div class="info">
97
APRON Coefficients (either scalars or intervals)
98
</div>
99
</td></tr>
100
</table>
101
102
<h1>Level 1 of APRON interface</h1>
103
<table class="indextable">
104
<tr><td><a href="Var.html">Var</a></td><td><div class="info">
105
APRON Variables
106
</div>
107
</td></tr>
108
<tr><td><a href="Environment.html">Environment</a></td><td><div class="info">
109
APRON Environments binding dimensions to names
110
</div>
111
</td></tr>
112
<tr><td><a href="Linexpr1.html">Linexpr1</a></td><td><div class="info">
113
APRON Linear Expressions of level 1
114
</div>
115
</td></tr>
116
<tr><td><a href="Lincons1.html">Lincons1</a></td><td><div class="info">
117
APRON Linear Constraints and array of constraints of level 1
118
</div>
119
</td></tr>
120
<tr><td><a href="Generator1.html">Generator1</a></td><td><div class="info">
121
APRON Generators and array of generators of level 1
122
</div>
123
</td></tr>
124
<tr><td><a href="Texpr1.html">Texpr1</a></td><td><div class="info">
125
APRON Non-Linear Expressions of level 1
126
</div>
127
</td></tr>
128
<tr><td><a href="Tcons1.html">Tcons1</a></td><td><div class="info">
129
APRON Non-Linear Constraints and array of constraints of level 1
130
</div>
131
</td></tr>
132
<tr><td><a href="Abstract1.html">Abstract1</a></td><td><div class="info">
133
APRON Abstract values of level 1
134
</div>
135
</td></tr>
136
<tr><td><a href="Parser.html">Parser</a></td><td><div class="info">
137
APRON Parser for expressions, constraints and generators
138
</div>
139
</td></tr>
140
</table>
141
142
<h1>Level 0 of APRON interface</h1>
143
144
Normally not needed for a user.
145
146
<table class="indextable">
147
<tr><td><a href="Dim.html">Dim</a></td><td><div class="info">
148
APRON Dimensions and related types
149
</div>
150
</td></tr>
151
<tr><td><a href="Linexpr0.html">Linexpr0</a></td><td><div class="info">
152
APRON Linear expressions of level 0
153
</div>
154
</td></tr>
155
<tr><td><a href="Lincons0.html">Lincons0</a></td><td><div class="info">
156
APRON Linear constraints of level 0
157
</div>
158
</td></tr>
159
<tr><td><a href="Generator0.html">Generator0</a></td><td><div class="info">
160
APRON Generators of level 0
161
</div>
162
</td></tr>
163
<tr><td><a href="Texpr0.html">Texpr0</a></td><td><div class="info">
164
APRON Non-Linear Expressions of level 0
165
</div>
166
</td></tr>
167
<tr><td><a href="Tcons0.html">Tcons0</a></td><td><div class="info">
168
APRON Non-Linear Constraints and array of constraints of level 0
169
</div>
170
</td></tr>
171
<tr><td><a href="Abstract0.html">Abstract0</a></td><td><div class="info">
172
APRON Abstract value of level 0
173
</div>
174
</td></tr>
175
</table>
176
177
178
<h1>Misc</h1>
179
180
<table class="indextable">
181
<tr><td><a href="Mpz.html">Mpz</a></td><td><div class="info">
182
GMP multi-precision integers
183
</div>
184
</td></tr>
185
<tr><td><a href="Mpq.html">Mpq</a></td><td><div class="info">
186
GMP multiprecision rationals
187
</div>
188
</td></tr>
189
<tr><td><a href="Mpf.html">Mpf</a></td><td><div class="info">
190
GMP multiprecision floating-point numbers
191
</div>
192
<tr><td><a href="Mpfr.html">Mpfr</a></td><td><div class="info">
193
MPFR Multiprecision floating-point numbers with guaranteed rounding
194
</div>
195
</td></tr>
196
<tr><td><a href="Gmp_random.html">Gmp_random</a></td><td><div class="info">
197
GMP random generation functions
198
</div>
199
</td></tr>
200
<tr><td><a href="Mpzf.html">Mpzf</a></td><td><div class="info">
201
GMP multi-precision integers, functional version
202
</div>
203
</td></tr>
204
<tr><td><a href="Mpqf.html">Mpqf</a></td><td><div class="info">
205
GMP multi-precision rationals, functional version
206
</div>
207
</td></tr>
208
<tr><td><a href="Mpfrf.html">Mpfrf</a></td><td><div class="info">
209
MPFR multi-precision floating-point numbers, functional version
210
</div>
211
</td></tr>
212
</table>
213
214
</body>
215
</html>
(-)./ppl/ap_ppl.texi (+108 lines)
Line 0 Link Here
1
@c This file is part of the APRON Library, released under LGPL
2
@c license. Please read the COPYING file packaged in the distribution
3
4
@c to be included from apron.texi
5
6
The @sc{APRON PPL} library is an APRON wrapper around the
7
@uref{http://www.cs.unipr.it/ppl/, Parma Polyhedra Library (PPL)}. The
8
wrapper offers the convex polyhedra and linear congruences abstract
9
domains.
10
11
@menu
12
* Use of APRON PPL::
13
* Allocating APRON PPL managers::
14
* APRON PPL standard options::
15
@end menu
16
17
@c ===================================================================
18
@node Use of APRON PPL, Allocating APRON PPL managers,,PPL
19
@subsection Use of APRON PPL
20
@c ===================================================================
21
22
To use APRON PPL in C, you need of course to install PPL, @emph{after
23
having patched it} following the recommendations of the @file{README}
24
file.  You need also to add
25
@example
26
#include "apron_ppl.h"
27
@end example
28
in your source file(s) and add @samp{-I$(APRON_PREFIX)/include} in the
29
command line in your Makefile.
30
31
You should also link your object files with the APRON PPL library to
32
produce an executable, @emph{using} @samp{g++} (instead of @samp{gcc},
33
because @file{libppl.a} is a C++ library), and adding something like
34
@samp{-L$(APRON_PREFIX)/lib -lapron_ppl -L$(PPL_PREFIX)/lib -lppl
35
-L$(GMP_PREFIX)/lib -lgmpxx} in the command line in your Makefile
36
(followed by the standard @samp{-lapron -litvmpq -litvdbl
37
-L$(MPFR_PREFIX)/lib -lmpfr -L$(GMP_PREFIX)/lib -lgmp}). The
38
@file{libgmpxx.a} library is the C++ wrapper on top of the GMP
39
library. Ensure that your GMP installation contains it, as it is not
40
always installed by default.
41
42
All scalars of type @code{double} are converted to scalars of type
43
@code{mpq_t} inside APRON PPL, as APRON PPL works internally with exact
44
rational arithmetics. So when possible it is better for the user (in
45
term of efficiency) to convert already @code{double} scalars to
46
@code{mpq_t} scalars.
47
48
The wrapper library is available in debug mode
49
(@samp{libapron_ppl_debug.a}).
50
51
@c ===================================================================
52
@node Allocating APRON PPL managers, APRON PPL standard options, Use of APRON PPL, PPL
53
@subsection Allocating APRON PPL managers
54
@c ===================================================================
55
56
@deftypefun ap_manager_t* ap_ppl_poly_manager_alloc (bool @var{strict})
57
Allocate a APRON manager for convex polyhedra, linked to the PPL
58
library.
59
60
The @var{strict} option, when true, enables strict constraints in polyhedra
61
(like @code{x>0}). Managers in strict mode or in loose mode
62
(strict constraints disabled) are not compatible, and so are
63
corresponding abstract values.
64
@end deftypefun
65
66
@deftypefun ap_manager_t* ap_ppl_grid_manager_alloc ()
67
Allocate an APRON manager for linear equalities, linked to the PPL
68
library.
69
@end deftypefun
70
71
@c ===================================================================
72
@node APRON PPL standard options,  , Allocating APRON PPL managers, PPL
73
@subsection APRON PPL standard options
74
@c ===================================================================
75
76
Currently, the only options available are related to the widening
77
operators. 
78
79
@multitable @columnfractions .2 .06 .74
80
81
@item Function              @tab algo      @tab Comments
82
@item
83
@item widening
84
@tab <=0 
85
@tab CH78 standard widening (Cousot & Halbwachs, POPL'1978).
86
@item
87
@tab >0
88
@tab BHRZ03 widening (Bagnara, Hill, Ricci & Zafanella, SAS'2003)
89
@item
90
@item widening_threshold
91
@tab <=0
92
@tab standard widening with threshold
93
@item
94
@tab =1
95
@tab standard widening with threshold, intersected by the bounding box of the convex hull pof the two arguments
96
@item
97
@tab <=0
98
@tab standard widening with threshold
99
@item
100
@tab =1
101
@tab standard widening with threshold, intersected by the bounding box of the convex hull of the second argument. This is actually an extrapolation rather than a widening (termination is not guaranteed)
102
@item
103
@tab =2
104
@tab BHRZ03 widening with threshold
105
@item
106
@tab =3
107
@tab BHRZ03 widening with threshold, intersected by the bounding box of the convex hull of the second argument. This is actually an extrapolation rather than a widening (termination is not guaranteed)
108
@end multitable

Return to bug 245804