PIPS
|
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include "linear_assert.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
Go to the source code of this file.
Functions | |
Psysteme * | sc_read (char *nomfic) |
Psysteme * sc_read(char * nomfic): construit un systeme d'inegalites lineaires a partir d'une representation externe standard; les variables utilisees dans le systeme doivent etre declarees dans la premiere ligne; les inegalites sont separees par des virgules et regroupees entre accolades; les egalites sont converties en paires d'inegalites. More... | |
bool | sc_fscan (FILE *f, Psysteme *ps) |
bool sc_fscan(FILE * f, Psysteme * ps): construit un systeme d'inegalites et d'egalites lineaires a partir d'une representation externe standard; More... | |
void | sc_dump (Psysteme sc) |
void sc_dump(Psysteme sc): dump to stderr More... | |
void | sc_default_dump (Psysteme sc) |
void sc_default_dump(Psysteme sc): dump to stderr More... | |
void | sc_print (Psysteme ps, get_variable_name_t nom_var) |
void sc_print() More... | |
void | sc_fprint (FILE *fp, Psysteme ps, get_variable_name_t nom_var) |
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier pointe par 'fp' la representation externe d'un systeme lineaire en nombres entiers, compatible avec la fonction de lecture sc_fscan() More... | |
void | sc_fprint_for_sc_fscan (FILE *f, Psysteme sc, char *(*nom_var)(Variable)) |
void sc_fprint_for_sc_fscan(FILE *f, Psysteme sc, char * (*nom_var)(Variable)) More... | |
void | sc_default_dump_to_files (Psysteme sc, int sc_nb, char *directory_name) |
void sc_default_dump_to_files(Psysteme sc, sc_nb,directory_name): More... | |
Variables | |
Psysteme | ps_yacc |
package sc More... | |
bool | syst_syntax_error |
detection des erreurs de syntaxe par sc_gram.y More... | |
FILE * | syst_in |
fichier lu par sc_lex.l More... | |
void sc_default_dump | ( | Psysteme | sc | ) |
void sc_default_dump(Psysteme sc): dump to stderr
sc_default_dump is now compatible with sc_fscan using default_variable_to_string (stored by LINEAR. see sc_debug.c) may fail in very few cases, because of variable names. DN(5/8/2002)
Definition at line 170 of file sc_io.c.
References Ssysteme::base, base_fprint(), default_variable_to_string(), Ssysteme::dimension, Ssysteme::egalites, egalites_fprint(), fprintf(), Ssysteme::inegalites, and inegalites_fprint().
Referenced by build_sc_nredund_2pass_ofl_ctrl(), hyperplane(), internal_sc_feasibility(), sc_feasibility_ofl_ctrl(), sc_simplex_feasibility_ofl_ctrl_fixprec(), sc_strong_normalize2(), and sc_strong_normalize_and_check_feasibility2().
void sc_default_dump_to_files(Psysteme sc, sc_nb,directory_name):
Suitable for filtering purposes Print the system of constraints into several output files in a directory with names given Each file is 100% compatible with sc_fscan print with name of variables from default_variable_to_string overwrite if files exist DN(10/2/2003)
Definition at line 288 of file sc_io.c.
References assert, base_fprint(), default_variable_to_string(), egalites_fprint(), f(), fprintf(), and inegalites_fprint().
Referenced by internal_sc_feasibility(), sc_fourier_motzkin_feasibility_ofl_ctrl_timeout_ctrl(), sc_janus_feasibility_ofl_ctrl_timeout_ctrl(), and sc_simplexe_feasibility_ofl_ctrl_timeout_ctrl().
void sc_dump | ( | Psysteme | sc | ) |
void sc_dump(Psysteme sc): dump to stderr
Ancien nom: sc_fprint() (modifie a cause d'un conflit avec une autre fonction sc_fprint d'un profil different)
using variable_debug_name(); lost of original variables' names now compatible with sc_fscan() Better use sc_default_name(Psysteme) DN(5/8/2002)
Definition at line 142 of file sc_io.c.
References Ssysteme::base, base_fprint(), Ssysteme::dimension, Ssysteme::egalites, egalites_fprint(), fprintf(), Ssysteme::inegalites, inegalites_fprint(), and variable_debug_name.
Referenced by make_bound_expression(), sc_minmax_of_variable2(), transformer_combine(), and unimodular().
void sc_fprint | ( | FILE * | fp, |
Psysteme | ps, | ||
get_variable_name_t | nom_var | ||
) |
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier pointe par 'fp' la representation externe d'un systeme lineaire en nombres entiers, compatible avec la fonction de lecture sc_fscan()
nom_var est un pointeur vers la fonction permettant d'obtenir le
nom d'une variable (i.e. d'un des vecteurs de base)
FI:
DN: better use sc_fprint_for_sc_fscan()
Definition at line 220 of file sc_io.c.
References assert, Ssysteme::base, count, Ssysteme::dimension, egalite_fprint(), Ssysteme::egalites, fprintf(), inegalite_fprint(), Ssysteme::inegalites, Ssysteme::nb_eq, Ssysteme::nb_ineq, nom_var, Scontrainte::succ, Svecteur::succ, VECTEUR_NUL_P, and vecteur_var.
Referenced by add_var_sup(), bound_distribution(), bound_generation(), build_sc_machine(), build_sc_with_several_uniform_ref(), check_range_wrt_precondition(), chose_variable_to_project_for_feasability(), constraint_distribution(), contexts_mapping_of_nest(), cute_convex_union(), dj_system_complement(), eq_in_ineq(), evaluate_var_to_complexity(), expression_less_than_in_context(), find_iteration_domain(), fortran_user_call_to_transformer(), fprint_transformer(), local_tile_constraints(), loop_bounds_to_tile_bounds(), loop_nest_to_wp65_code(), main(), make_context_of_loop(), make_scanning_over_one_tile(), make_scanning_over_tiles(), make_tile_constraints(), movement_computation(), parallel_tiling(), parametric_transformer_empty_p(), plint_pas(), prettyprint_dependence_graph(), prettyprint_dependence_graph_view(), primal(), primal_pivot(), primal_positive(), recompute_loop_transformer(), reg_sc_debug(), sc_elim_redund_with_first_ofl_ctrl(), sc_fm_project_variables(), sc_fourier_motzkin_feasibility_ofl_ctrl(), sc_image_computation(), sc_print(), sc_resol_smith(), sc_supress_parallel_redund_constraints(), sc_supress_same_constraints(), sc_syst_debug(), set_dimensions_of_local_variable_family(), simplify_sc_to_complexity(), smith_int(), test_file(), tile_hyperplane_constraints(), tile_membership(), tile_membership_constraints(), tiling_transformation(), transformer_combine(), transformer_derivative_constraints(), transformer_derivative_fix_point(), transformer_equality_fix_point(), transformer_list_generic_transitive_closure(), transformer_pattern_fix_point(), transformer_projection_with_redundancy_elimination_and_check(), translate_global_values(), un_fprint_tab(), and var_ecart_sup().
void sc_fprint_for_sc_fscan(FILE *f, Psysteme sc, char * (*nom_var)(Variable))
compatible with sc_fscan. Replaced sc_default_dump_to_file (not really in use)
should use default_variable_to_string
Definition at line 260 of file sc_io.c.
References Ssysteme::base, base_fprint(), Ssysteme::dimension, Ssysteme::egalites, egalites_fprint(), f(), fprintf(), Ssysteme::inegalites, inegalites_fprint(), and nom_var.
bool sc_fscan(FILE * f, Psysteme * ps): construit un systeme d'inegalites et d'egalites lineaires a partir d'une representation externe standard;
Le systeme s est alloue et son ancienne valeur est perdue. Cette fonction devrait donc etre appelee avec la precondition s==NULL. La variable s n'est pas retournee pour respecter la syntaxe habituelle de scanf et pour pouvoir retourner un code.
Si la syntaxe du fichier f est correct, la valeur true est retournee; false sinon.
les variables utilisees dans le systeme doivent etre declarees dans la premiere ligne precedees du mot-cle VAR et separees par des virgules
les inegalites et les egalites sont melangees entre elles, mais separees par des virgules et regroupees entre accolades; les inegalites sont toutes mises sous la forme :
sum a x <= b i i i
ou b est le terme constant; noter que le terme constant est conserve a droite du comparateur et la partie lineaire a gauche
Exemple: VAR x, y, z { x <= 1, y == 2, x + 2 z > y }
Noter l'absence de signe "multiplier" entre les coefficients numeriques et les noms de variables
Cette fonction peut relire un fichier cree par la fonction sc_fprint()
Definition at line 121 of file sc_io.c.
References f(), ps_yacc, sc_init_lex(), sc_reversal(), syst_in, syst_parse(), and syst_syntax_error.
Referenced by main(), read_syst_from_file(), and test_file().
void sc_print | ( | Psysteme | ps, |
get_variable_name_t | nom_var | ||
) |
void sc_print()
Obsolete. Better use sc_default_dump()
Definition at line 194 of file sc_io.c.
References nom_var, and sc_fprint().
Referenced by copy_write_statement_with_cumulated_regions(), new_system_with_only_live_variable(), and regions_transformer_apply().
Psysteme* sc_read | ( | char * | nomfic | ) |
Psysteme * sc_read(char * nomfic): construit un systeme d'inegalites lineaires a partir d'une representation externe standard; les variables utilisees dans le systeme doivent etre declarees dans la premiere ligne; les inegalites sont separees par des virgules et regroupees entre accolades; les egalites sont converties en paires d'inegalites.
Exemple: VAR x, y, z { x <= 1, y == 2, x + 2 z > y }
Noter l'absence de signe "multiplier" entre les coefficients numeriques et les noms de variables
Cette fonction relit un fichier cree par la fonction sc_fprint()
Ancien nom: fscsys_uf
Definition at line 74 of file sc_io.c.
References exit, fprintf(), ps_yacc, sc_init_lex(), syst_in, and syst_parse().
|
extern |
package sc
Psysteme construit par sc_gram.y
Definition at line 95 of file sc_gram.c.
Referenced by sc_fscan(), and sc_read().
|
extern |
fichier lu par sc_lex.l
Referenced by sc_fscan(), and sc_read().
|
extern |
detection des erreurs de syntaxe par sc_gram.y
Definition at line 93 of file sc_gram.c.
Referenced by sc_fscan(), and syst_error().