PIPS
|
#include <stdio.h>
#include <string.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "misc.h"
#include "newgen.h"
Go to the source code of this file.
Macros | |
#define | error(fun, msg) |
NewGen interface with C3 type Psysteme for PIPS project. More... | |
Functions | |
void | sc_gen_write (FILE *fd, Psysteme s) |
Psc.c. More... | |
Psysteme | sc_gen_read (FILE *fd, int(*f)()) |
void | sc_gen_free (Psysteme s) |
Psysteme | sc_gen_copy_tree (Psysteme s) |
int | sc_gen_allocated_memory (Psysteme s) |
#define error | ( | fun, | |
msg | |||
) |
NewGen interface with C3 type Psysteme for PIPS project.
Systems of linear equalities and inequalities are stored as a triplet, a base followed by two vector lists, the sets of equalities and inequalities: (b leq lineq).
Each vector list is also parenthesized: (v1 v2 v3). Each vector itself (see Pvecteur.c) is a parenthesized list of couples value/variable.
For instance, the empty system (the whole space as defined by basis b) is: (b()()) where basis vector b is stored as a regular vector (see Pvecteur.c).
To cope with the absence of unget() for f(), each vectors in the list is separated by a space.
Redundant information, the number of equalities and the number of inequalities and the system dimension, is discarded.
Francois Irigoin, November 1990 Sigh, sigh, sigh:
Definition at line 208 of file Psc.c.
References contrainte_gen_allocated_memory(), and vect_gen_allocated_memory().
Referenced by initialize_newgen().
Definition at line 203 of file Psc.c.
References sc_copy().
Referenced by initialize_newgen(), and main().
void sc_gen_free | ( | Psysteme | s | ) |
Definition at line 198 of file Psc.c.
References sc_rm().
Referenced by initialize_newgen(), and main().
It might be a good idea to check that the basis is consistent with the equalities and inequalities that were read, later...
FI: doesn't work because it's just the definition of transformer_identity
fd | ignored |
Definition at line 139 of file Psc.c.
References Ssysteme::base, contrainte_make(), Ssysteme::dimension, error, f(), pips_assert, sc_add_egalite(), sc_add_inegalite(), sc_new(), vect_gen_read(), and vect_size().
void sc_gen_write | ( | FILE * | fd, |
Psysteme | s | ||
) |
FI: we cannot not store SC_UNDEFINED as it is used in regions; we cannot store it like a system with an empty basis, no inequalities and no equalities because it is used to define transformer identity; conclusion: region library has to be changed and to use transformer_undefined as context
Current kludge: SC_UNDEFINED is stored but retrieved as a system with 0 equalities and 0 inequalities over a space of dimension 0
fd | d |
Definition at line 82 of file Psc.c.
References Ssysteme::base, CONTRAINTE_UNDEFINED, Ssysteme::egalites, Ssysteme::inegalites, pips_assert, sc_make(), Scontrainte::succ, vect_gen_write(), and Scontrainte::vecteur.
Referenced by initialize_newgen(), and main().