#include <stdlib.h>
#include <string.h>
#include <isl_ctx_private.h>
#include <isl_map_private.h>
#include <isl/set.h>
#include <isl_seq.h>
#include <isl_polynomial_private.h>
#include <isl_printer_private.h>
#include <isl_space_private.h>
#include <isl_mat_private.h>
#include <isl_vec_private.h>
#include <isl/union_set.h>
#include <isl/union_map.h>
#include <isl/constraint.h>
#include <isl_local.h>
#include <isl_local_space_private.h>
#include <isl_aff_private.h>
#include <isl_id_private.h>
#include <isl_val_private.h>
#include <isl_constraint_private.h>
#include <isl/ast_build.h>
#include <isl_sort.h>
#include <isl_output_private.h>
#include <bset_to_bmap.c>
#include <set_to_map.c>
#include <uset_to_umap.c>
static const char *s_to[2] = …;
static const char *s_and[2] = …;
static const char *s_or[2] = …;
static const char *s_le[2] = …;
static const char *s_ge[2] = …;
static const char *s_open_set[2] = …;
static const char *s_close_set[2] = …;
static const char *s_open_list[2] = …;
static const char *s_close_list[2] = …;
static const char *s_such_that[2] = …;
static const char *s_open_exists[2] = …;
static const char *s_close_exists[2] = …;
static const char *s_div_prefix[2] = …;
static const char *s_mod[2] = …;
static const char *s_param_prefix[2] = …;
static const char *s_input_prefix[2] = …;
static const char *s_output_prefix[2] = …;
static __isl_give isl_printer *print_constraint_polylib(
struct isl_basic_map *bmap, int ineq, int n, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *print_constraints_polylib(
struct isl_basic_map *bmap, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *bset_print_constraints_polylib(
struct isl_basic_set *bset, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *isl_basic_map_print_polylib(
__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p, int ext)
{ … }
static __isl_give isl_printer *isl_basic_set_print_polylib(
__isl_keep isl_basic_set *bset, __isl_take isl_printer *p, int ext)
{ … }
static __isl_give isl_printer *isl_map_print_polylib(__isl_keep isl_map *map,
__isl_take isl_printer *p, int ext)
{ … }
static __isl_give isl_printer *isl_set_print_polylib(__isl_keep isl_set *set,
__isl_take isl_printer *p, int ext)
{ … }
static isl_size count_same_name(__isl_keep isl_space *space,
enum isl_dim_type type, unsigned pos, const char *name)
{ … }
static __isl_give isl_printer *print_name(__isl_keep isl_space *space,
__isl_take isl_printer *p, enum isl_dim_type type, unsigned pos,
int latex)
{ … }
static isl_stat pos2type(__isl_keep isl_space *space,
enum isl_dim_type *type, unsigned *pos)
{ … }
static isl_bool can_print_div_expr(__isl_keep isl_printer *p,
__isl_keep isl_mat *div, int pos)
{ … }
static __isl_give isl_printer *print_div(__isl_keep isl_space *space,
__isl_keep isl_mat *div, int pos, __isl_take isl_printer *p);
static __isl_give isl_printer *print_term(__isl_keep isl_space *space,
__isl_keep isl_mat *div,
isl_int c, unsigned pos, __isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_affine_of_len(__isl_keep isl_space *space,
__isl_keep isl_mat *div,
__isl_take isl_printer *p, isl_int *c, int len)
{ … }
static __isl_give isl_printer *print_affine(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, isl_int *c)
{ … }
static __isl_give isl_printer *print_nested_var_list(__isl_take isl_printer *p,
__isl_keep isl_space *local_space, enum isl_dim_type local_type,
struct isl_print_space_data *data, int offset)
{ … }
static __isl_give isl_printer *print_var_list(__isl_take isl_printer *p,
__isl_keep isl_space *space, enum isl_dim_type type)
{ … }
static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p,
__isl_keep isl_space *local_dim,
struct isl_print_space_data *data, int offset);
static __isl_give isl_printer *print_nested_tuple(__isl_take isl_printer *p,
__isl_keep isl_space *local_space, enum isl_dim_type local_type,
struct isl_print_space_data *data, int offset)
{ … }
static __isl_give isl_printer *print_tuple(__isl_keep isl_space *space,
__isl_take isl_printer *p, enum isl_dim_type type,
struct isl_print_space_data *data)
{ … }
static __isl_give isl_printer *print_nested_map_dim(__isl_take isl_printer *p,
__isl_keep isl_space *local_dim,
struct isl_print_space_data *data, int offset)
{ … }
__isl_give isl_printer *isl_print_space(__isl_keep isl_space *space,
__isl_take isl_printer *p, int rational,
struct isl_print_space_data *data)
{ … }
static __isl_give isl_printer *print_omega_parameters(
__isl_keep isl_space *space, __isl_take isl_printer *p)
{ … }
static isl_bool next_is_opposite(__isl_keep isl_basic_map *bmap, int i,
int last)
{ … }
static const char *constraint_op(int sign, int strict, int latex)
{ … }
static __isl_give isl_printer *print_half_constraint(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div,
isl_int *c, int last, const char *op, int latex)
{ … }
static __isl_give isl_printer *print_constraint(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div,
isl_int *c, int last, const char *op, int latex)
{ … }
static __isl_give isl_printer *print_mod(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, int pos,
int latex)
{ … }
static isl_size print_as_modulo_pos(__isl_keep isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, unsigned pos,
isl_int c)
{ … }
static __isl_give isl_printer *print_eq_mod_constraint(
__isl_take isl_printer *p, __isl_keep isl_space *space,
__isl_keep isl_mat *div, unsigned div_pos,
isl_int *c, int last, int latex)
{ … }
static __isl_give isl_printer *print_eq_constraint(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, isl_int *c,
int last, int latex)
{ … }
static __isl_give isl_printer *print_constraints(__isl_keep isl_basic_map *bmap,
__isl_keep isl_space *space, __isl_keep isl_mat *div,
__isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_div(__isl_keep isl_space *space,
__isl_keep isl_mat *div, int pos, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *print_div_list(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, int latex,
int print_defined_divs)
{ … }
static isl_bool need_exists(__isl_keep isl_printer *p, __isl_keep isl_mat *div)
{ … }
static __isl_give isl_printer *open_exists(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, int latex)
{ … }
static __isl_give isl_mat *mark_all_unknown(__isl_take isl_mat *div)
{ … }
static __isl_give isl_printer *print_disjunct(__isl_keep isl_basic_map *bmap,
__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_optional_disjunct(
__isl_keep isl_basic_map *bmap, __isl_keep isl_space *space,
__isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *basic_map_print_omega(
__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *basic_set_print_omega(
__isl_keep isl_basic_set *bset, __isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *isl_map_print_omega(__isl_keep isl_map *map,
__isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *isl_set_print_omega(__isl_keep isl_set *set,
__isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *print_param_tuple(__isl_take isl_printer *p,
__isl_keep isl_space *space, struct isl_print_space_data *data)
{ … }
static __isl_give isl_printer *isl_basic_map_print_isl(
__isl_keep isl_basic_map *bmap, __isl_take isl_printer *p,
int latex)
{ … }
static __isl_give isl_printer *print_disjuncts_core(__isl_keep isl_map *map,
__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_disjuncts_in_hull(__isl_keep isl_map *map,
__isl_keep isl_space *space, __isl_take isl_basic_map *hull,
__isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_disjuncts(__isl_keep isl_map *map,
__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_disjuncts_map(__isl_keep isl_map *map,
__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{ … }
static __isl_give isl_printer *print_disjuncts_set(__isl_keep isl_set *set,
__isl_keep isl_space *space, __isl_take isl_printer *p, int latex)
{ … }
struct isl_aff_split { … };
static void free_split(__isl_take struct isl_aff_split *split, int n)
{ … }
static __isl_give isl_basic_map *get_aff(__isl_take isl_basic_map *bmap)
{ … }
static int aff_split_cmp(const void *p1, const void *p2, void *user)
{ … }
static __isl_give isl_basic_map *drop_aff(__isl_take isl_basic_map *bmap,
__isl_keep isl_basic_map *aff)
{ … }
static __isl_give struct isl_aff_split *split_aff(__isl_keep isl_map *map)
{ … }
static int defining_equality(__isl_keep isl_basic_map *eq,
__isl_keep isl_space *space, enum isl_dim_type type, int pos)
{ … }
static __isl_give isl_printer *print_dim_eq(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_split_map(__isl_take isl_printer *p,
struct isl_aff_split *split, int n, __isl_keep isl_space *space)
{ … }
static __isl_give isl_printer *print_body_map(__isl_take isl_printer *p,
__isl_keep isl_map *map)
{ … }
static __isl_give isl_printer *isl_map_print_isl(__isl_keep isl_map *map,
__isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *print_latex_map(__isl_keep isl_map *map,
__isl_take isl_printer *p, __isl_keep isl_basic_map *aff)
{ … }
static __isl_give isl_printer *isl_map_print_latex(__isl_keep isl_map *map,
__isl_take isl_printer *p)
{ … }
__isl_give isl_printer *isl_printer_print_basic_map(__isl_take isl_printer *p,
__isl_keep isl_basic_map *bmap)
{ … }
__isl_give isl_printer *isl_printer_print_basic_set(__isl_take isl_printer *p,
__isl_keep isl_basic_set *bset)
{ … }
__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *p,
__isl_keep isl_set *set)
{ … }
__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *p,
__isl_keep isl_map *map)
{ … }
struct isl_union_print_data { … };
#undef BASE
#define BASE …
#include "isl_union_print_templ.c"
static __isl_give isl_printer *isl_printer_print_union_set_isl_body(
__isl_take isl_printer *p, __isl_keep isl_union_set *uset)
{ … }
static isl_stat print_latex_map_body(__isl_take isl_map *map, void *user)
{ … }
static __isl_give isl_printer *isl_union_map_print_latex(
__isl_keep isl_union_map *umap, __isl_take isl_printer *p)
{ … }
__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p,
__isl_keep isl_union_map *umap)
{ … }
__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p,
__isl_keep isl_union_set *uset)
{ … }
static isl_size poly_rec_n_non_zero(__isl_keep isl_poly_rec *rec)
{ … }
static __isl_give isl_printer *poly_print_cst(__isl_keep isl_poly *poly,
__isl_take isl_printer *p, int first)
{ … }
static __isl_give isl_printer *print_base(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, int var)
{ … }
static __isl_give isl_printer *print_pow(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_mat *div, int var, int exp)
{ … }
static __isl_give isl_printer *poly_print(__isl_keep isl_poly *poly,
__isl_keep isl_space *space, __isl_keep isl_mat *div,
__isl_take isl_printer *p)
{ … }
static __isl_give isl_printer *print_qpolynomial(__isl_take isl_printer *p,
__isl_keep isl_qpolynomial *qp)
{ … }
static __isl_give isl_printer *print_qpolynomial_isl(__isl_take isl_printer *p,
__isl_keep isl_qpolynomial *qp)
{ … }
static __isl_give isl_printer *print_qpolynomial_c(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_qpolynomial *qp)
{ … }
__isl_give isl_printer *isl_printer_print_qpolynomial(
__isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp)
{ … }
void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out,
unsigned output_format)
{ … }
static __isl_give isl_printer *qpolynomial_fold_print(
__isl_keep isl_qpolynomial_fold *fold, __isl_take isl_printer *p)
{ … }
void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold,
FILE *out, unsigned output_format)
{ … }
static __isl_give isl_printer *print_body_pw_qpolynomial(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{ … }
static __isl_give isl_printer *print_pw_qpolynomial_isl(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{ … }
void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out,
unsigned output_format)
{ … }
static __isl_give isl_printer *print_body_pw_qpolynomial_fold(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{ … }
static __isl_give isl_printer *print_pw_qpolynomial_fold_isl(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{ … }
static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls, isl_int *c);
static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls, isl_int *c, const char *op, int *first)
{ … }
static __isl_give isl_printer *print_ls_partial_affine_c(
__isl_take isl_printer *p, __isl_keep isl_local_space *ls,
isl_int *c, unsigned len);
static __isl_give isl_printer *print_basic_set_c(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_basic_set *bset)
{ … }
static __isl_give isl_printer *print_set_c(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_set *set)
{ … }
static __isl_give isl_printer *print_pw_qpolynomial_c(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{ … }
__isl_give isl_printer *isl_printer_print_pw_qpolynomial(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
{ … }
#undef BASE
#define BASE …
#include "isl_union_print_templ.c"
__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial(
__isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp)
{ … }
static __isl_give isl_printer *print_qpolynomial_fold_c(
__isl_take isl_printer *p, __isl_keep isl_space *space,
__isl_keep isl_qpolynomial_fold *fold)
{ … }
__isl_give isl_printer *isl_printer_print_qpolynomial_fold(
__isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold)
{ … }
static __isl_give isl_printer *print_pw_qpolynomial_fold_c(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{ … }
__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold(
__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
{ … }
void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf,
FILE *out, unsigned output_format)
{ … }
#undef BASE
#define BASE …
#include "isl_union_print_templ.c"
__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold(
__isl_take isl_printer *p,
__isl_keep isl_union_pw_qpolynomial_fold *upwf)
{ … }
__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p,
__isl_keep isl_constraint *c)
{ … }
static __isl_give isl_printer *isl_printer_print_space_isl(
__isl_take isl_printer *p, __isl_keep isl_space *space)
{ … }
__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
__isl_keep isl_space *space)
{ … }
__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls)
{ … }
static isl_size last_modulo(__isl_keep isl_printer *p, __isl_keep isl_aff *aff,
unsigned n)
{ … }
static __isl_give isl_printer *print_aff_num_base(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{ … }
static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff);
static __isl_give isl_printer *print_mod_term(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff, int first,
__isl_take isl_val *c, __isl_keep isl_val *mod)
{ … }
static __isl_give isl_printer *print_aff_num_mod(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff, unsigned last)
{ … }
static __isl_give isl_printer *print_aff_num(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{ … }
static __isl_give isl_printer *print_aff_body(__isl_take isl_printer *p,
__isl_keep isl_space *space, __isl_keep isl_aff *aff)
{ … }
static __isl_give isl_printer *print_body_aff(__isl_take isl_printer *p,
__isl_keep isl_aff *aff)
{ … }
static __isl_give isl_printer *print_aff_isl(__isl_take isl_printer *p,
__isl_keep isl_aff *aff)
{ … }
#undef BASE
#define BASE …
#include "isl_pw_print_templ.c"
static __isl_give isl_printer *print_ls_name_c(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos)
{ … }
static __isl_give isl_printer *print_ls_term_c(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls, isl_int c, unsigned pos)
{ … }
static __isl_give isl_printer *print_ls_partial_affine_c(
__isl_take isl_printer *p, __isl_keep isl_local_space *ls,
isl_int *c, unsigned len)
{ … }
static __isl_give isl_printer *print_ls_affine_c(__isl_take isl_printer *p,
__isl_keep isl_local_space *ls, isl_int *c)
{ … }
static __isl_give isl_printer *print_aff_c(__isl_take isl_printer *p,
__isl_keep isl_aff *aff)
{ … }
static __isl_give isl_printer *print_pw_aff_c(__isl_take isl_printer *p,
__isl_keep isl_pw_aff *pwaff)
{ … }
__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
__isl_keep isl_aff *aff)
{ … }
__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
__isl_keep isl_pw_aff *pwaff)
{ … }
#undef BASE
#define BASE …
#include "isl_union_print_templ.c"
__isl_give isl_printer *isl_printer_print_union_pw_aff(
__isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa)
{ … }
static __isl_give isl_printer *print_dim_ma(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_body_multi_aff(__isl_take isl_printer *p,
__isl_keep isl_multi_aff *maff)
{ … }
static __isl_give isl_printer *print_multi_aff_isl(__isl_take isl_printer *p,
__isl_keep isl_multi_aff *maff)
{ … }
__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
__isl_keep isl_multi_aff *maff)
{ … }
#undef BASE
#define BASE …
#include "isl_pw_print_templ.c"
static __isl_give isl_printer *print_unnamed_pw_multi_aff_c(
__isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma)
{ … }
static __isl_give isl_printer *print_pw_multi_aff_c(__isl_take isl_printer *p,
__isl_keep isl_pw_multi_aff *pma)
{ … }
__isl_give isl_printer *isl_printer_print_pw_multi_aff(
__isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma)
{ … }
#undef BASE
#define BASE …
#include "isl_union_print_templ.c"
__isl_give isl_printer *isl_printer_print_union_pw_multi_aff(
__isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma)
{ … }
static __isl_give isl_printer *print_dim_mpa(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_multi_pw_aff_isl(__isl_take isl_printer *p,
__isl_keep isl_multi_pw_aff *mpa)
{ … }
__isl_give isl_printer *isl_printer_print_multi_pw_aff(
__isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa)
{ … }
static __isl_give isl_printer *print_dim_mv(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_multi_val_isl(__isl_take isl_printer *p,
__isl_keep isl_multi_val *mv)
{ … }
__isl_give isl_printer *isl_printer_print_multi_val(
__isl_take isl_printer *p, __isl_keep isl_multi_val *mv)
{ … }
static __isl_give isl_printer *print_dim_mi(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_multi_id_isl(__isl_take isl_printer *p,
__isl_keep isl_multi_id *mi)
{ … }
__isl_give isl_printer *isl_printer_print_multi_id(
__isl_take isl_printer *p, __isl_keep isl_multi_id *mi)
{ … }
static __isl_give isl_printer *print_union_pw_aff_dim(__isl_take isl_printer *p,
struct isl_print_space_data *data, unsigned pos)
{ … }
static __isl_give isl_printer *print_multi_union_pw_aff_isl(
__isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa)
{ … }
__isl_give isl_printer *isl_printer_print_multi_union_pw_aff(
__isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa)
{ … }