Update prebuilt Clang to r416183b from Android.

https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef

clang 12.0.5 (based on r416183b) from build 7284624.

Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/polly/isl/aff.h b/linux-x64/clang/include/polly/isl/aff.h
new file mode 100644
index 0000000..156175e
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/aff.h
@@ -0,0 +1,1361 @@
+#ifndef ISL_AFF_H
+#define ISL_AFF_H
+
+#include <isl/stdint.h>
+#include <isl/local_space.h>
+#include <isl/printer.h>
+#include <isl/id_type.h>
+#include <isl/set_type.h>
+#include <isl/aff_type.h>
+#include <isl/list.h>
+#include <isl/multi.h>
+#include <isl/union_set_type.h>
+#include <isl/val_type.h>
+#include <isl/point.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_overload
+__isl_give isl_aff *isl_aff_zero_on_domain_space(__isl_take isl_space *space);
+__isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls);
+__isl_give isl_aff *isl_aff_val_on_domain_space(__isl_take isl_space *space,
+	__isl_take isl_val *val);
+__isl_give isl_aff *isl_aff_val_on_domain(__isl_take isl_local_space *ls,
+	__isl_take isl_val *val);
+__isl_give isl_aff *isl_aff_var_on_domain(__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_aff *isl_aff_nan_on_domain(__isl_take isl_local_space *ls);
+__isl_give isl_aff *isl_aff_param_on_domain_space_id(
+	__isl_take isl_space *space, __isl_take isl_id *id);
+
+__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff);
+__isl_null isl_aff *isl_aff_free(__isl_take isl_aff *aff);
+
+isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff);
+uint32_t isl_aff_get_hash(__isl_keep isl_aff *aff);
+
+isl_bool isl_aff_involves_locals(__isl_keep isl_aff *aff);
+
+isl_size isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type);
+isl_bool isl_aff_involves_dims(__isl_keep isl_aff *aff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_give isl_space *isl_aff_get_domain_space(__isl_keep isl_aff *aff);
+__isl_give isl_space *isl_aff_get_space(__isl_keep isl_aff *aff);
+__isl_give isl_local_space *isl_aff_get_domain_local_space(
+	__isl_keep isl_aff *aff);
+__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff);
+
+const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_val *isl_aff_get_constant_val(__isl_keep isl_aff *aff);
+__isl_give isl_val *isl_aff_get_coefficient_val(__isl_keep isl_aff *aff,
+	enum isl_dim_type type, int pos);
+int isl_aff_coefficient_sgn(__isl_keep isl_aff *aff,
+	enum isl_dim_type type, int pos);
+__isl_give isl_val *isl_aff_get_denominator_val(__isl_keep isl_aff *aff);
+__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v);
+__isl_give isl_aff *isl_aff_set_constant_val(__isl_take isl_aff *aff,
+	__isl_take isl_val *v);
+__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff,
+	enum isl_dim_type type, int pos, int v);
+__isl_give isl_aff *isl_aff_set_coefficient_val(__isl_take isl_aff *aff,
+	enum isl_dim_type type, int pos, __isl_take isl_val *v);
+__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v);
+__isl_overload
+__isl_give isl_aff *isl_aff_add_constant_val(__isl_take isl_aff *aff,
+	__isl_take isl_val *v);
+__isl_give isl_aff *isl_aff_add_constant_num_si(__isl_take isl_aff *aff, int v);
+__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff,
+	enum isl_dim_type type, int pos, int v);
+__isl_give isl_aff *isl_aff_add_coefficient_val(__isl_take isl_aff *aff,
+	enum isl_dim_type type, int pos, __isl_take isl_val *v);
+
+isl_bool isl_aff_is_cst(__isl_keep isl_aff *aff);
+
+__isl_give isl_aff *isl_aff_set_tuple_id(__isl_take isl_aff *aff,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff,
+	enum isl_dim_type type, unsigned pos, const char *s);
+__isl_give isl_aff *isl_aff_set_dim_id(__isl_take isl_aff *aff,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+
+int isl_aff_find_dim_by_name(__isl_keep isl_aff *aff, enum isl_dim_type type,
+	const char *name);
+
+isl_bool isl_aff_plain_is_equal(__isl_keep isl_aff *aff1,
+	__isl_keep isl_aff *aff2);
+isl_bool isl_aff_plain_is_zero(__isl_keep isl_aff *aff);
+isl_bool isl_aff_is_nan(__isl_keep isl_aff *aff);
+
+__isl_give isl_aff *isl_aff_get_div(__isl_keep isl_aff *aff, int pos);
+
+__isl_give isl_aff *isl_aff_from_range(__isl_take isl_aff *aff);
+
+__isl_export
+__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff);
+__isl_export
+__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff);
+__isl_export
+__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff);
+__isl_overload
+__isl_give isl_aff *isl_aff_mod_val(__isl_take isl_aff *aff,
+	__isl_take isl_val *mod);
+
+__isl_export
+__isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_aff *isl_aff_div(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+
+__isl_overload
+__isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff,
+	__isl_take isl_val *v);
+__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f);
+__isl_overload
+__isl_give isl_aff *isl_aff_scale_down_val(__isl_take isl_aff *aff,
+	__isl_take isl_val *v);
+
+__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff,
+	enum isl_dim_type type, unsigned n);
+__isl_give isl_aff *isl_aff_move_dims(__isl_take isl_aff *aff,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_aff *isl_aff_project_domain_on_params(__isl_take isl_aff *aff);
+__isl_export
+__isl_give isl_aff *isl_aff_unbind_params_insert_domain(
+	__isl_take isl_aff *aff, __isl_take isl_multi_id *domain);
+
+__isl_give isl_aff *isl_aff_align_params(__isl_take isl_aff *aff,
+	__isl_take isl_space *model);
+
+__isl_export
+__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff,
+	__isl_take isl_set *context);
+__isl_give isl_aff *isl_aff_gist_params(__isl_take isl_aff *aff,
+	__isl_take isl_set *context);
+
+__isl_export
+__isl_give isl_val *isl_aff_eval(__isl_take isl_aff *aff,
+	__isl_take isl_point *pnt);
+
+__isl_give isl_aff *isl_aff_pullback_aff(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_overload
+__isl_give isl_aff *isl_aff_pullback_multi_aff(__isl_take isl_aff *aff,
+	__isl_take isl_multi_aff *ma);
+
+__isl_give isl_basic_set *isl_aff_zero_basic_set(__isl_take isl_aff *aff);
+__isl_give isl_basic_set *isl_aff_neg_basic_set(__isl_take isl_aff *aff);
+
+__isl_give isl_basic_set *isl_aff_eq_basic_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_eq_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_ne_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_le_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_give isl_basic_set *isl_aff_lt_basic_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_lt_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_ge_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_give isl_basic_set *isl_aff_gt_basic_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_gt_set(__isl_take isl_aff *aff1,
+	__isl_take isl_aff *aff2);
+
+__isl_overload
+__isl_give isl_basic_set *isl_aff_bind_id(__isl_take isl_aff *aff,
+	__isl_take isl_id *id);
+
+__isl_constructor
+__isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str);
+__isl_give char *isl_aff_to_str(__isl_keep isl_aff *aff);
+__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
+	__isl_keep isl_aff *aff);
+void isl_aff_dump(__isl_keep isl_aff *aff);
+
+isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
+uint32_t isl_pw_aff_get_hash(__isl_keep isl_pw_aff *pa);
+__isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff);
+__isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff);
+
+__isl_constructor
+__isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff);
+__isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *space);
+__isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
+	__isl_take isl_aff *aff);
+__isl_give isl_pw_aff *isl_pw_aff_zero_on_domain(
+	__isl_take isl_local_space *ls);
+__isl_give isl_pw_aff *isl_pw_aff_var_on_domain(__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_pw_aff *isl_pw_aff_nan_on_domain(__isl_take isl_local_space *ls);
+__isl_give isl_pw_aff *isl_pw_aff_val_on_domain(__isl_take isl_set *domain,
+	__isl_take isl_val *v);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_param_on_domain_id(
+	__isl_take isl_set *domain, __isl_take isl_id *id);
+
+__isl_export
+__isl_give isl_pw_aff *isl_set_indicator_function(__isl_take isl_set *set);
+
+const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_pw_aff_has_dim_id(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+
+int isl_pw_aff_find_dim_by_name(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type, const char *name);
+
+isl_bool isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
+isl_bool isl_pw_aff_involves_nan(__isl_keep isl_pw_aff *pa);
+int isl_pw_aff_plain_cmp(__isl_keep isl_pw_aff *pa1,
+	__isl_keep isl_pw_aff *pa2);
+isl_bool isl_pw_aff_plain_is_equal(__isl_keep isl_pw_aff *pwaff1,
+	__isl_keep isl_pw_aff *pwaff2);
+isl_bool isl_pw_aff_is_equal(__isl_keep isl_pw_aff *pa1,
+	__isl_keep isl_pw_aff *pa2);
+
+__isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+
+__isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
+__isl_null isl_pw_aff *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
+
+isl_size isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
+isl_bool isl_pw_aff_involves_param_id(__isl_keep isl_pw_aff *pa,
+	__isl_keep isl_id *id);
+isl_bool isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+isl_bool isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_insert_domain(__isl_take isl_pw_aff *pa,
+	__isl_take isl_space *domain);
+__isl_give isl_pw_aff *isl_pw_aff_project_domain_on_params(
+	__isl_take isl_pw_aff *pa);
+
+__isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff,
+	__isl_take isl_space *model);
+__isl_give isl_pw_aff *isl_pw_aff_drop_unused_params(
+	__isl_take isl_pw_aff *pa);
+
+isl_bool isl_pw_aff_has_tuple_id(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type);
+__isl_give isl_id *isl_pw_aff_get_tuple_id(__isl_keep isl_pw_aff *pa,
+	enum isl_dim_type type);
+__isl_give isl_pw_aff *isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff *pwaff,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_pw_aff *isl_pw_aff_reset_tuple_id(__isl_take isl_pw_aff *pa,
+	enum isl_dim_type type);
+__isl_give isl_pw_aff *isl_pw_aff_reset_user(__isl_take isl_pw_aff *pa);
+
+__isl_give isl_set *isl_pw_aff_params(__isl_take isl_pw_aff *pwa);
+__isl_export
+__isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
+__isl_give isl_pw_aff *isl_pw_aff_from_range(__isl_take isl_pw_aff *pwa);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_div(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_mod_val(__isl_take isl_pw_aff *pa,
+	__isl_take isl_val *mod);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_tdiv_q(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_tdiv_r(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_intersect_params(__isl_take isl_pw_aff *pa,
+	__isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_intersect_domain(__isl_take isl_pw_aff *pa,
+	__isl_take isl_set *set);
+__isl_give isl_pw_aff *isl_pw_aff_intersect_domain_wrapped_domain(
+	__isl_take isl_pw_aff *pa, __isl_take isl_set *set);
+__isl_give isl_pw_aff *isl_pw_aff_intersect_domain_wrapped_range(
+	__isl_take isl_pw_aff *pa, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_subtract_domain(__isl_take isl_pw_aff *pa,
+	__isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_pw_aff *cond,
+	__isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false);
+
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_add_constant_val(__isl_take isl_pw_aff *pa,
+	__isl_take isl_val *v);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_scale_val(__isl_take isl_pw_aff *pa,
+	__isl_take isl_val *v);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_scale_down_val(__isl_take isl_pw_aff *pa,
+	__isl_take isl_val *f);
+
+__isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff,
+	enum isl_dim_type type, unsigned n);
+__isl_give isl_pw_aff *isl_pw_aff_move_dims(__isl_take isl_pw_aff *pa,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pa);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
+	__isl_take isl_set *context);
+__isl_give isl_pw_aff *isl_pw_aff_gist_params(__isl_take isl_pw_aff *pwaff,
+	__isl_take isl_set *context);
+
+__isl_export
+__isl_give isl_val *isl_pw_aff_eval(__isl_take isl_pw_aff *pa,
+	__isl_take isl_point *pnt);
+
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_pullback_multi_aff(
+	__isl_take isl_pw_aff *pa, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_pullback_pw_multi_aff(
+	__isl_take isl_pw_aff *pa, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_pw_aff *isl_pw_aff_pullback_multi_pw_aff(
+	__isl_take isl_pw_aff *pa, __isl_take isl_multi_pw_aff *mpa);
+
+isl_size isl_pw_aff_n_piece(__isl_keep isl_pw_aff *pwaff);
+isl_stat isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff,
+	isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff,
+		    void *user), void *user);
+isl_bool isl_pw_aff_every_piece(__isl_keep isl_pw_aff *pa,
+	isl_bool (*test)(__isl_keep isl_set *set, __isl_keep isl_aff *aff,
+		void *user), void *user);
+__isl_export
+isl_bool isl_pw_aff_isa_aff(__isl_keep isl_pw_aff *pa);
+__isl_export
+__isl_give isl_aff *isl_pw_aff_as_aff(__isl_take isl_pw_aff *pa);
+
+__isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff);
+__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
+
+__isl_give isl_set *isl_pw_aff_pos_set(__isl_take isl_pw_aff *pa);
+__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff);
+__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
+__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
+
+__isl_export
+__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+__isl_export
+__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1,
+	__isl_take isl_pw_aff *pwaff2);
+
+__isl_give isl_map *isl_pw_aff_eq_map(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_give isl_map *isl_pw_aff_le_map(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_give isl_map *isl_pw_aff_lt_map(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_give isl_map *isl_pw_aff_ge_map(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+__isl_give isl_map *isl_pw_aff_gt_map(__isl_take isl_pw_aff *pa1,
+	__isl_take isl_pw_aff *pa2);
+
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_bind_domain(__isl_take isl_pw_aff *pa,
+	__isl_take isl_multi_id *tuple);
+__isl_export
+__isl_give isl_pw_aff *isl_pw_aff_bind_domain_wrapped_domain(
+	__isl_take isl_pw_aff *pa, __isl_take isl_multi_id *tuple);
+__isl_overload
+__isl_give isl_set *isl_pw_aff_bind_id(__isl_take isl_pw_aff *pa,
+	__isl_take isl_id *id);
+
+__isl_constructor
+__isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str);
+__isl_give char *isl_pw_aff_to_str(__isl_keep isl_pw_aff *pa);
+__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
+	__isl_keep isl_pw_aff *pwaff);
+void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
+
+__isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list);
+__isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list);
+
+__isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+__isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+__isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+__isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+__isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+__isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1,
+	__isl_take isl_pw_aff_list *list2);
+
+ISL_DECLARE_MULTI(aff)
+ISL_DECLARE_MULTI_IDENTITY(aff)
+ISL_DECLARE_MULTI_CMP(aff)
+ISL_DECLARE_MULTI_ARITH(aff)
+ISL_DECLARE_MULTI_ADD_CONSTANT(aff)
+ISL_DECLARE_MULTI_ZERO(aff)
+ISL_DECLARE_MULTI_NAN(aff)
+ISL_DECLARE_MULTI_DIMS(aff)
+ISL_DECLARE_MULTI_INSERT_DOMAIN(aff)
+ISL_DECLARE_MULTI_LOCALS(aff)
+ISL_DECLARE_MULTI_DIM_ID(aff)
+ISL_DECLARE_MULTI_TUPLE_ID(aff)
+ISL_DECLARE_MULTI_WITH_DOMAIN(aff)
+ISL_DECLARE_MULTI_BIND_DOMAIN(aff)
+ISL_DECLARE_MULTI_UNBIND_PARAMS(aff)
+
+__isl_constructor
+__isl_give isl_multi_aff *isl_multi_aff_from_aff(__isl_take isl_aff *aff);
+__isl_export
+__isl_give isl_multi_aff *isl_multi_aff_domain_map(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_multi_aff *isl_multi_aff_range_map(__isl_take isl_space *space);
+__isl_give isl_multi_aff *isl_multi_aff_project_out_map(
+	__isl_take isl_space *space, enum isl_dim_type type,
+	unsigned first, unsigned n);
+
+__isl_give isl_multi_aff *isl_multi_aff_multi_val_on_space(
+	__isl_take isl_space *space, __isl_take isl_multi_val *mv);
+
+__isl_export
+__isl_give isl_multi_val *isl_multi_aff_get_constant_multi_val(
+	__isl_keep isl_multi_aff *ma);
+
+__isl_export
+__isl_give isl_multi_aff *isl_multi_aff_floor(__isl_take isl_multi_aff *ma);
+
+__isl_give isl_multi_aff *isl_multi_aff_gist_params(
+	__isl_take isl_multi_aff *maff, __isl_take isl_set *context);
+__isl_export
+__isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff,
+	__isl_take isl_set *context);
+
+__isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff,
+	__isl_give isl_local_space **ls);
+
+__isl_overload
+__isl_give isl_multi_aff *isl_multi_aff_pullback_multi_aff(
+	__isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2);
+
+__isl_give isl_multi_aff *isl_multi_aff_move_dims(__isl_take isl_multi_aff *ma,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+
+__isl_give isl_set *isl_multi_aff_lex_lt_set(__isl_take isl_multi_aff *ma1,
+	__isl_take isl_multi_aff *ma2);
+__isl_give isl_set *isl_multi_aff_lex_le_set(__isl_take isl_multi_aff *ma1,
+	__isl_take isl_multi_aff *ma2);
+__isl_give isl_set *isl_multi_aff_lex_gt_set(__isl_take isl_multi_aff *ma1,
+	__isl_take isl_multi_aff *ma2);
+__isl_give isl_set *isl_multi_aff_lex_ge_set(__isl_take isl_multi_aff *ma1,
+	__isl_take isl_multi_aff *ma2);
+
+__isl_export
+__isl_give isl_basic_set *isl_multi_aff_bind(__isl_take isl_multi_aff *ma,
+	__isl_take isl_multi_id *tuple);
+
+__isl_give char *isl_multi_aff_to_str(__isl_keep isl_multi_aff *ma);
+__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p,
+	__isl_keep isl_multi_aff *maff);
+
+__isl_constructor
+__isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
+		const char *str);
+void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff);
+
+ISL_DECLARE_MULTI(pw_aff)
+ISL_DECLARE_MULTI_IDENTITY(pw_aff)
+ISL_DECLARE_MULTI_ARITH(pw_aff)
+ISL_DECLARE_MULTI_MIN_MAX(pw_aff)
+ISL_DECLARE_MULTI_ADD_CONSTANT(pw_aff)
+ISL_DECLARE_MULTI_ZERO(pw_aff)
+ISL_DECLARE_MULTI_NAN(pw_aff)
+ISL_DECLARE_MULTI_DIMS(pw_aff)
+ISL_DECLARE_MULTI_DIM_ID(pw_aff)
+ISL_DECLARE_MULTI_INSERT_DOMAIN(pw_aff)
+ISL_DECLARE_MULTI_TUPLE_ID(pw_aff)
+ISL_DECLARE_MULTI_WITH_DOMAIN(pw_aff)
+ISL_DECLARE_MULTI_BIND_DOMAIN(pw_aff)
+ISL_DECLARE_MULTI_PARAM(pw_aff)
+ISL_DECLARE_MULTI_UNBIND_PARAMS(pw_aff)
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_zero(__isl_take isl_space *space);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity(
+	__isl_take isl_space *space);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_domain_map(
+	__isl_take isl_space *space);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_map(
+	__isl_take isl_space *space);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_out_map(
+	__isl_take isl_space *space, enum isl_dim_type type,
+	unsigned first, unsigned n);
+__isl_constructor
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_aff(
+	__isl_take isl_multi_aff *ma);
+__isl_constructor
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_pw_aff(
+	__isl_take isl_pw_aff *pa);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set,
+	__isl_take isl_multi_aff *maff);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy(
+	__isl_keep isl_pw_multi_aff *pma);
+__isl_null isl_pw_multi_aff *isl_pw_multi_aff_free(
+	__isl_take isl_pw_multi_aff *pma);
+
+isl_size isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type);
+__isl_export
+isl_bool isl_pw_multi_aff_involves_locals(__isl_keep isl_pw_multi_aff *pma);
+isl_bool isl_pw_multi_aff_involves_param_id(__isl_keep isl_pw_multi_aff *pma,
+	__isl_keep isl_id *id);
+isl_bool isl_pw_multi_aff_involves_dims(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_pw_aff *isl_pw_multi_aff_get_pw_aff(
+	__isl_keep isl_pw_multi_aff *pma, int pos);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_pw_aff(
+	__isl_take isl_pw_multi_aff *pma, unsigned pos,
+	__isl_take isl_pw_aff *pa);
+
+isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma);
+__isl_give isl_space *isl_pw_multi_aff_get_domain_space(
+	__isl_keep isl_pw_multi_aff *pma);
+__isl_export
+__isl_give isl_space *isl_pw_multi_aff_get_space(
+	__isl_keep isl_pw_multi_aff *pma);
+isl_bool isl_pw_multi_aff_has_tuple_name(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type);
+const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type);
+__isl_give isl_id *isl_pw_multi_aff_get_tuple_id(
+	__isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type);
+isl_bool isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id(
+	__isl_take isl_pw_multi_aff *pma,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_tuple_id(
+	__isl_take isl_pw_multi_aff *pma, enum isl_dim_type type);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_user(
+	__isl_take isl_pw_multi_aff *pma);
+
+int isl_pw_multi_aff_find_dim_by_name(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_drop_dims(
+	__isl_take isl_pw_multi_aff *pma,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_export
+__isl_give isl_set *isl_pw_multi_aff_domain(__isl_take isl_pw_multi_aff *pma);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_domain(
+	__isl_take isl_set *set);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_multi_val_on_domain(
+	__isl_take isl_set *domain, __isl_take isl_multi_val *mv);
+
+const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_pw_multi_aff_get_dim_id(
+	__isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type,
+	unsigned pos);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id(
+	__isl_take isl_pw_multi_aff *pma,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+
+isl_bool isl_pw_multi_aff_involves_nan(__isl_keep isl_pw_multi_aff *pma);
+isl_bool isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1,
+	__isl_keep isl_pw_multi_aff *pma2);
+isl_bool isl_pw_multi_aff_is_equal(__isl_keep isl_pw_multi_aff *pma1,
+	__isl_keep isl_pw_multi_aff *pma2);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_fix_si(
+	__isl_take isl_pw_multi_aff *pma, enum isl_dim_type type,
+	unsigned pos, int value);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_neg(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add_constant_val(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v);
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add_constant_multi_val(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv);
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_val(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v);
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_down_val(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmin(
+	__isl_take isl_pw_multi_aff *pma1,
+	__isl_take isl_pw_multi_aff *pma2);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmax(
+	__isl_take isl_pw_multi_aff *pma1,
+	__isl_take isl_pw_multi_aff *pma2);
+
+__isl_give isl_multi_aff *isl_multi_aff_flatten_domain(
+	__isl_take isl_multi_aff *ma);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_product(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_flat_range_product(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_product(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_factor_domain(
+	__isl_take isl_pw_multi_aff *pma);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_factor_range(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain_wrapped_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain_wrapped_range(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_subtract_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_insert_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_space *domain);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_domain_on_params(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_align_params(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_space *model);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_drop_unused_params(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_coalesce(
+	__isl_take isl_pw_multi_aff *pma);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set);
+
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_pullback_multi_aff(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_pullback_pw_multi_aff(
+	__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
+
+__isl_export
+isl_size isl_pw_multi_aff_n_piece(__isl_keep isl_pw_multi_aff *pma);
+__isl_export
+isl_stat isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma,
+	isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff,
+		    void *user), void *user);
+isl_bool isl_pw_multi_aff_every_piece(__isl_keep isl_pw_multi_aff *pma,
+	isl_bool (*test)(__isl_keep isl_set *set, __isl_keep isl_multi_aff *ma,
+		void *user), void *user);
+__isl_export
+isl_bool isl_pw_multi_aff_isa_multi_aff(__isl_keep isl_pw_multi_aff *pma);
+__isl_export
+__isl_give isl_multi_aff *isl_pw_multi_aff_as_multi_aff(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
+__isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma);
+
+__isl_give char *isl_pw_multi_aff_to_str(__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);
+
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map);
+
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_bind_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_id *tuple);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_bind_domain_wrapped_domain(
+	__isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_id *tuple);
+
+__isl_constructor
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx,
+	const char *str);
+void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma);
+
+
+__isl_overload
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty_ctx(
+	isl_ctx *ctx);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty_space(
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty(
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_aff(
+	__isl_take isl_aff *aff);
+__isl_constructor
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_multi_aff(
+	__isl_take isl_multi_aff *ma);
+__isl_constructor
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_pw_multi_aff(
+	__isl_take isl_pw_multi_aff *pma);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_domain(
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_multi_val_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_multi_val *mv);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_param_on_domain_id(
+	__isl_take isl_union_set *domain, __isl_take isl_id *id);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_copy(
+	__isl_keep isl_union_pw_multi_aff *upma);
+__isl_null isl_union_pw_multi_aff *isl_union_pw_multi_aff_free(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_pw_multi_aff *isl_union_set_identity_union_pw_multi_aff(
+	__isl_take isl_union_set *uset);
+
+__isl_give isl_union_pw_aff *isl_union_pw_multi_aff_get_union_pw_aff(
+	__isl_keep isl_union_pw_multi_aff *upma, int pos);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_add_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_pw_multi_aff *pma);
+
+isl_ctx *isl_union_pw_multi_aff_get_ctx(
+	__isl_keep isl_union_pw_multi_aff *upma);
+__isl_export
+__isl_give isl_space *isl_union_pw_multi_aff_get_space(
+	__isl_keep isl_union_pw_multi_aff *upma);
+__isl_give isl_pw_multi_aff_list *isl_union_pw_multi_aff_get_pw_multi_aff_list(
+	__isl_keep isl_union_pw_multi_aff *upma);
+
+isl_size isl_union_pw_multi_aff_dim(__isl_keep isl_union_pw_multi_aff *upma,
+	enum isl_dim_type type);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_set_dim_name(
+	__isl_take isl_union_pw_multi_aff *upma,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+int isl_union_pw_multi_aff_find_dim_by_name(
+	__isl_keep isl_union_pw_multi_aff *upma, enum isl_dim_type type,
+	const char *name);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_drop_dims(
+	__isl_take isl_union_pw_multi_aff *upma,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_reset_user(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_coalesce(
+	__isl_take isl_union_pw_multi_aff *upma);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_gist_params(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_set *context);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_gist(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *context);
+
+__isl_overload
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_pullback_union_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+__isl_overload
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_apply_union_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_align_params(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_space *model);
+
+isl_size isl_union_pw_multi_aff_n_pw_multi_aff(
+	__isl_keep isl_union_pw_multi_aff *upma);
+
+isl_stat isl_union_pw_multi_aff_foreach_pw_multi_aff(
+	__isl_keep isl_union_pw_multi_aff *upma,
+	isl_stat (*fn)(__isl_take isl_pw_multi_aff *pma, void *user),
+	void *user);
+isl_bool isl_union_pw_multi_aff_every_pw_multi_aff(
+	__isl_keep isl_union_pw_multi_aff *upma,
+	isl_bool (*test)(__isl_keep isl_pw_multi_aff *pma, void *user),
+	void *user);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_union_pw_multi_aff_extract_pw_multi_aff(
+	__isl_keep isl_union_pw_multi_aff *upma, __isl_take isl_space *space);
+__isl_export
+isl_bool isl_union_pw_multi_aff_isa_pw_multi_aff(
+	__isl_keep isl_union_pw_multi_aff *upma);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_union_pw_multi_aff_as_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_export
+isl_bool isl_union_pw_multi_aff_plain_is_empty(
+	__isl_keep isl_union_pw_multi_aff *upma);
+__isl_export
+isl_bool isl_union_pw_multi_aff_involves_locals(
+	__isl_keep isl_union_pw_multi_aff *upma);
+isl_bool isl_union_pw_multi_aff_involves_nan(
+	__isl_keep isl_union_pw_multi_aff *upma);
+isl_bool isl_union_pw_multi_aff_plain_is_equal(
+	__isl_keep isl_union_pw_multi_aff *upma1,
+	__isl_keep isl_union_pw_multi_aff *upma2);
+
+__isl_export
+__isl_give isl_union_set *isl_union_pw_multi_aff_domain(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_neg(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_add(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_union_add(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_val(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_val *val);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_down_val(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_val *val);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_multi_val(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv);
+
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_range_product(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_flat_range_product(
+	__isl_take isl_union_pw_multi_aff *upma1,
+	__isl_take isl_union_pw_multi_aff *upma2);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_range_factor_domain(
+	__isl_take isl_union_pw_multi_aff *upma);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_range_factor_range(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_intersect_params(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_set *set);
+__isl_overload
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_intersect_domain_union_set(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_intersect_domain(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_intersect_domain_space(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_space *space);
+__isl_export
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_intersect_domain_wrapped_domain(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_intersect_domain_wrapped_range(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_subtract_domain_union_set(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_subtract_domain_space(
+	__isl_take isl_union_pw_multi_aff *upma, __isl_take isl_space *space);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_subtract_domain(
+	__isl_take isl_union_pw_multi_aff *upma,
+	__isl_take isl_union_set *uset);
+
+__isl_overload
+__isl_give isl_union_map *isl_union_map_from_union_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_printer *isl_printer_print_union_pw_multi_aff(
+	__isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_set(
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_map(
+	__isl_take isl_union_map *umap);
+
+__isl_constructor
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_read_from_str(
+	isl_ctx *ctx, const char *str);
+void isl_union_pw_multi_aff_dump(__isl_keep isl_union_pw_multi_aff *upma);
+__isl_give char *isl_union_pw_multi_aff_to_str(
+	__isl_keep isl_union_pw_multi_aff *upma);
+
+uint32_t isl_multi_pw_aff_get_hash(__isl_keep isl_multi_pw_aff *mpa);
+
+__isl_constructor
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_aff(__isl_take isl_aff *aff);
+__isl_constructor
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_multi_aff(
+	__isl_take isl_multi_aff *ma);
+__isl_constructor
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_aff(
+	__isl_take isl_pw_aff *pa);
+__isl_export
+__isl_give isl_set *isl_multi_pw_aff_domain(__isl_take isl_multi_pw_aff *mpa);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_intersect_params(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_intersect_domain(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *domain);
+
+__isl_export
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_coalesce(
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_gist(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set);
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_gist_params(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set);
+
+isl_bool isl_multi_pw_aff_is_cst(__isl_keep isl_multi_pw_aff *mpa);
+isl_bool isl_multi_pw_aff_is_equal(__isl_keep isl_multi_pw_aff *mpa1,
+	__isl_keep isl_multi_pw_aff *mpa2);
+
+__isl_overload
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_multi_aff(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_pw_multi_aff(
+	__isl_take isl_multi_pw_aff *mpa, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_multi_pw_aff(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+
+__isl_export
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_union_add(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_move_dims(
+	__isl_take isl_multi_pw_aff *pma,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+
+__isl_give isl_set *isl_set_from_multi_pw_aff(__isl_take isl_multi_pw_aff *mpa);
+__isl_give isl_map *isl_map_from_multi_pw_aff(__isl_take isl_multi_pw_aff *mpa);
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_pw_aff(
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_constructor
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_multi_aff(
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_give isl_map *isl_multi_pw_aff_eq_map(__isl_take isl_multi_pw_aff *mpa1,
+	__isl_take isl_multi_pw_aff *mpa2);
+__isl_give isl_map *isl_multi_pw_aff_lex_le_map(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+__isl_give isl_map *isl_multi_pw_aff_lex_lt_map(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+__isl_give isl_map *isl_multi_pw_aff_lex_ge_map(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+__isl_give isl_map *isl_multi_pw_aff_lex_gt_map(
+	__isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2);
+
+__isl_export
+__isl_give isl_set *isl_multi_pw_aff_bind(__isl_take isl_multi_pw_aff *mpa,
+	__isl_take isl_multi_id *tuple);
+
+__isl_constructor
+__isl_give isl_multi_pw_aff *isl_multi_pw_aff_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give char *isl_multi_pw_aff_to_str(__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);
+void isl_multi_pw_aff_dump(__isl_keep isl_multi_pw_aff *mpa);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_copy(
+	__isl_keep isl_union_pw_aff *upa);
+__isl_null isl_union_pw_aff *isl_union_pw_aff_free(
+	__isl_take isl_union_pw_aff *upa);
+
+isl_ctx *isl_union_pw_aff_get_ctx(__isl_keep isl_union_pw_aff *upa);
+__isl_export
+__isl_give isl_space *isl_union_pw_aff_get_space(
+	__isl_keep isl_union_pw_aff *upa);
+__isl_give isl_pw_aff_list *isl_union_pw_aff_get_pw_aff_list(
+	__isl_keep isl_union_pw_aff *upa);
+
+isl_size isl_union_pw_aff_dim(__isl_keep isl_union_pw_aff *upa,
+	enum isl_dim_type type);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_set_dim_name(
+	__isl_take isl_union_pw_aff *upa, enum isl_dim_type type,
+	unsigned pos, const char *s);
+
+int isl_union_pw_aff_find_dim_by_name(__isl_keep isl_union_pw_aff *upa,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_drop_dims(
+	__isl_take isl_union_pw_aff *upa,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_reset_user(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_empty_ctx(isl_ctx *ctx);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_empty_space(
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_empty(
+	__isl_take isl_space *space);
+__isl_constructor
+__isl_give isl_union_pw_aff *isl_union_pw_aff_from_aff(__isl_take isl_aff *aff);
+__isl_constructor
+__isl_give isl_union_pw_aff *isl_union_pw_aff_from_pw_aff(
+	__isl_take isl_pw_aff *pa);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_val_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_val *v);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_aff_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_aff *aff);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_pw_aff_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_pw_aff *pa);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_add_pw_aff(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_pw_aff *pa);
+
+__isl_constructor
+__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_pw_aff(
+	__isl_take isl_union_pw_aff *upa);
+
+isl_size isl_union_pw_aff_n_pw_aff(__isl_keep isl_union_pw_aff *upa);
+
+isl_stat isl_union_pw_aff_foreach_pw_aff(__isl_keep isl_union_pw_aff *upa,
+	isl_stat (*fn)(__isl_take isl_pw_aff *pa, void *user), void *user);
+isl_bool isl_union_pw_aff_every_pw_aff(__isl_keep isl_union_pw_aff *upa,
+	isl_bool (*test)(__isl_keep isl_pw_aff *pa, void *user), void *user);
+__isl_give isl_pw_aff *isl_union_pw_aff_extract_pw_aff(
+	__isl_keep isl_union_pw_aff *upa, __isl_take isl_space *space);
+
+isl_bool isl_union_pw_aff_involves_nan(__isl_keep isl_union_pw_aff *upa);
+isl_bool isl_union_pw_aff_plain_is_equal(__isl_keep isl_union_pw_aff *upa1,
+	__isl_keep isl_union_pw_aff *upa2);
+
+__isl_export
+__isl_give isl_union_set *isl_union_pw_aff_domain(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_neg(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_add(
+	__isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2);
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_union_add(
+	__isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2);
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_sub(
+	__isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2);
+
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_coalesce(
+	__isl_take isl_union_pw_aff *upa);
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_gist(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *context);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_gist_params(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_set *context);
+
+__isl_overload
+__isl_give isl_union_pw_aff *isl_union_pw_aff_pullback_union_pw_multi_aff(
+	__isl_take isl_union_pw_aff *upa,
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_floor(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_scale_val(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_val *v);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_scale_down_val(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_val *v);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_mod_val(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_val *f);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_align_params(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_space *model);
+
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_params(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_set *set);
+__isl_overload
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_space(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_space *space);
+__isl_overload
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_union_set(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_wrapped_domain(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_wrapped_range(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_pw_aff *isl_union_pw_aff_subtract_domain_union_set(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_pw_aff *isl_union_pw_aff_subtract_domain_space(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_space *space);
+__isl_give isl_union_pw_aff *isl_union_pw_aff_subtract_domain(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset);
+
+__isl_give isl_union_pw_aff *isl_union_pw_aff_set_dim_name(
+	__isl_take isl_union_pw_aff *upa,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+__isl_give isl_union_set *isl_union_pw_aff_zero_union_set(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_give isl_union_map *isl_union_map_from_union_pw_aff(
+	__isl_take isl_union_pw_aff *upa);
+
+__isl_overload
+__isl_give isl_union_set *isl_union_pw_aff_bind_id(
+	__isl_take isl_union_pw_aff *upa, __isl_take isl_id *id);
+
+__isl_constructor
+__isl_give isl_union_pw_aff *isl_union_pw_aff_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give char *isl_union_pw_aff_to_str(__isl_keep isl_union_pw_aff *upa);
+__isl_give isl_printer *isl_printer_print_union_pw_aff(
+	__isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa);
+void isl_union_pw_aff_dump(__isl_keep isl_union_pw_aff *upa);
+
+ISL_DECLARE_MULTI(union_pw_aff)
+ISL_DECLARE_MULTI_ARITH(union_pw_aff)
+ISL_DECLARE_MULTI_ZERO(union_pw_aff)
+ISL_DECLARE_MULTI_NAN(union_pw_aff)
+ISL_DECLARE_MULTI_DROP_DIMS(union_pw_aff)
+ISL_DECLARE_MULTI_DIM_ID(union_pw_aff)
+ISL_DECLARE_MULTI_TUPLE_ID(union_pw_aff)
+
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_multi_aff(
+	__isl_take isl_multi_aff *ma);
+__isl_constructor
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_union_pw_aff(
+	__isl_take isl_union_pw_aff *upa);
+__isl_constructor
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_multi_pw_aff(
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_multi_val_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_multi_val *mv);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_multi_aff_on_domain(
+	__isl_take isl_union_set *domain, __isl_take isl_multi_aff *ma);
+__isl_give isl_multi_union_pw_aff *
+isl_multi_union_pw_aff_pw_multi_aff_on_domain(__isl_take isl_union_set *domain,
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_floor(
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_domain(
+	__isl_take isl_multi_union_pw_aff *mupa,
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_params(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_set *params);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_range(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_union_set *isl_multi_union_pw_aff_domain(
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_coalesce(
+	__isl_take isl_multi_union_pw_aff *mupa);
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_gist(
+	__isl_take isl_multi_union_pw_aff *mupa,
+	__isl_take isl_union_set *context);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_gist_params(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_set *context);
+
+__isl_give isl_union_pw_aff *isl_multi_union_pw_aff_apply_aff(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_aff *aff);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_apply_multi_aff(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_multi_aff *ma);
+__isl_give isl_union_pw_aff *isl_multi_union_pw_aff_apply_pw_aff(
+	__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_pw_aff *pa);
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_apply_pw_multi_aff(
+	__isl_take isl_multi_union_pw_aff *mupa,
+	__isl_take isl_pw_multi_aff *pma);
+
+__isl_overload
+__isl_give isl_multi_union_pw_aff *
+isl_multi_union_pw_aff_pullback_union_pw_multi_aff(
+	__isl_take isl_multi_union_pw_aff *mupa,
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_pw_multi_aff *
+isl_union_pw_multi_aff_from_multi_union_pw_aff(
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_union_add(
+	__isl_take isl_multi_union_pw_aff *mupa1,
+	__isl_take isl_multi_union_pw_aff *mupa2);
+
+__isl_give isl_multi_union_pw_aff *
+isl_multi_union_pw_aff_from_union_pw_multi_aff(
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_union_map(
+	__isl_take isl_union_map *umap);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_from_multi_union_pw_aff(
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_give isl_union_set *isl_multi_union_pw_aff_zero_union_set(
+	__isl_take isl_multi_union_pw_aff *mupa);
+__isl_export
+__isl_give isl_union_set *isl_multi_union_pw_aff_bind(
+	__isl_take isl_multi_union_pw_aff *mupa,
+	__isl_take isl_multi_id *tuple);
+
+__isl_give isl_multi_pw_aff *isl_multi_union_pw_aff_extract_multi_pw_aff(
+	__isl_keep isl_multi_union_pw_aff *mupa, __isl_take isl_space *space);
+
+__isl_constructor
+__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_read_from_str(
+	isl_ctx *ctx, const char *str);
+__isl_give char *isl_multi_union_pw_aff_to_str(
+	__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);
+void isl_multi_union_pw_aff_dump(__isl_keep isl_multi_union_pw_aff *mupa);
+
+ISL_DECLARE_EXPORTED_LIST_FN(aff)
+ISL_DECLARE_EXPORTED_LIST_FN(pw_aff)
+ISL_DECLARE_EXPORTED_LIST_FN(pw_multi_aff)
+ISL_DECLARE_EXPORTED_LIST_FN(union_pw_aff)
+ISL_DECLARE_LIST_FN(union_pw_multi_aff)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/aff_type.h b/linux-x64/clang/include/polly/isl/aff_type.h
new file mode 100644
index 0000000..271f978
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/aff_type.h
@@ -0,0 +1,52 @@
+#ifndef ISL_AFF_TYPE_H
+#define ISL_AFF_TYPE_H
+
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_subclass(isl_multi_aff) __isl_subclass(isl_pw_aff) isl_aff;
+typedef struct isl_aff isl_aff;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(aff)
+
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_pw_multi_aff)
+	__isl_subclass(isl_union_pw_aff) isl_pw_aff;
+typedef struct isl_pw_aff isl_pw_aff;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(pw_aff)
+
+struct __isl_subclass(isl_multi_union_pw_aff)
+	__isl_subclass(isl_union_pw_multi_aff) isl_union_pw_aff;
+typedef struct isl_union_pw_aff isl_union_pw_aff;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(union_pw_aff)
+
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_pw_multi_aff)
+	isl_multi_aff;
+typedef struct isl_multi_aff isl_multi_aff;
+
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_union_pw_multi_aff)
+	isl_pw_multi_aff;
+typedef struct isl_pw_multi_aff isl_pw_multi_aff;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(pw_multi_aff)
+
+struct __isl_export isl_union_pw_multi_aff;
+typedef struct isl_union_pw_multi_aff isl_union_pw_multi_aff;
+
+ISL_DECLARE_LIST_TYPE(union_pw_multi_aff)
+
+struct __isl_subclass(isl_multi_union_pw_aff) isl_multi_pw_aff;
+typedef struct isl_multi_pw_aff isl_multi_pw_aff;
+
+struct __isl_export isl_multi_union_pw_aff;
+typedef struct isl_multi_union_pw_aff isl_multi_union_pw_aff;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/arg.h b/linux-x64/clang/include/polly/isl/arg.h
new file mode 100644
index 0000000..edbd81e
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/arg.h
@@ -0,0 +1,325 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_ARG_H
+#define ISL_ARG_H
+
+#include <stddef.h>
+#include <stdlib.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_arg_choice {
+	const char	*name;
+	unsigned	 value;
+};
+
+struct isl_arg_flags {
+	const char	*name;
+	unsigned	 mask;
+	unsigned	 value;
+};
+
+enum isl_arg_type {
+	isl_arg_end,
+	isl_arg_alias,
+	isl_arg_arg,
+	isl_arg_bool,
+	isl_arg_child,
+	isl_arg_choice,
+	isl_arg_flags,
+	isl_arg_footer,
+	isl_arg_int,
+	isl_arg_user,
+	isl_arg_long,
+	isl_arg_ulong,
+	isl_arg_str,
+	isl_arg_str_list,
+	isl_arg_version
+};
+
+struct isl_args;
+
+struct isl_arg {
+	enum isl_arg_type	 type;
+	char			 short_name;
+	const char		*long_name;
+	const char		*argument_name;
+#define ISL_ARG_OFFSET_NONE	((size_t) -1)
+	size_t			 offset;
+	const char		*help_msg;
+#define ISL_ARG_SINGLE_DASH	(1 << 0)
+#define ISL_ARG_BOOL_ARG	(1 << 1)
+#define ISL_ARG_HIDDEN		(1 << 2)
+	unsigned		 flags;
+	union {
+	struct {
+		struct isl_arg_choice	*choice;
+		unsigned	 	 default_value;
+		unsigned	 	 default_selected;
+		int (*set)(void *opt, unsigned val);
+	} choice;
+	struct {
+		struct isl_arg_flags	*flags;
+		unsigned	 	 default_value;
+	} flags;
+	struct {
+		unsigned		 default_value;
+		int (*set)(void *opt, unsigned val);
+	} b;
+	struct {
+		int			default_value;
+	} i;
+	struct {
+		long		 	default_value;
+		long		 	default_selected;
+		int (*set)(void *opt, long val);
+	} l;
+	struct {
+		unsigned long		default_value;
+	} ul;
+	struct {
+		const char		*default_value;
+	} str;
+	struct {
+		size_t			 offset_n;
+	} str_list;
+	struct {
+		struct isl_args		*child;
+	} child;
+	struct {
+		void (*print_version)(void);
+	} version;
+	struct {
+		int (*init)(void*);
+		void (*clear)(void*);
+	} user;
+	} u;
+};
+
+struct isl_args {
+	size_t			 options_size;
+	struct isl_arg		*args;
+};
+
+#define ISL_ARGS_START(s,name)						\
+	struct isl_arg name ## LIST[];					\
+	struct isl_args name = { sizeof(s), name ## LIST };		\
+	struct isl_arg name ## LIST[] = {
+#define ISL_ARGS_END							\
+	{ isl_arg_end } };
+
+#define ISL_ARG_ALIAS(l)	{					\
+	.type = isl_arg_alias,						\
+	.long_name = l,							\
+},
+#define ISL_ARG_ARG(st,f,a,d)	{					\
+	.type = isl_arg_arg,						\
+	.argument_name = a,						\
+	.offset = offsetof(st, f),					\
+	.u = { .str = { .default_value = d } }				\
+},
+#define ISL_ARG_FOOTER(h)	{					\
+	.type = isl_arg_footer,						\
+	.help_msg = h,							\
+},
+#define ISL_ARG_CHOICE(st,f,s,l,c,d,h)	{				\
+	.type = isl_arg_choice,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .choice = { .choice = c, .default_value = d,		\
+			    .default_selected = d, .set = NULL } }	\
+},
+#define ISL_ARG_OPT_CHOICE(st,f,s,l,c,d,ds,h)	{			\
+	.type = isl_arg_choice,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .choice = { .choice = c, .default_value = d,		\
+			    .default_selected = ds, .set = NULL } }	\
+},
+#define ISL_ARG_PHANTOM_USER_CHOICE_F(s,l,c,setter,d,h,fl)	{	\
+	.type = isl_arg_choice,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = ISL_ARG_OFFSET_NONE,					\
+	.help_msg = h,							\
+	.flags = fl,							\
+	.u = { .choice = { .choice = c, .default_value = d,		\
+			    .default_selected = d, .set = setter } }	\
+},
+#define ISL_ARG_USER_OPT_CHOICE(st,f,s,l,c,setter,d,ds,h)	{	\
+	.type = isl_arg_choice,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .choice = { .choice = c, .default_value = d,		\
+			    .default_selected = ds, .set = setter } }	\
+},
+#define _ISL_ARG_BOOL_F(o,s,l,setter,d,h,fl)	{			\
+	.type = isl_arg_bool,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = o,							\
+	.help_msg = h,							\
+	.flags = fl,							\
+	.u = { .b = { .default_value = d, .set = setter } }		\
+},
+#define ISL_ARG_BOOL_F(st,f,s,l,d,h,fl)					\
+	_ISL_ARG_BOOL_F(offsetof(st, f),s,l,NULL,d,h,fl)
+#define ISL_ARG_BOOL(st,f,s,l,d,h)					\
+	ISL_ARG_BOOL_F(st,f,s,l,d,h,0)
+#define ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,fl)				\
+	_ISL_ARG_BOOL_F(ISL_ARG_OFFSET_NONE,s,l,setter,0,h,fl)
+#define ISL_ARG_PHANTOM_BOOL(s,l,setter,h)				\
+	ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,0)
+#define ISL_ARG_INT_F(st,f,s,l,a,d,h,fl)	{			\
+	.type = isl_arg_int,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.argument_name = a,						\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.flags = fl,							\
+	.u = { .i = { .default_value = d } }				\
+},
+#define ISL_ARG_INT(st,f,s,l,a,d,h)					\
+	ISL_ARG_INT_F(st,f,s,l,a,d,h,0)
+#define ISL_ARG_LONG(st,f,s,lo,d,h)	{				\
+	.type = isl_arg_long,						\
+	.short_name = s,						\
+	.long_name = lo,						\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .l = { .default_value = d, .default_selected = d,	\
+		      .set = NULL } }					\
+},
+#define ISL_ARG_USER_LONG(st,f,s,lo,setter,d,h)	{			\
+	.type = isl_arg_long,						\
+	.short_name = s,						\
+	.long_name = lo,						\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .l = { .default_value = d, .default_selected = d,	\
+		      .set = setter } }					\
+},
+#define ISL_ARG_OPT_LONG(st,f,s,lo,d,ds,h)	{			\
+	.type = isl_arg_long,						\
+	.short_name = s,						\
+	.long_name = lo,						\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .l = { .default_value = d, .default_selected = ds,	\
+		      .set = NULL } }					\
+},
+#define ISL_ARG_ULONG(st,f,s,l,d,h)	{				\
+	.type = isl_arg_ulong,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .ul = { .default_value = d } }				\
+},
+#define ISL_ARG_STR_F(st,f,s,l,a,d,h,fl)	{			\
+	.type = isl_arg_str,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.argument_name = a,						\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.flags = fl,							\
+	.u = { .str = { .default_value = d } }				\
+},
+#define ISL_ARG_STR(st,f,s,l,a,d,h)					\
+	ISL_ARG_STR_F(st,f,s,l,a,d,h,0)
+#define ISL_ARG_STR_LIST(st,f_n,f_l,s,l,a,h)	{			\
+	.type = isl_arg_str_list,					\
+	.short_name = s,						\
+	.long_name = l,							\
+	.argument_name = a,						\
+	.offset = offsetof(st, f_l),					\
+	.help_msg = h,							\
+	.u = { .str_list = { .offset_n = offsetof(st, f_n) } }		\
+},
+#define _ISL_ARG_CHILD(o,l,c,h,fl)	{				\
+	.type = isl_arg_child,						\
+	.long_name = l,							\
+	.offset = o,							\
+	.help_msg = h,							\
+	.flags = fl,							\
+	.u = { .child = { .child = c } }				\
+},
+#define ISL_ARG_CHILD(st,f,l,c,h)					\
+	_ISL_ARG_CHILD(offsetof(st, f),l,c,h,0)
+#define ISL_ARG_GROUP_F(l,c,h,fl)					\
+	_ISL_ARG_CHILD(ISL_ARG_OFFSET_NONE,l,c,h,fl)
+#define ISL_ARG_GROUP(l,c,h)						\
+	ISL_ARG_GROUP_F(l,c,h,0)
+#define ISL_ARG_FLAGS(st,f,s,l,c,d,h)	{				\
+	.type = isl_arg_flags,						\
+	.short_name = s,						\
+	.long_name = l,							\
+	.offset = offsetof(st, f),					\
+	.help_msg = h,							\
+	.u = { .flags = { .flags = c, .default_value = d } }		\
+},
+#define ISL_ARG_USER(st,f,i,c) {					\
+	.type = isl_arg_user,						\
+	.offset = offsetof(st, f),					\
+	.u = { .user = { .init = i, .clear = c} }			\
+},
+#define ISL_ARG_VERSION(print) {					\
+	.type = isl_arg_version,					\
+	.u = { .version = { .print_version = print } }			\
+},
+
+#define ISL_ARG_ALL		(1 << 0)
+#define ISL_ARG_SKIP_HELP	(1 << 1)
+
+void isl_args_set_defaults(struct isl_args *args, void *opt);
+void isl_args_free(struct isl_args *args, void *opt);
+int isl_args_parse(struct isl_args *args, int argc, char **argv, void *opt,
+	unsigned flags);
+
+#define ISL_ARG_DECL(prefix,st,args)					\
+extern struct isl_args args;						\
+st *prefix ## _new_with_defaults(void);					\
+void prefix ## _free(st *opt);						\
+int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags);
+
+#define ISL_ARG_DEF(prefix,st,args)					\
+st *prefix ## _new_with_defaults()					\
+{									\
+	st *opt = (st *)calloc(1, sizeof(st));				\
+	if (opt)							\
+		isl_args_set_defaults(&(args), opt);			\
+	return opt;							\
+}									\
+									\
+void prefix ## _free(st *opt)						\
+{									\
+	isl_args_free(&(args), opt);					\
+}									\
+									\
+int prefix ## _parse(st *opt, int argc, char **argv, unsigned flags)	\
+{									\
+	return isl_args_parse(&(args), argc, argv, opt, flags);		\
+}
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/ast.h b/linux-x64/clang/include/polly/isl/ast.h
new file mode 100644
index 0000000..570c48a
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/ast.h
@@ -0,0 +1,242 @@
+#ifndef ISL_AST_H
+#define ISL_AST_H
+
+#include <isl/ctx.h>
+#include <isl/ast_type.h>
+#include <isl/id_type.h>
+#include <isl/id_to_ast_expr.h>
+#include <isl/val_type.h>
+#include <isl/list.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_stat isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val);
+const char *isl_options_get_ast_iterator_type(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_always_print_block(isl_ctx *ctx, int val);
+int isl_options_get_ast_always_print_block(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_print_outermost_block(isl_ctx *ctx, int val);
+int isl_options_get_ast_print_outermost_block(isl_ctx *ctx);
+
+__isl_give isl_ast_expr *isl_ast_expr_from_val(__isl_take isl_val *v);
+__isl_give isl_ast_expr *isl_ast_expr_from_id(__isl_take isl_id *id);
+__isl_give isl_ast_expr *isl_ast_expr_neg(__isl_take isl_ast_expr *expr);
+__isl_give isl_ast_expr *isl_ast_expr_add(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_sub(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_mul(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_div(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_pdiv_q(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_pdiv_r(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_and(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_and_then(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_or(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_or_else(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_le(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_lt(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_ge(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_gt(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_eq(__isl_take isl_ast_expr *expr1,
+	__isl_take isl_ast_expr *expr2);
+__isl_give isl_ast_expr *isl_ast_expr_access(__isl_take isl_ast_expr *array,
+	__isl_take isl_ast_expr_list *indices);
+__isl_give isl_ast_expr *isl_ast_expr_call(__isl_take isl_ast_expr *function,
+	__isl_take isl_ast_expr_list *arguments);
+__isl_give isl_ast_expr *isl_ast_expr_address_of(__isl_take isl_ast_expr *expr);
+
+__isl_give isl_ast_expr *isl_ast_expr_copy(__isl_keep isl_ast_expr *expr);
+__isl_null isl_ast_expr *isl_ast_expr_free(__isl_take isl_ast_expr *expr);
+
+isl_ctx *isl_ast_expr_get_ctx(__isl_keep isl_ast_expr *expr);
+__isl_subclass(isl_ast_expr)
+enum isl_ast_expr_type isl_ast_expr_get_type(__isl_keep isl_ast_expr *expr);
+__isl_export
+__isl_give isl_val *isl_ast_expr_int_get_val(__isl_keep isl_ast_expr *expr);
+__isl_give isl_val *isl_ast_expr_get_val(__isl_keep isl_ast_expr *expr);
+__isl_export
+__isl_give isl_id *isl_ast_expr_id_get_id(__isl_keep isl_ast_expr *expr);
+__isl_give isl_id *isl_ast_expr_get_id(__isl_keep isl_ast_expr *expr);
+
+__isl_subclass(isl_ast_expr_op)
+enum isl_ast_expr_op_type isl_ast_expr_op_get_type(
+	__isl_keep isl_ast_expr *expr);
+enum isl_ast_expr_op_type isl_ast_expr_get_op_type(
+	__isl_keep isl_ast_expr *expr);
+__isl_export
+isl_size isl_ast_expr_op_get_n_arg(__isl_keep isl_ast_expr *expr);
+isl_size isl_ast_expr_get_op_n_arg(__isl_keep isl_ast_expr *expr);
+__isl_export
+__isl_give isl_ast_expr *isl_ast_expr_op_get_arg(__isl_keep isl_ast_expr *expr,
+	int pos);
+__isl_give isl_ast_expr *isl_ast_expr_get_op_arg(__isl_keep isl_ast_expr *expr,
+	int pos);
+__isl_give isl_ast_expr *isl_ast_expr_set_op_arg(__isl_take isl_ast_expr *expr,
+	int pos, __isl_take isl_ast_expr *arg);
+
+isl_bool isl_ast_expr_is_equal(__isl_keep isl_ast_expr *expr1,
+	__isl_keep isl_ast_expr *expr2);
+
+__isl_give isl_ast_expr *isl_ast_expr_substitute_ids(
+	__isl_take isl_ast_expr *expr, __isl_take isl_id_to_ast_expr *id2expr);
+
+__isl_give isl_printer *isl_printer_print_ast_expr(__isl_take isl_printer *p,
+	__isl_keep isl_ast_expr *expr);
+void isl_ast_expr_dump(__isl_keep isl_ast_expr *expr);
+__isl_give char *isl_ast_expr_to_str(__isl_keep isl_ast_expr *expr);
+__isl_export
+__isl_give char *isl_ast_expr_to_C_str(__isl_keep isl_ast_expr *expr);
+
+__isl_give isl_ast_node *isl_ast_node_alloc_user(__isl_take isl_ast_expr *expr);
+__isl_give isl_ast_node *isl_ast_node_copy(__isl_keep isl_ast_node *node);
+__isl_null isl_ast_node *isl_ast_node_free(__isl_take isl_ast_node *node);
+
+isl_ctx *isl_ast_node_get_ctx(__isl_keep isl_ast_node *node);
+__isl_subclass(isl_ast_node)
+enum isl_ast_node_type isl_ast_node_get_type(__isl_keep isl_ast_node *node);
+
+__isl_give isl_ast_node *isl_ast_node_set_annotation(
+	__isl_take isl_ast_node *node, __isl_take isl_id *annotation);
+__isl_give isl_id *isl_ast_node_get_annotation(__isl_keep isl_ast_node *node);
+
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_for_get_iterator(
+	__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_for_get_init(
+	__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_for_get_cond(
+	__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_for_get_inc(
+	__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_node *isl_ast_node_for_get_body(
+	__isl_keep isl_ast_node *node);
+__isl_export
+isl_bool isl_ast_node_for_is_degenerate(__isl_keep isl_ast_node *node);
+
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_if_get_cond(
+	__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_node *isl_ast_node_if_get_then_node(
+	__isl_keep isl_ast_node *node);
+__isl_give isl_ast_node *isl_ast_node_if_get_then(
+	__isl_keep isl_ast_node *node);
+__isl_export
+isl_bool isl_ast_node_if_has_else_node(__isl_keep isl_ast_node *node);
+isl_bool isl_ast_node_if_has_else(__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_node *isl_ast_node_if_get_else_node(
+	__isl_keep isl_ast_node *node);
+__isl_give isl_ast_node *isl_ast_node_if_get_else(
+	__isl_keep isl_ast_node *node);
+
+__isl_export
+__isl_give isl_ast_node_list *isl_ast_node_block_get_children(
+	__isl_keep isl_ast_node *node);
+
+__isl_export
+__isl_give isl_id *isl_ast_node_mark_get_id(__isl_keep isl_ast_node *node);
+__isl_export
+__isl_give isl_ast_node *isl_ast_node_mark_get_node(
+	__isl_keep isl_ast_node *node);
+
+__isl_export
+__isl_give isl_ast_expr *isl_ast_node_user_get_expr(
+	__isl_keep isl_ast_node *node);
+
+isl_stat isl_ast_node_foreach_descendant_top_down(
+	__isl_keep isl_ast_node *node,
+	isl_bool (*fn)(__isl_keep isl_ast_node *node, void *user), void *user);
+
+__isl_give isl_printer *isl_printer_print_ast_node(__isl_take isl_printer *p,
+	__isl_keep isl_ast_node *node);
+void isl_ast_node_dump(__isl_keep isl_ast_node *node);
+__isl_give char *isl_ast_node_to_str(__isl_keep isl_ast_node *node);
+
+__isl_give isl_ast_print_options *isl_ast_print_options_alloc(isl_ctx *ctx);
+__isl_give isl_ast_print_options *isl_ast_print_options_copy(
+	__isl_keep isl_ast_print_options *options);
+__isl_null isl_ast_print_options *isl_ast_print_options_free(
+	__isl_take isl_ast_print_options *options);
+isl_ctx *isl_ast_print_options_get_ctx(
+	__isl_keep isl_ast_print_options *options);
+
+__isl_give isl_ast_print_options *isl_ast_print_options_set_print_user(
+	__isl_take isl_ast_print_options *options,
+	__isl_give isl_printer *(*print_user)(__isl_take isl_printer *p,
+		__isl_take isl_ast_print_options *options,
+		__isl_keep isl_ast_node *node, void *user),
+	void *user);
+__isl_give isl_ast_print_options *isl_ast_print_options_set_print_for(
+	__isl_take isl_ast_print_options *options,
+	__isl_give isl_printer *(*print_for)(__isl_take isl_printer *p,
+		__isl_take isl_ast_print_options *options,
+		__isl_keep isl_ast_node *node, void *user),
+	void *user);
+
+isl_stat isl_options_set_ast_print_macro_once(isl_ctx *ctx, int val);
+int isl_options_get_ast_print_macro_once(isl_ctx *ctx);
+
+isl_stat isl_ast_expr_foreach_ast_expr_op_type(__isl_keep isl_ast_expr *expr,
+	isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user);
+isl_stat isl_ast_expr_foreach_ast_op_type(__isl_keep isl_ast_expr *expr,
+	isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user);
+isl_stat isl_ast_node_foreach_ast_expr_op_type(__isl_keep isl_ast_node *node,
+	isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user);
+isl_stat isl_ast_node_foreach_ast_op_type(__isl_keep isl_ast_node *node,
+	isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user);
+__isl_give isl_printer *isl_ast_expr_op_type_set_print_name(
+	__isl_take isl_printer *p, enum isl_ast_expr_op_type type,
+	__isl_keep const char *name);
+__isl_give isl_printer *isl_ast_op_type_set_print_name(
+	__isl_take isl_printer *p, enum isl_ast_expr_op_type type,
+	__isl_keep const char *name);
+__isl_give isl_printer *isl_ast_expr_op_type_print_macro(
+	enum isl_ast_expr_op_type type, __isl_take isl_printer *p);
+__isl_give isl_printer *isl_ast_op_type_print_macro(
+	enum isl_ast_expr_op_type type, __isl_take isl_printer *p);
+__isl_give isl_printer *isl_ast_expr_print_macros(
+	__isl_keep isl_ast_expr *expr, __isl_take isl_printer *p);
+__isl_give isl_printer *isl_ast_node_print_macros(
+	__isl_keep isl_ast_node *node, __isl_take isl_printer *p);
+__isl_give isl_printer *isl_ast_node_print(__isl_keep isl_ast_node *node,
+	__isl_take isl_printer *p,
+	__isl_take isl_ast_print_options *options);
+__isl_give isl_printer *isl_ast_node_for_print(__isl_keep isl_ast_node *node,
+	__isl_take isl_printer *p,
+	__isl_take isl_ast_print_options *options);
+__isl_give isl_printer *isl_ast_node_if_print(__isl_keep isl_ast_node *node,
+	__isl_take isl_printer *p,
+	__isl_take isl_ast_print_options *options);
+
+__isl_export
+__isl_give char *isl_ast_node_to_C_str(__isl_keep isl_ast_node *node);
+
+ISL_DECLARE_LIST_FN(ast_expr)
+ISL_DECLARE_EXPORTED_LIST_FN(ast_node)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/ast_build.h b/linux-x64/clang/include/polly/isl/ast_build.h
new file mode 100644
index 0000000..0029cd5
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/ast_build.h
@@ -0,0 +1,131 @@
+#ifndef ISL_AST_BUILD_H
+#define ISL_AST_BUILD_H
+
+#include <isl/ctx.h>
+#include <isl/set.h>
+#include <isl/ast.h>
+#include <isl/schedule.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_ast_build;
+typedef struct isl_ast_build isl_ast_build;
+
+
+isl_stat isl_options_set_ast_build_atomic_upper_bound(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_atomic_upper_bound(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_prefer_pdiv(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_prefer_pdiv(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_detect_min_max(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_detect_min_max(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_exploit_nested_bounds(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_exploit_nested_bounds(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_group_coscheduled(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_group_coscheduled(isl_ctx *ctx);
+
+#define ISL_AST_BUILD_SEPARATION_BOUNDS_EXPLICIT		0
+#define ISL_AST_BUILD_SEPARATION_BOUNDS_IMPLICIT		1
+isl_stat isl_options_set_ast_build_separation_bounds(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_separation_bounds(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_scale_strides(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_scale_strides(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_allow_else(isl_ctx *ctx);
+
+isl_stat isl_options_set_ast_build_allow_or(isl_ctx *ctx, int val);
+int isl_options_get_ast_build_allow_or(isl_ctx *ctx);
+
+isl_ctx *isl_ast_build_get_ctx(__isl_keep isl_ast_build *build);
+
+__isl_constructor
+__isl_give isl_ast_build *isl_ast_build_alloc(isl_ctx *ctx);
+__isl_export
+__isl_give isl_ast_build *isl_ast_build_from_context(__isl_take isl_set *set);
+
+__isl_give isl_space *isl_ast_build_get_schedule_space(
+	__isl_keep isl_ast_build *build);
+__isl_export
+__isl_give isl_union_map *isl_ast_build_get_schedule(
+	__isl_keep isl_ast_build *build);
+
+__isl_give isl_ast_build *isl_ast_build_restrict(
+	__isl_take isl_ast_build *build, __isl_take isl_set *set);
+
+__isl_give isl_ast_build *isl_ast_build_copy(
+	__isl_keep isl_ast_build *build);
+__isl_null isl_ast_build *isl_ast_build_free(
+	__isl_take isl_ast_build *build);
+
+__isl_give isl_ast_build *isl_ast_build_set_options(
+	__isl_take isl_ast_build *build,
+	__isl_take isl_union_map *options);
+__isl_give isl_ast_build *isl_ast_build_set_iterators(
+	__isl_take isl_ast_build *build,
+	__isl_take isl_id_list *iterators);
+__isl_export
+__isl_give isl_ast_build *isl_ast_build_set_at_each_domain(
+	__isl_take isl_ast_build *build,
+	__isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node,
+		__isl_keep isl_ast_build *build, void *user), void *user);
+__isl_give isl_ast_build *isl_ast_build_set_before_each_for(
+	__isl_take isl_ast_build *build,
+	__isl_give isl_id *(*fn)(__isl_keep isl_ast_build *build,
+		void *user), void *user);
+__isl_give isl_ast_build *isl_ast_build_set_after_each_for(
+	__isl_take isl_ast_build *build,
+	__isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node,
+		__isl_keep isl_ast_build *build, void *user), void *user);
+__isl_give isl_ast_build *isl_ast_build_set_before_each_mark(
+	__isl_take isl_ast_build *build,
+	isl_stat (*fn)(__isl_keep isl_id *mark, __isl_keep isl_ast_build *build,
+		void *user), void *user);
+__isl_give isl_ast_build *isl_ast_build_set_after_each_mark(
+	__isl_take isl_ast_build *build,
+	__isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node,
+		__isl_keep isl_ast_build *build, void *user), void *user);
+__isl_give isl_ast_build *isl_ast_build_set_create_leaf(
+	__isl_take isl_ast_build *build,
+	__isl_give isl_ast_node *(*fn)(__isl_take isl_ast_build *build,
+		void *user), void *user);
+
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_expr_from_set(
+	__isl_keep isl_ast_build *build, __isl_take isl_set *set);
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_expr_from_pw_aff(
+	__isl_keep isl_ast_build *build, __isl_take isl_pw_aff *pa);
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_access_from_pw_multi_aff(
+	__isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_access_from_multi_pw_aff(
+	__isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_call_from_pw_multi_aff(
+	__isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_ast_expr *isl_ast_build_call_from_multi_pw_aff(
+	__isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa);
+
+__isl_overload
+__isl_give isl_ast_node *isl_ast_build_node_from_schedule(
+	__isl_keep isl_ast_build *build, __isl_take isl_schedule *schedule);
+__isl_export
+__isl_give isl_ast_node *isl_ast_build_node_from_schedule_map(
+	__isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule);
+__isl_give isl_ast_node *isl_ast_build_ast_from_schedule(
+	__isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/ast_type.h b/linux-x64/clang/include/polly/isl/ast_type.h
new file mode 100644
index 0000000..2877b8f
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/ast_type.h
@@ -0,0 +1,109 @@
+#ifndef ISL_AST_TYPE_H
+#define ISL_AST_TYPE_H
+
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_ast_expr;
+typedef struct isl_ast_expr isl_ast_expr;
+
+struct __isl_export isl_ast_node;
+typedef struct isl_ast_node isl_ast_node;
+
+enum isl_ast_expr_op_type {
+	isl_ast_expr_op_error = -1,
+	isl_ast_expr_op_and,
+	isl_ast_expr_op_and_then,
+	isl_ast_expr_op_or,
+	isl_ast_expr_op_or_else,
+	isl_ast_expr_op_max,
+	isl_ast_expr_op_min,
+	isl_ast_expr_op_minus,
+	isl_ast_expr_op_add,
+	isl_ast_expr_op_sub,
+	isl_ast_expr_op_mul,
+	isl_ast_expr_op_div,
+	isl_ast_expr_op_fdiv_q,	/* Round towards -infty */
+	isl_ast_expr_op_pdiv_q,	/* Dividend is non-negative */
+	isl_ast_expr_op_pdiv_r,	/* Dividend is non-negative */
+	isl_ast_expr_op_zdiv_r,	/* Result only compared against zero */
+	isl_ast_expr_op_cond,
+	isl_ast_expr_op_select,
+	isl_ast_expr_op_eq,
+	isl_ast_expr_op_le,
+	isl_ast_expr_op_lt,
+	isl_ast_expr_op_ge,
+	isl_ast_expr_op_gt,
+	isl_ast_expr_op_call,
+	isl_ast_expr_op_access,
+	isl_ast_expr_op_member,
+	isl_ast_expr_op_address_of
+};
+
+#define isl_ast_op_type		isl_ast_expr_op_type
+#define isl_ast_op_error	isl_ast_expr_op_error
+#define isl_ast_op_and		isl_ast_expr_op_and
+#define isl_ast_op_and_then	isl_ast_expr_op_and_then
+#define isl_ast_op_or		isl_ast_expr_op_or
+#define isl_ast_op_or_else	isl_ast_expr_op_or_else
+#define isl_ast_op_max		isl_ast_expr_op_max
+#define isl_ast_op_min		isl_ast_expr_op_min
+#define isl_ast_op_minus	isl_ast_expr_op_minus
+#define isl_ast_op_add		isl_ast_expr_op_add
+#define isl_ast_op_sub		isl_ast_expr_op_sub
+#define isl_ast_op_mul		isl_ast_expr_op_mul
+#define isl_ast_op_div		isl_ast_expr_op_div
+#define isl_ast_op_fdiv_q	isl_ast_expr_op_fdiv_q
+#define isl_ast_op_pdiv_q	isl_ast_expr_op_pdiv_q
+#define isl_ast_op_pdiv_r	isl_ast_expr_op_pdiv_r
+#define isl_ast_op_zdiv_r	isl_ast_expr_op_zdiv_r
+#define isl_ast_op_cond		isl_ast_expr_op_cond
+#define isl_ast_op_select	isl_ast_expr_op_select
+#define isl_ast_op_eq		isl_ast_expr_op_eq
+#define isl_ast_op_le		isl_ast_expr_op_le
+#define isl_ast_op_lt		isl_ast_expr_op_lt
+#define isl_ast_op_ge		isl_ast_expr_op_ge
+#define isl_ast_op_gt		isl_ast_expr_op_gt
+#define isl_ast_op_call		isl_ast_expr_op_call
+#define isl_ast_op_access	isl_ast_expr_op_access
+#define isl_ast_op_member	isl_ast_expr_op_member
+#define isl_ast_op_address_of	isl_ast_expr_op_address_of
+
+enum isl_ast_expr_type {
+	isl_ast_expr_error = -1,
+	isl_ast_expr_op,
+	isl_ast_expr_id,
+	isl_ast_expr_int
+};
+
+enum isl_ast_node_type {
+	isl_ast_node_error = -1,
+	isl_ast_node_for = 1,
+	isl_ast_node_if,
+	isl_ast_node_block,
+	isl_ast_node_mark,
+	isl_ast_node_user
+};
+
+enum isl_ast_loop_type {
+	isl_ast_loop_error = -1,
+	isl_ast_loop_default = 0,
+	isl_ast_loop_atomic,
+	isl_ast_loop_unroll,
+	isl_ast_loop_separate
+};
+
+struct isl_ast_print_options;
+typedef struct isl_ast_print_options isl_ast_print_options;
+
+ISL_DECLARE_LIST_TYPE(ast_expr)
+ISL_DECLARE_EXPORTED_LIST_TYPE(ast_node)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/constraint.h b/linux-x64/clang/include/polly/isl/constraint.h
new file mode 100644
index 0000000..a8b1611
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/constraint.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_CONSTRAINT_H
+#define ISL_CONSTRAINT_H
+
+#include <isl/local_space.h>
+#include <isl/space_type.h>
+#include <isl/aff_type.h>
+#include <isl/set_type.h>
+#include <isl/list.h>
+#include <isl/val_type.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_constraint;
+typedef struct isl_constraint isl_constraint;
+
+ISL_DECLARE_LIST(constraint)
+
+isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c);
+
+__isl_give isl_constraint *isl_constraint_alloc_equality(
+	__isl_take isl_local_space *ls);
+__isl_give isl_constraint *isl_constraint_alloc_inequality(
+	__isl_take isl_local_space *ls);
+__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls);
+__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_local_space *ls);
+
+__isl_give isl_constraint *isl_constraint_copy(__isl_keep isl_constraint *c);
+__isl_null isl_constraint *isl_constraint_free(__isl_take isl_constraint *c);
+
+isl_size isl_basic_map_n_constraint(__isl_keep isl_basic_map *bmap);
+isl_size isl_basic_set_n_constraint(__isl_keep isl_basic_set *bset);
+isl_stat isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap,
+	isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user);
+isl_stat isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset,
+	isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user);
+__isl_give isl_constraint_list *isl_basic_map_get_constraint_list(
+	__isl_keep isl_basic_map *bmap);
+__isl_give isl_constraint_list *isl_basic_set_get_constraint_list(
+	__isl_keep isl_basic_set *bset);
+int isl_constraint_is_equal(__isl_keep isl_constraint *constraint1,
+			    __isl_keep isl_constraint *constraint2);
+
+isl_stat isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos,
+	isl_stat (*fn)(__isl_take isl_constraint *lower,
+		  __isl_take isl_constraint *upper,
+		  __isl_take isl_basic_set *bset, void *user), void *user);
+
+__isl_give isl_basic_map *isl_basic_map_add_constraint(
+	__isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint);
+__isl_give isl_basic_set *isl_basic_set_add_constraint(
+	__isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint);
+__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map,
+	__isl_take isl_constraint *constraint);
+__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set,
+	__isl_take isl_constraint *constraint);
+
+isl_bool isl_basic_map_has_defining_equality(
+	__isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos,
+	__isl_give isl_constraint **c);
+isl_bool isl_basic_set_has_defining_equality(
+	struct isl_basic_set *bset, enum isl_dim_type type, int pos,
+	struct isl_constraint **constraint);
+isl_bool isl_basic_set_has_defining_inequalities(
+	struct isl_basic_set *bset, enum isl_dim_type type, int pos,
+	struct isl_constraint **lower,
+	struct isl_constraint **upper);
+
+__isl_give isl_space *isl_constraint_get_space(
+	__isl_keep isl_constraint *constraint);
+__isl_give isl_local_space *isl_constraint_get_local_space(
+	__isl_keep isl_constraint *constraint);
+isl_size isl_constraint_dim(__isl_keep isl_constraint *constraint,
+	enum isl_dim_type type);
+
+isl_bool isl_constraint_involves_dims(__isl_keep isl_constraint *constraint,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_val *isl_constraint_get_constant_val(
+	__isl_keep isl_constraint *constraint);
+__isl_give isl_val *isl_constraint_get_coefficient_val(
+	__isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos);
+__isl_give isl_constraint *isl_constraint_set_constant_si(
+	__isl_take isl_constraint *constraint, int v);
+__isl_give isl_constraint *isl_constraint_set_constant_val(
+	__isl_take isl_constraint *constraint, __isl_take isl_val *v);
+__isl_give isl_constraint *isl_constraint_set_coefficient_si(
+	__isl_take isl_constraint *constraint,
+	enum isl_dim_type type, int pos, int v);
+__isl_give isl_constraint *isl_constraint_set_coefficient_val(
+	__isl_take isl_constraint *constraint,
+	enum isl_dim_type type, int pos, __isl_take isl_val *v);
+
+__isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint,
+	int pos);
+
+__isl_give isl_constraint *isl_constraint_negate(
+	__isl_take isl_constraint *constraint);
+
+isl_bool isl_constraint_is_equality(__isl_keep isl_constraint *constraint);
+isl_bool isl_constraint_is_div_constraint(
+	__isl_keep isl_constraint *constraint);
+
+isl_bool isl_constraint_is_lower_bound(__isl_keep isl_constraint *constraint,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_constraint_is_upper_bound(__isl_keep isl_constraint *constraint,
+	enum isl_dim_type type, unsigned pos);
+
+__isl_give isl_basic_map *isl_basic_map_from_constraint(
+	__isl_take isl_constraint *constraint);
+__isl_give isl_basic_set *isl_basic_set_from_constraint(
+	__isl_take isl_constraint *constraint);
+
+__isl_give isl_aff *isl_constraint_get_bound(
+	__isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos);
+__isl_give isl_aff *isl_constraint_get_aff(
+	__isl_keep isl_constraint *constraint);
+__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff);
+__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff);
+
+int isl_constraint_plain_cmp(__isl_keep isl_constraint *c1,
+	__isl_keep isl_constraint *c2);
+int isl_constraint_cmp_last_non_zero(__isl_keep isl_constraint *c1,
+	__isl_keep isl_constraint *c2);
+
+__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p,
+	__isl_keep isl_constraint *c);
+void isl_constraint_dump(__isl_keep isl_constraint *c);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/cpp-checked-conversion.h b/linux-x64/clang/include/polly/isl/cpp-checked-conversion.h
new file mode 100644
index 0000000..20e422e
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/cpp-checked-conversion.h
@@ -0,0 +1,675 @@
+/// These are automatically generated conversions between
+/// the default and the checked C++ bindings for isl.
+///
+/// isl is a library for computing with integer sets and maps described by
+/// Presburger formulas. On top of this, isl provides various tools for
+/// polyhedral compilation, ranging from dependence analysis over scheduling
+/// to AST generation.
+
+#ifndef ISL_CPP_CHECKED_CONVERSION
+#define ISL_CPP_CHECKED_CONVERSION
+
+#include <isl/cpp.h>
+#include <isl/cpp-checked.h>
+
+namespace isl {
+
+checked::aff check(aff obj) {
+	return checked::manage(obj.copy());
+}
+
+aff uncheck(checked::aff obj) {
+	return manage(obj.copy());
+}
+
+checked::aff_list check(aff_list obj) {
+	return checked::manage(obj.copy());
+}
+
+aff_list uncheck(checked::aff_list obj) {
+	return manage(obj.copy());
+}
+
+checked::ast_build check(ast_build obj) {
+	return checked::manage(obj.copy());
+}
+
+ast_build uncheck(checked::ast_build obj) {
+	return manage(obj.copy());
+}
+
+checked::ast_expr check(ast_expr obj) {
+	return checked::manage(obj.copy());
+}
+
+ast_expr uncheck(checked::ast_expr obj) {
+	return manage(obj.copy());
+}
+
+checked::ast_expr_id check(ast_expr_id obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_id>();
+}
+
+ast_expr_id uncheck(checked::ast_expr_id obj) {
+	return manage(obj.copy()).as<ast_expr_id>();
+}
+
+checked::ast_expr_int check(ast_expr_int obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_int>();
+}
+
+ast_expr_int uncheck(checked::ast_expr_int obj) {
+	return manage(obj.copy()).as<ast_expr_int>();
+}
+
+checked::ast_expr_op check(ast_expr_op obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>();
+}
+
+ast_expr_op uncheck(checked::ast_expr_op obj) {
+	return manage(obj.copy()).as<ast_expr_op>();
+}
+
+checked::ast_expr_op_access check(ast_expr_op_access obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_access>();
+}
+
+ast_expr_op_access uncheck(checked::ast_expr_op_access obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_access>();
+}
+
+checked::ast_expr_op_add check(ast_expr_op_add obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_add>();
+}
+
+ast_expr_op_add uncheck(checked::ast_expr_op_add obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_add>();
+}
+
+checked::ast_expr_op_address_of check(ast_expr_op_address_of obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_address_of>();
+}
+
+ast_expr_op_address_of uncheck(checked::ast_expr_op_address_of obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_address_of>();
+}
+
+checked::ast_expr_op_and check(ast_expr_op_and obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_and>();
+}
+
+ast_expr_op_and uncheck(checked::ast_expr_op_and obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_and>();
+}
+
+checked::ast_expr_op_and_then check(ast_expr_op_and_then obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_and_then>();
+}
+
+ast_expr_op_and_then uncheck(checked::ast_expr_op_and_then obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_and_then>();
+}
+
+checked::ast_expr_op_call check(ast_expr_op_call obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_call>();
+}
+
+ast_expr_op_call uncheck(checked::ast_expr_op_call obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_call>();
+}
+
+checked::ast_expr_op_cond check(ast_expr_op_cond obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_cond>();
+}
+
+ast_expr_op_cond uncheck(checked::ast_expr_op_cond obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_cond>();
+}
+
+checked::ast_expr_op_div check(ast_expr_op_div obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_div>();
+}
+
+ast_expr_op_div uncheck(checked::ast_expr_op_div obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_div>();
+}
+
+checked::ast_expr_op_eq check(ast_expr_op_eq obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_eq>();
+}
+
+ast_expr_op_eq uncheck(checked::ast_expr_op_eq obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_eq>();
+}
+
+checked::ast_expr_op_fdiv_q check(ast_expr_op_fdiv_q obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_fdiv_q>();
+}
+
+ast_expr_op_fdiv_q uncheck(checked::ast_expr_op_fdiv_q obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_fdiv_q>();
+}
+
+checked::ast_expr_op_ge check(ast_expr_op_ge obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_ge>();
+}
+
+ast_expr_op_ge uncheck(checked::ast_expr_op_ge obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_ge>();
+}
+
+checked::ast_expr_op_gt check(ast_expr_op_gt obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_gt>();
+}
+
+ast_expr_op_gt uncheck(checked::ast_expr_op_gt obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_gt>();
+}
+
+checked::ast_expr_op_le check(ast_expr_op_le obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_le>();
+}
+
+ast_expr_op_le uncheck(checked::ast_expr_op_le obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_le>();
+}
+
+checked::ast_expr_op_lt check(ast_expr_op_lt obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_lt>();
+}
+
+ast_expr_op_lt uncheck(checked::ast_expr_op_lt obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_lt>();
+}
+
+checked::ast_expr_op_max check(ast_expr_op_max obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_max>();
+}
+
+ast_expr_op_max uncheck(checked::ast_expr_op_max obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_max>();
+}
+
+checked::ast_expr_op_member check(ast_expr_op_member obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_member>();
+}
+
+ast_expr_op_member uncheck(checked::ast_expr_op_member obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_member>();
+}
+
+checked::ast_expr_op_min check(ast_expr_op_min obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_min>();
+}
+
+ast_expr_op_min uncheck(checked::ast_expr_op_min obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_min>();
+}
+
+checked::ast_expr_op_minus check(ast_expr_op_minus obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_minus>();
+}
+
+ast_expr_op_minus uncheck(checked::ast_expr_op_minus obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_minus>();
+}
+
+checked::ast_expr_op_mul check(ast_expr_op_mul obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_mul>();
+}
+
+ast_expr_op_mul uncheck(checked::ast_expr_op_mul obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_mul>();
+}
+
+checked::ast_expr_op_or check(ast_expr_op_or obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_or>();
+}
+
+ast_expr_op_or uncheck(checked::ast_expr_op_or obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_or>();
+}
+
+checked::ast_expr_op_or_else check(ast_expr_op_or_else obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_or_else>();
+}
+
+ast_expr_op_or_else uncheck(checked::ast_expr_op_or_else obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_or_else>();
+}
+
+checked::ast_expr_op_pdiv_q check(ast_expr_op_pdiv_q obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_pdiv_q>();
+}
+
+ast_expr_op_pdiv_q uncheck(checked::ast_expr_op_pdiv_q obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_pdiv_q>();
+}
+
+checked::ast_expr_op_pdiv_r check(ast_expr_op_pdiv_r obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_pdiv_r>();
+}
+
+ast_expr_op_pdiv_r uncheck(checked::ast_expr_op_pdiv_r obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_pdiv_r>();
+}
+
+checked::ast_expr_op_select check(ast_expr_op_select obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_select>();
+}
+
+ast_expr_op_select uncheck(checked::ast_expr_op_select obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_select>();
+}
+
+checked::ast_expr_op_sub check(ast_expr_op_sub obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_sub>();
+}
+
+ast_expr_op_sub uncheck(checked::ast_expr_op_sub obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_sub>();
+}
+
+checked::ast_expr_op_zdiv_r check(ast_expr_op_zdiv_r obj) {
+	return checked::manage(obj.copy()).as<checked::ast_expr_op>().as<checked::ast_expr_op_zdiv_r>();
+}
+
+ast_expr_op_zdiv_r uncheck(checked::ast_expr_op_zdiv_r obj) {
+	return manage(obj.copy()).as<ast_expr_op>().as<ast_expr_op_zdiv_r>();
+}
+
+checked::ast_node check(ast_node obj) {
+	return checked::manage(obj.copy());
+}
+
+ast_node uncheck(checked::ast_node obj) {
+	return manage(obj.copy());
+}
+
+checked::ast_node_block check(ast_node_block obj) {
+	return checked::manage(obj.copy()).as<checked::ast_node_block>();
+}
+
+ast_node_block uncheck(checked::ast_node_block obj) {
+	return manage(obj.copy()).as<ast_node_block>();
+}
+
+checked::ast_node_for check(ast_node_for obj) {
+	return checked::manage(obj.copy()).as<checked::ast_node_for>();
+}
+
+ast_node_for uncheck(checked::ast_node_for obj) {
+	return manage(obj.copy()).as<ast_node_for>();
+}
+
+checked::ast_node_if check(ast_node_if obj) {
+	return checked::manage(obj.copy()).as<checked::ast_node_if>();
+}
+
+ast_node_if uncheck(checked::ast_node_if obj) {
+	return manage(obj.copy()).as<ast_node_if>();
+}
+
+checked::ast_node_list check(ast_node_list obj) {
+	return checked::manage(obj.copy());
+}
+
+ast_node_list uncheck(checked::ast_node_list obj) {
+	return manage(obj.copy());
+}
+
+checked::ast_node_mark check(ast_node_mark obj) {
+	return checked::manage(obj.copy()).as<checked::ast_node_mark>();
+}
+
+ast_node_mark uncheck(checked::ast_node_mark obj) {
+	return manage(obj.copy()).as<ast_node_mark>();
+}
+
+checked::ast_node_user check(ast_node_user obj) {
+	return checked::manage(obj.copy()).as<checked::ast_node_user>();
+}
+
+ast_node_user uncheck(checked::ast_node_user obj) {
+	return manage(obj.copy()).as<ast_node_user>();
+}
+
+checked::basic_map check(basic_map obj) {
+	return checked::manage(obj.copy());
+}
+
+basic_map uncheck(checked::basic_map obj) {
+	return manage(obj.copy());
+}
+
+checked::basic_set check(basic_set obj) {
+	return checked::manage(obj.copy());
+}
+
+basic_set uncheck(checked::basic_set obj) {
+	return manage(obj.copy());
+}
+
+checked::fixed_box check(fixed_box obj) {
+	return checked::manage(obj.copy());
+}
+
+fixed_box uncheck(checked::fixed_box obj) {
+	return manage(obj.copy());
+}
+
+checked::id check(id obj) {
+	return checked::manage(obj.copy());
+}
+
+id uncheck(checked::id obj) {
+	return manage(obj.copy());
+}
+
+checked::id_list check(id_list obj) {
+	return checked::manage(obj.copy());
+}
+
+id_list uncheck(checked::id_list obj) {
+	return manage(obj.copy());
+}
+
+checked::map check(map obj) {
+	return checked::manage(obj.copy());
+}
+
+map uncheck(checked::map obj) {
+	return manage(obj.copy());
+}
+
+checked::multi_aff check(multi_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+multi_aff uncheck(checked::multi_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::multi_id check(multi_id obj) {
+	return checked::manage(obj.copy());
+}
+
+multi_id uncheck(checked::multi_id obj) {
+	return manage(obj.copy());
+}
+
+checked::multi_pw_aff check(multi_pw_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+multi_pw_aff uncheck(checked::multi_pw_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::multi_union_pw_aff check(multi_union_pw_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+multi_union_pw_aff uncheck(checked::multi_union_pw_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::multi_val check(multi_val obj) {
+	return checked::manage(obj.copy());
+}
+
+multi_val uncheck(checked::multi_val obj) {
+	return manage(obj.copy());
+}
+
+checked::point check(point obj) {
+	return checked::manage(obj.copy());
+}
+
+point uncheck(checked::point obj) {
+	return manage(obj.copy());
+}
+
+checked::pw_aff check(pw_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+pw_aff uncheck(checked::pw_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::pw_aff_list check(pw_aff_list obj) {
+	return checked::manage(obj.copy());
+}
+
+pw_aff_list uncheck(checked::pw_aff_list obj) {
+	return manage(obj.copy());
+}
+
+checked::pw_multi_aff check(pw_multi_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+pw_multi_aff uncheck(checked::pw_multi_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::pw_multi_aff_list check(pw_multi_aff_list obj) {
+	return checked::manage(obj.copy());
+}
+
+pw_multi_aff_list uncheck(checked::pw_multi_aff_list obj) {
+	return manage(obj.copy());
+}
+
+checked::schedule check(schedule obj) {
+	return checked::manage(obj.copy());
+}
+
+schedule uncheck(checked::schedule obj) {
+	return manage(obj.copy());
+}
+
+checked::schedule_constraints check(schedule_constraints obj) {
+	return checked::manage(obj.copy());
+}
+
+schedule_constraints uncheck(checked::schedule_constraints obj) {
+	return manage(obj.copy());
+}
+
+checked::schedule_node check(schedule_node obj) {
+	return checked::manage(obj.copy());
+}
+
+schedule_node uncheck(checked::schedule_node obj) {
+	return manage(obj.copy());
+}
+
+checked::schedule_node_band check(schedule_node_band obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_band>();
+}
+
+schedule_node_band uncheck(checked::schedule_node_band obj) {
+	return manage(obj.copy()).as<schedule_node_band>();
+}
+
+checked::schedule_node_context check(schedule_node_context obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_context>();
+}
+
+schedule_node_context uncheck(checked::schedule_node_context obj) {
+	return manage(obj.copy()).as<schedule_node_context>();
+}
+
+checked::schedule_node_domain check(schedule_node_domain obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_domain>();
+}
+
+schedule_node_domain uncheck(checked::schedule_node_domain obj) {
+	return manage(obj.copy()).as<schedule_node_domain>();
+}
+
+checked::schedule_node_expansion check(schedule_node_expansion obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_expansion>();
+}
+
+schedule_node_expansion uncheck(checked::schedule_node_expansion obj) {
+	return manage(obj.copy()).as<schedule_node_expansion>();
+}
+
+checked::schedule_node_extension check(schedule_node_extension obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_extension>();
+}
+
+schedule_node_extension uncheck(checked::schedule_node_extension obj) {
+	return manage(obj.copy()).as<schedule_node_extension>();
+}
+
+checked::schedule_node_filter check(schedule_node_filter obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_filter>();
+}
+
+schedule_node_filter uncheck(checked::schedule_node_filter obj) {
+	return manage(obj.copy()).as<schedule_node_filter>();
+}
+
+checked::schedule_node_guard check(schedule_node_guard obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_guard>();
+}
+
+schedule_node_guard uncheck(checked::schedule_node_guard obj) {
+	return manage(obj.copy()).as<schedule_node_guard>();
+}
+
+checked::schedule_node_leaf check(schedule_node_leaf obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_leaf>();
+}
+
+schedule_node_leaf uncheck(checked::schedule_node_leaf obj) {
+	return manage(obj.copy()).as<schedule_node_leaf>();
+}
+
+checked::schedule_node_mark check(schedule_node_mark obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_mark>();
+}
+
+schedule_node_mark uncheck(checked::schedule_node_mark obj) {
+	return manage(obj.copy()).as<schedule_node_mark>();
+}
+
+checked::schedule_node_sequence check(schedule_node_sequence obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_sequence>();
+}
+
+schedule_node_sequence uncheck(checked::schedule_node_sequence obj) {
+	return manage(obj.copy()).as<schedule_node_sequence>();
+}
+
+checked::schedule_node_set check(schedule_node_set obj) {
+	return checked::manage(obj.copy()).as<checked::schedule_node_set>();
+}
+
+schedule_node_set uncheck(checked::schedule_node_set obj) {
+	return manage(obj.copy()).as<schedule_node_set>();
+}
+
+checked::set check(set obj) {
+	return checked::manage(obj.copy());
+}
+
+set uncheck(checked::set obj) {
+	return manage(obj.copy());
+}
+
+checked::space check(space obj) {
+	return checked::manage(obj.copy());
+}
+
+space uncheck(checked::space obj) {
+	return manage(obj.copy());
+}
+
+checked::union_access_info check(union_access_info obj) {
+	return checked::manage(obj.copy());
+}
+
+union_access_info uncheck(checked::union_access_info obj) {
+	return manage(obj.copy());
+}
+
+checked::union_flow check(union_flow obj) {
+	return checked::manage(obj.copy());
+}
+
+union_flow uncheck(checked::union_flow obj) {
+	return manage(obj.copy());
+}
+
+checked::union_map check(union_map obj) {
+	return checked::manage(obj.copy());
+}
+
+union_map uncheck(checked::union_map obj) {
+	return manage(obj.copy());
+}
+
+checked::union_pw_aff check(union_pw_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+union_pw_aff uncheck(checked::union_pw_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::union_pw_aff_list check(union_pw_aff_list obj) {
+	return checked::manage(obj.copy());
+}
+
+union_pw_aff_list uncheck(checked::union_pw_aff_list obj) {
+	return manage(obj.copy());
+}
+
+checked::union_pw_multi_aff check(union_pw_multi_aff obj) {
+	return checked::manage(obj.copy());
+}
+
+union_pw_multi_aff uncheck(checked::union_pw_multi_aff obj) {
+	return manage(obj.copy());
+}
+
+checked::union_set check(union_set obj) {
+	return checked::manage(obj.copy());
+}
+
+union_set uncheck(checked::union_set obj) {
+	return manage(obj.copy());
+}
+
+checked::union_set_list check(union_set_list obj) {
+	return checked::manage(obj.copy());
+}
+
+union_set_list uncheck(checked::union_set_list obj) {
+	return manage(obj.copy());
+}
+
+checked::val check(val obj) {
+	return checked::manage(obj.copy());
+}
+
+val uncheck(checked::val obj) {
+	return manage(obj.copy());
+}
+
+checked::val_list check(val_list obj) {
+	return checked::manage(obj.copy());
+}
+
+val_list uncheck(checked::val_list obj) {
+	return manage(obj.copy());
+}
+
+} // namespace isl
+
+#endif /* ISL_CPP_CHECKED_CONVERSION */
diff --git a/linux-x64/clang/include/polly/isl/cpp-checked.h b/linux-x64/clang/include/polly/isl/cpp-checked.h
new file mode 100644
index 0000000..4c3586d
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/cpp-checked.h
@@ -0,0 +1,13280 @@
+/// These are automatically generated checked C++ bindings for isl.
+///
+/// isl is a library for computing with integer sets and maps described by
+/// Presburger formulas. On top of this, isl provides various tools for
+/// polyhedral compilation, ranging from dependence analysis over scheduling
+/// to AST generation.
+
+#ifndef ISL_CPP_CHECKED
+#define ISL_CPP_CHECKED
+
+#include <isl/id.h>
+#include <isl/space.h>
+#include <isl/val.h>
+#include <isl/aff.h>
+#include <isl/set.h>
+#include <isl/map.h>
+#include <isl/ilp.h>
+#include <isl/union_set.h>
+#include <isl/union_map.h>
+#include <isl/flow.h>
+#include <isl/schedule.h>
+#include <isl/schedule_node.h>
+#include <isl/ast_build.h>
+#include <isl/fixed_box.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <functional>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <type_traits>
+
+namespace isl {
+namespace checked {
+
+#define ISLPP_STRINGIZE_(X) #X
+#define ISLPP_STRINGIZE(X) ISLPP_STRINGIZE_(X)
+
+#define ISLPP_ASSERT(test, message)                          \
+  do {                                                       \
+    if (test)                                                \
+      break;                                                 \
+    fputs("Assertion \"" #test "\" failed at " __FILE__      \
+      ":" ISLPP_STRINGIZE(__LINE__) "\n  " message "\n",     \
+      stderr);                                               \
+    abort();                                                 \
+  } while (0)
+
+/* Class used to check that isl::checked::boolean,
+ * isl::checked::stat and isl::checked::size values are checked for errors.
+ */
+struct checker {
+	bool checked = false;
+	~checker() {
+		ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
+	}
+};
+
+class boolean {
+private:
+  mutable std::shared_ptr<checker> check = std::make_shared<checker>();
+  isl_bool val;
+
+  friend boolean manage(isl_bool val);
+  boolean(isl_bool val): val(val) {}
+public:
+  static boolean error() {
+    return boolean(isl_bool_error);
+  }
+  boolean()
+      : val(isl_bool_error) {}
+
+  /* implicit */ boolean(bool val)
+      : val(val ? isl_bool_true : isl_bool_false) {}
+
+  isl_bool release() {
+    auto tmp = val;
+    val = isl_bool_error;
+    check->checked = true;
+    return tmp;
+  }
+
+  bool is_error() const { check->checked = true; return val == isl_bool_error; }
+  bool is_false() const { check->checked = true; return val == isl_bool_false; }
+  bool is_true() const { check->checked = true; return val == isl_bool_true; }
+
+  explicit operator bool() const {
+    ISLPP_ASSERT(check->checked, "IMPLEMENTATION ERROR: Unchecked error state");
+    ISLPP_ASSERT(!is_error(), "IMPLEMENTATION ERROR: Unhandled error state");
+    return is_true();
+  }
+
+  boolean negate() {
+    if (val == isl_bool_true)
+      val = isl_bool_false;
+    else if (val == isl_bool_false)
+      val = isl_bool_true;
+    return *this;
+  }
+
+  boolean operator!() const {
+    return boolean(*this).negate();
+  }
+};
+
+inline boolean manage(isl_bool val) {
+  return boolean(val);
+}
+
+class ctx {
+  isl_ctx *ptr;
+public:
+  /* implicit */ ctx(isl_ctx *ctx)
+      : ptr(ctx) {}
+  isl_ctx *release() {
+    auto tmp = ptr;
+    ptr = nullptr;
+    return tmp;
+  }
+  isl_ctx *get() {
+    return ptr;
+  }
+};
+
+/* Class encapsulating an isl_stat value.
+ */
+class stat {
+private:
+	mutable std::shared_ptr<checker> check = std::make_shared<checker>();
+	isl_stat val;
+
+	friend stat manage(isl_stat val);
+	stat(isl_stat val) : val(val) {}
+public:
+	static stat ok() {
+		return stat(isl_stat_ok);
+	}
+	static stat error() {
+		return stat(isl_stat_error);
+	}
+	stat() : val(isl_stat_error) {}
+
+	isl_stat release() {
+		check->checked = true;
+		return val;
+	}
+
+	bool is_error() const {
+		check->checked = true;
+		return val == isl_stat_error;
+	}
+	bool is_ok() const {
+		check->checked = true;
+		return val == isl_stat_ok;
+	}
+};
+
+inline stat manage(isl_stat val)
+{
+	return stat(val);
+}
+
+/* Class encapsulating an isl_size value.
+ */
+class size {
+private:
+	mutable std::shared_ptr<checker> check = std::make_shared<checker>();
+	isl_size val;
+
+	friend size manage(isl_size val);
+	size(isl_size val) : val(val) {}
+public:
+	size() : val(isl_size_error) {}
+
+	isl_size release() {
+		auto tmp = val;
+		val = isl_size_error;
+		check->checked = true;
+		return tmp;
+	}
+
+	bool is_error() const {
+		check->checked = true;
+		return val == isl_size_error;
+	}
+
+	explicit operator unsigned() const {
+		ISLPP_ASSERT(check->checked,
+			    "IMPLEMENTATION ERROR: Unchecked error state");
+		ISLPP_ASSERT(!is_error(),
+			    "IMPLEMENTATION ERROR: Unhandled error state");
+		return val;
+	}
+};
+
+inline size manage(isl_size val)
+{
+	return size(val);
+}
+
+}
+} // namespace isl
+
+namespace isl {
+
+namespace checked {
+
+// forward declarations
+class aff;
+class aff_list;
+class ast_build;
+class ast_expr;
+class ast_expr_id;
+class ast_expr_int;
+class ast_expr_op;
+class ast_expr_op_access;
+class ast_expr_op_add;
+class ast_expr_op_address_of;
+class ast_expr_op_and;
+class ast_expr_op_and_then;
+class ast_expr_op_call;
+class ast_expr_op_cond;
+class ast_expr_op_div;
+class ast_expr_op_eq;
+class ast_expr_op_fdiv_q;
+class ast_expr_op_ge;
+class ast_expr_op_gt;
+class ast_expr_op_le;
+class ast_expr_op_lt;
+class ast_expr_op_max;
+class ast_expr_op_member;
+class ast_expr_op_min;
+class ast_expr_op_minus;
+class ast_expr_op_mul;
+class ast_expr_op_or;
+class ast_expr_op_or_else;
+class ast_expr_op_pdiv_q;
+class ast_expr_op_pdiv_r;
+class ast_expr_op_select;
+class ast_expr_op_sub;
+class ast_expr_op_zdiv_r;
+class ast_node;
+class ast_node_block;
+class ast_node_for;
+class ast_node_if;
+class ast_node_list;
+class ast_node_mark;
+class ast_node_user;
+class basic_map;
+class basic_set;
+class fixed_box;
+class id;
+class id_list;
+class map;
+class multi_aff;
+class multi_id;
+class multi_pw_aff;
+class multi_union_pw_aff;
+class multi_val;
+class point;
+class pw_aff;
+class pw_aff_list;
+class pw_multi_aff;
+class pw_multi_aff_list;
+class schedule;
+class schedule_constraints;
+class schedule_node;
+class schedule_node_band;
+class schedule_node_context;
+class schedule_node_domain;
+class schedule_node_expansion;
+class schedule_node_extension;
+class schedule_node_filter;
+class schedule_node_guard;
+class schedule_node_leaf;
+class schedule_node_mark;
+class schedule_node_sequence;
+class schedule_node_set;
+class set;
+class space;
+class union_access_info;
+class union_flow;
+class union_map;
+class union_pw_aff;
+class union_pw_aff_list;
+class union_pw_multi_aff;
+class union_set;
+class union_set_list;
+class val;
+class val_list;
+
+// declarations for isl::aff
+inline aff manage(__isl_take isl_aff *ptr);
+inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+class aff {
+  friend inline aff manage(__isl_take isl_aff *ptr);
+  friend inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+protected:
+  isl_aff *ptr = nullptr;
+
+  inline explicit aff(__isl_take isl_aff *ptr);
+
+public:
+  inline /* implicit */ aff();
+  inline /* implicit */ aff(const aff &obj);
+  inline explicit aff(isl::checked::ctx ctx, const std::string &str);
+  inline aff &operator=(aff obj);
+  inline ~aff();
+  inline __isl_give isl_aff *copy() const &;
+  inline __isl_give isl_aff *copy() && = delete;
+  inline __isl_keep isl_aff *get() const;
+  inline __isl_give isl_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::aff add(isl::checked::aff aff2) const;
+  inline isl::checked::aff add_constant(isl::checked::val v) const;
+  inline isl::checked::aff add_constant(long v) const;
+  inline isl::checked::basic_set bind(isl::checked::id id) const;
+  inline isl::checked::basic_set bind(const std::string &id) const;
+  inline isl::checked::aff ceil() const;
+  inline isl::checked::aff div(isl::checked::aff aff2) const;
+  inline isl::checked::set eq_set(isl::checked::aff aff2) const;
+  inline isl::checked::val eval(isl::checked::point pnt) const;
+  inline isl::checked::aff floor() const;
+  inline isl::checked::set ge_set(isl::checked::aff aff2) const;
+  inline isl::checked::aff gist(isl::checked::set context) const;
+  inline isl::checked::set gt_set(isl::checked::aff aff2) const;
+  inline isl::checked::set le_set(isl::checked::aff aff2) const;
+  inline isl::checked::set lt_set(isl::checked::aff aff2) const;
+  inline isl::checked::aff mod(isl::checked::val mod) const;
+  inline isl::checked::aff mod(long mod) const;
+  inline isl::checked::aff mul(isl::checked::aff aff2) const;
+  inline isl::checked::set ne_set(isl::checked::aff aff2) const;
+  inline isl::checked::aff neg() const;
+  inline isl::checked::aff pullback(isl::checked::multi_aff ma) const;
+  inline isl::checked::aff scale(isl::checked::val v) const;
+  inline isl::checked::aff scale(long v) const;
+  inline isl::checked::aff scale_down(isl::checked::val v) const;
+  inline isl::checked::aff scale_down(long v) const;
+  inline isl::checked::aff sub(isl::checked::aff aff2) const;
+  inline isl::checked::aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
+  static inline isl::checked::aff zero_on_domain(isl::checked::space space);
+};
+
+// declarations for isl::aff_list
+inline aff_list manage(__isl_take isl_aff_list *ptr);
+inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+class aff_list {
+  friend inline aff_list manage(__isl_take isl_aff_list *ptr);
+  friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+protected:
+  isl_aff_list *ptr = nullptr;
+
+  inline explicit aff_list(__isl_take isl_aff_list *ptr);
+
+public:
+  inline /* implicit */ aff_list();
+  inline /* implicit */ aff_list(const aff_list &obj);
+  inline explicit aff_list(isl::checked::ctx ctx, int n);
+  inline explicit aff_list(isl::checked::aff el);
+  inline aff_list &operator=(aff_list obj);
+  inline ~aff_list();
+  inline __isl_give isl_aff_list *copy() const &;
+  inline __isl_give isl_aff_list *copy() && = delete;
+  inline __isl_keep isl_aff_list *get() const;
+  inline __isl_give isl_aff_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::aff_list add(isl::checked::aff el) const;
+  inline isl::checked::aff_list clear() const;
+  inline isl::checked::aff_list concat(isl::checked::aff_list list2) const;
+  inline isl::checked::aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::aff)> &fn) const;
+  inline isl::checked::aff at(int index) const;
+  inline isl::checked::aff get_at(int index) const;
+  inline isl::checked::aff_list insert(unsigned int pos, isl::checked::aff el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::ast_build
+inline ast_build manage(__isl_take isl_ast_build *ptr);
+inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+class ast_build {
+  friend inline ast_build manage(__isl_take isl_ast_build *ptr);
+  friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+protected:
+  isl_ast_build *ptr = nullptr;
+
+  inline explicit ast_build(__isl_take isl_ast_build *ptr);
+
+public:
+  inline /* implicit */ ast_build();
+  inline /* implicit */ ast_build(const ast_build &obj);
+  inline explicit ast_build(isl::checked::ctx ctx);
+  inline ast_build &operator=(ast_build obj);
+  inline ~ast_build();
+  inline __isl_give isl_ast_build *copy() const &;
+  inline __isl_give isl_ast_build *copy() && = delete;
+  inline __isl_keep isl_ast_build *get() const;
+  inline __isl_give isl_ast_build *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+private:
+  inline ast_build &copy_callbacks(const ast_build &obj);
+  struct at_each_domain_data {
+    std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> func;
+  };
+  std::shared_ptr<at_each_domain_data> at_each_domain_data;
+  static inline isl_ast_node *at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2);
+  inline void set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn);
+public:
+  inline isl::checked::ast_build set_at_each_domain(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn) const;
+  inline isl::checked::ast_expr access_from(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::ast_expr access_from(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::ast_expr call_from(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::ast_expr call_from(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::ast_expr expr_from(isl::checked::pw_aff pa) const;
+  inline isl::checked::ast_expr expr_from(isl::checked::set set) const;
+  static inline isl::checked::ast_build from_context(isl::checked::set set);
+  inline isl::checked::union_map schedule() const;
+  inline isl::checked::union_map get_schedule() const;
+  inline isl::checked::ast_node node_from(isl::checked::schedule schedule) const;
+  inline isl::checked::ast_node node_from_schedule_map(isl::checked::union_map schedule) const;
+};
+
+// declarations for isl::ast_expr
+inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+class ast_expr {
+  friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+  friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+protected:
+  isl_ast_expr *ptr = nullptr;
+
+  inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr();
+  inline /* implicit */ ast_expr(const ast_expr &obj);
+  inline ast_expr &operator=(ast_expr obj);
+  inline ~ast_expr();
+  inline __isl_give isl_ast_expr *copy() const &;
+  inline __isl_give isl_ast_expr *copy() && = delete;
+  inline __isl_keep isl_ast_expr *get() const;
+  inline __isl_give isl_ast_expr *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_expr_get_type(NULL)),
+                  const T>::value>::type>
+  inline boolean isa_type(T subtype) const;
+public:
+  template <class T> inline boolean isa() const;
+  template <class T> inline T as() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline std::string to_C_str() const;
+};
+
+// declarations for isl::ast_expr_id
+
+class ast_expr_id : public ast_expr {
+  template <class T>
+  friend boolean ast_expr::isa() const;
+  friend ast_expr_id ast_expr::as<ast_expr_id>() const;
+  static const auto type = isl_ast_expr_id;
+
+protected:
+  inline explicit ast_expr_id(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_id();
+  inline /* implicit */ ast_expr_id(const ast_expr_id &obj);
+  inline ast_expr_id &operator=(ast_expr_id obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::id id() const;
+  inline isl::checked::id get_id() const;
+};
+
+// declarations for isl::ast_expr_int
+
+class ast_expr_int : public ast_expr {
+  template <class T>
+  friend boolean ast_expr::isa() const;
+  friend ast_expr_int ast_expr::as<ast_expr_int>() const;
+  static const auto type = isl_ast_expr_int;
+
+protected:
+  inline explicit ast_expr_int(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_int();
+  inline /* implicit */ ast_expr_int(const ast_expr_int &obj);
+  inline ast_expr_int &operator=(ast_expr_int obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::val val() const;
+  inline isl::checked::val get_val() const;
+};
+
+// declarations for isl::ast_expr_op
+
+class ast_expr_op : public ast_expr {
+  template <class T>
+  friend boolean ast_expr::isa() const;
+  friend ast_expr_op ast_expr::as<ast_expr_op>() const;
+  static const auto type = isl_ast_expr_op;
+
+protected:
+  inline explicit ast_expr_op(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op();
+  inline /* implicit */ ast_expr_op(const ast_expr_op &obj);
+  inline ast_expr_op &operator=(ast_expr_op obj);
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_expr_op_get_type(NULL)),
+                  const T>::value>::type>
+  inline boolean isa_type(T subtype) const;
+public:
+  template <class T> inline boolean isa() const;
+  template <class T> inline T as() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_expr arg(int pos) const;
+  inline isl::checked::ast_expr get_arg(int pos) const;
+  inline class size n_arg() const;
+  inline class size get_n_arg() const;
+};
+
+// declarations for isl::ast_expr_op_access
+
+class ast_expr_op_access : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_access ast_expr_op::as<ast_expr_op_access>() const;
+  static const auto type = isl_ast_expr_op_access;
+
+protected:
+  inline explicit ast_expr_op_access(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_access();
+  inline /* implicit */ ast_expr_op_access(const ast_expr_op_access &obj);
+  inline ast_expr_op_access &operator=(ast_expr_op_access obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_add
+
+class ast_expr_op_add : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_add ast_expr_op::as<ast_expr_op_add>() const;
+  static const auto type = isl_ast_expr_op_add;
+
+protected:
+  inline explicit ast_expr_op_add(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_add();
+  inline /* implicit */ ast_expr_op_add(const ast_expr_op_add &obj);
+  inline ast_expr_op_add &operator=(ast_expr_op_add obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_address_of
+
+class ast_expr_op_address_of : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_address_of ast_expr_op::as<ast_expr_op_address_of>() const;
+  static const auto type = isl_ast_expr_op_address_of;
+
+protected:
+  inline explicit ast_expr_op_address_of(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_address_of();
+  inline /* implicit */ ast_expr_op_address_of(const ast_expr_op_address_of &obj);
+  inline ast_expr_op_address_of &operator=(ast_expr_op_address_of obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_and
+
+class ast_expr_op_and : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_and ast_expr_op::as<ast_expr_op_and>() const;
+  static const auto type = isl_ast_expr_op_and;
+
+protected:
+  inline explicit ast_expr_op_and(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_and();
+  inline /* implicit */ ast_expr_op_and(const ast_expr_op_and &obj);
+  inline ast_expr_op_and &operator=(ast_expr_op_and obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_and_then
+
+class ast_expr_op_and_then : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_and_then ast_expr_op::as<ast_expr_op_and_then>() const;
+  static const auto type = isl_ast_expr_op_and_then;
+
+protected:
+  inline explicit ast_expr_op_and_then(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_and_then();
+  inline /* implicit */ ast_expr_op_and_then(const ast_expr_op_and_then &obj);
+  inline ast_expr_op_and_then &operator=(ast_expr_op_and_then obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_call
+
+class ast_expr_op_call : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_call ast_expr_op::as<ast_expr_op_call>() const;
+  static const auto type = isl_ast_expr_op_call;
+
+protected:
+  inline explicit ast_expr_op_call(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_call();
+  inline /* implicit */ ast_expr_op_call(const ast_expr_op_call &obj);
+  inline ast_expr_op_call &operator=(ast_expr_op_call obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_cond
+
+class ast_expr_op_cond : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_cond ast_expr_op::as<ast_expr_op_cond>() const;
+  static const auto type = isl_ast_expr_op_cond;
+
+protected:
+  inline explicit ast_expr_op_cond(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_cond();
+  inline /* implicit */ ast_expr_op_cond(const ast_expr_op_cond &obj);
+  inline ast_expr_op_cond &operator=(ast_expr_op_cond obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_div
+
+class ast_expr_op_div : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_div ast_expr_op::as<ast_expr_op_div>() const;
+  static const auto type = isl_ast_expr_op_div;
+
+protected:
+  inline explicit ast_expr_op_div(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_div();
+  inline /* implicit */ ast_expr_op_div(const ast_expr_op_div &obj);
+  inline ast_expr_op_div &operator=(ast_expr_op_div obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_eq
+
+class ast_expr_op_eq : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_eq ast_expr_op::as<ast_expr_op_eq>() const;
+  static const auto type = isl_ast_expr_op_eq;
+
+protected:
+  inline explicit ast_expr_op_eq(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_eq();
+  inline /* implicit */ ast_expr_op_eq(const ast_expr_op_eq &obj);
+  inline ast_expr_op_eq &operator=(ast_expr_op_eq obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_fdiv_q
+
+class ast_expr_op_fdiv_q : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_fdiv_q ast_expr_op::as<ast_expr_op_fdiv_q>() const;
+  static const auto type = isl_ast_expr_op_fdiv_q;
+
+protected:
+  inline explicit ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_fdiv_q();
+  inline /* implicit */ ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj);
+  inline ast_expr_op_fdiv_q &operator=(ast_expr_op_fdiv_q obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_ge
+
+class ast_expr_op_ge : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_ge ast_expr_op::as<ast_expr_op_ge>() const;
+  static const auto type = isl_ast_expr_op_ge;
+
+protected:
+  inline explicit ast_expr_op_ge(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_ge();
+  inline /* implicit */ ast_expr_op_ge(const ast_expr_op_ge &obj);
+  inline ast_expr_op_ge &operator=(ast_expr_op_ge obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_gt
+
+class ast_expr_op_gt : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_gt ast_expr_op::as<ast_expr_op_gt>() const;
+  static const auto type = isl_ast_expr_op_gt;
+
+protected:
+  inline explicit ast_expr_op_gt(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_gt();
+  inline /* implicit */ ast_expr_op_gt(const ast_expr_op_gt &obj);
+  inline ast_expr_op_gt &operator=(ast_expr_op_gt obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_le
+
+class ast_expr_op_le : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_le ast_expr_op::as<ast_expr_op_le>() const;
+  static const auto type = isl_ast_expr_op_le;
+
+protected:
+  inline explicit ast_expr_op_le(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_le();
+  inline /* implicit */ ast_expr_op_le(const ast_expr_op_le &obj);
+  inline ast_expr_op_le &operator=(ast_expr_op_le obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_lt
+
+class ast_expr_op_lt : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_lt ast_expr_op::as<ast_expr_op_lt>() const;
+  static const auto type = isl_ast_expr_op_lt;
+
+protected:
+  inline explicit ast_expr_op_lt(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_lt();
+  inline /* implicit */ ast_expr_op_lt(const ast_expr_op_lt &obj);
+  inline ast_expr_op_lt &operator=(ast_expr_op_lt obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_max
+
+class ast_expr_op_max : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_max ast_expr_op::as<ast_expr_op_max>() const;
+  static const auto type = isl_ast_expr_op_max;
+
+protected:
+  inline explicit ast_expr_op_max(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_max();
+  inline /* implicit */ ast_expr_op_max(const ast_expr_op_max &obj);
+  inline ast_expr_op_max &operator=(ast_expr_op_max obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_member
+
+class ast_expr_op_member : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_member ast_expr_op::as<ast_expr_op_member>() const;
+  static const auto type = isl_ast_expr_op_member;
+
+protected:
+  inline explicit ast_expr_op_member(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_member();
+  inline /* implicit */ ast_expr_op_member(const ast_expr_op_member &obj);
+  inline ast_expr_op_member &operator=(ast_expr_op_member obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_min
+
+class ast_expr_op_min : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_min ast_expr_op::as<ast_expr_op_min>() const;
+  static const auto type = isl_ast_expr_op_min;
+
+protected:
+  inline explicit ast_expr_op_min(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_min();
+  inline /* implicit */ ast_expr_op_min(const ast_expr_op_min &obj);
+  inline ast_expr_op_min &operator=(ast_expr_op_min obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_minus
+
+class ast_expr_op_minus : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_minus ast_expr_op::as<ast_expr_op_minus>() const;
+  static const auto type = isl_ast_expr_op_minus;
+
+protected:
+  inline explicit ast_expr_op_minus(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_minus();
+  inline /* implicit */ ast_expr_op_minus(const ast_expr_op_minus &obj);
+  inline ast_expr_op_minus &operator=(ast_expr_op_minus obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_mul
+
+class ast_expr_op_mul : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_mul ast_expr_op::as<ast_expr_op_mul>() const;
+  static const auto type = isl_ast_expr_op_mul;
+
+protected:
+  inline explicit ast_expr_op_mul(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_mul();
+  inline /* implicit */ ast_expr_op_mul(const ast_expr_op_mul &obj);
+  inline ast_expr_op_mul &operator=(ast_expr_op_mul obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_or
+
+class ast_expr_op_or : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_or ast_expr_op::as<ast_expr_op_or>() const;
+  static const auto type = isl_ast_expr_op_or;
+
+protected:
+  inline explicit ast_expr_op_or(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_or();
+  inline /* implicit */ ast_expr_op_or(const ast_expr_op_or &obj);
+  inline ast_expr_op_or &operator=(ast_expr_op_or obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_or_else
+
+class ast_expr_op_or_else : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_or_else ast_expr_op::as<ast_expr_op_or_else>() const;
+  static const auto type = isl_ast_expr_op_or_else;
+
+protected:
+  inline explicit ast_expr_op_or_else(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_or_else();
+  inline /* implicit */ ast_expr_op_or_else(const ast_expr_op_or_else &obj);
+  inline ast_expr_op_or_else &operator=(ast_expr_op_or_else obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_pdiv_q
+
+class ast_expr_op_pdiv_q : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_pdiv_q ast_expr_op::as<ast_expr_op_pdiv_q>() const;
+  static const auto type = isl_ast_expr_op_pdiv_q;
+
+protected:
+  inline explicit ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_pdiv_q();
+  inline /* implicit */ ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj);
+  inline ast_expr_op_pdiv_q &operator=(ast_expr_op_pdiv_q obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_pdiv_r
+
+class ast_expr_op_pdiv_r : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_pdiv_r ast_expr_op::as<ast_expr_op_pdiv_r>() const;
+  static const auto type = isl_ast_expr_op_pdiv_r;
+
+protected:
+  inline explicit ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_pdiv_r();
+  inline /* implicit */ ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj);
+  inline ast_expr_op_pdiv_r &operator=(ast_expr_op_pdiv_r obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_select
+
+class ast_expr_op_select : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_select ast_expr_op::as<ast_expr_op_select>() const;
+  static const auto type = isl_ast_expr_op_select;
+
+protected:
+  inline explicit ast_expr_op_select(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_select();
+  inline /* implicit */ ast_expr_op_select(const ast_expr_op_select &obj);
+  inline ast_expr_op_select &operator=(ast_expr_op_select obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_sub
+
+class ast_expr_op_sub : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_sub ast_expr_op::as<ast_expr_op_sub>() const;
+  static const auto type = isl_ast_expr_op_sub;
+
+protected:
+  inline explicit ast_expr_op_sub(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_sub();
+  inline /* implicit */ ast_expr_op_sub(const ast_expr_op_sub &obj);
+  inline ast_expr_op_sub &operator=(ast_expr_op_sub obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_zdiv_r
+
+class ast_expr_op_zdiv_r : public ast_expr_op {
+  template <class T>
+  friend boolean ast_expr_op::isa() const;
+  friend ast_expr_op_zdiv_r ast_expr_op::as<ast_expr_op_zdiv_r>() const;
+  static const auto type = isl_ast_expr_op_zdiv_r;
+
+protected:
+  inline explicit ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_zdiv_r();
+  inline /* implicit */ ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj);
+  inline ast_expr_op_zdiv_r &operator=(ast_expr_op_zdiv_r obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_node
+inline ast_node manage(__isl_take isl_ast_node *ptr);
+inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+class ast_node {
+  friend inline ast_node manage(__isl_take isl_ast_node *ptr);
+  friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+protected:
+  isl_ast_node *ptr = nullptr;
+
+  inline explicit ast_node(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node();
+  inline /* implicit */ ast_node(const ast_node &obj);
+  inline ast_node &operator=(ast_node obj);
+  inline ~ast_node();
+  inline __isl_give isl_ast_node *copy() const &;
+  inline __isl_give isl_ast_node *copy() && = delete;
+  inline __isl_keep isl_ast_node *get() const;
+  inline __isl_give isl_ast_node *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_node_get_type(NULL)),
+                  const T>::value>::type>
+  inline boolean isa_type(T subtype) const;
+public:
+  template <class T> inline boolean isa() const;
+  template <class T> inline T as() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline std::string to_C_str() const;
+};
+
+// declarations for isl::ast_node_block
+
+class ast_node_block : public ast_node {
+  template <class T>
+  friend boolean ast_node::isa() const;
+  friend ast_node_block ast_node::as<ast_node_block>() const;
+  static const auto type = isl_ast_node_block;
+
+protected:
+  inline explicit ast_node_block(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_block();
+  inline /* implicit */ ast_node_block(const ast_node_block &obj);
+  inline ast_node_block &operator=(ast_node_block obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_node_list children() const;
+  inline isl::checked::ast_node_list get_children() const;
+};
+
+// declarations for isl::ast_node_for
+
+class ast_node_for : public ast_node {
+  template <class T>
+  friend boolean ast_node::isa() const;
+  friend ast_node_for ast_node::as<ast_node_for>() const;
+  static const auto type = isl_ast_node_for;
+
+protected:
+  inline explicit ast_node_for(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_for();
+  inline /* implicit */ ast_node_for(const ast_node_for &obj);
+  inline ast_node_for &operator=(ast_node_for obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_node body() const;
+  inline isl::checked::ast_node get_body() const;
+  inline isl::checked::ast_expr cond() const;
+  inline isl::checked::ast_expr get_cond() const;
+  inline isl::checked::ast_expr inc() const;
+  inline isl::checked::ast_expr get_inc() const;
+  inline isl::checked::ast_expr init() const;
+  inline isl::checked::ast_expr get_init() const;
+  inline isl::checked::ast_expr iterator() const;
+  inline isl::checked::ast_expr get_iterator() const;
+  inline boolean is_degenerate() const;
+};
+
+// declarations for isl::ast_node_if
+
+class ast_node_if : public ast_node {
+  template <class T>
+  friend boolean ast_node::isa() const;
+  friend ast_node_if ast_node::as<ast_node_if>() const;
+  static const auto type = isl_ast_node_if;
+
+protected:
+  inline explicit ast_node_if(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_if();
+  inline /* implicit */ ast_node_if(const ast_node_if &obj);
+  inline ast_node_if &operator=(ast_node_if obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_expr cond() const;
+  inline isl::checked::ast_expr get_cond() const;
+  inline isl::checked::ast_node else_node() const;
+  inline isl::checked::ast_node get_else_node() const;
+  inline isl::checked::ast_node then_node() const;
+  inline isl::checked::ast_node get_then_node() const;
+  inline boolean has_else_node() const;
+};
+
+// declarations for isl::ast_node_list
+inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+class ast_node_list {
+  friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+  friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+protected:
+  isl_ast_node_list *ptr = nullptr;
+
+  inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
+
+public:
+  inline /* implicit */ ast_node_list();
+  inline /* implicit */ ast_node_list(const ast_node_list &obj);
+  inline explicit ast_node_list(isl::checked::ctx ctx, int n);
+  inline explicit ast_node_list(isl::checked::ast_node el);
+  inline ast_node_list &operator=(ast_node_list obj);
+  inline ~ast_node_list();
+  inline __isl_give isl_ast_node_list *copy() const &;
+  inline __isl_give isl_ast_node_list *copy() && = delete;
+  inline __isl_keep isl_ast_node_list *get() const;
+  inline __isl_give isl_ast_node_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_node_list add(isl::checked::ast_node el) const;
+  inline isl::checked::ast_node_list clear() const;
+  inline isl::checked::ast_node_list concat(isl::checked::ast_node_list list2) const;
+  inline isl::checked::ast_node_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::ast_node)> &fn) const;
+  inline isl::checked::ast_node at(int index) const;
+  inline isl::checked::ast_node get_at(int index) const;
+  inline isl::checked::ast_node_list insert(unsigned int pos, isl::checked::ast_node el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::ast_node_mark
+
+class ast_node_mark : public ast_node {
+  template <class T>
+  friend boolean ast_node::isa() const;
+  friend ast_node_mark ast_node::as<ast_node_mark>() const;
+  static const auto type = isl_ast_node_mark;
+
+protected:
+  inline explicit ast_node_mark(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_mark();
+  inline /* implicit */ ast_node_mark(const ast_node_mark &obj);
+  inline ast_node_mark &operator=(ast_node_mark obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::id id() const;
+  inline isl::checked::id get_id() const;
+  inline isl::checked::ast_node node() const;
+  inline isl::checked::ast_node get_node() const;
+};
+
+// declarations for isl::ast_node_user
+
+class ast_node_user : public ast_node {
+  template <class T>
+  friend boolean ast_node::isa() const;
+  friend ast_node_user ast_node::as<ast_node_user>() const;
+  static const auto type = isl_ast_node_user;
+
+protected:
+  inline explicit ast_node_user(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_user();
+  inline /* implicit */ ast_node_user(const ast_node_user &obj);
+  inline ast_node_user &operator=(ast_node_user obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::ast_expr expr() const;
+  inline isl::checked::ast_expr get_expr() const;
+};
+
+// declarations for isl::basic_map
+inline basic_map manage(__isl_take isl_basic_map *ptr);
+inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+class basic_map {
+  friend inline basic_map manage(__isl_take isl_basic_map *ptr);
+  friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+protected:
+  isl_basic_map *ptr = nullptr;
+
+  inline explicit basic_map(__isl_take isl_basic_map *ptr);
+
+public:
+  inline /* implicit */ basic_map();
+  inline /* implicit */ basic_map(const basic_map &obj);
+  inline explicit basic_map(isl::checked::ctx ctx, const std::string &str);
+  inline basic_map &operator=(basic_map obj);
+  inline ~basic_map();
+  inline __isl_give isl_basic_map *copy() const &;
+  inline __isl_give isl_basic_map *copy() && = delete;
+  inline __isl_keep isl_basic_map *get() const;
+  inline __isl_give isl_basic_map *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::basic_map affine_hull() const;
+  inline isl::checked::basic_map apply_domain(isl::checked::basic_map bmap2) const;
+  inline isl::checked::basic_map apply_range(isl::checked::basic_map bmap2) const;
+  inline isl::checked::basic_set deltas() const;
+  inline isl::checked::basic_map detect_equalities() const;
+  inline isl::checked::basic_map flatten() const;
+  inline isl::checked::basic_map flatten_domain() const;
+  inline isl::checked::basic_map flatten_range() const;
+  inline isl::checked::basic_map gist(isl::checked::basic_map context) const;
+  inline isl::checked::basic_map intersect(isl::checked::basic_map bmap2) const;
+  inline isl::checked::basic_map intersect_domain(isl::checked::basic_set bset) const;
+  inline isl::checked::basic_map intersect_range(isl::checked::basic_set bset) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::basic_map &bmap2) const;
+  inline boolean is_subset(const isl::checked::basic_map &bmap2) const;
+  inline isl::checked::map lexmax() const;
+  inline isl::checked::map lexmin() const;
+  inline isl::checked::basic_map reverse() const;
+  inline isl::checked::basic_map sample() const;
+  inline isl::checked::map unite(isl::checked::basic_map bmap2) const;
+};
+
+// declarations for isl::basic_set
+inline basic_set manage(__isl_take isl_basic_set *ptr);
+inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+class basic_set {
+  friend inline basic_set manage(__isl_take isl_basic_set *ptr);
+  friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+protected:
+  isl_basic_set *ptr = nullptr;
+
+  inline explicit basic_set(__isl_take isl_basic_set *ptr);
+
+public:
+  inline /* implicit */ basic_set();
+  inline /* implicit */ basic_set(const basic_set &obj);
+  inline /* implicit */ basic_set(isl::checked::point pnt);
+  inline explicit basic_set(isl::checked::ctx ctx, const std::string &str);
+  inline basic_set &operator=(basic_set obj);
+  inline ~basic_set();
+  inline __isl_give isl_basic_set *copy() const &;
+  inline __isl_give isl_basic_set *copy() && = delete;
+  inline __isl_keep isl_basic_set *get() const;
+  inline __isl_give isl_basic_set *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::basic_set affine_hull() const;
+  inline isl::checked::basic_set apply(isl::checked::basic_map bmap) const;
+  inline isl::checked::basic_set detect_equalities() const;
+  inline isl::checked::val dim_max_val(int pos) const;
+  inline isl::checked::basic_set flatten() const;
+  inline isl::checked::basic_set gist(isl::checked::basic_set context) const;
+  inline isl::checked::basic_set intersect(isl::checked::basic_set bset2) const;
+  inline isl::checked::basic_set intersect_params(isl::checked::basic_set bset2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::basic_set &bset2) const;
+  inline boolean is_subset(const isl::checked::basic_set &bset2) const;
+  inline boolean is_wrapping() const;
+  inline isl::checked::set lexmax() const;
+  inline isl::checked::set lexmin() const;
+  inline isl::checked::basic_set params() const;
+  inline isl::checked::basic_set sample() const;
+  inline isl::checked::point sample_point() const;
+  inline isl::checked::set unite(isl::checked::basic_set bset2) const;
+};
+
+// declarations for isl::fixed_box
+inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+class fixed_box {
+  friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+  friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+protected:
+  isl_fixed_box *ptr = nullptr;
+
+  inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
+
+public:
+  inline /* implicit */ fixed_box();
+  inline /* implicit */ fixed_box(const fixed_box &obj);
+  inline fixed_box &operator=(fixed_box obj);
+  inline ~fixed_box();
+  inline __isl_give isl_fixed_box *copy() const &;
+  inline __isl_give isl_fixed_box *copy() && = delete;
+  inline __isl_keep isl_fixed_box *get() const;
+  inline __isl_give isl_fixed_box *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_aff offset() const;
+  inline isl::checked::multi_aff get_offset() const;
+  inline isl::checked::multi_val size() const;
+  inline isl::checked::multi_val get_size() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline boolean is_valid() const;
+};
+
+// declarations for isl::id
+inline id manage(__isl_take isl_id *ptr);
+inline id manage_copy(__isl_keep isl_id *ptr);
+
+class id {
+  friend inline id manage(__isl_take isl_id *ptr);
+  friend inline id manage_copy(__isl_keep isl_id *ptr);
+
+protected:
+  isl_id *ptr = nullptr;
+
+  inline explicit id(__isl_take isl_id *ptr);
+
+public:
+  inline /* implicit */ id();
+  inline /* implicit */ id(const id &obj);
+  inline explicit id(isl::checked::ctx ctx, const std::string &str);
+  inline id &operator=(id obj);
+  inline ~id();
+  inline __isl_give isl_id *copy() const &;
+  inline __isl_give isl_id *copy() && = delete;
+  inline __isl_keep isl_id *get() const;
+  inline __isl_give isl_id *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline std::string name() const;
+  inline std::string get_name() const;
+};
+
+// declarations for isl::id_list
+inline id_list manage(__isl_take isl_id_list *ptr);
+inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+class id_list {
+  friend inline id_list manage(__isl_take isl_id_list *ptr);
+  friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+protected:
+  isl_id_list *ptr = nullptr;
+
+  inline explicit id_list(__isl_take isl_id_list *ptr);
+
+public:
+  inline /* implicit */ id_list();
+  inline /* implicit */ id_list(const id_list &obj);
+  inline explicit id_list(isl::checked::ctx ctx, int n);
+  inline explicit id_list(isl::checked::id el);
+  inline id_list &operator=(id_list obj);
+  inline ~id_list();
+  inline __isl_give isl_id_list *copy() const &;
+  inline __isl_give isl_id_list *copy() && = delete;
+  inline __isl_keep isl_id_list *get() const;
+  inline __isl_give isl_id_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::id_list add(isl::checked::id el) const;
+  inline isl::checked::id_list add(const std::string &el) const;
+  inline isl::checked::id_list clear() const;
+  inline isl::checked::id_list concat(isl::checked::id_list list2) const;
+  inline isl::checked::id_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::id)> &fn) const;
+  inline isl::checked::id at(int index) const;
+  inline isl::checked::id get_at(int index) const;
+  inline isl::checked::id_list insert(unsigned int pos, isl::checked::id el) const;
+  inline isl::checked::id_list insert(unsigned int pos, const std::string &el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::map
+inline map manage(__isl_take isl_map *ptr);
+inline map manage_copy(__isl_keep isl_map *ptr);
+
+class map {
+  friend inline map manage(__isl_take isl_map *ptr);
+  friend inline map manage_copy(__isl_keep isl_map *ptr);
+
+protected:
+  isl_map *ptr = nullptr;
+
+  inline explicit map(__isl_take isl_map *ptr);
+
+public:
+  inline /* implicit */ map();
+  inline /* implicit */ map(const map &obj);
+  inline /* implicit */ map(isl::checked::basic_map bmap);
+  inline explicit map(isl::checked::ctx ctx, const std::string &str);
+  inline map &operator=(map obj);
+  inline ~map();
+  inline __isl_give isl_map *copy() const &;
+  inline __isl_give isl_map *copy() && = delete;
+  inline __isl_keep isl_map *get() const;
+  inline __isl_give isl_map *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::basic_map affine_hull() const;
+  inline isl::checked::map apply_domain(isl::checked::map map2) const;
+  inline isl::checked::map apply_range(isl::checked::map map2) const;
+  inline isl::checked::set bind_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::set bind_range(isl::checked::multi_id tuple) const;
+  inline isl::checked::map coalesce() const;
+  inline isl::checked::map complement() const;
+  inline isl::checked::map curry() const;
+  inline isl::checked::set deltas() const;
+  inline isl::checked::map detect_equalities() const;
+  inline isl::checked::set domain() const;
+  inline isl::checked::map domain_factor_domain() const;
+  inline isl::checked::map domain_factor_range() const;
+  inline isl::checked::map domain_product(isl::checked::map map2) const;
+  static inline isl::checked::map empty(isl::checked::space space);
+  inline isl::checked::map eq_at(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map factor_domain() const;
+  inline isl::checked::map factor_range() const;
+  inline isl::checked::map flatten() const;
+  inline isl::checked::map flatten_domain() const;
+  inline isl::checked::map flatten_range() const;
+  inline stat foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const;
+  inline isl::checked::fixed_box range_simple_fixed_box_hull() const;
+  inline isl::checked::fixed_box get_range_simple_fixed_box_hull() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::map gist(isl::checked::map context) const;
+  inline isl::checked::map gist_domain(isl::checked::set context) const;
+  inline isl::checked::map intersect(isl::checked::map map2) const;
+  inline isl::checked::map intersect_domain(isl::checked::set set) const;
+  inline isl::checked::map intersect_params(isl::checked::set params) const;
+  inline isl::checked::map intersect_range(isl::checked::set set) const;
+  inline boolean is_bijective() const;
+  inline boolean is_disjoint(const isl::checked::map &map2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::map &map2) const;
+  inline boolean is_injective() const;
+  inline boolean is_single_valued() const;
+  inline boolean is_strict_subset(const isl::checked::map &map2) const;
+  inline boolean is_subset(const isl::checked::map &map2) const;
+  inline isl::checked::map lex_ge_at(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map lex_gt_at(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map lex_le_at(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map lex_lt_at(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map lexmax() const;
+  inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
+  inline isl::checked::map lexmin() const;
+  inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
+  inline isl::checked::map lower_bound(isl::checked::multi_pw_aff lower) const;
+  inline isl::checked::map lower_bound(isl::checked::multi_val lower) const;
+  inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
+  inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
+  inline isl::checked::basic_map polyhedral_hull() const;
+  inline isl::checked::map preimage_domain(isl::checked::multi_aff ma) const;
+  inline isl::checked::map preimage_domain(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::map preimage_domain(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::map preimage_range(isl::checked::multi_aff ma) const;
+  inline isl::checked::map preimage_range(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::map project_out_all_params() const;
+  inline isl::checked::set range() const;
+  inline isl::checked::map range_factor_domain() const;
+  inline isl::checked::map range_factor_range() const;
+  inline isl::checked::map range_product(isl::checked::map map2) const;
+  inline isl::checked::map range_reverse() const;
+  inline isl::checked::map reverse() const;
+  inline isl::checked::basic_map sample() const;
+  inline isl::checked::map subtract(isl::checked::map map2) const;
+  inline isl::checked::map uncurry() const;
+  inline isl::checked::map unite(isl::checked::map map2) const;
+  static inline isl::checked::map universe(isl::checked::space space);
+  inline isl::checked::basic_map unshifted_simple_hull() const;
+  inline isl::checked::map upper_bound(isl::checked::multi_pw_aff upper) const;
+  inline isl::checked::map upper_bound(isl::checked::multi_val upper) const;
+  inline isl::checked::set wrap() const;
+};
+
+// declarations for isl::multi_aff
+inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+class multi_aff {
+  friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+  friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+protected:
+  isl_multi_aff *ptr = nullptr;
+
+  inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
+
+public:
+  inline /* implicit */ multi_aff();
+  inline /* implicit */ multi_aff(const multi_aff &obj);
+  inline /* implicit */ multi_aff(isl::checked::aff aff);
+  inline explicit multi_aff(isl::checked::space space, isl::checked::aff_list list);
+  inline explicit multi_aff(isl::checked::ctx ctx, const std::string &str);
+  inline multi_aff &operator=(multi_aff obj);
+  inline ~multi_aff();
+  inline __isl_give isl_multi_aff *copy() const &;
+  inline __isl_give isl_multi_aff *copy() && = delete;
+  inline __isl_keep isl_multi_aff *get() const;
+  inline __isl_give isl_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_aff add(isl::checked::multi_aff multi2) const;
+  inline isl::checked::multi_aff add_constant(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_aff add_constant(isl::checked::val v) const;
+  inline isl::checked::multi_aff add_constant(long v) const;
+  inline isl::checked::basic_set bind(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_aff bind_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
+  static inline isl::checked::multi_aff domain_map(isl::checked::space space);
+  inline isl::checked::multi_aff flat_range_product(isl::checked::multi_aff multi2) const;
+  inline isl::checked::multi_aff floor() const;
+  inline isl::checked::aff at(int pos) const;
+  inline isl::checked::aff get_at(int pos) const;
+  inline isl::checked::multi_val constant_multi_val() const;
+  inline isl::checked::multi_val get_constant_multi_val() const;
+  inline isl::checked::aff_list list() const;
+  inline isl::checked::aff_list get_list() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::multi_aff gist(isl::checked::set context) const;
+  inline isl::checked::multi_aff identity() const;
+  static inline isl::checked::multi_aff identity_on_domain(isl::checked::space space);
+  inline isl::checked::multi_aff insert_domain(isl::checked::space domain) const;
+  inline boolean involves_locals() const;
+  inline isl::checked::multi_aff neg() const;
+  inline boolean plain_is_equal(const isl::checked::multi_aff &multi2) const;
+  inline isl::checked::multi_aff product(isl::checked::multi_aff multi2) const;
+  inline isl::checked::multi_aff pullback(isl::checked::multi_aff ma2) const;
+  static inline isl::checked::multi_aff range_map(isl::checked::space space);
+  inline isl::checked::multi_aff range_product(isl::checked::multi_aff multi2) const;
+  inline isl::checked::multi_aff scale(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_aff scale(isl::checked::val v) const;
+  inline isl::checked::multi_aff scale(long v) const;
+  inline isl::checked::multi_aff scale_down(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_aff scale_down(isl::checked::val v) const;
+  inline isl::checked::multi_aff scale_down(long v) const;
+  inline isl::checked::multi_aff set_at(int pos, isl::checked::aff el) const;
+  inline class size size() const;
+  inline isl::checked::multi_aff sub(isl::checked::multi_aff multi2) const;
+  inline isl::checked::multi_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
+  static inline isl::checked::multi_aff zero(isl::checked::space space);
+};
+
+// declarations for isl::multi_id
+inline multi_id manage(__isl_take isl_multi_id *ptr);
+inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
+
+class multi_id {
+  friend inline multi_id manage(__isl_take isl_multi_id *ptr);
+  friend inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
+
+protected:
+  isl_multi_id *ptr = nullptr;
+
+  inline explicit multi_id(__isl_take isl_multi_id *ptr);
+
+public:
+  inline /* implicit */ multi_id();
+  inline /* implicit */ multi_id(const multi_id &obj);
+  inline explicit multi_id(isl::checked::space space, isl::checked::id_list list);
+  inline explicit multi_id(isl::checked::ctx ctx, const std::string &str);
+  inline multi_id &operator=(multi_id obj);
+  inline ~multi_id();
+  inline __isl_give isl_multi_id *copy() const &;
+  inline __isl_give isl_multi_id *copy() && = delete;
+  inline __isl_keep isl_multi_id *get() const;
+  inline __isl_give isl_multi_id *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_id flat_range_product(isl::checked::multi_id multi2) const;
+  inline isl::checked::id at(int pos) const;
+  inline isl::checked::id get_at(int pos) const;
+  inline isl::checked::id_list list() const;
+  inline isl::checked::id_list get_list() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline boolean plain_is_equal(const isl::checked::multi_id &multi2) const;
+  inline isl::checked::multi_id range_product(isl::checked::multi_id multi2) const;
+  inline isl::checked::multi_id set_at(int pos, isl::checked::id el) const;
+  inline isl::checked::multi_id set_at(int pos, const std::string &el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::multi_pw_aff
+inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+class multi_pw_aff {
+  friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+  friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+protected:
+  isl_multi_pw_aff *ptr = nullptr;
+
+  inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_pw_aff();
+  inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
+  inline /* implicit */ multi_pw_aff(isl::checked::aff aff);
+  inline /* implicit */ multi_pw_aff(isl::checked::multi_aff ma);
+  inline /* implicit */ multi_pw_aff(isl::checked::pw_aff pa);
+  inline explicit multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list);
+  inline /* implicit */ multi_pw_aff(isl::checked::pw_multi_aff pma);
+  inline explicit multi_pw_aff(isl::checked::ctx ctx, const std::string &str);
+  inline multi_pw_aff &operator=(multi_pw_aff obj);
+  inline ~multi_pw_aff();
+  inline __isl_give isl_multi_pw_aff *copy() const &;
+  inline __isl_give isl_multi_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_pw_aff *get() const;
+  inline __isl_give isl_multi_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_pw_aff add(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_pw_aff add_constant(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_pw_aff add_constant(isl::checked::val v) const;
+  inline isl::checked::multi_pw_aff add_constant(long v) const;
+  inline isl::checked::set bind(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_pw_aff bind_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_pw_aff coalesce() const;
+  inline isl::checked::set domain() const;
+  inline isl::checked::multi_pw_aff flat_range_product(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::pw_aff at(int pos) const;
+  inline isl::checked::pw_aff get_at(int pos) const;
+  inline isl::checked::pw_aff_list list() const;
+  inline isl::checked::pw_aff_list get_list() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::multi_pw_aff gist(isl::checked::set set) const;
+  inline isl::checked::multi_pw_aff identity() const;
+  static inline isl::checked::multi_pw_aff identity_on_domain(isl::checked::space space);
+  inline isl::checked::multi_pw_aff insert_domain(isl::checked::space domain) const;
+  inline isl::checked::multi_pw_aff intersect_domain(isl::checked::set domain) const;
+  inline isl::checked::multi_pw_aff intersect_params(isl::checked::set set) const;
+  inline boolean involves_param(const isl::checked::id &id) const;
+  inline boolean involves_param(const std::string &id) const;
+  inline boolean involves_param(const isl::checked::id_list &list) const;
+  inline isl::checked::multi_pw_aff max(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_val max_multi_val() const;
+  inline isl::checked::multi_pw_aff min(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_val min_multi_val() const;
+  inline isl::checked::multi_pw_aff neg() const;
+  inline boolean plain_is_equal(const isl::checked::multi_pw_aff &multi2) const;
+  inline isl::checked::multi_pw_aff product(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_pw_aff pullback(isl::checked::multi_aff ma) const;
+  inline isl::checked::multi_pw_aff pullback(isl::checked::multi_pw_aff mpa2) const;
+  inline isl::checked::multi_pw_aff pullback(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::multi_pw_aff range_product(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_pw_aff scale(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_pw_aff scale(isl::checked::val v) const;
+  inline isl::checked::multi_pw_aff scale(long v) const;
+  inline isl::checked::multi_pw_aff scale_down(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_pw_aff scale_down(isl::checked::val v) const;
+  inline isl::checked::multi_pw_aff scale_down(long v) const;
+  inline isl::checked::multi_pw_aff set_at(int pos, isl::checked::pw_aff el) const;
+  inline class size size() const;
+  inline isl::checked::multi_pw_aff sub(isl::checked::multi_pw_aff multi2) const;
+  inline isl::checked::multi_pw_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
+  inline isl::checked::multi_pw_aff union_add(isl::checked::multi_pw_aff mpa2) const;
+  static inline isl::checked::multi_pw_aff zero(isl::checked::space space);
+};
+
+// declarations for isl::multi_union_pw_aff
+inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+class multi_union_pw_aff {
+  friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+  friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+protected:
+  isl_multi_union_pw_aff *ptr = nullptr;
+
+  inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_union_pw_aff();
+  inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
+  inline /* implicit */ multi_union_pw_aff(isl::checked::multi_pw_aff mpa);
+  inline /* implicit */ multi_union_pw_aff(isl::checked::union_pw_aff upa);
+  inline explicit multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list);
+  inline explicit multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str);
+  inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
+  inline ~multi_union_pw_aff();
+  inline __isl_give isl_multi_union_pw_aff *copy() const &;
+  inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_union_pw_aff *get() const;
+  inline __isl_give isl_multi_union_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_union_pw_aff add(isl::checked::multi_union_pw_aff multi2) const;
+  inline isl::checked::union_set bind(isl::checked::multi_id tuple) const;
+  inline isl::checked::multi_union_pw_aff coalesce() const;
+  inline isl::checked::union_set domain() const;
+  inline isl::checked::multi_union_pw_aff flat_range_product(isl::checked::multi_union_pw_aff multi2) const;
+  inline isl::checked::union_pw_aff at(int pos) const;
+  inline isl::checked::union_pw_aff get_at(int pos) const;
+  inline isl::checked::union_pw_aff_list list() const;
+  inline isl::checked::union_pw_aff_list get_list() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::multi_union_pw_aff gist(isl::checked::union_set context) const;
+  inline isl::checked::multi_union_pw_aff intersect_domain(isl::checked::union_set uset) const;
+  inline isl::checked::multi_union_pw_aff intersect_params(isl::checked::set params) const;
+  inline isl::checked::multi_union_pw_aff neg() const;
+  inline boolean plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const;
+  inline isl::checked::multi_union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
+  inline isl::checked::multi_union_pw_aff range_product(isl::checked::multi_union_pw_aff multi2) const;
+  inline isl::checked::multi_union_pw_aff scale(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_union_pw_aff scale(isl::checked::val v) const;
+  inline isl::checked::multi_union_pw_aff scale(long v) const;
+  inline isl::checked::multi_union_pw_aff scale_down(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_union_pw_aff scale_down(isl::checked::val v) const;
+  inline isl::checked::multi_union_pw_aff scale_down(long v) const;
+  inline isl::checked::multi_union_pw_aff set_at(int pos, isl::checked::union_pw_aff el) const;
+  inline class size size() const;
+  inline isl::checked::multi_union_pw_aff sub(isl::checked::multi_union_pw_aff multi2) const;
+  inline isl::checked::multi_union_pw_aff union_add(isl::checked::multi_union_pw_aff mupa2) const;
+  static inline isl::checked::multi_union_pw_aff zero(isl::checked::space space);
+};
+
+// declarations for isl::multi_val
+inline multi_val manage(__isl_take isl_multi_val *ptr);
+inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+class multi_val {
+  friend inline multi_val manage(__isl_take isl_multi_val *ptr);
+  friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+protected:
+  isl_multi_val *ptr = nullptr;
+
+  inline explicit multi_val(__isl_take isl_multi_val *ptr);
+
+public:
+  inline /* implicit */ multi_val();
+  inline /* implicit */ multi_val(const multi_val &obj);
+  inline explicit multi_val(isl::checked::space space, isl::checked::val_list list);
+  inline explicit multi_val(isl::checked::ctx ctx, const std::string &str);
+  inline multi_val &operator=(multi_val obj);
+  inline ~multi_val();
+  inline __isl_give isl_multi_val *copy() const &;
+  inline __isl_give isl_multi_val *copy() && = delete;
+  inline __isl_keep isl_multi_val *get() const;
+  inline __isl_give isl_multi_val *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_val add(isl::checked::multi_val multi2) const;
+  inline isl::checked::multi_val add(isl::checked::val v) const;
+  inline isl::checked::multi_val add(long v) const;
+  inline isl::checked::multi_val flat_range_product(isl::checked::multi_val multi2) const;
+  inline isl::checked::val at(int pos) const;
+  inline isl::checked::val get_at(int pos) const;
+  inline isl::checked::val_list list() const;
+  inline isl::checked::val_list get_list() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::multi_val max(isl::checked::multi_val multi2) const;
+  inline isl::checked::multi_val min(isl::checked::multi_val multi2) const;
+  inline isl::checked::multi_val neg() const;
+  inline boolean plain_is_equal(const isl::checked::multi_val &multi2) const;
+  inline isl::checked::multi_val product(isl::checked::multi_val multi2) const;
+  inline isl::checked::multi_val range_product(isl::checked::multi_val multi2) const;
+  inline isl::checked::multi_val scale(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_val scale(isl::checked::val v) const;
+  inline isl::checked::multi_val scale(long v) const;
+  inline isl::checked::multi_val scale_down(isl::checked::multi_val mv) const;
+  inline isl::checked::multi_val scale_down(isl::checked::val v) const;
+  inline isl::checked::multi_val scale_down(long v) const;
+  inline isl::checked::multi_val set_at(int pos, isl::checked::val el) const;
+  inline isl::checked::multi_val set_at(int pos, long el) const;
+  inline class size size() const;
+  inline isl::checked::multi_val sub(isl::checked::multi_val multi2) const;
+  static inline isl::checked::multi_val zero(isl::checked::space space);
+};
+
+// declarations for isl::point
+inline point manage(__isl_take isl_point *ptr);
+inline point manage_copy(__isl_keep isl_point *ptr);
+
+class point {
+  friend inline point manage(__isl_take isl_point *ptr);
+  friend inline point manage_copy(__isl_keep isl_point *ptr);
+
+protected:
+  isl_point *ptr = nullptr;
+
+  inline explicit point(__isl_take isl_point *ptr);
+
+public:
+  inline /* implicit */ point();
+  inline /* implicit */ point(const point &obj);
+  inline point &operator=(point obj);
+  inline ~point();
+  inline __isl_give isl_point *copy() const &;
+  inline __isl_give isl_point *copy() && = delete;
+  inline __isl_keep isl_point *get() const;
+  inline __isl_give isl_point *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::multi_val multi_val() const;
+  inline isl::checked::multi_val get_multi_val() const;
+};
+
+// declarations for isl::pw_aff
+inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+class pw_aff {
+  friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+  friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+protected:
+  isl_pw_aff *ptr = nullptr;
+
+  inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
+
+public:
+  inline /* implicit */ pw_aff();
+  inline /* implicit */ pw_aff(const pw_aff &obj);
+  inline /* implicit */ pw_aff(isl::checked::aff aff);
+  inline explicit pw_aff(isl::checked::ctx ctx, const std::string &str);
+  inline pw_aff &operator=(pw_aff obj);
+  inline ~pw_aff();
+  inline __isl_give isl_pw_aff *copy() const &;
+  inline __isl_give isl_pw_aff *copy() && = delete;
+  inline __isl_keep isl_pw_aff *get() const;
+  inline __isl_give isl_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::pw_aff add(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff add_constant(isl::checked::val v) const;
+  inline isl::checked::pw_aff add_constant(long v) const;
+  inline isl::checked::aff as_aff() const;
+  inline isl::checked::set bind(isl::checked::id id) const;
+  inline isl::checked::set bind(const std::string &id) const;
+  inline isl::checked::pw_aff bind_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::pw_aff ceil() const;
+  inline isl::checked::pw_aff coalesce() const;
+  inline isl::checked::pw_aff cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const;
+  inline isl::checked::pw_aff div(isl::checked::pw_aff pa2) const;
+  inline isl::checked::set domain() const;
+  inline isl::checked::set eq_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::val eval(isl::checked::point pnt) const;
+  inline isl::checked::pw_aff floor() const;
+  inline isl::checked::set ge_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff gist(isl::checked::set context) const;
+  inline isl::checked::set gt_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff insert_domain(isl::checked::space domain) const;
+  inline isl::checked::pw_aff intersect_domain(isl::checked::set set) const;
+  inline isl::checked::pw_aff intersect_params(isl::checked::set set) const;
+  inline boolean isa_aff() const;
+  inline isl::checked::set le_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::set lt_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff max(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff min(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff mod(isl::checked::val mod) const;
+  inline isl::checked::pw_aff mod(long mod) const;
+  inline isl::checked::pw_aff mul(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::set ne_set(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff neg() const;
+  static inline isl::checked::pw_aff param_on_domain(isl::checked::set domain, isl::checked::id id);
+  inline isl::checked::pw_aff pullback(isl::checked::multi_aff ma) const;
+  inline isl::checked::pw_aff pullback(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::pw_aff pullback(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::pw_aff scale(isl::checked::val v) const;
+  inline isl::checked::pw_aff scale(long v) const;
+  inline isl::checked::pw_aff scale_down(isl::checked::val f) const;
+  inline isl::checked::pw_aff scale_down(long f) const;
+  inline isl::checked::pw_aff sub(isl::checked::pw_aff pwaff2) const;
+  inline isl::checked::pw_aff subtract_domain(isl::checked::set set) const;
+  inline isl::checked::pw_aff tdiv_q(isl::checked::pw_aff pa2) const;
+  inline isl::checked::pw_aff tdiv_r(isl::checked::pw_aff pa2) const;
+  inline isl::checked::pw_aff union_add(isl::checked::pw_aff pwaff2) const;
+};
+
+// declarations for isl::pw_aff_list
+inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+class pw_aff_list {
+  friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+  friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+protected:
+  isl_pw_aff_list *ptr = nullptr;
+
+  inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_aff_list();
+  inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
+  inline explicit pw_aff_list(isl::checked::ctx ctx, int n);
+  inline explicit pw_aff_list(isl::checked::pw_aff el);
+  inline pw_aff_list &operator=(pw_aff_list obj);
+  inline ~pw_aff_list();
+  inline __isl_give isl_pw_aff_list *copy() const &;
+  inline __isl_give isl_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_aff_list *get() const;
+  inline __isl_give isl_pw_aff_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::pw_aff_list add(isl::checked::pw_aff el) const;
+  inline isl::checked::pw_aff_list clear() const;
+  inline isl::checked::pw_aff_list concat(isl::checked::pw_aff_list list2) const;
+  inline isl::checked::pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const;
+  inline isl::checked::pw_aff at(int index) const;
+  inline isl::checked::pw_aff get_at(int index) const;
+  inline isl::checked::pw_aff_list insert(unsigned int pos, isl::checked::pw_aff el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::pw_multi_aff
+inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+class pw_multi_aff {
+  friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+  friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+protected:
+  isl_pw_multi_aff *ptr = nullptr;
+
+  inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff();
+  inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
+  inline /* implicit */ pw_multi_aff(isl::checked::multi_aff ma);
+  inline /* implicit */ pw_multi_aff(isl::checked::pw_aff pa);
+  inline explicit pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
+  inline pw_multi_aff &operator=(pw_multi_aff obj);
+  inline ~pw_multi_aff();
+  inline __isl_give isl_pw_multi_aff *copy() const &;
+  inline __isl_give isl_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff *get() const;
+  inline __isl_give isl_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::pw_multi_aff add(isl::checked::pw_multi_aff pma2) const;
+  inline isl::checked::pw_multi_aff add_constant(isl::checked::multi_val mv) const;
+  inline isl::checked::pw_multi_aff add_constant(isl::checked::val v) const;
+  inline isl::checked::pw_multi_aff add_constant(long v) const;
+  inline isl::checked::multi_aff as_multi_aff() const;
+  inline isl::checked::pw_multi_aff bind_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::pw_multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
+  inline isl::checked::pw_multi_aff coalesce() const;
+  inline isl::checked::set domain() const;
+  static inline isl::checked::pw_multi_aff domain_map(isl::checked::space space);
+  inline isl::checked::pw_multi_aff flat_range_product(isl::checked::pw_multi_aff pma2) const;
+  inline stat foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::pw_multi_aff gist(isl::checked::set set) const;
+  inline isl::checked::pw_multi_aff insert_domain(isl::checked::space domain) const;
+  inline isl::checked::pw_multi_aff intersect_domain(isl::checked::set set) const;
+  inline isl::checked::pw_multi_aff intersect_params(isl::checked::set set) const;
+  inline boolean involves_locals() const;
+  inline boolean isa_multi_aff() const;
+  inline isl::checked::multi_val max_multi_val() const;
+  inline isl::checked::multi_val min_multi_val() const;
+  inline class size n_piece() const;
+  inline isl::checked::pw_multi_aff product(isl::checked::pw_multi_aff pma2) const;
+  inline isl::checked::pw_multi_aff pullback(isl::checked::multi_aff ma) const;
+  inline isl::checked::pw_multi_aff pullback(isl::checked::pw_multi_aff pma2) const;
+  inline isl::checked::pw_multi_aff range_factor_domain() const;
+  inline isl::checked::pw_multi_aff range_factor_range() const;
+  static inline isl::checked::pw_multi_aff range_map(isl::checked::space space);
+  inline isl::checked::pw_multi_aff range_product(isl::checked::pw_multi_aff pma2) const;
+  inline isl::checked::pw_multi_aff scale(isl::checked::val v) const;
+  inline isl::checked::pw_multi_aff scale(long v) const;
+  inline isl::checked::pw_multi_aff scale_down(isl::checked::val v) const;
+  inline isl::checked::pw_multi_aff scale_down(long v) const;
+  inline isl::checked::pw_multi_aff sub(isl::checked::pw_multi_aff pma2) const;
+  inline isl::checked::pw_multi_aff subtract_domain(isl::checked::set set) const;
+  inline isl::checked::pw_multi_aff union_add(isl::checked::pw_multi_aff pma2) const;
+  static inline isl::checked::pw_multi_aff zero(isl::checked::space space);
+};
+
+// declarations for isl::pw_multi_aff_list
+inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+class pw_multi_aff_list {
+  friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+  friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+protected:
+  isl_pw_multi_aff_list *ptr = nullptr;
+
+  inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff_list();
+  inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
+  inline explicit pw_multi_aff_list(isl::checked::ctx ctx, int n);
+  inline explicit pw_multi_aff_list(isl::checked::pw_multi_aff el);
+  inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
+  inline ~pw_multi_aff_list();
+  inline __isl_give isl_pw_multi_aff_list *copy() const &;
+  inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff_list *get() const;
+  inline __isl_give isl_pw_multi_aff_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::pw_multi_aff_list add(isl::checked::pw_multi_aff el) const;
+  inline isl::checked::pw_multi_aff_list clear() const;
+  inline isl::checked::pw_multi_aff_list concat(isl::checked::pw_multi_aff_list list2) const;
+  inline isl::checked::pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const;
+  inline isl::checked::pw_multi_aff at(int index) const;
+  inline isl::checked::pw_multi_aff get_at(int index) const;
+  inline isl::checked::pw_multi_aff_list insert(unsigned int pos, isl::checked::pw_multi_aff el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::schedule
+inline schedule manage(__isl_take isl_schedule *ptr);
+inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+class schedule {
+  friend inline schedule manage(__isl_take isl_schedule *ptr);
+  friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+protected:
+  isl_schedule *ptr = nullptr;
+
+  inline explicit schedule(__isl_take isl_schedule *ptr);
+
+public:
+  inline /* implicit */ schedule();
+  inline /* implicit */ schedule(const schedule &obj);
+  inline explicit schedule(isl::checked::ctx ctx, const std::string &str);
+  inline schedule &operator=(schedule obj);
+  inline ~schedule();
+  inline __isl_give isl_schedule *copy() const &;
+  inline __isl_give isl_schedule *copy() && = delete;
+  inline __isl_keep isl_schedule *get() const;
+  inline __isl_give isl_schedule *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  static inline isl::checked::schedule from_domain(isl::checked::union_set domain);
+  inline isl::checked::union_map map() const;
+  inline isl::checked::union_map get_map() const;
+  inline isl::checked::schedule_node root() const;
+  inline isl::checked::schedule_node get_root() const;
+  inline isl::checked::schedule pullback(isl::checked::union_pw_multi_aff upma) const;
+};
+
+// declarations for isl::schedule_constraints
+inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+class schedule_constraints {
+  friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+  friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+protected:
+  isl_schedule_constraints *ptr = nullptr;
+
+  inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
+
+public:
+  inline /* implicit */ schedule_constraints();
+  inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
+  inline explicit schedule_constraints(isl::checked::ctx ctx, const std::string &str);
+  inline schedule_constraints &operator=(schedule_constraints obj);
+  inline ~schedule_constraints();
+  inline __isl_give isl_schedule_constraints *copy() const &;
+  inline __isl_give isl_schedule_constraints *copy() && = delete;
+  inline __isl_keep isl_schedule_constraints *get() const;
+  inline __isl_give isl_schedule_constraints *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::schedule compute_schedule() const;
+  inline isl::checked::union_map coincidence() const;
+  inline isl::checked::union_map get_coincidence() const;
+  inline isl::checked::union_map conditional_validity() const;
+  inline isl::checked::union_map get_conditional_validity() const;
+  inline isl::checked::union_map conditional_validity_condition() const;
+  inline isl::checked::union_map get_conditional_validity_condition() const;
+  inline isl::checked::set context() const;
+  inline isl::checked::set get_context() const;
+  inline isl::checked::union_set domain() const;
+  inline isl::checked::union_set get_domain() const;
+  inline isl::checked::union_map proximity() const;
+  inline isl::checked::union_map get_proximity() const;
+  inline isl::checked::union_map validity() const;
+  inline isl::checked::union_map get_validity() const;
+  static inline isl::checked::schedule_constraints on_domain(isl::checked::union_set domain);
+  inline isl::checked::schedule_constraints set_coincidence(isl::checked::union_map coincidence) const;
+  inline isl::checked::schedule_constraints set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const;
+  inline isl::checked::schedule_constraints set_context(isl::checked::set context) const;
+  inline isl::checked::schedule_constraints set_proximity(isl::checked::union_map proximity) const;
+  inline isl::checked::schedule_constraints set_validity(isl::checked::union_map validity) const;
+};
+
+// declarations for isl::schedule_node
+inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+class schedule_node {
+  friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+  friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+protected:
+  isl_schedule_node *ptr = nullptr;
+
+  inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node();
+  inline /* implicit */ schedule_node(const schedule_node &obj);
+  inline schedule_node &operator=(schedule_node obj);
+  inline ~schedule_node();
+  inline __isl_give isl_schedule_node *copy() const &;
+  inline __isl_give isl_schedule_node *copy() && = delete;
+  inline __isl_keep isl_schedule_node *get() const;
+  inline __isl_give isl_schedule_node *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_schedule_node_get_type(NULL)),
+                  const T>::value>::type>
+  inline boolean isa_type(T subtype) const;
+public:
+  template <class T> inline boolean isa() const;
+  template <class T> inline T as() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::schedule_node ancestor(int generation) const;
+  inline isl::checked::schedule_node child(int pos) const;
+  inline boolean every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const;
+  inline isl::checked::schedule_node first_child() const;
+  inline stat foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const;
+  inline stat foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const;
+  static inline isl::checked::schedule_node from_domain(isl::checked::union_set domain);
+  static inline isl::checked::schedule_node from_extension(isl::checked::union_map extension);
+  inline class size ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
+  inline class size get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
+  inline class size child_position() const;
+  inline class size get_child_position() const;
+  inline isl::checked::multi_union_pw_aff prefix_schedule_multi_union_pw_aff() const;
+  inline isl::checked::multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
+  inline isl::checked::union_map prefix_schedule_union_map() const;
+  inline isl::checked::union_map get_prefix_schedule_union_map() const;
+  inline isl::checked::union_pw_multi_aff prefix_schedule_union_pw_multi_aff() const;
+  inline isl::checked::union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
+  inline isl::checked::schedule schedule() const;
+  inline isl::checked::schedule get_schedule() const;
+  inline isl::checked::schedule_node shared_ancestor(const isl::checked::schedule_node &node2) const;
+  inline isl::checked::schedule_node get_shared_ancestor(const isl::checked::schedule_node &node2) const;
+  inline class size tree_depth() const;
+  inline class size get_tree_depth() const;
+  inline isl::checked::schedule_node graft_after(isl::checked::schedule_node graft) const;
+  inline isl::checked::schedule_node graft_before(isl::checked::schedule_node graft) const;
+  inline boolean has_children() const;
+  inline boolean has_next_sibling() const;
+  inline boolean has_parent() const;
+  inline boolean has_previous_sibling() const;
+  inline isl::checked::schedule_node insert_context(isl::checked::set context) const;
+  inline isl::checked::schedule_node insert_filter(isl::checked::union_set filter) const;
+  inline isl::checked::schedule_node insert_guard(isl::checked::set context) const;
+  inline isl::checked::schedule_node insert_mark(isl::checked::id mark) const;
+  inline isl::checked::schedule_node insert_mark(const std::string &mark) const;
+  inline isl::checked::schedule_node insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const;
+  inline isl::checked::schedule_node insert_sequence(isl::checked::union_set_list filters) const;
+  inline isl::checked::schedule_node insert_set(isl::checked::union_set_list filters) const;
+  inline boolean is_equal(const isl::checked::schedule_node &node2) const;
+  inline boolean is_subtree_anchored() const;
+  inline isl::checked::schedule_node map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const;
+  inline class size n_children() const;
+  inline isl::checked::schedule_node next_sibling() const;
+  inline isl::checked::schedule_node order_after(isl::checked::union_set filter) const;
+  inline isl::checked::schedule_node order_before(isl::checked::union_set filter) const;
+  inline isl::checked::schedule_node parent() const;
+  inline isl::checked::schedule_node previous_sibling() const;
+  inline isl::checked::schedule_node root() const;
+};
+
+// declarations for isl::schedule_node_band
+
+class schedule_node_band : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_band schedule_node::as<schedule_node_band>() const;
+  static const auto type = isl_schedule_node_band;
+
+protected:
+  inline explicit schedule_node_band(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_band();
+  inline /* implicit */ schedule_node_band(const schedule_node_band &obj);
+  inline schedule_node_band &operator=(schedule_node_band obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_set ast_build_options() const;
+  inline isl::checked::union_set get_ast_build_options() const;
+  inline isl::checked::set ast_isolate_option() const;
+  inline isl::checked::set get_ast_isolate_option() const;
+  inline isl::checked::multi_union_pw_aff partial_schedule() const;
+  inline isl::checked::multi_union_pw_aff get_partial_schedule() const;
+  inline boolean permutable() const;
+  inline boolean get_permutable() const;
+  inline boolean member_get_coincident(int pos) const;
+  inline schedule_node_band member_set_coincident(int pos, int coincident) const;
+  inline schedule_node_band mod(isl::checked::multi_val mv) const;
+  inline class size n_member() const;
+  inline schedule_node_band scale(isl::checked::multi_val mv) const;
+  inline schedule_node_band scale_down(isl::checked::multi_val mv) const;
+  inline schedule_node_band set_ast_build_options(isl::checked::union_set options) const;
+  inline schedule_node_band set_permutable(int permutable) const;
+  inline schedule_node_band shift(isl::checked::multi_union_pw_aff shift) const;
+  inline schedule_node_band split(int pos) const;
+  inline schedule_node_band tile(isl::checked::multi_val sizes) const;
+  inline schedule_node_band member_set_ast_loop_default(int pos) const;
+  inline schedule_node_band member_set_ast_loop_atomic(int pos) const;
+  inline schedule_node_band member_set_ast_loop_unroll(int pos) const;
+  inline schedule_node_band member_set_ast_loop_separate(int pos) const;
+};
+
+// declarations for isl::schedule_node_context
+
+class schedule_node_context : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_context schedule_node::as<schedule_node_context>() const;
+  static const auto type = isl_schedule_node_context;
+
+protected:
+  inline explicit schedule_node_context(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_context();
+  inline /* implicit */ schedule_node_context(const schedule_node_context &obj);
+  inline schedule_node_context &operator=(schedule_node_context obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::set context() const;
+  inline isl::checked::set get_context() const;
+};
+
+// declarations for isl::schedule_node_domain
+
+class schedule_node_domain : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_domain schedule_node::as<schedule_node_domain>() const;
+  static const auto type = isl_schedule_node_domain;
+
+protected:
+  inline explicit schedule_node_domain(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_domain();
+  inline /* implicit */ schedule_node_domain(const schedule_node_domain &obj);
+  inline schedule_node_domain &operator=(schedule_node_domain obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_set domain() const;
+  inline isl::checked::union_set get_domain() const;
+};
+
+// declarations for isl::schedule_node_expansion
+
+class schedule_node_expansion : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_expansion schedule_node::as<schedule_node_expansion>() const;
+  static const auto type = isl_schedule_node_expansion;
+
+protected:
+  inline explicit schedule_node_expansion(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_expansion();
+  inline /* implicit */ schedule_node_expansion(const schedule_node_expansion &obj);
+  inline schedule_node_expansion &operator=(schedule_node_expansion obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_pw_multi_aff contraction() const;
+  inline isl::checked::union_pw_multi_aff get_contraction() const;
+  inline isl::checked::union_map expansion() const;
+  inline isl::checked::union_map get_expansion() const;
+};
+
+// declarations for isl::schedule_node_extension
+
+class schedule_node_extension : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_extension schedule_node::as<schedule_node_extension>() const;
+  static const auto type = isl_schedule_node_extension;
+
+protected:
+  inline explicit schedule_node_extension(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_extension();
+  inline /* implicit */ schedule_node_extension(const schedule_node_extension &obj);
+  inline schedule_node_extension &operator=(schedule_node_extension obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_map extension() const;
+  inline isl::checked::union_map get_extension() const;
+};
+
+// declarations for isl::schedule_node_filter
+
+class schedule_node_filter : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_filter schedule_node::as<schedule_node_filter>() const;
+  static const auto type = isl_schedule_node_filter;
+
+protected:
+  inline explicit schedule_node_filter(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_filter();
+  inline /* implicit */ schedule_node_filter(const schedule_node_filter &obj);
+  inline schedule_node_filter &operator=(schedule_node_filter obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_set filter() const;
+  inline isl::checked::union_set get_filter() const;
+};
+
+// declarations for isl::schedule_node_guard
+
+class schedule_node_guard : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_guard schedule_node::as<schedule_node_guard>() const;
+  static const auto type = isl_schedule_node_guard;
+
+protected:
+  inline explicit schedule_node_guard(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_guard();
+  inline /* implicit */ schedule_node_guard(const schedule_node_guard &obj);
+  inline schedule_node_guard &operator=(schedule_node_guard obj);
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::set guard() const;
+  inline isl::checked::set get_guard() const;
+};
+
+// declarations for isl::schedule_node_leaf
+
+class schedule_node_leaf : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_leaf schedule_node::as<schedule_node_leaf>() const;
+  static const auto type = isl_schedule_node_leaf;
+
+protected:
+  inline explicit schedule_node_leaf(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_leaf();
+  inline /* implicit */ schedule_node_leaf(const schedule_node_leaf &obj);
+  inline schedule_node_leaf &operator=(schedule_node_leaf obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_mark
+
+class schedule_node_mark : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_mark schedule_node::as<schedule_node_mark>() const;
+  static const auto type = isl_schedule_node_mark;
+
+protected:
+  inline explicit schedule_node_mark(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_mark();
+  inline /* implicit */ schedule_node_mark(const schedule_node_mark &obj);
+  inline schedule_node_mark &operator=(schedule_node_mark obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_sequence
+
+class schedule_node_sequence : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_sequence schedule_node::as<schedule_node_sequence>() const;
+  static const auto type = isl_schedule_node_sequence;
+
+protected:
+  inline explicit schedule_node_sequence(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_sequence();
+  inline /* implicit */ schedule_node_sequence(const schedule_node_sequence &obj);
+  inline schedule_node_sequence &operator=(schedule_node_sequence obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_set
+
+class schedule_node_set : public schedule_node {
+  template <class T>
+  friend boolean schedule_node::isa() const;
+  friend schedule_node_set schedule_node::as<schedule_node_set>() const;
+  static const auto type = isl_schedule_node_set;
+
+protected:
+  inline explicit schedule_node_set(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_set();
+  inline /* implicit */ schedule_node_set(const schedule_node_set &obj);
+  inline schedule_node_set &operator=(schedule_node_set obj);
+  inline isl::checked::ctx ctx() const;
+
+};
+
+// declarations for isl::set
+inline set manage(__isl_take isl_set *ptr);
+inline set manage_copy(__isl_keep isl_set *ptr);
+
+class set {
+  friend inline set manage(__isl_take isl_set *ptr);
+  friend inline set manage_copy(__isl_keep isl_set *ptr);
+
+protected:
+  isl_set *ptr = nullptr;
+
+  inline explicit set(__isl_take isl_set *ptr);
+
+public:
+  inline /* implicit */ set();
+  inline /* implicit */ set(const set &obj);
+  inline /* implicit */ set(isl::checked::basic_set bset);
+  inline /* implicit */ set(isl::checked::point pnt);
+  inline explicit set(isl::checked::ctx ctx, const std::string &str);
+  inline set &operator=(set obj);
+  inline ~set();
+  inline __isl_give isl_set *copy() const &;
+  inline __isl_give isl_set *copy() && = delete;
+  inline __isl_keep isl_set *get() const;
+  inline __isl_give isl_set *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::basic_set affine_hull() const;
+  inline isl::checked::set apply(isl::checked::map map) const;
+  inline isl::checked::set bind(isl::checked::multi_id tuple) const;
+  inline isl::checked::set coalesce() const;
+  inline isl::checked::set complement() const;
+  inline isl::checked::set detect_equalities() const;
+  inline isl::checked::val dim_max_val(int pos) const;
+  inline isl::checked::val dim_min_val(int pos) const;
+  static inline isl::checked::set empty(isl::checked::space space);
+  inline isl::checked::set flatten() const;
+  inline stat foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const;
+  inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
+  inline isl::checked::multi_val plain_multi_val_if_fixed() const;
+  inline isl::checked::multi_val get_plain_multi_val_if_fixed() const;
+  inline isl::checked::fixed_box simple_fixed_box_hull() const;
+  inline isl::checked::fixed_box get_simple_fixed_box_hull() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::val stride(int pos) const;
+  inline isl::checked::val get_stride(int pos) const;
+  inline isl::checked::set gist(isl::checked::set context) const;
+  inline isl::checked::map identity() const;
+  inline isl::checked::pw_aff indicator_function() const;
+  inline isl::checked::map insert_domain(isl::checked::space domain) const;
+  inline isl::checked::set intersect(isl::checked::set set2) const;
+  inline isl::checked::set intersect_params(isl::checked::set params) const;
+  inline boolean involves_locals() const;
+  inline boolean is_disjoint(const isl::checked::set &set2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::set &set2) const;
+  inline boolean is_singleton() const;
+  inline boolean is_strict_subset(const isl::checked::set &set2) const;
+  inline boolean is_subset(const isl::checked::set &set2) const;
+  inline boolean is_wrapping() const;
+  inline isl::checked::set lexmax() const;
+  inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
+  inline isl::checked::set lexmin() const;
+  inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
+  inline isl::checked::set lower_bound(isl::checked::multi_pw_aff lower) const;
+  inline isl::checked::set lower_bound(isl::checked::multi_val lower) const;
+  inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
+  inline isl::checked::val max_val(const isl::checked::aff &obj) const;
+  inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
+  inline isl::checked::val min_val(const isl::checked::aff &obj) const;
+  inline isl::checked::set params() const;
+  inline isl::checked::basic_set polyhedral_hull() const;
+  inline isl::checked::set preimage(isl::checked::multi_aff ma) const;
+  inline isl::checked::set preimage(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::set preimage(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::set product(isl::checked::set set2) const;
+  inline isl::checked::set project_out_all_params() const;
+  inline isl::checked::set project_out_param(isl::checked::id id) const;
+  inline isl::checked::set project_out_param(const std::string &id) const;
+  inline isl::checked::set project_out_param(isl::checked::id_list list) const;
+  inline isl::checked::basic_set sample() const;
+  inline isl::checked::point sample_point() const;
+  inline isl::checked::set subtract(isl::checked::set set2) const;
+  inline isl::checked::set unbind_params(isl::checked::multi_id tuple) const;
+  inline isl::checked::map unbind_params_insert_domain(isl::checked::multi_id domain) const;
+  inline isl::checked::set unite(isl::checked::set set2) const;
+  static inline isl::checked::set universe(isl::checked::space space);
+  inline isl::checked::basic_set unshifted_simple_hull() const;
+  inline isl::checked::map unwrap() const;
+  inline isl::checked::set upper_bound(isl::checked::multi_pw_aff upper) const;
+  inline isl::checked::set upper_bound(isl::checked::multi_val upper) const;
+};
+
+// declarations for isl::space
+inline space manage(__isl_take isl_space *ptr);
+inline space manage_copy(__isl_keep isl_space *ptr);
+
+class space {
+  friend inline space manage(__isl_take isl_space *ptr);
+  friend inline space manage_copy(__isl_keep isl_space *ptr);
+
+protected:
+  isl_space *ptr = nullptr;
+
+  inline explicit space(__isl_take isl_space *ptr);
+
+public:
+  inline /* implicit */ space();
+  inline /* implicit */ space(const space &obj);
+  inline space &operator=(space obj);
+  inline ~space();
+  inline __isl_give isl_space *copy() const &;
+  inline __isl_give isl_space *copy() && = delete;
+  inline __isl_keep isl_space *get() const;
+  inline __isl_give isl_space *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::space add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const;
+  inline isl::checked::space add_named_tuple(const std::string &tuple_id, unsigned int dim) const;
+  inline isl::checked::space add_unnamed_tuple(unsigned int dim) const;
+  inline isl::checked::space domain() const;
+  inline isl::checked::space flatten_domain() const;
+  inline isl::checked::space flatten_range() const;
+  inline boolean is_equal(const isl::checked::space &space2) const;
+  inline boolean is_wrapping() const;
+  inline isl::checked::space map_from_set() const;
+  inline isl::checked::space params() const;
+  inline isl::checked::space range() const;
+  static inline isl::checked::space unit(isl::checked::ctx ctx);
+  inline isl::checked::space unwrap() const;
+  inline isl::checked::space wrap() const;
+};
+
+// declarations for isl::union_access_info
+inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+class union_access_info {
+  friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+  friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+protected:
+  isl_union_access_info *ptr = nullptr;
+
+  inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
+
+public:
+  inline /* implicit */ union_access_info();
+  inline /* implicit */ union_access_info(const union_access_info &obj);
+  inline explicit union_access_info(isl::checked::union_map sink);
+  inline union_access_info &operator=(union_access_info obj);
+  inline ~union_access_info();
+  inline __isl_give isl_union_access_info *copy() const &;
+  inline __isl_give isl_union_access_info *copy() && = delete;
+  inline __isl_keep isl_union_access_info *get() const;
+  inline __isl_give isl_union_access_info *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_flow compute_flow() const;
+  inline isl::checked::union_access_info set_kill(isl::checked::union_map kill) const;
+  inline isl::checked::union_access_info set_may_source(isl::checked::union_map may_source) const;
+  inline isl::checked::union_access_info set_must_source(isl::checked::union_map must_source) const;
+  inline isl::checked::union_access_info set_schedule(isl::checked::schedule schedule) const;
+  inline isl::checked::union_access_info set_schedule_map(isl::checked::union_map schedule_map) const;
+};
+
+// declarations for isl::union_flow
+inline union_flow manage(__isl_take isl_union_flow *ptr);
+inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+class union_flow {
+  friend inline union_flow manage(__isl_take isl_union_flow *ptr);
+  friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+protected:
+  isl_union_flow *ptr = nullptr;
+
+  inline explicit union_flow(__isl_take isl_union_flow *ptr);
+
+public:
+  inline /* implicit */ union_flow();
+  inline /* implicit */ union_flow(const union_flow &obj);
+  inline union_flow &operator=(union_flow obj);
+  inline ~union_flow();
+  inline __isl_give isl_union_flow *copy() const &;
+  inline __isl_give isl_union_flow *copy() && = delete;
+  inline __isl_keep isl_union_flow *get() const;
+  inline __isl_give isl_union_flow *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_map full_may_dependence() const;
+  inline isl::checked::union_map get_full_may_dependence() const;
+  inline isl::checked::union_map full_must_dependence() const;
+  inline isl::checked::union_map get_full_must_dependence() const;
+  inline isl::checked::union_map may_dependence() const;
+  inline isl::checked::union_map get_may_dependence() const;
+  inline isl::checked::union_map may_no_source() const;
+  inline isl::checked::union_map get_may_no_source() const;
+  inline isl::checked::union_map must_dependence() const;
+  inline isl::checked::union_map get_must_dependence() const;
+  inline isl::checked::union_map must_no_source() const;
+  inline isl::checked::union_map get_must_no_source() const;
+};
+
+// declarations for isl::union_map
+inline union_map manage(__isl_take isl_union_map *ptr);
+inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+class union_map {
+  friend inline union_map manage(__isl_take isl_union_map *ptr);
+  friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+protected:
+  isl_union_map *ptr = nullptr;
+
+  inline explicit union_map(__isl_take isl_union_map *ptr);
+
+public:
+  inline /* implicit */ union_map();
+  inline /* implicit */ union_map(const union_map &obj);
+  inline /* implicit */ union_map(isl::checked::basic_map bmap);
+  inline /* implicit */ union_map(isl::checked::map map);
+  inline explicit union_map(isl::checked::ctx ctx, const std::string &str);
+  inline union_map &operator=(union_map obj);
+  inline ~union_map();
+  inline __isl_give isl_union_map *copy() const &;
+  inline __isl_give isl_union_map *copy() && = delete;
+  inline __isl_keep isl_union_map *get() const;
+  inline __isl_give isl_union_map *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_map affine_hull() const;
+  inline isl::checked::union_map apply_domain(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map apply_range(isl::checked::union_map umap2) const;
+  inline isl::checked::union_set bind_range(isl::checked::multi_id tuple) const;
+  inline isl::checked::union_map coalesce() const;
+  inline isl::checked::union_map compute_divs() const;
+  inline isl::checked::union_map curry() const;
+  inline isl::checked::union_set deltas() const;
+  inline isl::checked::union_map detect_equalities() const;
+  inline isl::checked::union_set domain() const;
+  inline isl::checked::union_map domain_factor_domain() const;
+  inline isl::checked::union_map domain_factor_range() const;
+  inline isl::checked::union_map domain_map() const;
+  inline isl::checked::union_pw_multi_aff domain_map_union_pw_multi_aff() const;
+  inline isl::checked::union_map domain_product(isl::checked::union_map umap2) const;
+  static inline isl::checked::union_map empty(isl::checked::ctx ctx);
+  inline isl::checked::union_map eq_at(isl::checked::multi_union_pw_aff mupa) const;
+  inline boolean every_map(const std::function<boolean(isl::checked::map)> &test) const;
+  inline isl::checked::map extract_map(isl::checked::space space) const;
+  inline isl::checked::union_map factor_domain() const;
+  inline isl::checked::union_map factor_range() const;
+  inline isl::checked::union_map fixed_power(isl::checked::val exp) const;
+  inline isl::checked::union_map fixed_power(long exp) const;
+  inline stat foreach_map(const std::function<stat(isl::checked::map)> &fn) const;
+  static inline isl::checked::union_map from(isl::checked::multi_union_pw_aff mupa);
+  static inline isl::checked::union_map from(isl::checked::union_pw_multi_aff upma);
+  static inline isl::checked::union_map from_domain(isl::checked::union_set uset);
+  static inline isl::checked::union_map from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range);
+  static inline isl::checked::union_map from_range(isl::checked::union_set uset);
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::union_map gist(isl::checked::union_map context) const;
+  inline isl::checked::union_map gist_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_map gist_params(isl::checked::set set) const;
+  inline isl::checked::union_map gist_range(isl::checked::union_set uset) const;
+  inline isl::checked::union_map intersect(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map intersect_domain(isl::checked::space space) const;
+  inline isl::checked::union_map intersect_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_map intersect_params(isl::checked::set set) const;
+  inline isl::checked::union_map intersect_range(isl::checked::space space) const;
+  inline isl::checked::union_map intersect_range(isl::checked::union_set uset) const;
+  inline boolean is_bijective() const;
+  inline boolean is_disjoint(const isl::checked::union_map &umap2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::union_map &umap2) const;
+  inline boolean is_injective() const;
+  inline boolean is_single_valued() const;
+  inline boolean is_strict_subset(const isl::checked::union_map &umap2) const;
+  inline boolean is_subset(const isl::checked::union_map &umap2) const;
+  inline boolean isa_map() const;
+  inline isl::checked::union_map lexmax() const;
+  inline isl::checked::union_map lexmin() const;
+  inline isl::checked::union_map polyhedral_hull() const;
+  inline isl::checked::union_map preimage_domain(isl::checked::multi_aff ma) const;
+  inline isl::checked::union_map preimage_domain(isl::checked::multi_pw_aff mpa) const;
+  inline isl::checked::union_map preimage_domain(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::union_map preimage_domain(isl::checked::union_pw_multi_aff upma) const;
+  inline isl::checked::union_map preimage_range(isl::checked::multi_aff ma) const;
+  inline isl::checked::union_map preimage_range(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::union_map preimage_range(isl::checked::union_pw_multi_aff upma) const;
+  inline isl::checked::union_map product(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map project_out_all_params() const;
+  inline isl::checked::union_set range() const;
+  inline isl::checked::union_map range_factor_domain() const;
+  inline isl::checked::union_map range_factor_range() const;
+  inline isl::checked::union_map range_map() const;
+  inline isl::checked::union_map range_product(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map range_reverse() const;
+  inline isl::checked::union_map reverse() const;
+  inline isl::checked::union_map subtract(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map subtract_domain(isl::checked::union_set dom) const;
+  inline isl::checked::union_map subtract_range(isl::checked::union_set dom) const;
+  inline isl::checked::union_map uncurry() const;
+  inline isl::checked::union_map unite(isl::checked::union_map umap2) const;
+  inline isl::checked::union_map universe() const;
+  inline isl::checked::union_set wrap() const;
+  inline isl::checked::union_map zip() const;
+};
+
+// declarations for isl::union_pw_aff
+inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+class union_pw_aff {
+  friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+  friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+protected:
+  isl_union_pw_aff *ptr = nullptr;
+
+  inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff();
+  inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
+  inline /* implicit */ union_pw_aff(isl::checked::aff aff);
+  inline /* implicit */ union_pw_aff(isl::checked::pw_aff pa);
+  inline explicit union_pw_aff(isl::checked::ctx ctx, const std::string &str);
+  inline union_pw_aff &operator=(union_pw_aff obj);
+  inline ~union_pw_aff();
+  inline __isl_give isl_union_pw_aff *copy() const &;
+  inline __isl_give isl_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff *get() const;
+  inline __isl_give isl_union_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_pw_aff add(isl::checked::union_pw_aff upa2) const;
+  inline isl::checked::union_set bind(isl::checked::id id) const;
+  inline isl::checked::union_set bind(const std::string &id) const;
+  inline isl::checked::union_pw_aff coalesce() const;
+  inline isl::checked::union_set domain() const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::union_pw_aff gist(isl::checked::union_set context) const;
+  inline isl::checked::union_pw_aff intersect_domain(isl::checked::space space) const;
+  inline isl::checked::union_pw_aff intersect_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_aff intersect_params(isl::checked::set set) const;
+  inline isl::checked::union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
+  inline isl::checked::union_pw_aff sub(isl::checked::union_pw_aff upa2) const;
+  inline isl::checked::union_pw_aff subtract_domain(isl::checked::space space) const;
+  inline isl::checked::union_pw_aff subtract_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_aff union_add(isl::checked::union_pw_aff upa2) const;
+};
+
+// declarations for isl::union_pw_aff_list
+inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+class union_pw_aff_list {
+  friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+  friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+protected:
+  isl_union_pw_aff_list *ptr = nullptr;
+
+  inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff_list();
+  inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
+  inline explicit union_pw_aff_list(isl::checked::ctx ctx, int n);
+  inline explicit union_pw_aff_list(isl::checked::union_pw_aff el);
+  inline union_pw_aff_list &operator=(union_pw_aff_list obj);
+  inline ~union_pw_aff_list();
+  inline __isl_give isl_union_pw_aff_list *copy() const &;
+  inline __isl_give isl_union_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff_list *get() const;
+  inline __isl_give isl_union_pw_aff_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_pw_aff_list add(isl::checked::union_pw_aff el) const;
+  inline isl::checked::union_pw_aff_list clear() const;
+  inline isl::checked::union_pw_aff_list concat(isl::checked::union_pw_aff_list list2) const;
+  inline isl::checked::union_pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const;
+  inline isl::checked::union_pw_aff at(int index) const;
+  inline isl::checked::union_pw_aff get_at(int index) const;
+  inline isl::checked::union_pw_aff_list insert(unsigned int pos, isl::checked::union_pw_aff el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::union_pw_multi_aff
+inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+class union_pw_multi_aff {
+  friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+  friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+protected:
+  isl_union_pw_multi_aff *ptr = nullptr;
+
+  inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_multi_aff();
+  inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
+  inline /* implicit */ union_pw_multi_aff(isl::checked::multi_aff ma);
+  inline /* implicit */ union_pw_multi_aff(isl::checked::pw_multi_aff pma);
+  inline /* implicit */ union_pw_multi_aff(isl::checked::union_pw_aff upa);
+  inline explicit union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
+  inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
+  inline ~union_pw_multi_aff();
+  inline __isl_give isl_union_pw_multi_aff *copy() const &;
+  inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_multi_aff *get() const;
+  inline __isl_give isl_union_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_pw_multi_aff add(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::union_pw_multi_aff apply(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::pw_multi_aff as_pw_multi_aff() const;
+  inline isl::checked::union_pw_multi_aff coalesce() const;
+  inline isl::checked::union_set domain() const;
+  static inline isl::checked::union_pw_multi_aff empty(isl::checked::ctx ctx);
+  inline isl::checked::pw_multi_aff extract_pw_multi_aff(isl::checked::space space) const;
+  inline isl::checked::union_pw_multi_aff flat_range_product(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::union_pw_multi_aff gist(isl::checked::union_set context) const;
+  inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::space space) const;
+  inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_multi_aff intersect_params(isl::checked::set set) const;
+  inline boolean involves_locals() const;
+  inline boolean isa_pw_multi_aff() const;
+  inline boolean plain_is_empty() const;
+  inline isl::checked::union_pw_multi_aff pullback(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::union_pw_multi_aff range_factor_domain() const;
+  inline isl::checked::union_pw_multi_aff range_factor_range() const;
+  inline isl::checked::union_pw_multi_aff range_product(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::union_pw_multi_aff sub(isl::checked::union_pw_multi_aff upma2) const;
+  inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::space space) const;
+  inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::union_set uset) const;
+  inline isl::checked::union_pw_multi_aff union_add(isl::checked::union_pw_multi_aff upma2) const;
+};
+
+// declarations for isl::union_set
+inline union_set manage(__isl_take isl_union_set *ptr);
+inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+class union_set {
+  friend inline union_set manage(__isl_take isl_union_set *ptr);
+  friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+protected:
+  isl_union_set *ptr = nullptr;
+
+  inline explicit union_set(__isl_take isl_union_set *ptr);
+
+public:
+  inline /* implicit */ union_set();
+  inline /* implicit */ union_set(const union_set &obj);
+  inline /* implicit */ union_set(isl::checked::basic_set bset);
+  inline /* implicit */ union_set(isl::checked::point pnt);
+  inline /* implicit */ union_set(isl::checked::set set);
+  inline explicit union_set(isl::checked::ctx ctx, const std::string &str);
+  inline union_set &operator=(union_set obj);
+  inline ~union_set();
+  inline __isl_give isl_union_set *copy() const &;
+  inline __isl_give isl_union_set *copy() && = delete;
+  inline __isl_keep isl_union_set *get() const;
+  inline __isl_give isl_union_set *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_set affine_hull() const;
+  inline isl::checked::union_set apply(isl::checked::union_map umap) const;
+  inline isl::checked::union_set coalesce() const;
+  inline isl::checked::union_set compute_divs() const;
+  inline isl::checked::union_set detect_equalities() const;
+  static inline isl::checked::union_set empty(isl::checked::ctx ctx);
+  inline boolean every_set(const std::function<boolean(isl::checked::set)> &test) const;
+  inline isl::checked::set extract_set(isl::checked::space space) const;
+  inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
+  inline stat foreach_set(const std::function<stat(isl::checked::set)> &fn) const;
+  inline isl::checked::space space() const;
+  inline isl::checked::space get_space() const;
+  inline isl::checked::union_set gist(isl::checked::union_set context) const;
+  inline isl::checked::union_set gist_params(isl::checked::set set) const;
+  inline isl::checked::union_map identity() const;
+  inline isl::checked::union_set intersect(isl::checked::union_set uset2) const;
+  inline isl::checked::union_set intersect_params(isl::checked::set set) const;
+  inline boolean is_disjoint(const isl::checked::union_set &uset2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const isl::checked::union_set &uset2) const;
+  inline boolean is_strict_subset(const isl::checked::union_set &uset2) const;
+  inline boolean is_subset(const isl::checked::union_set &uset2) const;
+  inline boolean isa_set() const;
+  inline isl::checked::union_set lexmax() const;
+  inline isl::checked::union_set lexmin() const;
+  inline isl::checked::union_set polyhedral_hull() const;
+  inline isl::checked::union_set preimage(isl::checked::multi_aff ma) const;
+  inline isl::checked::union_set preimage(isl::checked::pw_multi_aff pma) const;
+  inline isl::checked::union_set preimage(isl::checked::union_pw_multi_aff upma) const;
+  inline isl::checked::point sample_point() const;
+  inline isl::checked::union_set subtract(isl::checked::union_set uset2) const;
+  inline isl::checked::union_set unite(isl::checked::union_set uset2) const;
+  inline isl::checked::union_set universe() const;
+  inline isl::checked::union_map unwrap() const;
+};
+
+// declarations for isl::union_set_list
+inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+class union_set_list {
+  friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+  friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+protected:
+  isl_union_set_list *ptr = nullptr;
+
+  inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
+
+public:
+  inline /* implicit */ union_set_list();
+  inline /* implicit */ union_set_list(const union_set_list &obj);
+  inline explicit union_set_list(isl::checked::ctx ctx, int n);
+  inline explicit union_set_list(isl::checked::union_set el);
+  inline union_set_list &operator=(union_set_list obj);
+  inline ~union_set_list();
+  inline __isl_give isl_union_set_list *copy() const &;
+  inline __isl_give isl_union_set_list *copy() && = delete;
+  inline __isl_keep isl_union_set_list *get() const;
+  inline __isl_give isl_union_set_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::union_set_list add(isl::checked::union_set el) const;
+  inline isl::checked::union_set_list clear() const;
+  inline isl::checked::union_set_list concat(isl::checked::union_set_list list2) const;
+  inline isl::checked::union_set_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::union_set)> &fn) const;
+  inline isl::checked::union_set at(int index) const;
+  inline isl::checked::union_set get_at(int index) const;
+  inline isl::checked::union_set_list insert(unsigned int pos, isl::checked::union_set el) const;
+  inline class size size() const;
+};
+
+// declarations for isl::val
+inline val manage(__isl_take isl_val *ptr);
+inline val manage_copy(__isl_keep isl_val *ptr);
+
+class val {
+  friend inline val manage(__isl_take isl_val *ptr);
+  friend inline val manage_copy(__isl_keep isl_val *ptr);
+
+protected:
+  isl_val *ptr = nullptr;
+
+  inline explicit val(__isl_take isl_val *ptr);
+
+public:
+  inline /* implicit */ val();
+  inline /* implicit */ val(const val &obj);
+  inline explicit val(isl::checked::ctx ctx, long i);
+  inline explicit val(isl::checked::ctx ctx, const std::string &str);
+  inline val &operator=(val obj);
+  inline ~val();
+  inline __isl_give isl_val *copy() const &;
+  inline __isl_give isl_val *copy() && = delete;
+  inline __isl_keep isl_val *get() const;
+  inline __isl_give isl_val *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::val abs() const;
+  inline boolean abs_eq(const isl::checked::val &v2) const;
+  inline boolean abs_eq(long v2) const;
+  inline isl::checked::val add(isl::checked::val v2) const;
+  inline isl::checked::val add(long v2) const;
+  inline isl::checked::val ceil() const;
+  inline int cmp_si(long i) const;
+  inline isl::checked::val div(isl::checked::val v2) const;
+  inline isl::checked::val div(long v2) const;
+  inline boolean eq(const isl::checked::val &v2) const;
+  inline boolean eq(long v2) const;
+  inline isl::checked::val floor() const;
+  inline isl::checked::val gcd(isl::checked::val v2) const;
+  inline isl::checked::val gcd(long v2) const;
+  inline boolean ge(const isl::checked::val &v2) const;
+  inline boolean ge(long v2) const;
+  inline long den_si() const;
+  inline long get_den_si() const;
+  inline long num_si() const;
+  inline long get_num_si() const;
+  inline boolean gt(const isl::checked::val &v2) const;
+  inline boolean gt(long v2) const;
+  static inline isl::checked::val infty(isl::checked::ctx ctx);
+  inline isl::checked::val inv() const;
+  inline boolean is_divisible_by(const isl::checked::val &v2) const;
+  inline boolean is_divisible_by(long v2) const;
+  inline boolean is_infty() const;
+  inline boolean is_int() const;
+  inline boolean is_nan() const;
+  inline boolean is_neg() const;
+  inline boolean is_neginfty() const;
+  inline boolean is_negone() const;
+  inline boolean is_nonneg() const;
+  inline boolean is_nonpos() const;
+  inline boolean is_one() const;
+  inline boolean is_pos() const;
+  inline boolean is_rat() const;
+  inline boolean is_zero() const;
+  inline boolean le(const isl::checked::val &v2) const;
+  inline boolean le(long v2) const;
+  inline boolean lt(const isl::checked::val &v2) const;
+  inline boolean lt(long v2) const;
+  inline isl::checked::val max(isl::checked::val v2) const;
+  inline isl::checked::val max(long v2) const;
+  inline isl::checked::val min(isl::checked::val v2) const;
+  inline isl::checked::val min(long v2) const;
+  inline isl::checked::val mod(isl::checked::val v2) const;
+  inline isl::checked::val mod(long v2) const;
+  inline isl::checked::val mul(isl::checked::val v2) const;
+  inline isl::checked::val mul(long v2) const;
+  static inline isl::checked::val nan(isl::checked::ctx ctx);
+  inline boolean ne(const isl::checked::val &v2) const;
+  inline boolean ne(long v2) const;
+  inline isl::checked::val neg() const;
+  static inline isl::checked::val neginfty(isl::checked::ctx ctx);
+  static inline isl::checked::val negone(isl::checked::ctx ctx);
+  static inline isl::checked::val one(isl::checked::ctx ctx);
+  inline isl::checked::val pow2() const;
+  inline int sgn() const;
+  inline isl::checked::val sub(isl::checked::val v2) const;
+  inline isl::checked::val sub(long v2) const;
+  inline isl::checked::val trunc() const;
+  static inline isl::checked::val zero(isl::checked::ctx ctx);
+};
+
+// declarations for isl::val_list
+inline val_list manage(__isl_take isl_val_list *ptr);
+inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+class val_list {
+  friend inline val_list manage(__isl_take isl_val_list *ptr);
+  friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+protected:
+  isl_val_list *ptr = nullptr;
+
+  inline explicit val_list(__isl_take isl_val_list *ptr);
+
+public:
+  inline /* implicit */ val_list();
+  inline /* implicit */ val_list(const val_list &obj);
+  inline explicit val_list(isl::checked::ctx ctx, int n);
+  inline explicit val_list(isl::checked::val el);
+  inline val_list &operator=(val_list obj);
+  inline ~val_list();
+  inline __isl_give isl_val_list *copy() const &;
+  inline __isl_give isl_val_list *copy() && = delete;
+  inline __isl_keep isl_val_list *get() const;
+  inline __isl_give isl_val_list *release();
+  inline bool is_null() const;
+  inline isl::checked::ctx ctx() const;
+
+  inline isl::checked::val_list add(isl::checked::val el) const;
+  inline isl::checked::val_list add(long el) const;
+  inline isl::checked::val_list clear() const;
+  inline isl::checked::val_list concat(isl::checked::val_list list2) const;
+  inline isl::checked::val_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(isl::checked::val)> &fn) const;
+  inline isl::checked::val at(int index) const;
+  inline isl::checked::val get_at(int index) const;
+  inline isl::checked::val_list insert(unsigned int pos, isl::checked::val el) const;
+  inline isl::checked::val_list insert(unsigned int pos, long el) const;
+  inline class size size() const;
+};
+
+// implementations for isl::aff
+aff manage(__isl_take isl_aff *ptr) {
+  return aff(ptr);
+}
+aff manage_copy(__isl_keep isl_aff *ptr) {
+  ptr = isl_aff_copy(ptr);
+  return aff(ptr);
+}
+
+aff::aff()
+    : ptr(nullptr) {}
+
+aff::aff(const aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+aff::aff(__isl_take isl_aff *ptr)
+    : ptr(ptr) {}
+
+aff::aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+aff &aff::operator=(aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff::~aff() {
+  if (ptr)
+    isl_aff_free(ptr);
+}
+
+__isl_give isl_aff *aff::copy() const & {
+  return isl_aff_copy(ptr);
+}
+
+__isl_keep isl_aff *aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff *aff::release() {
+  isl_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx aff::ctx() const {
+  return isl::checked::ctx(isl_aff_get_ctx(ptr));
+}
+
+isl::checked::aff aff::add(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_add(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::add_constant(isl::checked::val v) const
+{
+  auto res = isl_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::add_constant(long v) const
+{
+  return this->add_constant(isl::checked::val(ctx(), v));
+}
+
+isl::checked::basic_set aff::bind(isl::checked::id id) const
+{
+  auto res = isl_aff_bind_id(copy(), id.release());
+  return manage(res);
+}
+
+isl::checked::basic_set aff::bind(const std::string &id) const
+{
+  return this->bind(isl::checked::id(ctx(), id));
+}
+
+isl::checked::aff aff::ceil() const
+{
+  auto res = isl_aff_ceil(copy());
+  return manage(res);
+}
+
+isl::checked::aff aff::div(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_div(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::set aff::eq_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_eq_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::val aff::eval(isl::checked::point pnt) const
+{
+  auto res = isl_aff_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::floor() const
+{
+  auto res = isl_aff_floor(copy());
+  return manage(res);
+}
+
+isl::checked::set aff::ge_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_ge_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::gist(isl::checked::set context) const
+{
+  auto res = isl_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::set aff::gt_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_gt_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::set aff::le_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_le_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::set aff::lt_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_lt_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::mod(isl::checked::val mod) const
+{
+  auto res = isl_aff_mod_val(copy(), mod.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::mod(long mod) const
+{
+  return this->mod(isl::checked::val(ctx(), mod));
+}
+
+isl::checked::aff aff::mul(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_mul(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::set aff::ne_set(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_ne_set(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::neg() const
+{
+  auto res = isl_aff_neg(copy());
+  return manage(res);
+}
+
+isl::checked::aff aff::pullback(isl::checked::multi_aff ma) const
+{
+  auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::scale(isl::checked::val v) const
+{
+  auto res = isl_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::aff aff::scale_down(isl::checked::val v) const
+{
+  auto res = isl_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::aff aff::sub(isl::checked::aff aff2) const
+{
+  auto res = isl_aff_sub(copy(), aff2.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
+{
+  auto res = isl_aff_unbind_params_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::aff aff::zero_on_domain(isl::checked::space space)
+{
+  auto res = isl_aff_zero_on_domain_space(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const aff &obj)
+{
+  char *str = isl_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::aff_list
+aff_list manage(__isl_take isl_aff_list *ptr) {
+  return aff_list(ptr);
+}
+aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
+  ptr = isl_aff_list_copy(ptr);
+  return aff_list(ptr);
+}
+
+aff_list::aff_list()
+    : ptr(nullptr) {}
+
+aff_list::aff_list(const aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+aff_list::aff_list(__isl_take isl_aff_list *ptr)
+    : ptr(ptr) {}
+
+aff_list::aff_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_aff_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+aff_list::aff_list(isl::checked::aff el)
+{
+  auto res = isl_aff_list_from_aff(el.release());
+  ptr = res;
+}
+
+aff_list &aff_list::operator=(aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff_list::~aff_list() {
+  if (ptr)
+    isl_aff_list_free(ptr);
+}
+
+__isl_give isl_aff_list *aff_list::copy() const & {
+  return isl_aff_list_copy(ptr);
+}
+
+__isl_keep isl_aff_list *aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff_list *aff_list::release() {
+  isl_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx aff_list::ctx() const {
+  return isl::checked::ctx(isl_aff_list_get_ctx(ptr));
+}
+
+isl::checked::aff_list aff_list::add(isl::checked::aff el) const
+{
+  auto res = isl_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::aff_list aff_list::clear() const
+{
+  auto res = isl_aff_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::aff_list aff_list::concat(isl::checked::aff_list list2) const
+{
+  auto res = isl_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::aff_list aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat aff_list::foreach(const std::function<stat(isl::checked::aff)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::aff)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::aff aff_list::at(int index) const
+{
+  auto res = isl_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::aff aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::aff_list aff_list::insert(unsigned int pos, isl::checked::aff el) const
+{
+  auto res = isl_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size aff_list::size() const
+{
+  auto res = isl_aff_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const aff_list &obj)
+{
+  char *str = isl_aff_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_build
+ast_build manage(__isl_take isl_ast_build *ptr) {
+  return ast_build(ptr);
+}
+ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
+  ptr = isl_ast_build_copy(ptr);
+  return ast_build(ptr);
+}
+
+ast_build::ast_build()
+    : ptr(nullptr) {}
+
+ast_build::ast_build(const ast_build &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+  copy_callbacks(obj);
+}
+
+ast_build::ast_build(__isl_take isl_ast_build *ptr)
+    : ptr(ptr) {}
+
+ast_build::ast_build(isl::checked::ctx ctx)
+{
+  auto res = isl_ast_build_alloc(ctx.release());
+  ptr = res;
+}
+
+ast_build &ast_build::operator=(ast_build obj) {
+  std::swap(this->ptr, obj.ptr);
+  copy_callbacks(obj);
+  return *this;
+}
+
+ast_build::~ast_build() {
+  if (ptr)
+    isl_ast_build_free(ptr);
+}
+
+__isl_give isl_ast_build *ast_build::copy() const & {
+  return isl_ast_build_copy(ptr);
+}
+
+__isl_keep isl_ast_build *ast_build::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_build *ast_build::release() {
+  if (at_each_domain_data)
+    isl_die(ctx().get(), isl_error_invalid, "cannot release object with persistent callbacks", return nullptr);
+  isl_ast_build *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_build::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx ast_build::ctx() const {
+  return isl::checked::ctx(isl_ast_build_get_ctx(ptr));
+}
+
+ast_build &ast_build::copy_callbacks(const ast_build &obj)
+{
+  at_each_domain_data = obj.at_each_domain_data;
+  return *this;
+}
+
+isl_ast_node *ast_build::at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2)
+{
+  auto *data = static_cast<struct at_each_domain_data *>(arg_2);
+  auto ret = (data->func)(manage(arg_0), manage_copy(arg_1));
+  return ret.release();
+}
+
+void ast_build::set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn)
+{
+  at_each_domain_data = std::make_shared<struct at_each_domain_data>();
+  at_each_domain_data->func = fn;
+  ptr = isl_ast_build_set_at_each_domain(ptr, &at_each_domain, at_each_domain_data.get());
+}
+
+isl::checked::ast_build ast_build::set_at_each_domain(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn) const
+{
+  auto copy = *this;
+  copy.set_at_each_domain_data(fn);
+  return copy;
+}
+
+isl::checked::ast_expr ast_build::access_from(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_build::access_from(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_build::call_from(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_build::call_from(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_build::expr_from(isl::checked::pw_aff pa) const
+{
+  auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_build::expr_from(isl::checked::set set) const
+{
+  auto res = isl_ast_build_expr_from_set(get(), set.release());
+  return manage(res);
+}
+
+isl::checked::ast_build ast_build::from_context(isl::checked::set set)
+{
+  auto res = isl_ast_build_from_context(set.release());
+  return manage(res);
+}
+
+isl::checked::union_map ast_build::schedule() const
+{
+  auto res = isl_ast_build_get_schedule(get());
+  return manage(res);
+}
+
+isl::checked::union_map ast_build::get_schedule() const
+{
+  return schedule();
+}
+
+isl::checked::ast_node ast_build::node_from(isl::checked::schedule schedule) const
+{
+  auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
+  return manage(res);
+}
+
+isl::checked::ast_node ast_build::node_from_schedule_map(isl::checked::union_map schedule) const
+{
+  auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
+  return manage(res);
+}
+
+// implementations for isl::ast_expr
+ast_expr manage(__isl_take isl_ast_expr *ptr) {
+  return ast_expr(ptr);
+}
+ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
+  ptr = isl_ast_expr_copy(ptr);
+  return ast_expr(ptr);
+}
+
+ast_expr::ast_expr()
+    : ptr(nullptr) {}
+
+ast_expr::ast_expr(const ast_expr &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
+    : ptr(ptr) {}
+
+ast_expr &ast_expr::operator=(ast_expr obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_expr::~ast_expr() {
+  if (ptr)
+    isl_ast_expr_free(ptr);
+}
+
+__isl_give isl_ast_expr *ast_expr::copy() const & {
+  return isl_ast_expr_copy(ptr);
+}
+
+__isl_keep isl_ast_expr *ast_expr::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_expr *ast_expr::release() {
+  isl_ast_expr *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_expr::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+boolean ast_expr::isa_type(T subtype) const
+{
+  if (is_null())
+    return boolean();
+  return isl_ast_expr_get_type(get()) == subtype;
+}
+template <class T>
+boolean ast_expr::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_expr::as() const
+{
+ if (isa<T>().is_false())
+    isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
+  return T(copy());
+}
+
+isl::checked::ctx ast_expr::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+std::string ast_expr::to_C_str() const
+{
+  auto res = isl_ast_expr_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_id
+ast_expr_id::ast_expr_id()
+    : ast_expr() {}
+
+ast_expr_id::ast_expr_id(const ast_expr_id &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_id::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::checked::id ast_expr_id::id() const
+{
+  auto res = isl_ast_expr_id_get_id(get());
+  return manage(res);
+}
+
+isl::checked::id ast_expr_id::get_id() const
+{
+  return id();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_id &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_int
+ast_expr_int::ast_expr_int()
+    : ast_expr() {}
+
+ast_expr_int::ast_expr_int(const ast_expr_int &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_int::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::checked::val ast_expr_int::val() const
+{
+  auto res = isl_ast_expr_int_get_val(get());
+  return manage(res);
+}
+
+isl::checked::val ast_expr_int::get_val() const
+{
+  return val();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_int &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op
+ast_expr_op::ast_expr_op()
+    : ast_expr() {}
+
+ast_expr_op::ast_expr_op(const ast_expr_op &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+template <typename T, typename>
+boolean ast_expr_op::isa_type(T subtype) const
+{
+  if (is_null())
+    return boolean();
+  return isl_ast_expr_op_get_type(get()) == subtype;
+}
+template <class T>
+boolean ast_expr_op::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_expr_op::as() const
+{
+ if (isa<T>().is_false())
+    isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
+  return T(copy());
+}
+
+isl::checked::ctx ast_expr_op::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::checked::ast_expr ast_expr_op::arg(int pos) const
+{
+  auto res = isl_ast_expr_op_get_arg(get(), pos);
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_expr_op::get_arg(int pos) const
+{
+  return arg(pos);
+}
+
+class size ast_expr_op::n_arg() const
+{
+  auto res = isl_ast_expr_op_get_n_arg(get());
+  return manage(res);
+}
+
+class size ast_expr_op::get_n_arg() const
+{
+  return n_arg();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_access
+ast_expr_op_access::ast_expr_op_access()
+    : ast_expr_op() {}
+
+ast_expr_op_access::ast_expr_op_access(const ast_expr_op_access &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_access::ast_expr_op_access(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_access &ast_expr_op_access::operator=(ast_expr_op_access obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_access::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_access &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_add
+ast_expr_op_add::ast_expr_op_add()
+    : ast_expr_op() {}
+
+ast_expr_op_add::ast_expr_op_add(const ast_expr_op_add &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_add::ast_expr_op_add(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_add &ast_expr_op_add::operator=(ast_expr_op_add obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_add::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_add &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_address_of
+ast_expr_op_address_of::ast_expr_op_address_of()
+    : ast_expr_op() {}
+
+ast_expr_op_address_of::ast_expr_op_address_of(const ast_expr_op_address_of &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_address_of::ast_expr_op_address_of(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_address_of &ast_expr_op_address_of::operator=(ast_expr_op_address_of obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_address_of::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_address_of &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_and
+ast_expr_op_and::ast_expr_op_and()
+    : ast_expr_op() {}
+
+ast_expr_op_and::ast_expr_op_and(const ast_expr_op_and &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_and::ast_expr_op_and(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_and &ast_expr_op_and::operator=(ast_expr_op_and obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_and::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_and_then
+ast_expr_op_and_then::ast_expr_op_and_then()
+    : ast_expr_op() {}
+
+ast_expr_op_and_then::ast_expr_op_and_then(const ast_expr_op_and_then &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_and_then::ast_expr_op_and_then(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_and_then &ast_expr_op_and_then::operator=(ast_expr_op_and_then obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_and_then::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and_then &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_call
+ast_expr_op_call::ast_expr_op_call()
+    : ast_expr_op() {}
+
+ast_expr_op_call::ast_expr_op_call(const ast_expr_op_call &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_call::ast_expr_op_call(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_call &ast_expr_op_call::operator=(ast_expr_op_call obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_call::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_call &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_cond
+ast_expr_op_cond::ast_expr_op_cond()
+    : ast_expr_op() {}
+
+ast_expr_op_cond::ast_expr_op_cond(const ast_expr_op_cond &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_cond::ast_expr_op_cond(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_cond &ast_expr_op_cond::operator=(ast_expr_op_cond obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_cond::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_cond &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_div
+ast_expr_op_div::ast_expr_op_div()
+    : ast_expr_op() {}
+
+ast_expr_op_div::ast_expr_op_div(const ast_expr_op_div &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_div::ast_expr_op_div(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_div &ast_expr_op_div::operator=(ast_expr_op_div obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_div::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_div &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_eq
+ast_expr_op_eq::ast_expr_op_eq()
+    : ast_expr_op() {}
+
+ast_expr_op_eq::ast_expr_op_eq(const ast_expr_op_eq &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_eq::ast_expr_op_eq(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_eq &ast_expr_op_eq::operator=(ast_expr_op_eq obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_eq::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_eq &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_fdiv_q
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q()
+    : ast_expr_op() {}
+
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_fdiv_q &ast_expr_op_fdiv_q::operator=(ast_expr_op_fdiv_q obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_fdiv_q::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_fdiv_q &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_ge
+ast_expr_op_ge::ast_expr_op_ge()
+    : ast_expr_op() {}
+
+ast_expr_op_ge::ast_expr_op_ge(const ast_expr_op_ge &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_ge::ast_expr_op_ge(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_ge &ast_expr_op_ge::operator=(ast_expr_op_ge obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_ge::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_ge &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_gt
+ast_expr_op_gt::ast_expr_op_gt()
+    : ast_expr_op() {}
+
+ast_expr_op_gt::ast_expr_op_gt(const ast_expr_op_gt &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_gt::ast_expr_op_gt(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_gt &ast_expr_op_gt::operator=(ast_expr_op_gt obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_gt::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_gt &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_le
+ast_expr_op_le::ast_expr_op_le()
+    : ast_expr_op() {}
+
+ast_expr_op_le::ast_expr_op_le(const ast_expr_op_le &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_le::ast_expr_op_le(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_le &ast_expr_op_le::operator=(ast_expr_op_le obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_le::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_le &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_lt
+ast_expr_op_lt::ast_expr_op_lt()
+    : ast_expr_op() {}
+
+ast_expr_op_lt::ast_expr_op_lt(const ast_expr_op_lt &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_lt::ast_expr_op_lt(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_lt &ast_expr_op_lt::operator=(ast_expr_op_lt obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_lt::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_lt &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_max
+ast_expr_op_max::ast_expr_op_max()
+    : ast_expr_op() {}
+
+ast_expr_op_max::ast_expr_op_max(const ast_expr_op_max &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_max::ast_expr_op_max(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_max &ast_expr_op_max::operator=(ast_expr_op_max obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_max::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_max &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_member
+ast_expr_op_member::ast_expr_op_member()
+    : ast_expr_op() {}
+
+ast_expr_op_member::ast_expr_op_member(const ast_expr_op_member &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_member::ast_expr_op_member(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_member &ast_expr_op_member::operator=(ast_expr_op_member obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_member::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_member &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_min
+ast_expr_op_min::ast_expr_op_min()
+    : ast_expr_op() {}
+
+ast_expr_op_min::ast_expr_op_min(const ast_expr_op_min &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_min::ast_expr_op_min(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_min &ast_expr_op_min::operator=(ast_expr_op_min obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_min::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_min &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_minus
+ast_expr_op_minus::ast_expr_op_minus()
+    : ast_expr_op() {}
+
+ast_expr_op_minus::ast_expr_op_minus(const ast_expr_op_minus &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_minus::ast_expr_op_minus(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_minus &ast_expr_op_minus::operator=(ast_expr_op_minus obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_minus::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_minus &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_mul
+ast_expr_op_mul::ast_expr_op_mul()
+    : ast_expr_op() {}
+
+ast_expr_op_mul::ast_expr_op_mul(const ast_expr_op_mul &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_mul::ast_expr_op_mul(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_mul &ast_expr_op_mul::operator=(ast_expr_op_mul obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_mul::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_mul &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_or
+ast_expr_op_or::ast_expr_op_or()
+    : ast_expr_op() {}
+
+ast_expr_op_or::ast_expr_op_or(const ast_expr_op_or &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_or::ast_expr_op_or(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_or &ast_expr_op_or::operator=(ast_expr_op_or obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_or::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_or_else
+ast_expr_op_or_else::ast_expr_op_or_else()
+    : ast_expr_op() {}
+
+ast_expr_op_or_else::ast_expr_op_or_else(const ast_expr_op_or_else &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_or_else::ast_expr_op_or_else(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_or_else &ast_expr_op_or_else::operator=(ast_expr_op_or_else obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_or_else::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or_else &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_pdiv_q
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q()
+    : ast_expr_op() {}
+
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_pdiv_q &ast_expr_op_pdiv_q::operator=(ast_expr_op_pdiv_q obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_pdiv_q::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_q &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_pdiv_r
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r()
+    : ast_expr_op() {}
+
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_pdiv_r &ast_expr_op_pdiv_r::operator=(ast_expr_op_pdiv_r obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_pdiv_r::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_r &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_select
+ast_expr_op_select::ast_expr_op_select()
+    : ast_expr_op() {}
+
+ast_expr_op_select::ast_expr_op_select(const ast_expr_op_select &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_select::ast_expr_op_select(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_select &ast_expr_op_select::operator=(ast_expr_op_select obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_select::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_select &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_sub
+ast_expr_op_sub::ast_expr_op_sub()
+    : ast_expr_op() {}
+
+ast_expr_op_sub::ast_expr_op_sub(const ast_expr_op_sub &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_sub::ast_expr_op_sub(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_sub &ast_expr_op_sub::operator=(ast_expr_op_sub obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_sub::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_sub &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_zdiv_r
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r()
+    : ast_expr_op() {}
+
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_zdiv_r &ast_expr_op_zdiv_r::operator=(ast_expr_op_zdiv_r obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_expr_op_zdiv_r::ctx() const {
+  return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_zdiv_r &obj)
+{
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node
+ast_node manage(__isl_take isl_ast_node *ptr) {
+  return ast_node(ptr);
+}
+ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
+  ptr = isl_ast_node_copy(ptr);
+  return ast_node(ptr);
+}
+
+ast_node::ast_node()
+    : ptr(nullptr) {}
+
+ast_node::ast_node(const ast_node &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+ast_node::ast_node(__isl_take isl_ast_node *ptr)
+    : ptr(ptr) {}
+
+ast_node &ast_node::operator=(ast_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node::~ast_node() {
+  if (ptr)
+    isl_ast_node_free(ptr);
+}
+
+__isl_give isl_ast_node *ast_node::copy() const & {
+  return isl_ast_node_copy(ptr);
+}
+
+__isl_keep isl_ast_node *ast_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node *ast_node::release() {
+  isl_ast_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+boolean ast_node::isa_type(T subtype) const
+{
+  if (is_null())
+    return boolean();
+  return isl_ast_node_get_type(get()) == subtype;
+}
+template <class T>
+boolean ast_node::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_node::as() const
+{
+ if (isa<T>().is_false())
+    isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
+  return T(copy());
+}
+
+isl::checked::ctx ast_node::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+std::string ast_node::to_C_str() const
+{
+  auto res = isl_ast_node_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_block
+ast_node_block::ast_node_block()
+    : ast_node() {}
+
+ast_node_block::ast_node_block(const ast_node_block &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_block &ast_node_block::operator=(ast_node_block obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_node_block::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::checked::ast_node_list ast_node_block::children() const
+{
+  auto res = isl_ast_node_block_get_children(get());
+  return manage(res);
+}
+
+isl::checked::ast_node_list ast_node_block::get_children() const
+{
+  return children();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_block &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_for
+ast_node_for::ast_node_for()
+    : ast_node() {}
+
+ast_node_for::ast_node_for(const ast_node_for &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_for &ast_node_for::operator=(ast_node_for obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_node_for::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::checked::ast_node ast_node_for::body() const
+{
+  auto res = isl_ast_node_for_get_body(get());
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_for::get_body() const
+{
+  return body();
+}
+
+isl::checked::ast_expr ast_node_for::cond() const
+{
+  auto res = isl_ast_node_for_get_cond(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_for::get_cond() const
+{
+  return cond();
+}
+
+isl::checked::ast_expr ast_node_for::inc() const
+{
+  auto res = isl_ast_node_for_get_inc(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_for::get_inc() const
+{
+  return inc();
+}
+
+isl::checked::ast_expr ast_node_for::init() const
+{
+  auto res = isl_ast_node_for_get_init(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_for::get_init() const
+{
+  return init();
+}
+
+isl::checked::ast_expr ast_node_for::iterator() const
+{
+  auto res = isl_ast_node_for_get_iterator(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_for::get_iterator() const
+{
+  return iterator();
+}
+
+boolean ast_node_for::is_degenerate() const
+{
+  auto res = isl_ast_node_for_is_degenerate(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_for &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_if
+ast_node_if::ast_node_if()
+    : ast_node() {}
+
+ast_node_if::ast_node_if(const ast_node_if &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_if &ast_node_if::operator=(ast_node_if obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_node_if::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::checked::ast_expr ast_node_if::cond() const
+{
+  auto res = isl_ast_node_if_get_cond(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_if::get_cond() const
+{
+  return cond();
+}
+
+isl::checked::ast_node ast_node_if::else_node() const
+{
+  auto res = isl_ast_node_if_get_else_node(get());
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_if::get_else_node() const
+{
+  return else_node();
+}
+
+isl::checked::ast_node ast_node_if::then_node() const
+{
+  auto res = isl_ast_node_if_get_then_node(get());
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_if::get_then_node() const
+{
+  return then_node();
+}
+
+boolean ast_node_if::has_else_node() const
+{
+  auto res = isl_ast_node_if_has_else_node(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_if &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_list
+ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
+  return ast_node_list(ptr);
+}
+ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
+  ptr = isl_ast_node_list_copy(ptr);
+  return ast_node_list(ptr);
+}
+
+ast_node_list::ast_node_list()
+    : ptr(nullptr) {}
+
+ast_node_list::ast_node_list(const ast_node_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
+    : ptr(ptr) {}
+
+ast_node_list::ast_node_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_ast_node_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+ast_node_list::ast_node_list(isl::checked::ast_node el)
+{
+  auto res = isl_ast_node_list_from_ast_node(el.release());
+  ptr = res;
+}
+
+ast_node_list &ast_node_list::operator=(ast_node_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node_list::~ast_node_list() {
+  if (ptr)
+    isl_ast_node_list_free(ptr);
+}
+
+__isl_give isl_ast_node_list *ast_node_list::copy() const & {
+  return isl_ast_node_list_copy(ptr);
+}
+
+__isl_keep isl_ast_node_list *ast_node_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node_list *ast_node_list::release() {
+  isl_ast_node_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx ast_node_list::ctx() const {
+  return isl::checked::ctx(isl_ast_node_list_get_ctx(ptr));
+}
+
+isl::checked::ast_node_list ast_node_list::add(isl::checked::ast_node el) const
+{
+  auto res = isl_ast_node_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::ast_node_list ast_node_list::clear() const
+{
+  auto res = isl_ast_node_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::ast_node_list ast_node_list::concat(isl::checked::ast_node_list list2) const
+{
+  auto res = isl_ast_node_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_ast_node_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat ast_node_list::foreach(const std::function<stat(isl::checked::ast_node)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::ast_node)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_list::at(int index) const
+{
+  auto res = isl_ast_node_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::ast_node_list ast_node_list::insert(unsigned int pos, isl::checked::ast_node el) const
+{
+  auto res = isl_ast_node_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size ast_node_list::size() const
+{
+  auto res = isl_ast_node_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_list &obj)
+{
+  char *str = isl_ast_node_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_mark
+ast_node_mark::ast_node_mark()
+    : ast_node() {}
+
+ast_node_mark::ast_node_mark(const ast_node_mark &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_node_mark::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::checked::id ast_node_mark::id() const
+{
+  auto res = isl_ast_node_mark_get_id(get());
+  return manage(res);
+}
+
+isl::checked::id ast_node_mark::get_id() const
+{
+  return id();
+}
+
+isl::checked::ast_node ast_node_mark::node() const
+{
+  auto res = isl_ast_node_mark_get_node(get());
+  return manage(res);
+}
+
+isl::checked::ast_node ast_node_mark::get_node() const
+{
+  return node();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_mark &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_user
+ast_node_user::ast_node_user()
+    : ast_node() {}
+
+ast_node_user::ast_node_user(const ast_node_user &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_user &ast_node_user::operator=(ast_node_user obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx ast_node_user::ctx() const {
+  return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::checked::ast_expr ast_node_user::expr() const
+{
+  auto res = isl_ast_node_user_get_expr(get());
+  return manage(res);
+}
+
+isl::checked::ast_expr ast_node_user::get_expr() const
+{
+  return expr();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_user &obj)
+{
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::basic_map
+basic_map manage(__isl_take isl_basic_map *ptr) {
+  return basic_map(ptr);
+}
+basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
+  ptr = isl_basic_map_copy(ptr);
+  return basic_map(ptr);
+}
+
+basic_map::basic_map()
+    : ptr(nullptr) {}
+
+basic_map::basic_map(const basic_map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+basic_map::basic_map(__isl_take isl_basic_map *ptr)
+    : ptr(ptr) {}
+
+basic_map::basic_map(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+basic_map &basic_map::operator=(basic_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_map::~basic_map() {
+  if (ptr)
+    isl_basic_map_free(ptr);
+}
+
+__isl_give isl_basic_map *basic_map::copy() const & {
+  return isl_basic_map_copy(ptr);
+}
+
+__isl_keep isl_basic_map *basic_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_map *basic_map::release() {
+  isl_basic_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx basic_map::ctx() const {
+  return isl::checked::ctx(isl_basic_map_get_ctx(ptr));
+}
+
+isl::checked::basic_map basic_map::affine_hull() const
+{
+  auto res = isl_basic_map_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::apply_domain(isl::checked::basic_map bmap2) const
+{
+  auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::apply_range(isl::checked::basic_map bmap2) const
+{
+  auto res = isl_basic_map_apply_range(copy(), bmap2.release());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_map::deltas() const
+{
+  auto res = isl_basic_map_deltas(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::detect_equalities() const
+{
+  auto res = isl_basic_map_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::flatten() const
+{
+  auto res = isl_basic_map_flatten(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::flatten_domain() const
+{
+  auto res = isl_basic_map_flatten_domain(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::flatten_range() const
+{
+  auto res = isl_basic_map_flatten_range(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::gist(isl::checked::basic_map context) const
+{
+  auto res = isl_basic_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::intersect(isl::checked::basic_map bmap2) const
+{
+  auto res = isl_basic_map_intersect(copy(), bmap2.release());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::intersect_domain(isl::checked::basic_set bset) const
+{
+  auto res = isl_basic_map_intersect_domain(copy(), bset.release());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::intersect_range(isl::checked::basic_set bset) const
+{
+  auto res = isl_basic_map_intersect_range(copy(), bset.release());
+  return manage(res);
+}
+
+boolean basic_map::is_empty() const
+{
+  auto res = isl_basic_map_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_map::is_equal(const isl::checked::basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_equal(get(), bmap2.get());
+  return manage(res);
+}
+
+boolean basic_map::is_subset(const isl::checked::basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_subset(get(), bmap2.get());
+  return manage(res);
+}
+
+isl::checked::map basic_map::lexmax() const
+{
+  auto res = isl_basic_map_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::map basic_map::lexmin() const
+{
+  auto res = isl_basic_map_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::reverse() const
+{
+  auto res = isl_basic_map_reverse(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map basic_map::sample() const
+{
+  auto res = isl_basic_map_sample(copy());
+  return manage(res);
+}
+
+isl::checked::map basic_map::unite(isl::checked::basic_map bmap2) const
+{
+  auto res = isl_basic_map_union(copy(), bmap2.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const basic_map &obj)
+{
+  char *str = isl_basic_map_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::basic_set
+basic_set manage(__isl_take isl_basic_set *ptr) {
+  return basic_set(ptr);
+}
+basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
+  ptr = isl_basic_set_copy(ptr);
+  return basic_set(ptr);
+}
+
+basic_set::basic_set()
+    : ptr(nullptr) {}
+
+basic_set::basic_set(const basic_set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+basic_set::basic_set(__isl_take isl_basic_set *ptr)
+    : ptr(ptr) {}
+
+basic_set::basic_set(isl::checked::point pnt)
+{
+  auto res = isl_basic_set_from_point(pnt.release());
+  ptr = res;
+}
+
+basic_set::basic_set(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+basic_set &basic_set::operator=(basic_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_set::~basic_set() {
+  if (ptr)
+    isl_basic_set_free(ptr);
+}
+
+__isl_give isl_basic_set *basic_set::copy() const & {
+  return isl_basic_set_copy(ptr);
+}
+
+__isl_keep isl_basic_set *basic_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_set *basic_set::release() {
+  isl_basic_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx basic_set::ctx() const {
+  return isl::checked::ctx(isl_basic_set_get_ctx(ptr));
+}
+
+isl::checked::basic_set basic_set::affine_hull() const
+{
+  auto res = isl_basic_set_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::apply(isl::checked::basic_map bmap) const
+{
+  auto res = isl_basic_set_apply(copy(), bmap.release());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::detect_equalities() const
+{
+  auto res = isl_basic_set_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::val basic_set::dim_max_val(int pos) const
+{
+  auto res = isl_basic_set_dim_max_val(copy(), pos);
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::flatten() const
+{
+  auto res = isl_basic_set_flatten(copy());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::gist(isl::checked::basic_set context) const
+{
+  auto res = isl_basic_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::intersect(isl::checked::basic_set bset2) const
+{
+  auto res = isl_basic_set_intersect(copy(), bset2.release());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::intersect_params(isl::checked::basic_set bset2) const
+{
+  auto res = isl_basic_set_intersect_params(copy(), bset2.release());
+  return manage(res);
+}
+
+boolean basic_set::is_empty() const
+{
+  auto res = isl_basic_set_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_set::is_equal(const isl::checked::basic_set &bset2) const
+{
+  auto res = isl_basic_set_is_equal(get(), bset2.get());
+  return manage(res);
+}
+
+boolean basic_set::is_subset(const isl::checked::basic_set &bset2) const
+{
+  auto res = isl_basic_set_is_subset(get(), bset2.get());
+  return manage(res);
+}
+
+boolean basic_set::is_wrapping() const
+{
+  auto res = isl_basic_set_is_wrapping(get());
+  return manage(res);
+}
+
+isl::checked::set basic_set::lexmax() const
+{
+  auto res = isl_basic_set_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::set basic_set::lexmin() const
+{
+  auto res = isl_basic_set_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::params() const
+{
+  auto res = isl_basic_set_params(copy());
+  return manage(res);
+}
+
+isl::checked::basic_set basic_set::sample() const
+{
+  auto res = isl_basic_set_sample(copy());
+  return manage(res);
+}
+
+isl::checked::point basic_set::sample_point() const
+{
+  auto res = isl_basic_set_sample_point(copy());
+  return manage(res);
+}
+
+isl::checked::set basic_set::unite(isl::checked::basic_set bset2) const
+{
+  auto res = isl_basic_set_union(copy(), bset2.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const basic_set &obj)
+{
+  char *str = isl_basic_set_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::fixed_box
+fixed_box manage(__isl_take isl_fixed_box *ptr) {
+  return fixed_box(ptr);
+}
+fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
+  ptr = isl_fixed_box_copy(ptr);
+  return fixed_box(ptr);
+}
+
+fixed_box::fixed_box()
+    : ptr(nullptr) {}
+
+fixed_box::fixed_box(const fixed_box &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
+    : ptr(ptr) {}
+
+fixed_box &fixed_box::operator=(fixed_box obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+fixed_box::~fixed_box() {
+  if (ptr)
+    isl_fixed_box_free(ptr);
+}
+
+__isl_give isl_fixed_box *fixed_box::copy() const & {
+  return isl_fixed_box_copy(ptr);
+}
+
+__isl_keep isl_fixed_box *fixed_box::get() const {
+  return ptr;
+}
+
+__isl_give isl_fixed_box *fixed_box::release() {
+  isl_fixed_box *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool fixed_box::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx fixed_box::ctx() const {
+  return isl::checked::ctx(isl_fixed_box_get_ctx(ptr));
+}
+
+isl::checked::multi_aff fixed_box::offset() const
+{
+  auto res = isl_fixed_box_get_offset(get());
+  return manage(res);
+}
+
+isl::checked::multi_aff fixed_box::get_offset() const
+{
+  return offset();
+}
+
+isl::checked::multi_val fixed_box::size() const
+{
+  auto res = isl_fixed_box_get_size(get());
+  return manage(res);
+}
+
+isl::checked::multi_val fixed_box::get_size() const
+{
+  return size();
+}
+
+isl::checked::space fixed_box::space() const
+{
+  auto res = isl_fixed_box_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space fixed_box::get_space() const
+{
+  return space();
+}
+
+boolean fixed_box::is_valid() const
+{
+  auto res = isl_fixed_box_is_valid(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const fixed_box &obj)
+{
+  char *str = isl_fixed_box_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::id
+id manage(__isl_take isl_id *ptr) {
+  return id(ptr);
+}
+id manage_copy(__isl_keep isl_id *ptr) {
+  ptr = isl_id_copy(ptr);
+  return id(ptr);
+}
+
+id::id()
+    : ptr(nullptr) {}
+
+id::id(const id &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+id::id(__isl_take isl_id *ptr)
+    : ptr(ptr) {}
+
+id::id(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_id_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+id &id::operator=(id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id::~id() {
+  if (ptr)
+    isl_id_free(ptr);
+}
+
+__isl_give isl_id *id::copy() const & {
+  return isl_id_copy(ptr);
+}
+
+__isl_keep isl_id *id::get() const {
+  return ptr;
+}
+
+__isl_give isl_id *id::release() {
+  isl_id *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx id::ctx() const {
+  return isl::checked::ctx(isl_id_get_ctx(ptr));
+}
+
+std::string id::name() const
+{
+  auto res = isl_id_get_name(get());
+  std::string tmp(res);
+  return tmp;
+}
+
+std::string id::get_name() const
+{
+  return name();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const id &obj)
+{
+  char *str = isl_id_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::id_list
+id_list manage(__isl_take isl_id_list *ptr) {
+  return id_list(ptr);
+}
+id_list manage_copy(__isl_keep isl_id_list *ptr) {
+  ptr = isl_id_list_copy(ptr);
+  return id_list(ptr);
+}
+
+id_list::id_list()
+    : ptr(nullptr) {}
+
+id_list::id_list(const id_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+id_list::id_list(__isl_take isl_id_list *ptr)
+    : ptr(ptr) {}
+
+id_list::id_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_id_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+id_list::id_list(isl::checked::id el)
+{
+  auto res = isl_id_list_from_id(el.release());
+  ptr = res;
+}
+
+id_list &id_list::operator=(id_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id_list::~id_list() {
+  if (ptr)
+    isl_id_list_free(ptr);
+}
+
+__isl_give isl_id_list *id_list::copy() const & {
+  return isl_id_list_copy(ptr);
+}
+
+__isl_keep isl_id_list *id_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_id_list *id_list::release() {
+  isl_id_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx id_list::ctx() const {
+  return isl::checked::ctx(isl_id_list_get_ctx(ptr));
+}
+
+isl::checked::id_list id_list::add(isl::checked::id el) const
+{
+  auto res = isl_id_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::id_list id_list::add(const std::string &el) const
+{
+  return this->add(isl::checked::id(ctx(), el));
+}
+
+isl::checked::id_list id_list::clear() const
+{
+  auto res = isl_id_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::id_list id_list::concat(isl::checked::id_list list2) const
+{
+  auto res = isl_id_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::id_list id_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_id_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat id_list::foreach(const std::function<stat(isl::checked::id)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::id)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::id id_list::at(int index) const
+{
+  auto res = isl_id_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::id id_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::id_list id_list::insert(unsigned int pos, isl::checked::id el) const
+{
+  auto res = isl_id_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+isl::checked::id_list id_list::insert(unsigned int pos, const std::string &el) const
+{
+  return this->insert(pos, isl::checked::id(ctx(), el));
+}
+
+class size id_list::size() const
+{
+  auto res = isl_id_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const id_list &obj)
+{
+  char *str = isl_id_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::map
+map manage(__isl_take isl_map *ptr) {
+  return map(ptr);
+}
+map manage_copy(__isl_keep isl_map *ptr) {
+  ptr = isl_map_copy(ptr);
+  return map(ptr);
+}
+
+map::map()
+    : ptr(nullptr) {}
+
+map::map(const map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+map::map(__isl_take isl_map *ptr)
+    : ptr(ptr) {}
+
+map::map(isl::checked::basic_map bmap)
+{
+  auto res = isl_map_from_basic_map(bmap.release());
+  ptr = res;
+}
+
+map::map(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+map &map::operator=(map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+map::~map() {
+  if (ptr)
+    isl_map_free(ptr);
+}
+
+__isl_give isl_map *map::copy() const & {
+  return isl_map_copy(ptr);
+}
+
+__isl_keep isl_map *map::get() const {
+  return ptr;
+}
+
+__isl_give isl_map *map::release() {
+  isl_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx map::ctx() const {
+  return isl::checked::ctx(isl_map_get_ctx(ptr));
+}
+
+isl::checked::basic_map map::affine_hull() const
+{
+  auto res = isl_map_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::map map::apply_domain(isl::checked::map map2) const
+{
+  auto res = isl_map_apply_domain(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::apply_range(isl::checked::map map2) const
+{
+  auto res = isl_map_apply_range(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::set map::bind_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_map_bind_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::set map::bind_range(isl::checked::multi_id tuple) const
+{
+  auto res = isl_map_bind_range(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::map map::coalesce() const
+{
+  auto res = isl_map_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::map map::complement() const
+{
+  auto res = isl_map_complement(copy());
+  return manage(res);
+}
+
+isl::checked::map map::curry() const
+{
+  auto res = isl_map_curry(copy());
+  return manage(res);
+}
+
+isl::checked::set map::deltas() const
+{
+  auto res = isl_map_deltas(copy());
+  return manage(res);
+}
+
+isl::checked::map map::detect_equalities() const
+{
+  auto res = isl_map_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::set map::domain() const
+{
+  auto res = isl_map_domain(copy());
+  return manage(res);
+}
+
+isl::checked::map map::domain_factor_domain() const
+{
+  auto res = isl_map_domain_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::map map::domain_factor_range() const
+{
+  auto res = isl_map_domain_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::map map::domain_product(isl::checked::map map2) const
+{
+  auto res = isl_map_domain_product(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::empty(isl::checked::space space)
+{
+  auto res = isl_map_empty(space.release());
+  return manage(res);
+}
+
+isl::checked::map map::eq_at(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_eq_at_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::factor_domain() const
+{
+  auto res = isl_map_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::map map::factor_range() const
+{
+  auto res = isl_map_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::map map::flatten() const
+{
+  auto res = isl_map_flatten(copy());
+  return manage(res);
+}
+
+isl::checked::map map::flatten_domain() const
+{
+  auto res = isl_map_flatten_domain(copy());
+  return manage(res);
+}
+
+isl::checked::map map::flatten_range() const
+{
+  auto res = isl_map_flatten_range(copy());
+  return manage(res);
+}
+
+stat map::foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::basic_map)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::fixed_box map::range_simple_fixed_box_hull() const
+{
+  auto res = isl_map_get_range_simple_fixed_box_hull(get());
+  return manage(res);
+}
+
+isl::checked::fixed_box map::get_range_simple_fixed_box_hull() const
+{
+  return range_simple_fixed_box_hull();
+}
+
+isl::checked::space map::space() const
+{
+  auto res = isl_map_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space map::get_space() const
+{
+  return space();
+}
+
+isl::checked::map map::gist(isl::checked::map context) const
+{
+  auto res = isl_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::map map::gist_domain(isl::checked::set context) const
+{
+  auto res = isl_map_gist_domain(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::map map::intersect(isl::checked::map map2) const
+{
+  auto res = isl_map_intersect(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::intersect_domain(isl::checked::set set) const
+{
+  auto res = isl_map_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::map map::intersect_params(isl::checked::set params) const
+{
+  auto res = isl_map_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+isl::checked::map map::intersect_range(isl::checked::set set) const
+{
+  auto res = isl_map_intersect_range(copy(), set.release());
+  return manage(res);
+}
+
+boolean map::is_bijective() const
+{
+  auto res = isl_map_is_bijective(get());
+  return manage(res);
+}
+
+boolean map::is_disjoint(const isl::checked::map &map2) const
+{
+  auto res = isl_map_is_disjoint(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_empty() const
+{
+  auto res = isl_map_is_empty(get());
+  return manage(res);
+}
+
+boolean map::is_equal(const isl::checked::map &map2) const
+{
+  auto res = isl_map_is_equal(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_injective() const
+{
+  auto res = isl_map_is_injective(get());
+  return manage(res);
+}
+
+boolean map::is_single_valued() const
+{
+  auto res = isl_map_is_single_valued(get());
+  return manage(res);
+}
+
+boolean map::is_strict_subset(const isl::checked::map &map2) const
+{
+  auto res = isl_map_is_strict_subset(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_subset(const isl::checked::map &map2) const
+{
+  auto res = isl_map_is_subset(get(), map2.get());
+  return manage(res);
+}
+
+isl::checked::map map::lex_ge_at(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_lex_ge_at_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::lex_gt_at(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_lex_gt_at_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::lex_le_at(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_lex_le_at_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::lex_lt_at(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_lex_lt_at_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::lexmax() const
+{
+  auto res = isl_map_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff map::lexmax_pw_multi_aff() const
+{
+  auto res = isl_map_lexmax_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::map map::lexmin() const
+{
+  auto res = isl_map_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff map::lexmin_pw_multi_aff() const
+{
+  auto res = isl_map_lexmin_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::map map::lower_bound(isl::checked::multi_pw_aff lower) const
+{
+  auto res = isl_map_lower_bound_multi_pw_aff(copy(), lower.release());
+  return manage(res);
+}
+
+isl::checked::map map::lower_bound(isl::checked::multi_val lower) const
+{
+  auto res = isl_map_lower_bound_multi_val(copy(), lower.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff map::max_multi_pw_aff() const
+{
+  auto res = isl_map_max_multi_pw_aff(copy());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff map::min_multi_pw_aff() const
+{
+  auto res = isl_map_min_multi_pw_aff(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map map::polyhedral_hull() const
+{
+  auto res = isl_map_polyhedral_hull(copy());
+  return manage(res);
+}
+
+isl::checked::map map::preimage_domain(isl::checked::multi_aff ma) const
+{
+  auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::map map::preimage_domain(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::map map::preimage_domain(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::map map::preimage_range(isl::checked::multi_aff ma) const
+{
+  auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::map map::preimage_range(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::map map::project_out_all_params() const
+{
+  auto res = isl_map_project_out_all_params(copy());
+  return manage(res);
+}
+
+isl::checked::set map::range() const
+{
+  auto res = isl_map_range(copy());
+  return manage(res);
+}
+
+isl::checked::map map::range_factor_domain() const
+{
+  auto res = isl_map_range_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::map map::range_factor_range() const
+{
+  auto res = isl_map_range_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::map map::range_product(isl::checked::map map2) const
+{
+  auto res = isl_map_range_product(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::range_reverse() const
+{
+  auto res = isl_map_range_reverse(copy());
+  return manage(res);
+}
+
+isl::checked::map map::reverse() const
+{
+  auto res = isl_map_reverse(copy());
+  return manage(res);
+}
+
+isl::checked::basic_map map::sample() const
+{
+  auto res = isl_map_sample(copy());
+  return manage(res);
+}
+
+isl::checked::map map::subtract(isl::checked::map map2) const
+{
+  auto res = isl_map_subtract(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::uncurry() const
+{
+  auto res = isl_map_uncurry(copy());
+  return manage(res);
+}
+
+isl::checked::map map::unite(isl::checked::map map2) const
+{
+  auto res = isl_map_union(copy(), map2.release());
+  return manage(res);
+}
+
+isl::checked::map map::universe(isl::checked::space space)
+{
+  auto res = isl_map_universe(space.release());
+  return manage(res);
+}
+
+isl::checked::basic_map map::unshifted_simple_hull() const
+{
+  auto res = isl_map_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+isl::checked::map map::upper_bound(isl::checked::multi_pw_aff upper) const
+{
+  auto res = isl_map_upper_bound_multi_pw_aff(copy(), upper.release());
+  return manage(res);
+}
+
+isl::checked::map map::upper_bound(isl::checked::multi_val upper) const
+{
+  auto res = isl_map_upper_bound_multi_val(copy(), upper.release());
+  return manage(res);
+}
+
+isl::checked::set map::wrap() const
+{
+  auto res = isl_map_wrap(copy());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const map &obj)
+{
+  char *str = isl_map_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_aff
+multi_aff manage(__isl_take isl_multi_aff *ptr) {
+  return multi_aff(ptr);
+}
+multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
+  ptr = isl_multi_aff_copy(ptr);
+  return multi_aff(ptr);
+}
+
+multi_aff::multi_aff()
+    : ptr(nullptr) {}
+
+multi_aff::multi_aff(const multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
+    : ptr(ptr) {}
+
+multi_aff::multi_aff(isl::checked::aff aff)
+{
+  auto res = isl_multi_aff_from_aff(aff.release());
+  ptr = res;
+}
+
+multi_aff::multi_aff(isl::checked::space space, isl::checked::aff_list list)
+{
+  auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
+  ptr = res;
+}
+
+multi_aff::multi_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_aff &multi_aff::operator=(multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_aff::~multi_aff() {
+  if (ptr)
+    isl_multi_aff_free(ptr);
+}
+
+__isl_give isl_multi_aff *multi_aff::copy() const & {
+  return isl_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_aff *multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_aff *multi_aff::release() {
+  isl_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx multi_aff::ctx() const {
+  return isl::checked::ctx(isl_multi_aff_get_ctx(ptr));
+}
+
+isl::checked::multi_aff multi_aff::add(isl::checked::multi_aff multi2) const
+{
+  auto res = isl_multi_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::add_constant(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_aff_add_constant_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::add_constant(isl::checked::val v) const
+{
+  auto res = isl_multi_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::add_constant(long v) const
+{
+  return this->add_constant(isl::checked::val(ctx(), v));
+}
+
+isl::checked::basic_set multi_aff::bind(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_aff_bind(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::bind_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_aff_bind_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::domain_map(isl::checked::space space)
+{
+  auto res = isl_multi_aff_domain_map(space.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::flat_range_product(isl::checked::multi_aff multi2) const
+{
+  auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::floor() const
+{
+  auto res = isl_multi_aff_floor(copy());
+  return manage(res);
+}
+
+isl::checked::aff multi_aff::at(int pos) const
+{
+  auto res = isl_multi_aff_get_at(get(), pos);
+  return manage(res);
+}
+
+isl::checked::aff multi_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::checked::multi_val multi_aff::constant_multi_val() const
+{
+  auto res = isl_multi_aff_get_constant_multi_val(get());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_aff::get_constant_multi_val() const
+{
+  return constant_multi_val();
+}
+
+isl::checked::aff_list multi_aff::list() const
+{
+  auto res = isl_multi_aff_get_list(get());
+  return manage(res);
+}
+
+isl::checked::aff_list multi_aff::get_list() const
+{
+  return list();
+}
+
+isl::checked::space multi_aff::space() const
+{
+  auto res = isl_multi_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::multi_aff multi_aff::gist(isl::checked::set context) const
+{
+  auto res = isl_multi_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::identity() const
+{
+  auto res = isl_multi_aff_identity_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::identity_on_domain(isl::checked::space space)
+{
+  auto res = isl_multi_aff_identity_on_domain_space(space.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::insert_domain(isl::checked::space domain) const
+{
+  auto res = isl_multi_aff_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+boolean multi_aff::involves_locals() const
+{
+  auto res = isl_multi_aff_involves_locals(get());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::neg() const
+{
+  auto res = isl_multi_aff_neg(copy());
+  return manage(res);
+}
+
+boolean multi_aff::plain_is_equal(const isl::checked::multi_aff &multi2) const
+{
+  auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::product(isl::checked::multi_aff multi2) const
+{
+  auto res = isl_multi_aff_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::pullback(isl::checked::multi_aff ma2) const
+{
+  auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::range_map(isl::checked::space space)
+{
+  auto res = isl_multi_aff_range_map(space.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::range_product(isl::checked::multi_aff multi2) const
+{
+  auto res = isl_multi_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::scale(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::scale(isl::checked::val v) const
+{
+  auto res = isl_multi_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_aff multi_aff::scale_down(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::scale_down(isl::checked::val v) const
+{
+  auto res = isl_multi_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_aff multi_aff::set_at(int pos, isl::checked::aff el) const
+{
+  auto res = isl_multi_aff_set_at(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size multi_aff::size() const
+{
+  auto res = isl_multi_aff_size(get());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::sub(isl::checked::multi_aff multi2) const
+{
+  auto res = isl_multi_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
+{
+  auto res = isl_multi_aff_unbind_params_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::multi_aff multi_aff::zero(isl::checked::space space)
+{
+  auto res = isl_multi_aff_zero(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_aff &obj)
+{
+  char *str = isl_multi_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_id
+multi_id manage(__isl_take isl_multi_id *ptr) {
+  return multi_id(ptr);
+}
+multi_id manage_copy(__isl_keep isl_multi_id *ptr) {
+  ptr = isl_multi_id_copy(ptr);
+  return multi_id(ptr);
+}
+
+multi_id::multi_id()
+    : ptr(nullptr) {}
+
+multi_id::multi_id(const multi_id &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+multi_id::multi_id(__isl_take isl_multi_id *ptr)
+    : ptr(ptr) {}
+
+multi_id::multi_id(isl::checked::space space, isl::checked::id_list list)
+{
+  auto res = isl_multi_id_from_id_list(space.release(), list.release());
+  ptr = res;
+}
+
+multi_id::multi_id(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_id_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_id &multi_id::operator=(multi_id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_id::~multi_id() {
+  if (ptr)
+    isl_multi_id_free(ptr);
+}
+
+__isl_give isl_multi_id *multi_id::copy() const & {
+  return isl_multi_id_copy(ptr);
+}
+
+__isl_keep isl_multi_id *multi_id::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_id *multi_id::release() {
+  isl_multi_id *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_id::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx multi_id::ctx() const {
+  return isl::checked::ctx(isl_multi_id_get_ctx(ptr));
+}
+
+isl::checked::multi_id multi_id::flat_range_product(isl::checked::multi_id multi2) const
+{
+  auto res = isl_multi_id_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::id multi_id::at(int pos) const
+{
+  auto res = isl_multi_id_get_at(get(), pos);
+  return manage(res);
+}
+
+isl::checked::id multi_id::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::checked::id_list multi_id::list() const
+{
+  auto res = isl_multi_id_get_list(get());
+  return manage(res);
+}
+
+isl::checked::id_list multi_id::get_list() const
+{
+  return list();
+}
+
+isl::checked::space multi_id::space() const
+{
+  auto res = isl_multi_id_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space multi_id::get_space() const
+{
+  return space();
+}
+
+boolean multi_id::plain_is_equal(const isl::checked::multi_id &multi2) const
+{
+  auto res = isl_multi_id_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+isl::checked::multi_id multi_id::range_product(isl::checked::multi_id multi2) const
+{
+  auto res = isl_multi_id_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_id multi_id::set_at(int pos, isl::checked::id el) const
+{
+  auto res = isl_multi_id_set_at(copy(), pos, el.release());
+  return manage(res);
+}
+
+isl::checked::multi_id multi_id::set_at(int pos, const std::string &el) const
+{
+  return this->set_at(pos, isl::checked::id(ctx(), el));
+}
+
+class size multi_id::size() const
+{
+  auto res = isl_multi_id_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_id &obj)
+{
+  char *str = isl_multi_id_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_pw_aff
+multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
+  return multi_pw_aff(ptr);
+}
+multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
+  ptr = isl_multi_pw_aff_copy(ptr);
+  return multi_pw_aff(ptr);
+}
+
+multi_pw_aff::multi_pw_aff()
+    : ptr(nullptr) {}
+
+multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_pw_aff::multi_pw_aff(isl::checked::aff aff)
+{
+  auto res = isl_multi_pw_aff_from_aff(aff.release());
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::checked::multi_aff ma)
+{
+  auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::checked::pw_aff pa)
+{
+  auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list)
+{
+  auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::checked::pw_multi_aff pma)
+{
+  auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_pw_aff::~multi_pw_aff() {
+  if (ptr)
+    isl_multi_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
+  return isl_multi_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::release() {
+  isl_multi_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx multi_pw_aff::ctx() const {
+  return isl::checked::ctx(isl_multi_pw_aff_get_ctx(ptr));
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::add(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_add_constant_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::val v) const
+{
+  auto res = isl_multi_pw_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::add_constant(long v) const
+{
+  return this->add_constant(isl::checked::val(ctx(), v));
+}
+
+isl::checked::set multi_pw_aff::bind(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_pw_aff_bind(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::bind_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_pw_aff_bind_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::coalesce() const
+{
+  auto res = isl_multi_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::set multi_pw_aff::domain() const
+{
+  auto res = isl_multi_pw_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::flat_range_product(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff multi_pw_aff::at(int pos) const
+{
+  auto res = isl_multi_pw_aff_get_at(get(), pos);
+  return manage(res);
+}
+
+isl::checked::pw_aff multi_pw_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::checked::pw_aff_list multi_pw_aff::list() const
+{
+  auto res = isl_multi_pw_aff_get_list(get());
+  return manage(res);
+}
+
+isl::checked::pw_aff_list multi_pw_aff::get_list() const
+{
+  return list();
+}
+
+isl::checked::space multi_pw_aff::space() const
+{
+  auto res = isl_multi_pw_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space multi_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::gist(isl::checked::set set) const
+{
+  auto res = isl_multi_pw_aff_gist(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::identity() const
+{
+  auto res = isl_multi_pw_aff_identity_multi_pw_aff(copy());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::identity_on_domain(isl::checked::space space)
+{
+  auto res = isl_multi_pw_aff_identity_on_domain_space(space.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::insert_domain(isl::checked::space domain) const
+{
+  auto res = isl_multi_pw_aff_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::intersect_domain(isl::checked::set domain) const
+{
+  auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean multi_pw_aff::involves_param(const isl::checked::id &id) const
+{
+  auto res = isl_multi_pw_aff_involves_param_id(get(), id.get());
+  return manage(res);
+}
+
+boolean multi_pw_aff::involves_param(const std::string &id) const
+{
+  return this->involves_param(isl::checked::id(ctx(), id));
+}
+
+boolean multi_pw_aff::involves_param(const isl::checked::id_list &list) const
+{
+  auto res = isl_multi_pw_aff_involves_param_id_list(get(), list.get());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::max(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_max(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_pw_aff::max_multi_val() const
+{
+  auto res = isl_multi_pw_aff_max_multi_val(copy());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::min(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_min(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_pw_aff::min_multi_val() const
+{
+  auto res = isl_multi_pw_aff_min_multi_val(copy());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::neg() const
+{
+  auto res = isl_multi_pw_aff_neg(copy());
+  return manage(res);
+}
+
+boolean multi_pw_aff::plain_is_equal(const isl::checked::multi_pw_aff &multi2) const
+{
+  auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::product(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_aff ma) const
+{
+  auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::range_product(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::val v) const
+{
+  auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::val v) const
+{
+  auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::set_at(int pos, isl::checked::pw_aff el) const
+{
+  auto res = isl_multi_pw_aff_set_at(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size multi_pw_aff::size() const
+{
+  auto res = isl_multi_pw_aff_size(get());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::sub(isl::checked::multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
+{
+  auto res = isl_multi_pw_aff_unbind_params_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::union_add(isl::checked::multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_union_add(copy(), mpa2.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff multi_pw_aff::zero(isl::checked::space space)
+{
+  auto res = isl_multi_pw_aff_zero(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_pw_aff &obj)
+{
+  char *str = isl_multi_pw_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_union_pw_aff
+multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
+  return multi_union_pw_aff(ptr);
+}
+multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
+  ptr = isl_multi_union_pw_aff_copy(ptr);
+  return multi_union_pw_aff(ptr);
+}
+
+multi_union_pw_aff::multi_union_pw_aff()
+    : ptr(nullptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::checked::multi_pw_aff mpa)
+{
+  auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::checked::union_pw_aff upa)
+{
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list)
+{
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_union_pw_aff::~multi_union_pw_aff() {
+  if (ptr)
+    isl_multi_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
+  return isl_multi_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
+  isl_multi_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx multi_union_pw_aff::ctx() const {
+  return isl::checked::ctx(isl_multi_union_pw_aff_get_ctx(ptr));
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::add(isl::checked::multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::union_set multi_union_pw_aff::bind(isl::checked::multi_id tuple) const
+{
+  auto res = isl_multi_union_pw_aff_bind(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::coalesce() const
+{
+  auto res = isl_multi_union_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::union_set multi_union_pw_aff::domain() const
+{
+  auto res = isl_multi_union_pw_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::flat_range_product(isl::checked::multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff multi_union_pw_aff::at(int pos) const
+{
+  auto res = isl_multi_union_pw_aff_get_at(get(), pos);
+  return manage(res);
+}
+
+isl::checked::union_pw_aff multi_union_pw_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::checked::union_pw_aff_list multi_union_pw_aff::list() const
+{
+  auto res = isl_multi_union_pw_aff_get_list(get());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff_list multi_union_pw_aff::get_list() const
+{
+  return list();
+}
+
+isl::checked::space multi_union_pw_aff::space() const
+{
+  auto res = isl_multi_union_pw_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space multi_union_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::gist(isl::checked::union_set context) const
+{
+  auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_params(isl::checked::set params) const
+{
+  auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::neg() const
+{
+  auto res = isl_multi_union_pw_aff_neg(copy());
+  return manage(res);
+}
+
+boolean multi_union_pw_aff::plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const
+{
+  auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::range_product(isl::checked::multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::val v) const
+{
+  auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::val v) const
+{
+  auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::set_at(int pos, isl::checked::union_pw_aff el) const
+{
+  auto res = isl_multi_union_pw_aff_set_at(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size multi_union_pw_aff::size() const
+{
+  auto res = isl_multi_union_pw_aff_size(get());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::sub(isl::checked::multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::union_add(isl::checked::multi_union_pw_aff mupa2) const
+{
+  auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff multi_union_pw_aff::zero(isl::checked::space space)
+{
+  auto res = isl_multi_union_pw_aff_zero(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_union_pw_aff &obj)
+{
+  char *str = isl_multi_union_pw_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_val
+multi_val manage(__isl_take isl_multi_val *ptr) {
+  return multi_val(ptr);
+}
+multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
+  ptr = isl_multi_val_copy(ptr);
+  return multi_val(ptr);
+}
+
+multi_val::multi_val()
+    : ptr(nullptr) {}
+
+multi_val::multi_val(const multi_val &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+multi_val::multi_val(__isl_take isl_multi_val *ptr)
+    : ptr(ptr) {}
+
+multi_val::multi_val(isl::checked::space space, isl::checked::val_list list)
+{
+  auto res = isl_multi_val_from_val_list(space.release(), list.release());
+  ptr = res;
+}
+
+multi_val::multi_val(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_val &multi_val::operator=(multi_val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_val::~multi_val() {
+  if (ptr)
+    isl_multi_val_free(ptr);
+}
+
+__isl_give isl_multi_val *multi_val::copy() const & {
+  return isl_multi_val_copy(ptr);
+}
+
+__isl_keep isl_multi_val *multi_val::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_val *multi_val::release() {
+  isl_multi_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_val::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx multi_val::ctx() const {
+  return isl::checked::ctx(isl_multi_val_get_ctx(ptr));
+}
+
+isl::checked::multi_val multi_val::add(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_add(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::add(isl::checked::val v) const
+{
+  auto res = isl_multi_val_add_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::add(long v) const
+{
+  return this->add(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_val multi_val::flat_range_product(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::val multi_val::at(int pos) const
+{
+  auto res = isl_multi_val_get_at(get(), pos);
+  return manage(res);
+}
+
+isl::checked::val multi_val::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::checked::val_list multi_val::list() const
+{
+  auto res = isl_multi_val_get_list(get());
+  return manage(res);
+}
+
+isl::checked::val_list multi_val::get_list() const
+{
+  return list();
+}
+
+isl::checked::space multi_val::space() const
+{
+  auto res = isl_multi_val_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space multi_val::get_space() const
+{
+  return space();
+}
+
+isl::checked::multi_val multi_val::max(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_max(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::min(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_min(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::neg() const
+{
+  auto res = isl_multi_val_neg(copy());
+  return manage(res);
+}
+
+boolean multi_val::plain_is_equal(const isl::checked::multi_val &multi2) const
+{
+  auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::product(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::range_product(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::scale(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::scale(isl::checked::val v) const
+{
+  auto res = isl_multi_val_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_val multi_val::scale_down(isl::checked::multi_val mv) const
+{
+  auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::scale_down(isl::checked::val v) const
+{
+  auto res = isl_multi_val_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_val multi_val::set_at(int pos, isl::checked::val el) const
+{
+  auto res = isl_multi_val_set_at(copy(), pos, el.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::set_at(int pos, long el) const
+{
+  return this->set_at(pos, isl::checked::val(ctx(), el));
+}
+
+class size multi_val::size() const
+{
+  auto res = isl_multi_val_size(get());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::sub(isl::checked::multi_val multi2) const
+{
+  auto res = isl_multi_val_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+isl::checked::multi_val multi_val::zero(isl::checked::space space)
+{
+  auto res = isl_multi_val_zero(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_val &obj)
+{
+  char *str = isl_multi_val_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::point
+point manage(__isl_take isl_point *ptr) {
+  return point(ptr);
+}
+point manage_copy(__isl_keep isl_point *ptr) {
+  ptr = isl_point_copy(ptr);
+  return point(ptr);
+}
+
+point::point()
+    : ptr(nullptr) {}
+
+point::point(const point &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+point::point(__isl_take isl_point *ptr)
+    : ptr(ptr) {}
+
+point &point::operator=(point obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+point::~point() {
+  if (ptr)
+    isl_point_free(ptr);
+}
+
+__isl_give isl_point *point::copy() const & {
+  return isl_point_copy(ptr);
+}
+
+__isl_keep isl_point *point::get() const {
+  return ptr;
+}
+
+__isl_give isl_point *point::release() {
+  isl_point *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool point::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx point::ctx() const {
+  return isl::checked::ctx(isl_point_get_ctx(ptr));
+}
+
+isl::checked::multi_val point::multi_val() const
+{
+  auto res = isl_point_get_multi_val(get());
+  return manage(res);
+}
+
+isl::checked::multi_val point::get_multi_val() const
+{
+  return multi_val();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const point &obj)
+{
+  char *str = isl_point_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_aff
+pw_aff manage(__isl_take isl_pw_aff *ptr) {
+  return pw_aff(ptr);
+}
+pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
+  ptr = isl_pw_aff_copy(ptr);
+  return pw_aff(ptr);
+}
+
+pw_aff::pw_aff()
+    : ptr(nullptr) {}
+
+pw_aff::pw_aff(const pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
+    : ptr(ptr) {}
+
+pw_aff::pw_aff(isl::checked::aff aff)
+{
+  auto res = isl_pw_aff_from_aff(aff.release());
+  ptr = res;
+}
+
+pw_aff::pw_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+pw_aff &pw_aff::operator=(pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff::~pw_aff() {
+  if (ptr)
+    isl_pw_aff_free(ptr);
+}
+
+__isl_give isl_pw_aff *pw_aff::copy() const & {
+  return isl_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_aff *pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff *pw_aff::release() {
+  isl_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx pw_aff::ctx() const {
+  return isl::checked::ctx(isl_pw_aff_get_ctx(ptr));
+}
+
+isl::checked::pw_aff pw_aff::add(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_add(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::add_constant(isl::checked::val v) const
+{
+  auto res = isl_pw_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::add_constant(long v) const
+{
+  return this->add_constant(isl::checked::val(ctx(), v));
+}
+
+isl::checked::aff pw_aff::as_aff() const
+{
+  auto res = isl_pw_aff_as_aff(copy());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::bind(isl::checked::id id) const
+{
+  auto res = isl_pw_aff_bind_id(copy(), id.release());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::bind(const std::string &id) const
+{
+  return this->bind(isl::checked::id(ctx(), id));
+}
+
+isl::checked::pw_aff pw_aff::bind_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_pw_aff_bind_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::ceil() const
+{
+  auto res = isl_pw_aff_ceil(copy());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::coalesce() const
+{
+  auto res = isl_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const
+{
+  auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::div(isl::checked::pw_aff pa2) const
+{
+  auto res = isl_pw_aff_div(copy(), pa2.release());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::domain() const
+{
+  auto res = isl_pw_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::eq_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::val pw_aff::eval(isl::checked::point pnt) const
+{
+  auto res = isl_pw_aff_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::floor() const
+{
+  auto res = isl_pw_aff_floor(copy());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::ge_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::gist(isl::checked::set context) const
+{
+  auto res = isl_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::gt_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::insert_domain(isl::checked::space domain) const
+{
+  auto res = isl_pw_aff_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::intersect_domain(isl::checked::set set) const
+{
+  auto res = isl_pw_aff_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_aff::isa_aff() const
+{
+  auto res = isl_pw_aff_isa_aff(get());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::le_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::lt_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::max(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_max(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::min(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_min(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::mod(isl::checked::val mod) const
+{
+  auto res = isl_pw_aff_mod_val(copy(), mod.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::mod(long mod) const
+{
+  return this->mod(isl::checked::val(ctx(), mod));
+}
+
+isl::checked::pw_aff pw_aff::mul(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_mul(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::set pw_aff::ne_set(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::neg() const
+{
+  auto res = isl_pw_aff_neg(copy());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::param_on_domain(isl::checked::set domain, isl::checked::id id)
+{
+  auto res = isl_pw_aff_param_on_domain_id(domain.release(), id.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_aff ma) const
+{
+  auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::pullback(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::scale(isl::checked::val v) const
+{
+  auto res = isl_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::pw_aff pw_aff::scale_down(isl::checked::val f) const
+{
+  auto res = isl_pw_aff_scale_down_val(copy(), f.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::scale_down(long f) const
+{
+  return this->scale_down(isl::checked::val(ctx(), f));
+}
+
+isl::checked::pw_aff pw_aff::sub(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_sub(copy(), pwaff2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::subtract_domain(isl::checked::set set) const
+{
+  auto res = isl_pw_aff_subtract_domain(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::tdiv_q(isl::checked::pw_aff pa2) const
+{
+  auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::tdiv_r(isl::checked::pw_aff pa2) const
+{
+  auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff::union_add(isl::checked::pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_aff &obj)
+{
+  char *str = isl_pw_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_aff_list
+pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
+  return pw_aff_list(ptr);
+}
+pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
+  ptr = isl_pw_aff_list_copy(ptr);
+  return pw_aff_list(ptr);
+}
+
+pw_aff_list::pw_aff_list()
+    : ptr(nullptr) {}
+
+pw_aff_list::pw_aff_list(const pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+pw_aff_list::pw_aff_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_pw_aff_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+pw_aff_list::pw_aff_list(isl::checked::pw_aff el)
+{
+  auto res = isl_pw_aff_list_from_pw_aff(el.release());
+  ptr = res;
+}
+
+pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff_list::~pw_aff_list() {
+  if (ptr)
+    isl_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
+  return isl_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_aff_list *pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::release() {
+  isl_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx pw_aff_list::ctx() const {
+  return isl::checked::ctx(isl_pw_aff_list_get_ctx(ptr));
+}
+
+isl::checked::pw_aff_list pw_aff_list::add(isl::checked::pw_aff el) const
+{
+  auto res = isl_pw_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff_list pw_aff_list::clear() const
+{
+  auto res = isl_pw_aff_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::pw_aff_list pw_aff_list::concat(isl::checked::pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat pw_aff_list::foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::pw_aff)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff_list::at(int index) const
+{
+  auto res = isl_pw_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::pw_aff pw_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::pw_aff_list pw_aff_list::insert(unsigned int pos, isl::checked::pw_aff el) const
+{
+  auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size pw_aff_list::size() const
+{
+  auto res = isl_pw_aff_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_aff_list &obj)
+{
+  char *str = isl_pw_aff_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_multi_aff
+pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
+  return pw_multi_aff(ptr);
+}
+pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
+  ptr = isl_pw_multi_aff_copy(ptr);
+  return pw_multi_aff(ptr);
+}
+
+pw_multi_aff::pw_multi_aff()
+    : ptr(nullptr) {}
+
+pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+pw_multi_aff::pw_multi_aff(isl::checked::multi_aff ma)
+{
+  auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
+  ptr = res;
+}
+
+pw_multi_aff::pw_multi_aff(isl::checked::pw_aff pa)
+{
+  auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+
+pw_multi_aff::pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff::~pw_multi_aff() {
+  if (ptr)
+    isl_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
+  return isl_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::release() {
+  isl_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx pw_multi_aff::ctx() const {
+  return isl::checked::ctx(isl_pw_multi_aff_get_ctx(ptr));
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::add(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_add(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::multi_val mv) const
+{
+  auto res = isl_pw_multi_aff_add_constant_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::val v) const
+{
+  auto res = isl_pw_multi_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::add_constant(long v) const
+{
+  return this->add_constant(isl::checked::val(ctx(), v));
+}
+
+isl::checked::multi_aff pw_multi_aff::as_multi_aff() const
+{
+  auto res = isl_pw_multi_aff_as_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::bind_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_pw_multi_aff_bind_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
+{
+  auto res = isl_pw_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::coalesce() const
+{
+  auto res = isl_pw_multi_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::set pw_multi_aff::domain() const
+{
+  auto res = isl_pw_multi_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::domain_map(isl::checked::space space)
+{
+  auto res = isl_pw_multi_aff_domain_map(space.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::flat_range_product(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
+  return manage(res);
+}
+
+stat pw_multi_aff::foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::set, isl::checked::multi_aff)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    auto ret = (data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::space pw_multi_aff::space() const
+{
+  auto res = isl_pw_multi_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space pw_multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::gist(isl::checked::set set) const
+{
+  auto res = isl_pw_multi_aff_gist(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::insert_domain(isl::checked::space domain) const
+{
+  auto res = isl_pw_multi_aff_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::intersect_domain(isl::checked::set set) const
+{
+  auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_multi_aff::involves_locals() const
+{
+  auto res = isl_pw_multi_aff_involves_locals(get());
+  return manage(res);
+}
+
+boolean pw_multi_aff::isa_multi_aff() const
+{
+  auto res = isl_pw_multi_aff_isa_multi_aff(get());
+  return manage(res);
+}
+
+isl::checked::multi_val pw_multi_aff::max_multi_val() const
+{
+  auto res = isl_pw_multi_aff_max_multi_val(copy());
+  return manage(res);
+}
+
+isl::checked::multi_val pw_multi_aff::min_multi_val() const
+{
+  auto res = isl_pw_multi_aff_min_multi_val(copy());
+  return manage(res);
+}
+
+class size pw_multi_aff::n_piece() const
+{
+  auto res = isl_pw_multi_aff_n_piece(get());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::product(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_product(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::multi_aff ma) const
+{
+  auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::range_factor_domain() const
+{
+  auto res = isl_pw_multi_aff_range_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::range_factor_range() const
+{
+  auto res = isl_pw_multi_aff_range_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::range_map(isl::checked::space space)
+{
+  auto res = isl_pw_multi_aff_range_map(space.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::range_product(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::scale(isl::checked::val v) const
+{
+  auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::scale(long v) const
+{
+  return this->scale(isl::checked::val(ctx(), v));
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::scale_down(isl::checked::val v) const
+{
+  auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::scale_down(long v) const
+{
+  return this->scale_down(isl::checked::val(ctx(), v));
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::sub(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::subtract_domain(isl::checked::set set) const
+{
+  auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::union_add(isl::checked::pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff::zero(isl::checked::space space)
+{
+  auto res = isl_pw_multi_aff_zero(space.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff &obj)
+{
+  char *str = isl_pw_multi_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_multi_aff_list
+pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
+  return pw_multi_aff_list(ptr);
+}
+pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
+  ptr = isl_pw_multi_aff_list_copy(ptr);
+  return pw_multi_aff_list(ptr);
+}
+
+pw_multi_aff_list::pw_multi_aff_list()
+    : ptr(nullptr) {}
+
+pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
+    : ptr(ptr) {}
+
+pw_multi_aff_list::pw_multi_aff_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+pw_multi_aff_list::pw_multi_aff_list(isl::checked::pw_multi_aff el)
+{
+  auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
+  ptr = res;
+}
+
+pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff_list::~pw_multi_aff_list() {
+  if (ptr)
+    isl_pw_multi_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
+  return isl_pw_multi_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
+  isl_pw_multi_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx pw_multi_aff_list::ctx() const {
+  return isl::checked::ctx(isl_pw_multi_aff_list_get_ctx(ptr));
+}
+
+isl::checked::pw_multi_aff_list pw_multi_aff_list::add(isl::checked::pw_multi_aff el) const
+{
+  auto res = isl_pw_multi_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff_list pw_multi_aff_list::clear() const
+{
+  auto res = isl_pw_multi_aff_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff_list pw_multi_aff_list::concat(isl::checked::pw_multi_aff_list list2) const
+{
+  auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat pw_multi_aff_list::foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::pw_multi_aff)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff_list::at(int index) const
+{
+  auto res = isl_pw_multi_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff pw_multi_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, isl::checked::pw_multi_aff el) const
+{
+  auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size pw_multi_aff_list::size() const
+{
+  auto res = isl_pw_multi_aff_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff_list &obj)
+{
+  char *str = isl_pw_multi_aff_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule
+schedule manage(__isl_take isl_schedule *ptr) {
+  return schedule(ptr);
+}
+schedule manage_copy(__isl_keep isl_schedule *ptr) {
+  ptr = isl_schedule_copy(ptr);
+  return schedule(ptr);
+}
+
+schedule::schedule()
+    : ptr(nullptr) {}
+
+schedule::schedule(const schedule &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+schedule::schedule(__isl_take isl_schedule *ptr)
+    : ptr(ptr) {}
+
+schedule::schedule(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+schedule &schedule::operator=(schedule obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule::~schedule() {
+  if (ptr)
+    isl_schedule_free(ptr);
+}
+
+__isl_give isl_schedule *schedule::copy() const & {
+  return isl_schedule_copy(ptr);
+}
+
+__isl_keep isl_schedule *schedule::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule *schedule::release() {
+  isl_schedule *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx schedule::ctx() const {
+  return isl::checked::ctx(isl_schedule_get_ctx(ptr));
+}
+
+isl::checked::schedule schedule::from_domain(isl::checked::union_set domain)
+{
+  auto res = isl_schedule_from_domain(domain.release());
+  return manage(res);
+}
+
+isl::checked::union_map schedule::map() const
+{
+  auto res = isl_schedule_get_map(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule::get_map() const
+{
+  return map();
+}
+
+isl::checked::schedule_node schedule::root() const
+{
+  auto res = isl_schedule_get_root(get());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule::get_root() const
+{
+  return root();
+}
+
+isl::checked::schedule schedule::pullback(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule &obj)
+{
+  char *str = isl_schedule_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_constraints
+schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
+  return schedule_constraints(ptr);
+}
+schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
+  ptr = isl_schedule_constraints_copy(ptr);
+  return schedule_constraints(ptr);
+}
+
+schedule_constraints::schedule_constraints()
+    : ptr(nullptr) {}
+
+schedule_constraints::schedule_constraints(const schedule_constraints &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
+    : ptr(ptr) {}
+
+schedule_constraints::schedule_constraints(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_constraints::~schedule_constraints() {
+  if (ptr)
+    isl_schedule_constraints_free(ptr);
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
+  return isl_schedule_constraints_copy(ptr);
+}
+
+__isl_keep isl_schedule_constraints *schedule_constraints::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::release() {
+  isl_schedule_constraints *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_constraints::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx schedule_constraints::ctx() const {
+  return isl::checked::ctx(isl_schedule_constraints_get_ctx(ptr));
+}
+
+isl::checked::schedule schedule_constraints::compute_schedule() const
+{
+  auto res = isl_schedule_constraints_compute_schedule(copy());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::coincidence() const
+{
+  auto res = isl_schedule_constraints_get_coincidence(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::get_coincidence() const
+{
+  return coincidence();
+}
+
+isl::checked::union_map schedule_constraints::conditional_validity() const
+{
+  auto res = isl_schedule_constraints_get_conditional_validity(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::get_conditional_validity() const
+{
+  return conditional_validity();
+}
+
+isl::checked::union_map schedule_constraints::conditional_validity_condition() const
+{
+  auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::get_conditional_validity_condition() const
+{
+  return conditional_validity_condition();
+}
+
+isl::checked::set schedule_constraints::context() const
+{
+  auto res = isl_schedule_constraints_get_context(get());
+  return manage(res);
+}
+
+isl::checked::set schedule_constraints::get_context() const
+{
+  return context();
+}
+
+isl::checked::union_set schedule_constraints::domain() const
+{
+  auto res = isl_schedule_constraints_get_domain(get());
+  return manage(res);
+}
+
+isl::checked::union_set schedule_constraints::get_domain() const
+{
+  return domain();
+}
+
+isl::checked::union_map schedule_constraints::proximity() const
+{
+  auto res = isl_schedule_constraints_get_proximity(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::get_proximity() const
+{
+  return proximity();
+}
+
+isl::checked::union_map schedule_constraints::validity() const
+{
+  auto res = isl_schedule_constraints_get_validity(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_constraints::get_validity() const
+{
+  return validity();
+}
+
+isl::checked::schedule_constraints schedule_constraints::on_domain(isl::checked::union_set domain)
+{
+  auto res = isl_schedule_constraints_on_domain(domain.release());
+  return manage(res);
+}
+
+isl::checked::schedule_constraints schedule_constraints::set_coincidence(isl::checked::union_map coincidence) const
+{
+  auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
+  return manage(res);
+}
+
+isl::checked::schedule_constraints schedule_constraints::set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const
+{
+  auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
+  return manage(res);
+}
+
+isl::checked::schedule_constraints schedule_constraints::set_context(isl::checked::set context) const
+{
+  auto res = isl_schedule_constraints_set_context(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::schedule_constraints schedule_constraints::set_proximity(isl::checked::union_map proximity) const
+{
+  auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
+  return manage(res);
+}
+
+isl::checked::schedule_constraints schedule_constraints::set_validity(isl::checked::union_map validity) const
+{
+  auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_constraints &obj)
+{
+  char *str = isl_schedule_constraints_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node
+schedule_node manage(__isl_take isl_schedule_node *ptr) {
+  return schedule_node(ptr);
+}
+schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
+  ptr = isl_schedule_node_copy(ptr);
+  return schedule_node(ptr);
+}
+
+schedule_node::schedule_node()
+    : ptr(nullptr) {}
+
+schedule_node::schedule_node(const schedule_node &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
+    : ptr(ptr) {}
+
+schedule_node &schedule_node::operator=(schedule_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_node::~schedule_node() {
+  if (ptr)
+    isl_schedule_node_free(ptr);
+}
+
+__isl_give isl_schedule_node *schedule_node::copy() const & {
+  return isl_schedule_node_copy(ptr);
+}
+
+__isl_keep isl_schedule_node *schedule_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_node *schedule_node::release() {
+  isl_schedule_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_node::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+boolean schedule_node::isa_type(T subtype) const
+{
+  if (is_null())
+    return boolean();
+  return isl_schedule_node_get_type(get()) == subtype;
+}
+template <class T>
+boolean schedule_node::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T schedule_node::as() const
+{
+ if (isa<T>().is_false())
+    isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
+  return T(copy());
+}
+
+isl::checked::ctx schedule_node::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::schedule_node schedule_node::ancestor(int generation) const
+{
+  auto res = isl_schedule_node_ancestor(copy(), generation);
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::child(int pos) const
+{
+  auto res = isl_schedule_node_child(copy(), pos);
+  return manage(res);
+}
+
+boolean schedule_node::every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const
+{
+  struct test_data {
+    std::function<boolean(isl::checked::schedule_node)> func;
+  } test_data = { test };
+  auto test_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    auto ret = (data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_schedule_node_every_descendant(get(), test_lambda, &test_data);
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::first_child() const
+{
+  auto res = isl_schedule_node_first_child(copy());
+  return manage(res);
+}
+
+stat schedule_node::foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::schedule_node)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat schedule_node::foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const
+{
+  struct fn_data {
+    std::function<boolean(isl::checked::schedule_node)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_schedule_node_foreach_descendant_top_down(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::from_domain(isl::checked::union_set domain)
+{
+  auto res = isl_schedule_node_from_domain(domain.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::from_extension(isl::checked::union_map extension)
+{
+  auto res = isl_schedule_node_from_extension(extension.release());
+  return manage(res);
+}
+
+class size schedule_node::ancestor_child_position(const isl::checked::schedule_node &ancestor) const
+{
+  auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
+  return manage(res);
+}
+
+class size schedule_node::get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const
+{
+  return ancestor_child_position(ancestor);
+}
+
+class size schedule_node::child_position() const
+{
+  auto res = isl_schedule_node_get_child_position(get());
+  return manage(res);
+}
+
+class size schedule_node::get_child_position() const
+{
+  return child_position();
+}
+
+isl::checked::multi_union_pw_aff schedule_node::prefix_schedule_multi_union_pw_aff() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
+{
+  return prefix_schedule_multi_union_pw_aff();
+}
+
+isl::checked::union_map schedule_node::prefix_schedule_union_map() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_node::get_prefix_schedule_union_map() const
+{
+  return prefix_schedule_union_map();
+}
+
+isl::checked::union_pw_multi_aff schedule_node::prefix_schedule_union_pw_multi_aff() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
+{
+  return prefix_schedule_union_pw_multi_aff();
+}
+
+isl::checked::schedule schedule_node::schedule() const
+{
+  auto res = isl_schedule_node_get_schedule(get());
+  return manage(res);
+}
+
+isl::checked::schedule schedule_node::get_schedule() const
+{
+  return schedule();
+}
+
+isl::checked::schedule_node schedule_node::shared_ancestor(const isl::checked::schedule_node &node2) const
+{
+  auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::get_shared_ancestor(const isl::checked::schedule_node &node2) const
+{
+  return shared_ancestor(node2);
+}
+
+class size schedule_node::tree_depth() const
+{
+  auto res = isl_schedule_node_get_tree_depth(get());
+  return manage(res);
+}
+
+class size schedule_node::get_tree_depth() const
+{
+  return tree_depth();
+}
+
+isl::checked::schedule_node schedule_node::graft_after(isl::checked::schedule_node graft) const
+{
+  auto res = isl_schedule_node_graft_after(copy(), graft.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::graft_before(isl::checked::schedule_node graft) const
+{
+  auto res = isl_schedule_node_graft_before(copy(), graft.release());
+  return manage(res);
+}
+
+boolean schedule_node::has_children() const
+{
+  auto res = isl_schedule_node_has_children(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_next_sibling() const
+{
+  auto res = isl_schedule_node_has_next_sibling(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_parent() const
+{
+  auto res = isl_schedule_node_has_parent(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_previous_sibling() const
+{
+  auto res = isl_schedule_node_has_previous_sibling(get());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_context(isl::checked::set context) const
+{
+  auto res = isl_schedule_node_insert_context(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_filter(isl::checked::union_set filter) const
+{
+  auto res = isl_schedule_node_insert_filter(copy(), filter.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_guard(isl::checked::set context) const
+{
+  auto res = isl_schedule_node_insert_guard(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_mark(isl::checked::id mark) const
+{
+  auto res = isl_schedule_node_insert_mark(copy(), mark.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_mark(const std::string &mark) const
+{
+  return this->insert_mark(isl::checked::id(ctx(), mark));
+}
+
+isl::checked::schedule_node schedule_node::insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const
+{
+  auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_sequence(isl::checked::union_set_list filters) const
+{
+  auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::insert_set(isl::checked::union_set_list filters) const
+{
+  auto res = isl_schedule_node_insert_set(copy(), filters.release());
+  return manage(res);
+}
+
+boolean schedule_node::is_equal(const isl::checked::schedule_node &node2) const
+{
+  auto res = isl_schedule_node_is_equal(get(), node2.get());
+  return manage(res);
+}
+
+boolean schedule_node::is_subtree_anchored() const
+{
+  auto res = isl_schedule_node_is_subtree_anchored(get());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const
+{
+  struct fn_data {
+    std::function<isl::checked::schedule_node(isl::checked::schedule_node)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_schedule_node * {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_schedule_node_map_descendant_bottom_up(copy(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+class size schedule_node::n_children() const
+{
+  auto res = isl_schedule_node_n_children(get());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::next_sibling() const
+{
+  auto res = isl_schedule_node_next_sibling(copy());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::order_after(isl::checked::union_set filter) const
+{
+  auto res = isl_schedule_node_order_after(copy(), filter.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::order_before(isl::checked::union_set filter) const
+{
+  auto res = isl_schedule_node_order_before(copy(), filter.release());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::parent() const
+{
+  auto res = isl_schedule_node_parent(copy());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::previous_sibling() const
+{
+  auto res = isl_schedule_node_previous_sibling(copy());
+  return manage(res);
+}
+
+isl::checked::schedule_node schedule_node::root() const
+{
+  auto res = isl_schedule_node_root(copy());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_band
+schedule_node_band::schedule_node_band()
+    : schedule_node() {}
+
+schedule_node_band::schedule_node_band(const schedule_node_band &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_band::schedule_node_band(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_band &schedule_node_band::operator=(schedule_node_band obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_band::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::union_set schedule_node_band::ast_build_options() const
+{
+  auto res = isl_schedule_node_band_get_ast_build_options(get());
+  return manage(res);
+}
+
+isl::checked::union_set schedule_node_band::get_ast_build_options() const
+{
+  return ast_build_options();
+}
+
+isl::checked::set schedule_node_band::ast_isolate_option() const
+{
+  auto res = isl_schedule_node_band_get_ast_isolate_option(get());
+  return manage(res);
+}
+
+isl::checked::set schedule_node_band::get_ast_isolate_option() const
+{
+  return ast_isolate_option();
+}
+
+isl::checked::multi_union_pw_aff schedule_node_band::partial_schedule() const
+{
+  auto res = isl_schedule_node_band_get_partial_schedule(get());
+  return manage(res);
+}
+
+isl::checked::multi_union_pw_aff schedule_node_band::get_partial_schedule() const
+{
+  return partial_schedule();
+}
+
+boolean schedule_node_band::permutable() const
+{
+  auto res = isl_schedule_node_band_get_permutable(get());
+  return manage(res);
+}
+
+boolean schedule_node_band::get_permutable() const
+{
+  return permutable();
+}
+
+boolean schedule_node_band::member_get_coincident(int pos) const
+{
+  auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
+  return manage(res);
+}
+
+schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const
+{
+  auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::mod(isl::checked::multi_val mv) const
+{
+  auto res = isl_schedule_node_band_mod(copy(), mv.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+class size schedule_node_band::n_member() const
+{
+  auto res = isl_schedule_node_band_n_member(get());
+  return manage(res);
+}
+
+schedule_node_band schedule_node_band::scale(isl::checked::multi_val mv) const
+{
+  auto res = isl_schedule_node_band_scale(copy(), mv.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::scale_down(isl::checked::multi_val mv) const
+{
+  auto res = isl_schedule_node_band_scale_down(copy(), mv.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::set_ast_build_options(isl::checked::union_set options) const
+{
+  auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::set_permutable(int permutable) const
+{
+  auto res = isl_schedule_node_band_set_permutable(copy(), permutable);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::shift(isl::checked::multi_union_pw_aff shift) const
+{
+  auto res = isl_schedule_node_band_shift(copy(), shift.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::split(int pos) const
+{
+  auto res = isl_schedule_node_band_split(copy(), pos);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::tile(isl::checked::multi_val sizes) const
+{
+  auto res = isl_schedule_node_band_tile(copy(), sizes.release());
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const
+{
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_default);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const
+{
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_atomic);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const
+{
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_unroll);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const
+{
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_separate);
+  return manage(res).as<schedule_node_band>();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_band &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_context
+schedule_node_context::schedule_node_context()
+    : schedule_node() {}
+
+schedule_node_context::schedule_node_context(const schedule_node_context &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_context::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::set schedule_node_context::context() const
+{
+  auto res = isl_schedule_node_context_get_context(get());
+  return manage(res);
+}
+
+isl::checked::set schedule_node_context::get_context() const
+{
+  return context();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_context &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_domain
+schedule_node_domain::schedule_node_domain()
+    : schedule_node() {}
+
+schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_domain::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::union_set schedule_node_domain::domain() const
+{
+  auto res = isl_schedule_node_domain_get_domain(get());
+  return manage(res);
+}
+
+isl::checked::union_set schedule_node_domain::get_domain() const
+{
+  return domain();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_domain &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_expansion
+schedule_node_expansion::schedule_node_expansion()
+    : schedule_node() {}
+
+schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_expansion::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::union_pw_multi_aff schedule_node_expansion::contraction() const
+{
+  auto res = isl_schedule_node_expansion_get_contraction(get());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff schedule_node_expansion::get_contraction() const
+{
+  return contraction();
+}
+
+isl::checked::union_map schedule_node_expansion::expansion() const
+{
+  auto res = isl_schedule_node_expansion_get_expansion(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_node_expansion::get_expansion() const
+{
+  return expansion();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_expansion &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_extension
+schedule_node_extension::schedule_node_extension()
+    : schedule_node() {}
+
+schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_extension::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::union_map schedule_node_extension::extension() const
+{
+  auto res = isl_schedule_node_extension_get_extension(get());
+  return manage(res);
+}
+
+isl::checked::union_map schedule_node_extension::get_extension() const
+{
+  return extension();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_extension &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_filter
+schedule_node_filter::schedule_node_filter()
+    : schedule_node() {}
+
+schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_filter::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::union_set schedule_node_filter::filter() const
+{
+  auto res = isl_schedule_node_filter_get_filter(get());
+  return manage(res);
+}
+
+isl::checked::union_set schedule_node_filter::get_filter() const
+{
+  return filter();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_filter &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_guard
+schedule_node_guard::schedule_node_guard()
+    : schedule_node() {}
+
+schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_guard::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::checked::set schedule_node_guard::guard() const
+{
+  auto res = isl_schedule_node_guard_get_guard(get());
+  return manage(res);
+}
+
+isl::checked::set schedule_node_guard::get_guard() const
+{
+  return guard();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_guard &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_leaf
+schedule_node_leaf::schedule_node_leaf()
+    : schedule_node() {}
+
+schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_leaf::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_leaf &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_mark
+schedule_node_mark::schedule_node_mark()
+    : schedule_node() {}
+
+schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_mark::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_mark &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_sequence
+schedule_node_sequence::schedule_node_sequence()
+    : schedule_node() {}
+
+schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_sequence::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_sequence &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_set
+schedule_node_set::schedule_node_set()
+    : schedule_node() {}
+
+schedule_node_set::schedule_node_set(const schedule_node_set &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::checked::ctx schedule_node_set::ctx() const {
+  return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_set &obj)
+{
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::set
+set manage(__isl_take isl_set *ptr) {
+  return set(ptr);
+}
+set manage_copy(__isl_keep isl_set *ptr) {
+  ptr = isl_set_copy(ptr);
+  return set(ptr);
+}
+
+set::set()
+    : ptr(nullptr) {}
+
+set::set(const set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+set::set(__isl_take isl_set *ptr)
+    : ptr(ptr) {}
+
+set::set(isl::checked::basic_set bset)
+{
+  auto res = isl_set_from_basic_set(bset.release());
+  ptr = res;
+}
+
+set::set(isl::checked::point pnt)
+{
+  auto res = isl_set_from_point(pnt.release());
+  ptr = res;
+}
+
+set::set(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+set &set::operator=(set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+set::~set() {
+  if (ptr)
+    isl_set_free(ptr);
+}
+
+__isl_give isl_set *set::copy() const & {
+  return isl_set_copy(ptr);
+}
+
+__isl_keep isl_set *set::get() const {
+  return ptr;
+}
+
+__isl_give isl_set *set::release() {
+  isl_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx set::ctx() const {
+  return isl::checked::ctx(isl_set_get_ctx(ptr));
+}
+
+isl::checked::basic_set set::affine_hull() const
+{
+  auto res = isl_set_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::set set::apply(isl::checked::map map) const
+{
+  auto res = isl_set_apply(copy(), map.release());
+  return manage(res);
+}
+
+isl::checked::set set::bind(isl::checked::multi_id tuple) const
+{
+  auto res = isl_set_bind(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::set set::coalesce() const
+{
+  auto res = isl_set_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::set set::complement() const
+{
+  auto res = isl_set_complement(copy());
+  return manage(res);
+}
+
+isl::checked::set set::detect_equalities() const
+{
+  auto res = isl_set_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::val set::dim_max_val(int pos) const
+{
+  auto res = isl_set_dim_max_val(copy(), pos);
+  return manage(res);
+}
+
+isl::checked::val set::dim_min_val(int pos) const
+{
+  auto res = isl_set_dim_min_val(copy(), pos);
+  return manage(res);
+}
+
+isl::checked::set set::empty(isl::checked::space space)
+{
+  auto res = isl_set_empty(space.release());
+  return manage(res);
+}
+
+isl::checked::set set::flatten() const
+{
+  auto res = isl_set_flatten(copy());
+  return manage(res);
+}
+
+stat set::foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::basic_set)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::point)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::multi_val set::plain_multi_val_if_fixed() const
+{
+  auto res = isl_set_get_plain_multi_val_if_fixed(get());
+  return manage(res);
+}
+
+isl::checked::multi_val set::get_plain_multi_val_if_fixed() const
+{
+  return plain_multi_val_if_fixed();
+}
+
+isl::checked::fixed_box set::simple_fixed_box_hull() const
+{
+  auto res = isl_set_get_simple_fixed_box_hull(get());
+  return manage(res);
+}
+
+isl::checked::fixed_box set::get_simple_fixed_box_hull() const
+{
+  return simple_fixed_box_hull();
+}
+
+isl::checked::space set::space() const
+{
+  auto res = isl_set_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space set::get_space() const
+{
+  return space();
+}
+
+isl::checked::val set::stride(int pos) const
+{
+  auto res = isl_set_get_stride(get(), pos);
+  return manage(res);
+}
+
+isl::checked::val set::get_stride(int pos) const
+{
+  return stride(pos);
+}
+
+isl::checked::set set::gist(isl::checked::set context) const
+{
+  auto res = isl_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::map set::identity() const
+{
+  auto res = isl_set_identity(copy());
+  return manage(res);
+}
+
+isl::checked::pw_aff set::indicator_function() const
+{
+  auto res = isl_set_indicator_function(copy());
+  return manage(res);
+}
+
+isl::checked::map set::insert_domain(isl::checked::space domain) const
+{
+  auto res = isl_set_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::set set::intersect(isl::checked::set set2) const
+{
+  auto res = isl_set_intersect(copy(), set2.release());
+  return manage(res);
+}
+
+isl::checked::set set::intersect_params(isl::checked::set params) const
+{
+  auto res = isl_set_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+boolean set::involves_locals() const
+{
+  auto res = isl_set_involves_locals(get());
+  return manage(res);
+}
+
+boolean set::is_disjoint(const isl::checked::set &set2) const
+{
+  auto res = isl_set_is_disjoint(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_empty() const
+{
+  auto res = isl_set_is_empty(get());
+  return manage(res);
+}
+
+boolean set::is_equal(const isl::checked::set &set2) const
+{
+  auto res = isl_set_is_equal(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_singleton() const
+{
+  auto res = isl_set_is_singleton(get());
+  return manage(res);
+}
+
+boolean set::is_strict_subset(const isl::checked::set &set2) const
+{
+  auto res = isl_set_is_strict_subset(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_subset(const isl::checked::set &set2) const
+{
+  auto res = isl_set_is_subset(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_wrapping() const
+{
+  auto res = isl_set_is_wrapping(get());
+  return manage(res);
+}
+
+isl::checked::set set::lexmax() const
+{
+  auto res = isl_set_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff set::lexmax_pw_multi_aff() const
+{
+  auto res = isl_set_lexmax_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::set set::lexmin() const
+{
+  auto res = isl_set_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff set::lexmin_pw_multi_aff() const
+{
+  auto res = isl_set_lexmin_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::set set::lower_bound(isl::checked::multi_pw_aff lower) const
+{
+  auto res = isl_set_lower_bound_multi_pw_aff(copy(), lower.release());
+  return manage(res);
+}
+
+isl::checked::set set::lower_bound(isl::checked::multi_val lower) const
+{
+  auto res = isl_set_lower_bound_multi_val(copy(), lower.release());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff set::max_multi_pw_aff() const
+{
+  auto res = isl_set_max_multi_pw_aff(copy());
+  return manage(res);
+}
+
+isl::checked::val set::max_val(const isl::checked::aff &obj) const
+{
+  auto res = isl_set_max_val(get(), obj.get());
+  return manage(res);
+}
+
+isl::checked::multi_pw_aff set::min_multi_pw_aff() const
+{
+  auto res = isl_set_min_multi_pw_aff(copy());
+  return manage(res);
+}
+
+isl::checked::val set::min_val(const isl::checked::aff &obj) const
+{
+  auto res = isl_set_min_val(get(), obj.get());
+  return manage(res);
+}
+
+isl::checked::set set::params() const
+{
+  auto res = isl_set_params(copy());
+  return manage(res);
+}
+
+isl::checked::basic_set set::polyhedral_hull() const
+{
+  auto res = isl_set_polyhedral_hull(copy());
+  return manage(res);
+}
+
+isl::checked::set set::preimage(isl::checked::multi_aff ma) const
+{
+  auto res = isl_set_preimage_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::set set::preimage(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::set set::preimage(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::set set::product(isl::checked::set set2) const
+{
+  auto res = isl_set_product(copy(), set2.release());
+  return manage(res);
+}
+
+isl::checked::set set::project_out_all_params() const
+{
+  auto res = isl_set_project_out_all_params(copy());
+  return manage(res);
+}
+
+isl::checked::set set::project_out_param(isl::checked::id id) const
+{
+  auto res = isl_set_project_out_param_id(copy(), id.release());
+  return manage(res);
+}
+
+isl::checked::set set::project_out_param(const std::string &id) const
+{
+  return this->project_out_param(isl::checked::id(ctx(), id));
+}
+
+isl::checked::set set::project_out_param(isl::checked::id_list list) const
+{
+  auto res = isl_set_project_out_param_id_list(copy(), list.release());
+  return manage(res);
+}
+
+isl::checked::basic_set set::sample() const
+{
+  auto res = isl_set_sample(copy());
+  return manage(res);
+}
+
+isl::checked::point set::sample_point() const
+{
+  auto res = isl_set_sample_point(copy());
+  return manage(res);
+}
+
+isl::checked::set set::subtract(isl::checked::set set2) const
+{
+  auto res = isl_set_subtract(copy(), set2.release());
+  return manage(res);
+}
+
+isl::checked::set set::unbind_params(isl::checked::multi_id tuple) const
+{
+  auto res = isl_set_unbind_params(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::map set::unbind_params_insert_domain(isl::checked::multi_id domain) const
+{
+  auto res = isl_set_unbind_params_insert_domain(copy(), domain.release());
+  return manage(res);
+}
+
+isl::checked::set set::unite(isl::checked::set set2) const
+{
+  auto res = isl_set_union(copy(), set2.release());
+  return manage(res);
+}
+
+isl::checked::set set::universe(isl::checked::space space)
+{
+  auto res = isl_set_universe(space.release());
+  return manage(res);
+}
+
+isl::checked::basic_set set::unshifted_simple_hull() const
+{
+  auto res = isl_set_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+isl::checked::map set::unwrap() const
+{
+  auto res = isl_set_unwrap(copy());
+  return manage(res);
+}
+
+isl::checked::set set::upper_bound(isl::checked::multi_pw_aff upper) const
+{
+  auto res = isl_set_upper_bound_multi_pw_aff(copy(), upper.release());
+  return manage(res);
+}
+
+isl::checked::set set::upper_bound(isl::checked::multi_val upper) const
+{
+  auto res = isl_set_upper_bound_multi_val(copy(), upper.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const set &obj)
+{
+  char *str = isl_set_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::space
+space manage(__isl_take isl_space *ptr) {
+  return space(ptr);
+}
+space manage_copy(__isl_keep isl_space *ptr) {
+  ptr = isl_space_copy(ptr);
+  return space(ptr);
+}
+
+space::space()
+    : ptr(nullptr) {}
+
+space::space(const space &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+space::space(__isl_take isl_space *ptr)
+    : ptr(ptr) {}
+
+space &space::operator=(space obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+space::~space() {
+  if (ptr)
+    isl_space_free(ptr);
+}
+
+__isl_give isl_space *space::copy() const & {
+  return isl_space_copy(ptr);
+}
+
+__isl_keep isl_space *space::get() const {
+  return ptr;
+}
+
+__isl_give isl_space *space::release() {
+  isl_space *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool space::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx space::ctx() const {
+  return isl::checked::ctx(isl_space_get_ctx(ptr));
+}
+
+isl::checked::space space::add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const
+{
+  auto res = isl_space_add_named_tuple_id_ui(copy(), tuple_id.release(), dim);
+  return manage(res);
+}
+
+isl::checked::space space::add_named_tuple(const std::string &tuple_id, unsigned int dim) const
+{
+  return this->add_named_tuple(isl::checked::id(ctx(), tuple_id), dim);
+}
+
+isl::checked::space space::add_unnamed_tuple(unsigned int dim) const
+{
+  auto res = isl_space_add_unnamed_tuple_ui(copy(), dim);
+  return manage(res);
+}
+
+isl::checked::space space::domain() const
+{
+  auto res = isl_space_domain(copy());
+  return manage(res);
+}
+
+isl::checked::space space::flatten_domain() const
+{
+  auto res = isl_space_flatten_domain(copy());
+  return manage(res);
+}
+
+isl::checked::space space::flatten_range() const
+{
+  auto res = isl_space_flatten_range(copy());
+  return manage(res);
+}
+
+boolean space::is_equal(const isl::checked::space &space2) const
+{
+  auto res = isl_space_is_equal(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::is_wrapping() const
+{
+  auto res = isl_space_is_wrapping(get());
+  return manage(res);
+}
+
+isl::checked::space space::map_from_set() const
+{
+  auto res = isl_space_map_from_set(copy());
+  return manage(res);
+}
+
+isl::checked::space space::params() const
+{
+  auto res = isl_space_params(copy());
+  return manage(res);
+}
+
+isl::checked::space space::range() const
+{
+  auto res = isl_space_range(copy());
+  return manage(res);
+}
+
+isl::checked::space space::unit(isl::checked::ctx ctx)
+{
+  auto res = isl_space_unit(ctx.release());
+  return manage(res);
+}
+
+isl::checked::space space::unwrap() const
+{
+  auto res = isl_space_unwrap(copy());
+  return manage(res);
+}
+
+isl::checked::space space::wrap() const
+{
+  auto res = isl_space_wrap(copy());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const space &obj)
+{
+  char *str = isl_space_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_access_info
+union_access_info manage(__isl_take isl_union_access_info *ptr) {
+  return union_access_info(ptr);
+}
+union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
+  ptr = isl_union_access_info_copy(ptr);
+  return union_access_info(ptr);
+}
+
+union_access_info::union_access_info()
+    : ptr(nullptr) {}
+
+union_access_info::union_access_info(const union_access_info &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
+    : ptr(ptr) {}
+
+union_access_info::union_access_info(isl::checked::union_map sink)
+{
+  auto res = isl_union_access_info_from_sink(sink.release());
+  ptr = res;
+}
+
+union_access_info &union_access_info::operator=(union_access_info obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_access_info::~union_access_info() {
+  if (ptr)
+    isl_union_access_info_free(ptr);
+}
+
+__isl_give isl_union_access_info *union_access_info::copy() const & {
+  return isl_union_access_info_copy(ptr);
+}
+
+__isl_keep isl_union_access_info *union_access_info::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_access_info *union_access_info::release() {
+  isl_union_access_info *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_access_info::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_access_info::ctx() const {
+  return isl::checked::ctx(isl_union_access_info_get_ctx(ptr));
+}
+
+isl::checked::union_flow union_access_info::compute_flow() const
+{
+  auto res = isl_union_access_info_compute_flow(copy());
+  return manage(res);
+}
+
+isl::checked::union_access_info union_access_info::set_kill(isl::checked::union_map kill) const
+{
+  auto res = isl_union_access_info_set_kill(copy(), kill.release());
+  return manage(res);
+}
+
+isl::checked::union_access_info union_access_info::set_may_source(isl::checked::union_map may_source) const
+{
+  auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
+  return manage(res);
+}
+
+isl::checked::union_access_info union_access_info::set_must_source(isl::checked::union_map must_source) const
+{
+  auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
+  return manage(res);
+}
+
+isl::checked::union_access_info union_access_info::set_schedule(isl::checked::schedule schedule) const
+{
+  auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
+  return manage(res);
+}
+
+isl::checked::union_access_info union_access_info::set_schedule_map(isl::checked::union_map schedule_map) const
+{
+  auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_access_info &obj)
+{
+  char *str = isl_union_access_info_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_flow
+union_flow manage(__isl_take isl_union_flow *ptr) {
+  return union_flow(ptr);
+}
+union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
+  ptr = isl_union_flow_copy(ptr);
+  return union_flow(ptr);
+}
+
+union_flow::union_flow()
+    : ptr(nullptr) {}
+
+union_flow::union_flow(const union_flow &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_flow::union_flow(__isl_take isl_union_flow *ptr)
+    : ptr(ptr) {}
+
+union_flow &union_flow::operator=(union_flow obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_flow::~union_flow() {
+  if (ptr)
+    isl_union_flow_free(ptr);
+}
+
+__isl_give isl_union_flow *union_flow::copy() const & {
+  return isl_union_flow_copy(ptr);
+}
+
+__isl_keep isl_union_flow *union_flow::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_flow *union_flow::release() {
+  isl_union_flow *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_flow::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_flow::ctx() const {
+  return isl::checked::ctx(isl_union_flow_get_ctx(ptr));
+}
+
+isl::checked::union_map union_flow::full_may_dependence() const
+{
+  auto res = isl_union_flow_get_full_may_dependence(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_full_may_dependence() const
+{
+  return full_may_dependence();
+}
+
+isl::checked::union_map union_flow::full_must_dependence() const
+{
+  auto res = isl_union_flow_get_full_must_dependence(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_full_must_dependence() const
+{
+  return full_must_dependence();
+}
+
+isl::checked::union_map union_flow::may_dependence() const
+{
+  auto res = isl_union_flow_get_may_dependence(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_may_dependence() const
+{
+  return may_dependence();
+}
+
+isl::checked::union_map union_flow::may_no_source() const
+{
+  auto res = isl_union_flow_get_may_no_source(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_may_no_source() const
+{
+  return may_no_source();
+}
+
+isl::checked::union_map union_flow::must_dependence() const
+{
+  auto res = isl_union_flow_get_must_dependence(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_must_dependence() const
+{
+  return must_dependence();
+}
+
+isl::checked::union_map union_flow::must_no_source() const
+{
+  auto res = isl_union_flow_get_must_no_source(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_flow::get_must_no_source() const
+{
+  return must_no_source();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_flow &obj)
+{
+  char *str = isl_union_flow_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_map
+union_map manage(__isl_take isl_union_map *ptr) {
+  return union_map(ptr);
+}
+union_map manage_copy(__isl_keep isl_union_map *ptr) {
+  ptr = isl_union_map_copy(ptr);
+  return union_map(ptr);
+}
+
+union_map::union_map()
+    : ptr(nullptr) {}
+
+union_map::union_map(const union_map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_map::union_map(__isl_take isl_union_map *ptr)
+    : ptr(ptr) {}
+
+union_map::union_map(isl::checked::basic_map bmap)
+{
+  auto res = isl_union_map_from_basic_map(bmap.release());
+  ptr = res;
+}
+
+union_map::union_map(isl::checked::map map)
+{
+  auto res = isl_union_map_from_map(map.release());
+  ptr = res;
+}
+
+union_map::union_map(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_map &union_map::operator=(union_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_map::~union_map() {
+  if (ptr)
+    isl_union_map_free(ptr);
+}
+
+__isl_give isl_union_map *union_map::copy() const & {
+  return isl_union_map_copy(ptr);
+}
+
+__isl_keep isl_union_map *union_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_map *union_map::release() {
+  isl_union_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_map::ctx() const {
+  return isl::checked::ctx(isl_union_map_get_ctx(ptr));
+}
+
+isl::checked::union_map union_map::affine_hull() const
+{
+  auto res = isl_union_map_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::apply_domain(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_apply_domain(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::apply_range(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_apply_range(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_map::bind_range(isl::checked::multi_id tuple) const
+{
+  auto res = isl_union_map_bind_range(copy(), tuple.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::coalesce() const
+{
+  auto res = isl_union_map_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::compute_divs() const
+{
+  auto res = isl_union_map_compute_divs(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::curry() const
+{
+  auto res = isl_union_map_curry(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_map::deltas() const
+{
+  auto res = isl_union_map_deltas(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::detect_equalities() const
+{
+  auto res = isl_union_map_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_map::domain() const
+{
+  auto res = isl_union_map_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::domain_factor_domain() const
+{
+  auto res = isl_union_map_domain_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::domain_factor_range() const
+{
+  auto res = isl_union_map_domain_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::domain_map() const
+{
+  auto res = isl_union_map_domain_map(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
+{
+  auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::domain_product(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_domain_product(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::empty(isl::checked::ctx ctx)
+{
+  auto res = isl_union_map_empty_ctx(ctx.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::eq_at(isl::checked::multi_union_pw_aff mupa) const
+{
+  auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
+  return manage(res);
+}
+
+boolean union_map::every_map(const std::function<boolean(isl::checked::map)> &test) const
+{
+  struct test_data {
+    std::function<boolean(isl::checked::map)> func;
+  } test_data = { test };
+  auto test_lambda = [](isl_map *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    auto ret = (data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_map_every_map(get(), test_lambda, &test_data);
+  return manage(res);
+}
+
+isl::checked::map union_map::extract_map(isl::checked::space space) const
+{
+  auto res = isl_union_map_extract_map(get(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::factor_domain() const
+{
+  auto res = isl_union_map_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::factor_range() const
+{
+  auto res = isl_union_map_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::fixed_power(isl::checked::val exp) const
+{
+  auto res = isl_union_map_fixed_power_val(copy(), exp.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::fixed_power(long exp) const
+{
+  return this->fixed_power(isl::checked::val(ctx(), exp));
+}
+
+stat union_map::foreach_map(const std::function<stat(isl::checked::map)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::map)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::union_map union_map::from(isl::checked::multi_union_pw_aff mupa)
+{
+  auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::from(isl::checked::union_pw_multi_aff upma)
+{
+  auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::from_domain(isl::checked::union_set uset)
+{
+  auto res = isl_union_map_from_domain(uset.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range)
+{
+  auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::from_range(isl::checked::union_set uset)
+{
+  auto res = isl_union_map_from_range(uset.release());
+  return manage(res);
+}
+
+isl::checked::space union_map::space() const
+{
+  auto res = isl_union_map_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space union_map::get_space() const
+{
+  return space();
+}
+
+isl::checked::union_map union_map::gist(isl::checked::union_map context) const
+{
+  auto res = isl_union_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::gist_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_map_gist_domain(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::gist_params(isl::checked::set set) const
+{
+  auto res = isl_union_map_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::gist_range(isl::checked::union_set uset) const
+{
+  auto res = isl_union_map_gist_range(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_intersect(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect_domain(isl::checked::space space) const
+{
+  auto res = isl_union_map_intersect_domain_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_map_intersect_domain_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_union_map_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect_range(isl::checked::space space) const
+{
+  auto res = isl_union_map_intersect_range_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::intersect_range(isl::checked::union_set uset) const
+{
+  auto res = isl_union_map_intersect_range_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+boolean union_map::is_bijective() const
+{
+  auto res = isl_union_map_is_bijective(get());
+  return manage(res);
+}
+
+boolean union_map::is_disjoint(const isl::checked::union_map &umap2) const
+{
+  auto res = isl_union_map_is_disjoint(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_empty() const
+{
+  auto res = isl_union_map_is_empty(get());
+  return manage(res);
+}
+
+boolean union_map::is_equal(const isl::checked::union_map &umap2) const
+{
+  auto res = isl_union_map_is_equal(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_injective() const
+{
+  auto res = isl_union_map_is_injective(get());
+  return manage(res);
+}
+
+boolean union_map::is_single_valued() const
+{
+  auto res = isl_union_map_is_single_valued(get());
+  return manage(res);
+}
+
+boolean union_map::is_strict_subset(const isl::checked::union_map &umap2) const
+{
+  auto res = isl_union_map_is_strict_subset(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_subset(const isl::checked::union_map &umap2) const
+{
+  auto res = isl_union_map_is_subset(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::isa_map() const
+{
+  auto res = isl_union_map_isa_map(get());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::lexmax() const
+{
+  auto res = isl_union_map_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::lexmin() const
+{
+  auto res = isl_union_map_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::polyhedral_hull() const
+{
+  auto res = isl_union_map_polyhedral_hull(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_domain(isl::checked::multi_aff ma) const
+{
+  auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_domain(isl::checked::multi_pw_aff mpa) const
+{
+  auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_domain(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_domain(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_range(isl::checked::multi_aff ma) const
+{
+  auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_range(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::preimage_range(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::product(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_product(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::project_out_all_params() const
+{
+  auto res = isl_union_map_project_out_all_params(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_map::range() const
+{
+  auto res = isl_union_map_range(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::range_factor_domain() const
+{
+  auto res = isl_union_map_range_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::range_factor_range() const
+{
+  auto res = isl_union_map_range_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::range_map() const
+{
+  auto res = isl_union_map_range_map(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::range_product(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_range_product(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::range_reverse() const
+{
+  auto res = isl_union_map_range_reverse(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::reverse() const
+{
+  auto res = isl_union_map_reverse(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::subtract(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_subtract(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::subtract_domain(isl::checked::union_set dom) const
+{
+  auto res = isl_union_map_subtract_domain(copy(), dom.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::subtract_range(isl::checked::union_set dom) const
+{
+  auto res = isl_union_map_subtract_range(copy(), dom.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::uncurry() const
+{
+  auto res = isl_union_map_uncurry(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::unite(isl::checked::union_map umap2) const
+{
+  auto res = isl_union_map_union(copy(), umap2.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::universe() const
+{
+  auto res = isl_union_map_universe(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_map::wrap() const
+{
+  auto res = isl_union_map_wrap(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_map::zip() const
+{
+  auto res = isl_union_map_zip(copy());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_map &obj)
+{
+  char *str = isl_union_map_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_aff
+union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
+  return union_pw_aff(ptr);
+}
+union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
+  ptr = isl_union_pw_aff_copy(ptr);
+  return union_pw_aff(ptr);
+}
+
+union_pw_aff::union_pw_aff()
+    : ptr(nullptr) {}
+
+union_pw_aff::union_pw_aff(const union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_aff::union_pw_aff(isl::checked::aff aff)
+{
+  auto res = isl_union_pw_aff_from_aff(aff.release());
+  ptr = res;
+}
+
+union_pw_aff::union_pw_aff(isl::checked::pw_aff pa)
+{
+  auto res = isl_union_pw_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+
+union_pw_aff::union_pw_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff::~union_pw_aff() {
+  if (ptr)
+    isl_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
+  return isl_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff *union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::release() {
+  isl_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_pw_aff::ctx() const {
+  return isl::checked::ctx(isl_union_pw_aff_get_ctx(ptr));
+}
+
+isl::checked::union_pw_aff union_pw_aff::add(isl::checked::union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_add(copy(), upa2.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_pw_aff::bind(isl::checked::id id) const
+{
+  auto res = isl_union_pw_aff_bind_id(copy(), id.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_pw_aff::bind(const std::string &id) const
+{
+  return this->bind(isl::checked::id(ctx(), id));
+}
+
+isl::checked::union_pw_aff union_pw_aff::coalesce() const
+{
+  auto res = isl_union_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_pw_aff::domain() const
+{
+  auto res = isl_union_pw_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::space union_pw_aff::space() const
+{
+  auto res = isl_union_pw_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space union_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::union_pw_aff union_pw_aff::gist(isl::checked::union_set context) const
+{
+  auto res = isl_union_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::space space) const
+{
+  auto res = isl_union_pw_aff_intersect_domain_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_aff_intersect_domain_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_aff_intersect_domain_wrapped_domain(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_aff_intersect_domain_wrapped_range(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::sub(isl::checked::union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_sub(copy(), upa2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::space space) const
+{
+  auto res = isl_union_pw_aff_subtract_domain_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_aff_subtract_domain_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff::union_add(isl::checked::union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_aff &obj)
+{
+  char *str = isl_union_pw_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_aff_list
+union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
+  return union_pw_aff_list(ptr);
+}
+union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
+  ptr = isl_union_pw_aff_list_copy(ptr);
+  return union_pw_aff_list(ptr);
+}
+
+union_pw_aff_list::union_pw_aff_list()
+    : ptr(nullptr) {}
+
+union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+union_pw_aff_list::union_pw_aff_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+union_pw_aff_list::union_pw_aff_list(isl::checked::union_pw_aff el)
+{
+  auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
+  ptr = res;
+}
+
+union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff_list::~union_pw_aff_list() {
+  if (ptr)
+    isl_union_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
+  return isl_union_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
+  isl_union_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_pw_aff_list::ctx() const {
+  return isl::checked::ctx(isl_union_pw_aff_list_get_ctx(ptr));
+}
+
+isl::checked::union_pw_aff_list union_pw_aff_list::add(isl::checked::union_pw_aff el) const
+{
+  auto res = isl_union_pw_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff_list union_pw_aff_list::clear() const
+{
+  auto res = isl_union_pw_aff_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff_list union_pw_aff_list::concat(isl::checked::union_pw_aff_list list2) const
+{
+  auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_pw_aff_list::foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::union_pw_aff)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff_list::at(int index) const
+{
+  auto res = isl_union_pw_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::union_pw_aff union_pw_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, isl::checked::union_pw_aff el) const
+{
+  auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size union_pw_aff_list::size() const
+{
+  auto res = isl_union_pw_aff_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_aff_list &obj)
+{
+  char *str = isl_union_pw_aff_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_multi_aff
+union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
+  return union_pw_multi_aff(ptr);
+}
+union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
+  ptr = isl_union_pw_multi_aff_copy(ptr);
+  return union_pw_multi_aff(ptr);
+}
+
+union_pw_multi_aff::union_pw_multi_aff()
+    : ptr(nullptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::checked::multi_aff ma)
+{
+  auto res = isl_union_pw_multi_aff_from_multi_aff(ma.release());
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::checked::pw_multi_aff pma)
+{
+  auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::checked::union_pw_aff upa)
+{
+  auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_multi_aff::~union_pw_multi_aff() {
+  if (ptr)
+    isl_union_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
+  return isl_union_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
+  isl_union_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_pw_multi_aff::ctx() const {
+  return isl::checked::ctx(isl_union_pw_multi_aff_get_ctx(ptr));
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::add(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::apply(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_apply_union_pw_multi_aff(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff union_pw_multi_aff::as_pw_multi_aff() const
+{
+  auto res = isl_union_pw_multi_aff_as_pw_multi_aff(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::coalesce() const
+{
+  auto res = isl_union_pw_multi_aff_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_pw_multi_aff::domain() const
+{
+  auto res = isl_union_pw_multi_aff_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::empty(isl::checked::ctx ctx)
+{
+  auto res = isl_union_pw_multi_aff_empty_ctx(ctx.release());
+  return manage(res);
+}
+
+isl::checked::pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(isl::checked::space space) const
+{
+  auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::flat_range_product(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::space union_pw_multi_aff::space() const
+{
+  auto res = isl_union_pw_multi_aff_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space union_pw_multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::gist(isl::checked::union_set context) const
+{
+  auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::space space) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_domain_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_domain_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_domain(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_range(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_pw_multi_aff::involves_locals() const
+{
+  auto res = isl_union_pw_multi_aff_involves_locals(get());
+  return manage(res);
+}
+
+boolean union_pw_multi_aff::isa_pw_multi_aff() const
+{
+  auto res = isl_union_pw_multi_aff_isa_pw_multi_aff(get());
+  return manage(res);
+}
+
+boolean union_pw_multi_aff::plain_is_empty() const
+{
+  auto res = isl_union_pw_multi_aff_plain_is_empty(get());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::pullback(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_domain() const
+{
+  auto res = isl_union_pw_multi_aff_range_factor_domain(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_range() const
+{
+  auto res = isl_union_pw_multi_aff_range_factor_range(copy());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::range_product(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_range_product(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::sub(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::space space) const
+{
+  auto res = isl_union_pw_multi_aff_subtract_domain_space(copy(), space.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_subtract_domain_union_set(copy(), uset.release());
+  return manage(res);
+}
+
+isl::checked::union_pw_multi_aff union_pw_multi_aff::union_add(isl::checked::union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_multi_aff &obj)
+{
+  char *str = isl_union_pw_multi_aff_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_set
+union_set manage(__isl_take isl_union_set *ptr) {
+  return union_set(ptr);
+}
+union_set manage_copy(__isl_keep isl_union_set *ptr) {
+  ptr = isl_union_set_copy(ptr);
+  return union_set(ptr);
+}
+
+union_set::union_set()
+    : ptr(nullptr) {}
+
+union_set::union_set(const union_set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_set::union_set(__isl_take isl_union_set *ptr)
+    : ptr(ptr) {}
+
+union_set::union_set(isl::checked::basic_set bset)
+{
+  auto res = isl_union_set_from_basic_set(bset.release());
+  ptr = res;
+}
+
+union_set::union_set(isl::checked::point pnt)
+{
+  auto res = isl_union_set_from_point(pnt.release());
+  ptr = res;
+}
+
+union_set::union_set(isl::checked::set set)
+{
+  auto res = isl_union_set_from_set(set.release());
+  ptr = res;
+}
+
+union_set::union_set(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_set &union_set::operator=(union_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set::~union_set() {
+  if (ptr)
+    isl_union_set_free(ptr);
+}
+
+__isl_give isl_union_set *union_set::copy() const & {
+  return isl_union_set_copy(ptr);
+}
+
+__isl_keep isl_union_set *union_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set *union_set::release() {
+  isl_union_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_set::ctx() const {
+  return isl::checked::ctx(isl_union_set_get_ctx(ptr));
+}
+
+isl::checked::union_set union_set::affine_hull() const
+{
+  auto res = isl_union_set_affine_hull(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::apply(isl::checked::union_map umap) const
+{
+  auto res = isl_union_set_apply(copy(), umap.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::coalesce() const
+{
+  auto res = isl_union_set_coalesce(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::compute_divs() const
+{
+  auto res = isl_union_set_compute_divs(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::detect_equalities() const
+{
+  auto res = isl_union_set_detect_equalities(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::empty(isl::checked::ctx ctx)
+{
+  auto res = isl_union_set_empty_ctx(ctx.release());
+  return manage(res);
+}
+
+boolean union_set::every_set(const std::function<boolean(isl::checked::set)> &test) const
+{
+  struct test_data {
+    std::function<boolean(isl::checked::set)> func;
+  } test_data = { test };
+  auto test_lambda = [](isl_set *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    auto ret = (data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_every_set(get(), test_lambda, &test_data);
+  return manage(res);
+}
+
+isl::checked::set union_set::extract_set(isl::checked::space space) const
+{
+  auto res = isl_union_set_extract_set(get(), space.release());
+  return manage(res);
+}
+
+stat union_set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::point)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat union_set::foreach_set(const std::function<stat(isl::checked::set)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::set)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::space union_set::space() const
+{
+  auto res = isl_union_set_get_space(get());
+  return manage(res);
+}
+
+isl::checked::space union_set::get_space() const
+{
+  return space();
+}
+
+isl::checked::union_set union_set::gist(isl::checked::union_set context) const
+{
+  auto res = isl_union_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::gist_params(isl::checked::set set) const
+{
+  auto res = isl_union_set_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+isl::checked::union_map union_set::identity() const
+{
+  auto res = isl_union_set_identity(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::intersect(isl::checked::union_set uset2) const
+{
+  auto res = isl_union_set_intersect(copy(), uset2.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::intersect_params(isl::checked::set set) const
+{
+  auto res = isl_union_set_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_set::is_disjoint(const isl::checked::union_set &uset2) const
+{
+  auto res = isl_union_set_is_disjoint(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_empty() const
+{
+  auto res = isl_union_set_is_empty(get());
+  return manage(res);
+}
+
+boolean union_set::is_equal(const isl::checked::union_set &uset2) const
+{
+  auto res = isl_union_set_is_equal(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_strict_subset(const isl::checked::union_set &uset2) const
+{
+  auto res = isl_union_set_is_strict_subset(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_subset(const isl::checked::union_set &uset2) const
+{
+  auto res = isl_union_set_is_subset(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::isa_set() const
+{
+  auto res = isl_union_set_isa_set(get());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::lexmax() const
+{
+  auto res = isl_union_set_lexmax(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::lexmin() const
+{
+  auto res = isl_union_set_lexmin(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::polyhedral_hull() const
+{
+  auto res = isl_union_set_polyhedral_hull(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::preimage(isl::checked::multi_aff ma) const
+{
+  auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::preimage(isl::checked::pw_multi_aff pma) const
+{
+  auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::preimage(isl::checked::union_pw_multi_aff upma) const
+{
+  auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+isl::checked::point union_set::sample_point() const
+{
+  auto res = isl_union_set_sample_point(copy());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::subtract(isl::checked::union_set uset2) const
+{
+  auto res = isl_union_set_subtract(copy(), uset2.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::unite(isl::checked::union_set uset2) const
+{
+  auto res = isl_union_set_union(copy(), uset2.release());
+  return manage(res);
+}
+
+isl::checked::union_set union_set::universe() const
+{
+  auto res = isl_union_set_universe(copy());
+  return manage(res);
+}
+
+isl::checked::union_map union_set::unwrap() const
+{
+  auto res = isl_union_set_unwrap(copy());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_set &obj)
+{
+  char *str = isl_union_set_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_set_list
+union_set_list manage(__isl_take isl_union_set_list *ptr) {
+  return union_set_list(ptr);
+}
+union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
+  ptr = isl_union_set_list_copy(ptr);
+  return union_set_list(ptr);
+}
+
+union_set_list::union_set_list()
+    : ptr(nullptr) {}
+
+union_set_list::union_set_list(const union_set_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
+    : ptr(ptr) {}
+
+union_set_list::union_set_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_union_set_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+union_set_list::union_set_list(isl::checked::union_set el)
+{
+  auto res = isl_union_set_list_from_union_set(el.release());
+  ptr = res;
+}
+
+union_set_list &union_set_list::operator=(union_set_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set_list::~union_set_list() {
+  if (ptr)
+    isl_union_set_list_free(ptr);
+}
+
+__isl_give isl_union_set_list *union_set_list::copy() const & {
+  return isl_union_set_list_copy(ptr);
+}
+
+__isl_keep isl_union_set_list *union_set_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set_list *union_set_list::release() {
+  isl_union_set_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx union_set_list::ctx() const {
+  return isl::checked::ctx(isl_union_set_list_get_ctx(ptr));
+}
+
+isl::checked::union_set_list union_set_list::add(isl::checked::union_set el) const
+{
+  auto res = isl_union_set_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::union_set_list union_set_list::clear() const
+{
+  auto res = isl_union_set_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::union_set_list union_set_list::concat(isl::checked::union_set_list list2) const
+{
+  auto res = isl_union_set_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_set_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_set_list::foreach(const std::function<stat(isl::checked::union_set)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::union_set)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::union_set union_set_list::at(int index) const
+{
+  auto res = isl_union_set_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::union_set union_set_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::union_set_list union_set_list::insert(unsigned int pos, isl::checked::union_set el) const
+{
+  auto res = isl_union_set_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+class size union_set_list::size() const
+{
+  auto res = isl_union_set_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_set_list &obj)
+{
+  char *str = isl_union_set_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::val
+val manage(__isl_take isl_val *ptr) {
+  return val(ptr);
+}
+val manage_copy(__isl_keep isl_val *ptr) {
+  ptr = isl_val_copy(ptr);
+  return val(ptr);
+}
+
+val::val()
+    : ptr(nullptr) {}
+
+val::val(const val &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+val::val(__isl_take isl_val *ptr)
+    : ptr(ptr) {}
+
+val::val(isl::checked::ctx ctx, long i)
+{
+  auto res = isl_val_int_from_si(ctx.release(), i);
+  ptr = res;
+}
+
+val::val(isl::checked::ctx ctx, const std::string &str)
+{
+  auto res = isl_val_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+val &val::operator=(val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val::~val() {
+  if (ptr)
+    isl_val_free(ptr);
+}
+
+__isl_give isl_val *val::copy() const & {
+  return isl_val_copy(ptr);
+}
+
+__isl_keep isl_val *val::get() const {
+  return ptr;
+}
+
+__isl_give isl_val *val::release() {
+  isl_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx val::ctx() const {
+  return isl::checked::ctx(isl_val_get_ctx(ptr));
+}
+
+isl::checked::val val::abs() const
+{
+  auto res = isl_val_abs(copy());
+  return manage(res);
+}
+
+boolean val::abs_eq(const isl::checked::val &v2) const
+{
+  auto res = isl_val_abs_eq(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::abs_eq(long v2) const
+{
+  return this->abs_eq(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::add(isl::checked::val v2) const
+{
+  auto res = isl_val_add(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::add(long v2) const
+{
+  return this->add(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::ceil() const
+{
+  auto res = isl_val_ceil(copy());
+  return manage(res);
+}
+
+int val::cmp_si(long i) const
+{
+  auto res = isl_val_cmp_si(get(), i);
+  return res;
+}
+
+isl::checked::val val::div(isl::checked::val v2) const
+{
+  auto res = isl_val_div(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::div(long v2) const
+{
+  return this->div(isl::checked::val(ctx(), v2));
+}
+
+boolean val::eq(const isl::checked::val &v2) const
+{
+  auto res = isl_val_eq(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::eq(long v2) const
+{
+  return this->eq(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::floor() const
+{
+  auto res = isl_val_floor(copy());
+  return manage(res);
+}
+
+isl::checked::val val::gcd(isl::checked::val v2) const
+{
+  auto res = isl_val_gcd(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::gcd(long v2) const
+{
+  return this->gcd(isl::checked::val(ctx(), v2));
+}
+
+boolean val::ge(const isl::checked::val &v2) const
+{
+  auto res = isl_val_ge(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::ge(long v2) const
+{
+  return this->ge(isl::checked::val(ctx(), v2));
+}
+
+long val::den_si() const
+{
+  auto res = isl_val_get_den_si(get());
+  return res;
+}
+
+long val::get_den_si() const
+{
+  return den_si();
+}
+
+long val::num_si() const
+{
+  auto res = isl_val_get_num_si(get());
+  return res;
+}
+
+long val::get_num_si() const
+{
+  return num_si();
+}
+
+boolean val::gt(const isl::checked::val &v2) const
+{
+  auto res = isl_val_gt(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::gt(long v2) const
+{
+  return this->gt(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::infty(isl::checked::ctx ctx)
+{
+  auto res = isl_val_infty(ctx.release());
+  return manage(res);
+}
+
+isl::checked::val val::inv() const
+{
+  auto res = isl_val_inv(copy());
+  return manage(res);
+}
+
+boolean val::is_divisible_by(const isl::checked::val &v2) const
+{
+  auto res = isl_val_is_divisible_by(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::is_divisible_by(long v2) const
+{
+  return this->is_divisible_by(isl::checked::val(ctx(), v2));
+}
+
+boolean val::is_infty() const
+{
+  auto res = isl_val_is_infty(get());
+  return manage(res);
+}
+
+boolean val::is_int() const
+{
+  auto res = isl_val_is_int(get());
+  return manage(res);
+}
+
+boolean val::is_nan() const
+{
+  auto res = isl_val_is_nan(get());
+  return manage(res);
+}
+
+boolean val::is_neg() const
+{
+  auto res = isl_val_is_neg(get());
+  return manage(res);
+}
+
+boolean val::is_neginfty() const
+{
+  auto res = isl_val_is_neginfty(get());
+  return manage(res);
+}
+
+boolean val::is_negone() const
+{
+  auto res = isl_val_is_negone(get());
+  return manage(res);
+}
+
+boolean val::is_nonneg() const
+{
+  auto res = isl_val_is_nonneg(get());
+  return manage(res);
+}
+
+boolean val::is_nonpos() const
+{
+  auto res = isl_val_is_nonpos(get());
+  return manage(res);
+}
+
+boolean val::is_one() const
+{
+  auto res = isl_val_is_one(get());
+  return manage(res);
+}
+
+boolean val::is_pos() const
+{
+  auto res = isl_val_is_pos(get());
+  return manage(res);
+}
+
+boolean val::is_rat() const
+{
+  auto res = isl_val_is_rat(get());
+  return manage(res);
+}
+
+boolean val::is_zero() const
+{
+  auto res = isl_val_is_zero(get());
+  return manage(res);
+}
+
+boolean val::le(const isl::checked::val &v2) const
+{
+  auto res = isl_val_le(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::le(long v2) const
+{
+  return this->le(isl::checked::val(ctx(), v2));
+}
+
+boolean val::lt(const isl::checked::val &v2) const
+{
+  auto res = isl_val_lt(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::lt(long v2) const
+{
+  return this->lt(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::max(isl::checked::val v2) const
+{
+  auto res = isl_val_max(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::max(long v2) const
+{
+  return this->max(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::min(isl::checked::val v2) const
+{
+  auto res = isl_val_min(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::min(long v2) const
+{
+  return this->min(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::mod(isl::checked::val v2) const
+{
+  auto res = isl_val_mod(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::mod(long v2) const
+{
+  return this->mod(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::mul(isl::checked::val v2) const
+{
+  auto res = isl_val_mul(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::mul(long v2) const
+{
+  return this->mul(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::nan(isl::checked::ctx ctx)
+{
+  auto res = isl_val_nan(ctx.release());
+  return manage(res);
+}
+
+boolean val::ne(const isl::checked::val &v2) const
+{
+  auto res = isl_val_ne(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::ne(long v2) const
+{
+  return this->ne(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::neg() const
+{
+  auto res = isl_val_neg(copy());
+  return manage(res);
+}
+
+isl::checked::val val::neginfty(isl::checked::ctx ctx)
+{
+  auto res = isl_val_neginfty(ctx.release());
+  return manage(res);
+}
+
+isl::checked::val val::negone(isl::checked::ctx ctx)
+{
+  auto res = isl_val_negone(ctx.release());
+  return manage(res);
+}
+
+isl::checked::val val::one(isl::checked::ctx ctx)
+{
+  auto res = isl_val_one(ctx.release());
+  return manage(res);
+}
+
+isl::checked::val val::pow2() const
+{
+  auto res = isl_val_pow2(copy());
+  return manage(res);
+}
+
+int val::sgn() const
+{
+  auto res = isl_val_sgn(get());
+  return res;
+}
+
+isl::checked::val val::sub(isl::checked::val v2) const
+{
+  auto res = isl_val_sub(copy(), v2.release());
+  return manage(res);
+}
+
+isl::checked::val val::sub(long v2) const
+{
+  return this->sub(isl::checked::val(ctx(), v2));
+}
+
+isl::checked::val val::trunc() const
+{
+  auto res = isl_val_trunc(copy());
+  return manage(res);
+}
+
+isl::checked::val val::zero(isl::checked::ctx ctx)
+{
+  auto res = isl_val_zero(ctx.release());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const val &obj)
+{
+  char *str = isl_val_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::val_list
+val_list manage(__isl_take isl_val_list *ptr) {
+  return val_list(ptr);
+}
+val_list manage_copy(__isl_keep isl_val_list *ptr) {
+  ptr = isl_val_list_copy(ptr);
+  return val_list(ptr);
+}
+
+val_list::val_list()
+    : ptr(nullptr) {}
+
+val_list::val_list(const val_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+
+val_list::val_list(__isl_take isl_val_list *ptr)
+    : ptr(ptr) {}
+
+val_list::val_list(isl::checked::ctx ctx, int n)
+{
+  auto res = isl_val_list_alloc(ctx.release(), n);
+  ptr = res;
+}
+
+val_list::val_list(isl::checked::val el)
+{
+  auto res = isl_val_list_from_val(el.release());
+  ptr = res;
+}
+
+val_list &val_list::operator=(val_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val_list::~val_list() {
+  if (ptr)
+    isl_val_list_free(ptr);
+}
+
+__isl_give isl_val_list *val_list::copy() const & {
+  return isl_val_list_copy(ptr);
+}
+
+__isl_keep isl_val_list *val_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_val_list *val_list::release() {
+  isl_val_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::checked::ctx val_list::ctx() const {
+  return isl::checked::ctx(isl_val_list_get_ctx(ptr));
+}
+
+isl::checked::val_list val_list::add(isl::checked::val el) const
+{
+  auto res = isl_val_list_add(copy(), el.release());
+  return manage(res);
+}
+
+isl::checked::val_list val_list::add(long el) const
+{
+  return this->add(isl::checked::val(ctx(), el));
+}
+
+isl::checked::val_list val_list::clear() const
+{
+  auto res = isl_val_list_clear(copy());
+  return manage(res);
+}
+
+isl::checked::val_list val_list::concat(isl::checked::val_list list2) const
+{
+  auto res = isl_val_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+isl::checked::val_list val_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_val_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat val_list::foreach(const std::function<stat(isl::checked::val)> &fn) const
+{
+  struct fn_data {
+    std::function<stat(isl::checked::val)> func;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    auto ret = (data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+isl::checked::val val_list::at(int index) const
+{
+  auto res = isl_val_list_get_at(get(), index);
+  return manage(res);
+}
+
+isl::checked::val val_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::checked::val_list val_list::insert(unsigned int pos, isl::checked::val el) const
+{
+  auto res = isl_val_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+isl::checked::val_list val_list::insert(unsigned int pos, long el) const
+{
+  return this->insert(pos, isl::checked::val(ctx(), el));
+}
+
+class size val_list::size() const
+{
+  auto res = isl_val_list_size(get());
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const val_list &obj)
+{
+  char *str = isl_val_list_to_str(obj.get());
+  if (!str) {
+    os.setstate(std::ios_base::badbit);
+    return os;
+  }
+  os << str;
+  free(str);
+  return os;
+}
+} // namespace checked
+} // namespace isl
+
+#endif /* ISL_CPP_CHECKED */
diff --git a/linux-x64/clang/include/polly/isl/cpp.h b/linux-x64/clang/include/polly/isl/cpp.h
new file mode 100644
index 0000000..0d885a5
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/cpp.h
@@ -0,0 +1,19442 @@
+/// These are automatically generated C++ bindings for isl.
+///
+/// isl is a library for computing with integer sets and maps described by
+/// Presburger formulas. On top of this, isl provides various tools for
+/// polyhedral compilation, ranging from dependence analysis over scheduling
+/// to AST generation.
+
+#ifndef ISL_CPP
+#define ISL_CPP
+
+#include <isl/id.h>
+#include <isl/space.h>
+#include <isl/val.h>
+#include <isl/aff.h>
+#include <isl/set.h>
+#include <isl/map.h>
+#include <isl/ilp.h>
+#include <isl/union_set.h>
+#include <isl/union_map.h>
+#include <isl/flow.h>
+#include <isl/schedule.h>
+#include <isl/schedule_node.h>
+#include <isl/ast_build.h>
+#include <isl/fixed_box.h>
+
+#include <isl/ctx.h>
+#include <isl/options.h>
+
+#include <functional>
+#include <memory>
+#include <ostream>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+
+/* ISL_USE_EXCEPTIONS should be defined to 1 if exceptions are available.
+ * gcc and clang define __cpp_exceptions; MSVC and xlC define _CPPUNWIND.
+ * Older versions of gcc (e.g., 4.9) only define __EXCEPTIONS.
+ * If exceptions are not available, any error condition will result
+ * in an abort.
+ */
+#ifndef ISL_USE_EXCEPTIONS
+#if defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(__EXCEPTIONS)
+#define ISL_USE_EXCEPTIONS	1
+#else
+#define ISL_USE_EXCEPTIONS	0
+#endif
+#endif
+
+namespace isl {
+
+class ctx {
+	isl_ctx *ptr;
+public:
+	/* implicit */ ctx(isl_ctx *ctx) : ptr(ctx) {}
+	isl_ctx *release() {
+		auto tmp = ptr;
+		ptr = nullptr;
+		return tmp;
+	}
+	isl_ctx *get() {
+		return ptr;
+	}
+};
+
+/* Macros hiding try/catch.
+ * If exceptions are not available, then no exceptions will be thrown and
+ * there is nothing to catch.
+ */
+#if ISL_USE_EXCEPTIONS
+#define ISL_CPP_TRY		try
+#define ISL_CPP_CATCH_ALL	catch (...)
+#else
+#define ISL_CPP_TRY		if (1)
+#define ISL_CPP_CATCH_ALL	if (0)
+#endif
+
+#if ISL_USE_EXCEPTIONS
+
+/* Class capturing isl errors.
+ *
+ * The what() return value is stored in a reference counted string
+ * to ensure that the copy constructor and the assignment operator
+ * do not throw any exceptions.
+ */
+class exception : public std::exception {
+	std::shared_ptr<std::string> what_str;
+
+protected:
+	inline exception(const char *what_arg, const char *msg,
+		const char *file, int line);
+public:
+	exception() {}
+	exception(const char *what_arg) {
+		what_str = std::make_shared<std::string>(what_arg);
+	}
+	static inline void throw_error(enum isl_error error, const char *msg,
+		const char *file, int line);
+	virtual const char *what() const noexcept {
+		return what_str->c_str();
+	}
+
+	/* Default behavior on error conditions that occur inside isl calls
+	 * performed from inside the bindings.
+	 * In the case exceptions are available, isl should continue
+	 * without printing a warning since the warning message
+	 * will be included in the exception thrown from inside the bindings.
+	 */
+	static constexpr auto on_error = ISL_ON_ERROR_CONTINUE;
+	/* Wrapper for throwing an exception with the given message.
+	 */
+	static void throw_invalid(const char *msg, const char *file, int line) {
+		throw_error(isl_error_invalid, msg, file, line);
+	}
+	static inline void throw_last_error(ctx ctx);
+};
+
+/* Create an exception of a type described by "what_arg", with
+ * error message "msg" in line "line" of file "file".
+ *
+ * Create a string holding the what() return value that
+ * corresponds to what isl would have printed.
+ * If no error message or no error file was set, then use "what_arg" instead.
+ */
+exception::exception(const char *what_arg, const char *msg, const char *file,
+	int line)
+{
+	if (!msg || !file)
+		what_str = std::make_shared<std::string>(what_arg);
+	else
+		what_str = std::make_shared<std::string>(std::string(file) +
+				    ":" + std::to_string(line) + ": " + msg);
+}
+
+class exception_abort : public exception {
+	friend exception;
+	exception_abort(const char *msg, const char *file, int line) :
+		exception("execution aborted", msg, file, line) {}
+};
+
+class exception_alloc : public exception {
+	friend exception;
+	exception_alloc(const char *msg, const char *file, int line) :
+		exception("memory allocation failure", msg, file, line) {}
+};
+
+class exception_unknown : public exception {
+	friend exception;
+	exception_unknown(const char *msg, const char *file, int line) :
+		exception("unknown failure", msg, file, line) {}
+};
+
+class exception_internal : public exception {
+	friend exception;
+	exception_internal(const char *msg, const char *file, int line) :
+		exception("internal error", msg, file, line) {}
+};
+
+class exception_invalid : public exception {
+	friend exception;
+	exception_invalid(const char *msg, const char *file, int line) :
+		exception("invalid argument", msg, file, line) {}
+};
+
+class exception_quota : public exception {
+	friend exception;
+	exception_quota(const char *msg, const char *file, int line) :
+		exception("quota exceeded", msg, file, line) {}
+};
+
+class exception_unsupported : public exception {
+	friend exception;
+	exception_unsupported(const char *msg, const char *file, int line) :
+		exception("unsupported operation", msg, file, line) {}
+};
+
+/* Throw an exception of the class that corresponds to "error", with
+ * error message "msg" in line "line" of file "file".
+ *
+ * isl_error_none is treated as an invalid error type.
+ */
+void exception::throw_error(enum isl_error error, const char *msg,
+	const char *file, int line)
+{
+	switch (error) {
+	case isl_error_none:
+		break;
+	case isl_error_abort: throw exception_abort(msg, file, line);
+	case isl_error_alloc: throw exception_alloc(msg, file, line);
+	case isl_error_unknown: throw exception_unknown(msg, file, line);
+	case isl_error_internal: throw exception_internal(msg, file, line);
+	case isl_error_invalid: throw exception_invalid(msg, file, line);
+	case isl_error_quota: throw exception_quota(msg, file, line);
+	case isl_error_unsupported:
+				throw exception_unsupported(msg, file, line);
+	}
+
+	throw exception_invalid("invalid error type", file, line);
+}
+
+/* Throw an exception corresponding to the last error on "ctx" and
+ * reset the error.
+ *
+ * If "ctx" is NULL or if it is not in an error state at the start,
+ * then an invalid argument exception is thrown.
+ */
+void exception::throw_last_error(ctx ctx)
+{
+	enum isl_error error;
+	const char *msg, *file;
+	int line;
+
+	error = isl_ctx_last_error(ctx.get());
+	msg = isl_ctx_last_error_msg(ctx.get());
+	file = isl_ctx_last_error_file(ctx.get());
+	line = isl_ctx_last_error_line(ctx.get());
+	isl_ctx_reset_error(ctx.get());
+
+	throw_error(error, msg, file, line);
+}
+
+#else
+
+#include <stdio.h>
+#include <stdlib.h>
+
+class exception {
+public:
+	/* Default behavior on error conditions that occur inside isl calls
+	 * performed from inside the bindings.
+	 * In the case exceptions are not available, isl should abort.
+	 */
+	static constexpr auto on_error = ISL_ON_ERROR_ABORT;
+	/* Wrapper for throwing an exception with the given message.
+	 * In the case exceptions are not available, print an error and abort.
+	 */
+	static void throw_invalid(const char *msg, const char *file, int line) {
+		fprintf(stderr, "%s:%d: %s\n", file, line, msg);
+		abort();
+	}
+	/* Throw an exception corresponding to the last
+	 * error on "ctx".
+	 * isl should already abort when an error condition occurs,
+	 * so this function should never be called.
+	 */
+	static void throw_last_error(ctx ctx) {
+		abort();
+	}
+};
+
+#endif
+
+/* Helper class for setting the on_error and resetting the option
+ * to the original value when leaving the scope.
+ */
+class options_scoped_set_on_error {
+	isl_ctx *ctx;
+	int saved_on_error;
+public:
+	options_scoped_set_on_error(class ctx ctx, int on_error) {
+		this->ctx = ctx.get();
+		saved_on_error = isl_options_get_on_error(this->ctx);
+		isl_options_set_on_error(this->ctx, on_error);
+	}
+	~options_scoped_set_on_error() {
+		isl_options_set_on_error(ctx, saved_on_error);
+	}
+};
+
+} // namespace isl
+
+namespace isl {
+
+// forward declarations
+class aff;
+class aff_list;
+class ast_build;
+class ast_expr;
+class ast_expr_id;
+class ast_expr_int;
+class ast_expr_op;
+class ast_expr_op_access;
+class ast_expr_op_add;
+class ast_expr_op_address_of;
+class ast_expr_op_and;
+class ast_expr_op_and_then;
+class ast_expr_op_call;
+class ast_expr_op_cond;
+class ast_expr_op_div;
+class ast_expr_op_eq;
+class ast_expr_op_fdiv_q;
+class ast_expr_op_ge;
+class ast_expr_op_gt;
+class ast_expr_op_le;
+class ast_expr_op_lt;
+class ast_expr_op_max;
+class ast_expr_op_member;
+class ast_expr_op_min;
+class ast_expr_op_minus;
+class ast_expr_op_mul;
+class ast_expr_op_or;
+class ast_expr_op_or_else;
+class ast_expr_op_pdiv_q;
+class ast_expr_op_pdiv_r;
+class ast_expr_op_select;
+class ast_expr_op_sub;
+class ast_expr_op_zdiv_r;
+class ast_node;
+class ast_node_block;
+class ast_node_for;
+class ast_node_if;
+class ast_node_list;
+class ast_node_mark;
+class ast_node_user;
+class basic_map;
+class basic_set;
+class fixed_box;
+class id;
+class id_list;
+class map;
+class multi_aff;
+class multi_id;
+class multi_pw_aff;
+class multi_union_pw_aff;
+class multi_val;
+class point;
+class pw_aff;
+class pw_aff_list;
+class pw_multi_aff;
+class pw_multi_aff_list;
+class schedule;
+class schedule_constraints;
+class schedule_node;
+class schedule_node_band;
+class schedule_node_context;
+class schedule_node_domain;
+class schedule_node_expansion;
+class schedule_node_extension;
+class schedule_node_filter;
+class schedule_node_guard;
+class schedule_node_leaf;
+class schedule_node_mark;
+class schedule_node_sequence;
+class schedule_node_set;
+class set;
+class space;
+class union_access_info;
+class union_flow;
+class union_map;
+class union_pw_aff;
+class union_pw_aff_list;
+class union_pw_multi_aff;
+class union_set;
+class union_set_list;
+class val;
+class val_list;
+
+// declarations for isl::aff
+inline aff manage(__isl_take isl_aff *ptr);
+inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+class aff {
+  friend inline aff manage(__isl_take isl_aff *ptr);
+  friend inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+protected:
+  isl_aff *ptr = nullptr;
+
+  inline explicit aff(__isl_take isl_aff *ptr);
+
+public:
+  inline /* implicit */ aff();
+  inline /* implicit */ aff(const aff &obj);
+  inline explicit aff(isl::ctx ctx, const std::string &str);
+  inline aff &operator=(aff obj);
+  inline ~aff();
+  inline __isl_give isl_aff *copy() const &;
+  inline __isl_give isl_aff *copy() && = delete;
+  inline __isl_keep isl_aff *get() const;
+  inline __isl_give isl_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::aff add(isl::aff aff2) const;
+  inline isl::aff add_constant(isl::val v) const;
+  inline isl::aff add_constant(long v) const;
+  inline isl::basic_set bind(isl::id id) const;
+  inline isl::basic_set bind(const std::string &id) const;
+  inline isl::aff ceil() const;
+  inline isl::aff div(isl::aff aff2) const;
+  inline isl::set eq_set(isl::aff aff2) const;
+  inline isl::val eval(isl::point pnt) const;
+  inline isl::aff floor() const;
+  inline isl::set ge_set(isl::aff aff2) const;
+  inline isl::aff gist(isl::set context) const;
+  inline isl::set gt_set(isl::aff aff2) const;
+  inline isl::set le_set(isl::aff aff2) const;
+  inline isl::set lt_set(isl::aff aff2) const;
+  inline isl::aff mod(isl::val mod) const;
+  inline isl::aff mod(long mod) const;
+  inline isl::aff mul(isl::aff aff2) const;
+  inline isl::set ne_set(isl::aff aff2) const;
+  inline isl::aff neg() const;
+  inline isl::aff pullback(isl::multi_aff ma) const;
+  inline isl::aff scale(isl::val v) const;
+  inline isl::aff scale(long v) const;
+  inline isl::aff scale_down(isl::val v) const;
+  inline isl::aff scale_down(long v) const;
+  inline isl::aff sub(isl::aff aff2) const;
+  inline isl::aff unbind_params_insert_domain(isl::multi_id domain) const;
+  static inline isl::aff zero_on_domain(isl::space space);
+};
+
+// declarations for isl::aff_list
+inline aff_list manage(__isl_take isl_aff_list *ptr);
+inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+class aff_list {
+  friend inline aff_list manage(__isl_take isl_aff_list *ptr);
+  friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+protected:
+  isl_aff_list *ptr = nullptr;
+
+  inline explicit aff_list(__isl_take isl_aff_list *ptr);
+
+public:
+  inline /* implicit */ aff_list();
+  inline /* implicit */ aff_list(const aff_list &obj);
+  inline explicit aff_list(isl::ctx ctx, int n);
+  inline explicit aff_list(isl::aff el);
+  inline aff_list &operator=(aff_list obj);
+  inline ~aff_list();
+  inline __isl_give isl_aff_list *copy() const &;
+  inline __isl_give isl_aff_list *copy() && = delete;
+  inline __isl_keep isl_aff_list *get() const;
+  inline __isl_give isl_aff_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::aff_list add(isl::aff el) const;
+  inline isl::aff_list clear() const;
+  inline isl::aff_list concat(isl::aff_list list2) const;
+  inline isl::aff_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::aff)> &fn) const;
+  inline isl::aff at(int index) const;
+  inline isl::aff get_at(int index) const;
+  inline isl::aff_list insert(unsigned int pos, isl::aff el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::ast_build
+inline ast_build manage(__isl_take isl_ast_build *ptr);
+inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+class ast_build {
+  friend inline ast_build manage(__isl_take isl_ast_build *ptr);
+  friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+protected:
+  isl_ast_build *ptr = nullptr;
+
+  inline explicit ast_build(__isl_take isl_ast_build *ptr);
+
+public:
+  inline /* implicit */ ast_build();
+  inline /* implicit */ ast_build(const ast_build &obj);
+  inline explicit ast_build(isl::ctx ctx);
+  inline ast_build &operator=(ast_build obj);
+  inline ~ast_build();
+  inline __isl_give isl_ast_build *copy() const &;
+  inline __isl_give isl_ast_build *copy() && = delete;
+  inline __isl_keep isl_ast_build *get() const;
+  inline __isl_give isl_ast_build *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+private:
+  inline ast_build &copy_callbacks(const ast_build &obj);
+  struct at_each_domain_data {
+    std::function<isl::ast_node(isl::ast_node, isl::ast_build)> func;
+    std::exception_ptr eptr;
+  };
+  std::shared_ptr<at_each_domain_data> at_each_domain_data;
+  static inline isl_ast_node *at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2);
+  inline void set_at_each_domain_data(const std::function<isl::ast_node(isl::ast_node, isl::ast_build)> &fn);
+public:
+  inline isl::ast_build set_at_each_domain(const std::function<isl::ast_node(isl::ast_node, isl::ast_build)> &fn) const;
+  inline isl::ast_expr access_from(isl::multi_pw_aff mpa) const;
+  inline isl::ast_expr access_from(isl::pw_multi_aff pma) const;
+  inline isl::ast_expr call_from(isl::multi_pw_aff mpa) const;
+  inline isl::ast_expr call_from(isl::pw_multi_aff pma) const;
+  inline isl::ast_expr expr_from(isl::pw_aff pa) const;
+  inline isl::ast_expr expr_from(isl::set set) const;
+  static inline isl::ast_build from_context(isl::set set);
+  inline isl::union_map schedule() const;
+  inline isl::union_map get_schedule() const;
+  inline isl::ast_node node_from(isl::schedule schedule) const;
+  inline isl::ast_node node_from_schedule_map(isl::union_map schedule) const;
+};
+
+// declarations for isl::ast_expr
+inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+class ast_expr {
+  friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+  friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+protected:
+  isl_ast_expr *ptr = nullptr;
+
+  inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr();
+  inline /* implicit */ ast_expr(const ast_expr &obj);
+  inline ast_expr &operator=(ast_expr obj);
+  inline ~ast_expr();
+  inline __isl_give isl_ast_expr *copy() const &;
+  inline __isl_give isl_ast_expr *copy() && = delete;
+  inline __isl_keep isl_ast_expr *get() const;
+  inline __isl_give isl_ast_expr *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_expr_get_type(NULL)),
+                  const T>::value>::type>
+  inline bool isa_type(T subtype) const;
+public:
+  template <class T> inline bool isa() const;
+  template <class T> inline T as() const;
+  inline isl::ctx ctx() const;
+
+  inline std::string to_C_str() const;
+};
+
+// declarations for isl::ast_expr_id
+
+class ast_expr_id : public ast_expr {
+  template <class T>
+  friend bool ast_expr::isa() const;
+  friend ast_expr_id ast_expr::as<ast_expr_id>() const;
+  static const auto type = isl_ast_expr_id;
+
+protected:
+  inline explicit ast_expr_id(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_id();
+  inline /* implicit */ ast_expr_id(const ast_expr_id &obj);
+  inline ast_expr_id &operator=(ast_expr_id obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::id id() const;
+  inline isl::id get_id() const;
+};
+
+// declarations for isl::ast_expr_int
+
+class ast_expr_int : public ast_expr {
+  template <class T>
+  friend bool ast_expr::isa() const;
+  friend ast_expr_int ast_expr::as<ast_expr_int>() const;
+  static const auto type = isl_ast_expr_int;
+
+protected:
+  inline explicit ast_expr_int(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_int();
+  inline /* implicit */ ast_expr_int(const ast_expr_int &obj);
+  inline ast_expr_int &operator=(ast_expr_int obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::val val() const;
+  inline isl::val get_val() const;
+};
+
+// declarations for isl::ast_expr_op
+
+class ast_expr_op : public ast_expr {
+  template <class T>
+  friend bool ast_expr::isa() const;
+  friend ast_expr_op ast_expr::as<ast_expr_op>() const;
+  static const auto type = isl_ast_expr_op;
+
+protected:
+  inline explicit ast_expr_op(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op();
+  inline /* implicit */ ast_expr_op(const ast_expr_op &obj);
+  inline ast_expr_op &operator=(ast_expr_op obj);
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_expr_op_get_type(NULL)),
+                  const T>::value>::type>
+  inline bool isa_type(T subtype) const;
+public:
+  template <class T> inline bool isa() const;
+  template <class T> inline T as() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_expr arg(int pos) const;
+  inline isl::ast_expr get_arg(int pos) const;
+  inline unsigned n_arg() const;
+  inline unsigned get_n_arg() const;
+};
+
+// declarations for isl::ast_expr_op_access
+
+class ast_expr_op_access : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_access ast_expr_op::as<ast_expr_op_access>() const;
+  static const auto type = isl_ast_expr_op_access;
+
+protected:
+  inline explicit ast_expr_op_access(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_access();
+  inline /* implicit */ ast_expr_op_access(const ast_expr_op_access &obj);
+  inline ast_expr_op_access &operator=(ast_expr_op_access obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_add
+
+class ast_expr_op_add : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_add ast_expr_op::as<ast_expr_op_add>() const;
+  static const auto type = isl_ast_expr_op_add;
+
+protected:
+  inline explicit ast_expr_op_add(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_add();
+  inline /* implicit */ ast_expr_op_add(const ast_expr_op_add &obj);
+  inline ast_expr_op_add &operator=(ast_expr_op_add obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_address_of
+
+class ast_expr_op_address_of : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_address_of ast_expr_op::as<ast_expr_op_address_of>() const;
+  static const auto type = isl_ast_expr_op_address_of;
+
+protected:
+  inline explicit ast_expr_op_address_of(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_address_of();
+  inline /* implicit */ ast_expr_op_address_of(const ast_expr_op_address_of &obj);
+  inline ast_expr_op_address_of &operator=(ast_expr_op_address_of obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_and
+
+class ast_expr_op_and : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_and ast_expr_op::as<ast_expr_op_and>() const;
+  static const auto type = isl_ast_expr_op_and;
+
+protected:
+  inline explicit ast_expr_op_and(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_and();
+  inline /* implicit */ ast_expr_op_and(const ast_expr_op_and &obj);
+  inline ast_expr_op_and &operator=(ast_expr_op_and obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_and_then
+
+class ast_expr_op_and_then : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_and_then ast_expr_op::as<ast_expr_op_and_then>() const;
+  static const auto type = isl_ast_expr_op_and_then;
+
+protected:
+  inline explicit ast_expr_op_and_then(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_and_then();
+  inline /* implicit */ ast_expr_op_and_then(const ast_expr_op_and_then &obj);
+  inline ast_expr_op_and_then &operator=(ast_expr_op_and_then obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_call
+
+class ast_expr_op_call : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_call ast_expr_op::as<ast_expr_op_call>() const;
+  static const auto type = isl_ast_expr_op_call;
+
+protected:
+  inline explicit ast_expr_op_call(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_call();
+  inline /* implicit */ ast_expr_op_call(const ast_expr_op_call &obj);
+  inline ast_expr_op_call &operator=(ast_expr_op_call obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_cond
+
+class ast_expr_op_cond : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_cond ast_expr_op::as<ast_expr_op_cond>() const;
+  static const auto type = isl_ast_expr_op_cond;
+
+protected:
+  inline explicit ast_expr_op_cond(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_cond();
+  inline /* implicit */ ast_expr_op_cond(const ast_expr_op_cond &obj);
+  inline ast_expr_op_cond &operator=(ast_expr_op_cond obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_div
+
+class ast_expr_op_div : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_div ast_expr_op::as<ast_expr_op_div>() const;
+  static const auto type = isl_ast_expr_op_div;
+
+protected:
+  inline explicit ast_expr_op_div(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_div();
+  inline /* implicit */ ast_expr_op_div(const ast_expr_op_div &obj);
+  inline ast_expr_op_div &operator=(ast_expr_op_div obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_eq
+
+class ast_expr_op_eq : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_eq ast_expr_op::as<ast_expr_op_eq>() const;
+  static const auto type = isl_ast_expr_op_eq;
+
+protected:
+  inline explicit ast_expr_op_eq(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_eq();
+  inline /* implicit */ ast_expr_op_eq(const ast_expr_op_eq &obj);
+  inline ast_expr_op_eq &operator=(ast_expr_op_eq obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_fdiv_q
+
+class ast_expr_op_fdiv_q : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_fdiv_q ast_expr_op::as<ast_expr_op_fdiv_q>() const;
+  static const auto type = isl_ast_expr_op_fdiv_q;
+
+protected:
+  inline explicit ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_fdiv_q();
+  inline /* implicit */ ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj);
+  inline ast_expr_op_fdiv_q &operator=(ast_expr_op_fdiv_q obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_ge
+
+class ast_expr_op_ge : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_ge ast_expr_op::as<ast_expr_op_ge>() const;
+  static const auto type = isl_ast_expr_op_ge;
+
+protected:
+  inline explicit ast_expr_op_ge(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_ge();
+  inline /* implicit */ ast_expr_op_ge(const ast_expr_op_ge &obj);
+  inline ast_expr_op_ge &operator=(ast_expr_op_ge obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_gt
+
+class ast_expr_op_gt : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_gt ast_expr_op::as<ast_expr_op_gt>() const;
+  static const auto type = isl_ast_expr_op_gt;
+
+protected:
+  inline explicit ast_expr_op_gt(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_gt();
+  inline /* implicit */ ast_expr_op_gt(const ast_expr_op_gt &obj);
+  inline ast_expr_op_gt &operator=(ast_expr_op_gt obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_le
+
+class ast_expr_op_le : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_le ast_expr_op::as<ast_expr_op_le>() const;
+  static const auto type = isl_ast_expr_op_le;
+
+protected:
+  inline explicit ast_expr_op_le(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_le();
+  inline /* implicit */ ast_expr_op_le(const ast_expr_op_le &obj);
+  inline ast_expr_op_le &operator=(ast_expr_op_le obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_lt
+
+class ast_expr_op_lt : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_lt ast_expr_op::as<ast_expr_op_lt>() const;
+  static const auto type = isl_ast_expr_op_lt;
+
+protected:
+  inline explicit ast_expr_op_lt(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_lt();
+  inline /* implicit */ ast_expr_op_lt(const ast_expr_op_lt &obj);
+  inline ast_expr_op_lt &operator=(ast_expr_op_lt obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_max
+
+class ast_expr_op_max : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_max ast_expr_op::as<ast_expr_op_max>() const;
+  static const auto type = isl_ast_expr_op_max;
+
+protected:
+  inline explicit ast_expr_op_max(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_max();
+  inline /* implicit */ ast_expr_op_max(const ast_expr_op_max &obj);
+  inline ast_expr_op_max &operator=(ast_expr_op_max obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_member
+
+class ast_expr_op_member : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_member ast_expr_op::as<ast_expr_op_member>() const;
+  static const auto type = isl_ast_expr_op_member;
+
+protected:
+  inline explicit ast_expr_op_member(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_member();
+  inline /* implicit */ ast_expr_op_member(const ast_expr_op_member &obj);
+  inline ast_expr_op_member &operator=(ast_expr_op_member obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_min
+
+class ast_expr_op_min : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_min ast_expr_op::as<ast_expr_op_min>() const;
+  static const auto type = isl_ast_expr_op_min;
+
+protected:
+  inline explicit ast_expr_op_min(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_min();
+  inline /* implicit */ ast_expr_op_min(const ast_expr_op_min &obj);
+  inline ast_expr_op_min &operator=(ast_expr_op_min obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_minus
+
+class ast_expr_op_minus : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_minus ast_expr_op::as<ast_expr_op_minus>() const;
+  static const auto type = isl_ast_expr_op_minus;
+
+protected:
+  inline explicit ast_expr_op_minus(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_minus();
+  inline /* implicit */ ast_expr_op_minus(const ast_expr_op_minus &obj);
+  inline ast_expr_op_minus &operator=(ast_expr_op_minus obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_mul
+
+class ast_expr_op_mul : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_mul ast_expr_op::as<ast_expr_op_mul>() const;
+  static const auto type = isl_ast_expr_op_mul;
+
+protected:
+  inline explicit ast_expr_op_mul(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_mul();
+  inline /* implicit */ ast_expr_op_mul(const ast_expr_op_mul &obj);
+  inline ast_expr_op_mul &operator=(ast_expr_op_mul obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_or
+
+class ast_expr_op_or : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_or ast_expr_op::as<ast_expr_op_or>() const;
+  static const auto type = isl_ast_expr_op_or;
+
+protected:
+  inline explicit ast_expr_op_or(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_or();
+  inline /* implicit */ ast_expr_op_or(const ast_expr_op_or &obj);
+  inline ast_expr_op_or &operator=(ast_expr_op_or obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_or_else
+
+class ast_expr_op_or_else : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_or_else ast_expr_op::as<ast_expr_op_or_else>() const;
+  static const auto type = isl_ast_expr_op_or_else;
+
+protected:
+  inline explicit ast_expr_op_or_else(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_or_else();
+  inline /* implicit */ ast_expr_op_or_else(const ast_expr_op_or_else &obj);
+  inline ast_expr_op_or_else &operator=(ast_expr_op_or_else obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_pdiv_q
+
+class ast_expr_op_pdiv_q : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_pdiv_q ast_expr_op::as<ast_expr_op_pdiv_q>() const;
+  static const auto type = isl_ast_expr_op_pdiv_q;
+
+protected:
+  inline explicit ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_pdiv_q();
+  inline /* implicit */ ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj);
+  inline ast_expr_op_pdiv_q &operator=(ast_expr_op_pdiv_q obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_pdiv_r
+
+class ast_expr_op_pdiv_r : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_pdiv_r ast_expr_op::as<ast_expr_op_pdiv_r>() const;
+  static const auto type = isl_ast_expr_op_pdiv_r;
+
+protected:
+  inline explicit ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_pdiv_r();
+  inline /* implicit */ ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj);
+  inline ast_expr_op_pdiv_r &operator=(ast_expr_op_pdiv_r obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_select
+
+class ast_expr_op_select : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_select ast_expr_op::as<ast_expr_op_select>() const;
+  static const auto type = isl_ast_expr_op_select;
+
+protected:
+  inline explicit ast_expr_op_select(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_select();
+  inline /* implicit */ ast_expr_op_select(const ast_expr_op_select &obj);
+  inline ast_expr_op_select &operator=(ast_expr_op_select obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_sub
+
+class ast_expr_op_sub : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_sub ast_expr_op::as<ast_expr_op_sub>() const;
+  static const auto type = isl_ast_expr_op_sub;
+
+protected:
+  inline explicit ast_expr_op_sub(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_sub();
+  inline /* implicit */ ast_expr_op_sub(const ast_expr_op_sub &obj);
+  inline ast_expr_op_sub &operator=(ast_expr_op_sub obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_expr_op_zdiv_r
+
+class ast_expr_op_zdiv_r : public ast_expr_op {
+  template <class T>
+  friend bool ast_expr_op::isa() const;
+  friend ast_expr_op_zdiv_r ast_expr_op::as<ast_expr_op_zdiv_r>() const;
+  static const auto type = isl_ast_expr_op_zdiv_r;
+
+protected:
+  inline explicit ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr_op_zdiv_r();
+  inline /* implicit */ ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj);
+  inline ast_expr_op_zdiv_r &operator=(ast_expr_op_zdiv_r obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::ast_node
+inline ast_node manage(__isl_take isl_ast_node *ptr);
+inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+class ast_node {
+  friend inline ast_node manage(__isl_take isl_ast_node *ptr);
+  friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+protected:
+  isl_ast_node *ptr = nullptr;
+
+  inline explicit ast_node(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node();
+  inline /* implicit */ ast_node(const ast_node &obj);
+  inline ast_node &operator=(ast_node obj);
+  inline ~ast_node();
+  inline __isl_give isl_ast_node *copy() const &;
+  inline __isl_give isl_ast_node *copy() && = delete;
+  inline __isl_keep isl_ast_node *get() const;
+  inline __isl_give isl_ast_node *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_ast_node_get_type(NULL)),
+                  const T>::value>::type>
+  inline bool isa_type(T subtype) const;
+public:
+  template <class T> inline bool isa() const;
+  template <class T> inline T as() const;
+  inline isl::ctx ctx() const;
+
+  inline std::string to_C_str() const;
+};
+
+// declarations for isl::ast_node_block
+
+class ast_node_block : public ast_node {
+  template <class T>
+  friend bool ast_node::isa() const;
+  friend ast_node_block ast_node::as<ast_node_block>() const;
+  static const auto type = isl_ast_node_block;
+
+protected:
+  inline explicit ast_node_block(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_block();
+  inline /* implicit */ ast_node_block(const ast_node_block &obj);
+  inline ast_node_block &operator=(ast_node_block obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_node_list children() const;
+  inline isl::ast_node_list get_children() const;
+};
+
+// declarations for isl::ast_node_for
+
+class ast_node_for : public ast_node {
+  template <class T>
+  friend bool ast_node::isa() const;
+  friend ast_node_for ast_node::as<ast_node_for>() const;
+  static const auto type = isl_ast_node_for;
+
+protected:
+  inline explicit ast_node_for(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_for();
+  inline /* implicit */ ast_node_for(const ast_node_for &obj);
+  inline ast_node_for &operator=(ast_node_for obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_node body() const;
+  inline isl::ast_node get_body() const;
+  inline isl::ast_expr cond() const;
+  inline isl::ast_expr get_cond() const;
+  inline isl::ast_expr inc() const;
+  inline isl::ast_expr get_inc() const;
+  inline isl::ast_expr init() const;
+  inline isl::ast_expr get_init() const;
+  inline isl::ast_expr iterator() const;
+  inline isl::ast_expr get_iterator() const;
+  inline bool is_degenerate() const;
+};
+
+// declarations for isl::ast_node_if
+
+class ast_node_if : public ast_node {
+  template <class T>
+  friend bool ast_node::isa() const;
+  friend ast_node_if ast_node::as<ast_node_if>() const;
+  static const auto type = isl_ast_node_if;
+
+protected:
+  inline explicit ast_node_if(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_if();
+  inline /* implicit */ ast_node_if(const ast_node_if &obj);
+  inline ast_node_if &operator=(ast_node_if obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_expr cond() const;
+  inline isl::ast_expr get_cond() const;
+  inline isl::ast_node else_node() const;
+  inline isl::ast_node get_else_node() const;
+  inline isl::ast_node then_node() const;
+  inline isl::ast_node get_then_node() const;
+  inline bool has_else_node() const;
+};
+
+// declarations for isl::ast_node_list
+inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+class ast_node_list {
+  friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+  friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+protected:
+  isl_ast_node_list *ptr = nullptr;
+
+  inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
+
+public:
+  inline /* implicit */ ast_node_list();
+  inline /* implicit */ ast_node_list(const ast_node_list &obj);
+  inline explicit ast_node_list(isl::ctx ctx, int n);
+  inline explicit ast_node_list(isl::ast_node el);
+  inline ast_node_list &operator=(ast_node_list obj);
+  inline ~ast_node_list();
+  inline __isl_give isl_ast_node_list *copy() const &;
+  inline __isl_give isl_ast_node_list *copy() && = delete;
+  inline __isl_keep isl_ast_node_list *get() const;
+  inline __isl_give isl_ast_node_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_node_list add(isl::ast_node el) const;
+  inline isl::ast_node_list clear() const;
+  inline isl::ast_node_list concat(isl::ast_node_list list2) const;
+  inline isl::ast_node_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::ast_node)> &fn) const;
+  inline isl::ast_node at(int index) const;
+  inline isl::ast_node get_at(int index) const;
+  inline isl::ast_node_list insert(unsigned int pos, isl::ast_node el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::ast_node_mark
+
+class ast_node_mark : public ast_node {
+  template <class T>
+  friend bool ast_node::isa() const;
+  friend ast_node_mark ast_node::as<ast_node_mark>() const;
+  static const auto type = isl_ast_node_mark;
+
+protected:
+  inline explicit ast_node_mark(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_mark();
+  inline /* implicit */ ast_node_mark(const ast_node_mark &obj);
+  inline ast_node_mark &operator=(ast_node_mark obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::id id() const;
+  inline isl::id get_id() const;
+  inline isl::ast_node node() const;
+  inline isl::ast_node get_node() const;
+};
+
+// declarations for isl::ast_node_user
+
+class ast_node_user : public ast_node {
+  template <class T>
+  friend bool ast_node::isa() const;
+  friend ast_node_user ast_node::as<ast_node_user>() const;
+  static const auto type = isl_ast_node_user;
+
+protected:
+  inline explicit ast_node_user(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node_user();
+  inline /* implicit */ ast_node_user(const ast_node_user &obj);
+  inline ast_node_user &operator=(ast_node_user obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::ast_expr expr() const;
+  inline isl::ast_expr get_expr() const;
+};
+
+// declarations for isl::basic_map
+inline basic_map manage(__isl_take isl_basic_map *ptr);
+inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+class basic_map {
+  friend inline basic_map manage(__isl_take isl_basic_map *ptr);
+  friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+protected:
+  isl_basic_map *ptr = nullptr;
+
+  inline explicit basic_map(__isl_take isl_basic_map *ptr);
+
+public:
+  inline /* implicit */ basic_map();
+  inline /* implicit */ basic_map(const basic_map &obj);
+  inline explicit basic_map(isl::ctx ctx, const std::string &str);
+  inline basic_map &operator=(basic_map obj);
+  inline ~basic_map();
+  inline __isl_give isl_basic_map *copy() const &;
+  inline __isl_give isl_basic_map *copy() && = delete;
+  inline __isl_keep isl_basic_map *get() const;
+  inline __isl_give isl_basic_map *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::basic_map affine_hull() const;
+  inline isl::basic_map apply_domain(isl::basic_map bmap2) const;
+  inline isl::basic_map apply_range(isl::basic_map bmap2) const;
+  inline isl::basic_set deltas() const;
+  inline isl::basic_map detect_equalities() const;
+  inline isl::basic_map flatten() const;
+  inline isl::basic_map flatten_domain() const;
+  inline isl::basic_map flatten_range() const;
+  inline isl::basic_map gist(isl::basic_map context) const;
+  inline isl::basic_map intersect(isl::basic_map bmap2) const;
+  inline isl::basic_map intersect_domain(isl::basic_set bset) const;
+  inline isl::basic_map intersect_range(isl::basic_set bset) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::basic_map &bmap2) const;
+  inline bool is_subset(const isl::basic_map &bmap2) const;
+  inline isl::map lexmax() const;
+  inline isl::map lexmin() const;
+  inline isl::basic_map reverse() const;
+  inline isl::basic_map sample() const;
+  inline isl::map unite(isl::basic_map bmap2) const;
+};
+
+// declarations for isl::basic_set
+inline basic_set manage(__isl_take isl_basic_set *ptr);
+inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+class basic_set {
+  friend inline basic_set manage(__isl_take isl_basic_set *ptr);
+  friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+protected:
+  isl_basic_set *ptr = nullptr;
+
+  inline explicit basic_set(__isl_take isl_basic_set *ptr);
+
+public:
+  inline /* implicit */ basic_set();
+  inline /* implicit */ basic_set(const basic_set &obj);
+  inline /* implicit */ basic_set(isl::point pnt);
+  inline explicit basic_set(isl::ctx ctx, const std::string &str);
+  inline basic_set &operator=(basic_set obj);
+  inline ~basic_set();
+  inline __isl_give isl_basic_set *copy() const &;
+  inline __isl_give isl_basic_set *copy() && = delete;
+  inline __isl_keep isl_basic_set *get() const;
+  inline __isl_give isl_basic_set *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::basic_set affine_hull() const;
+  inline isl::basic_set apply(isl::basic_map bmap) const;
+  inline isl::basic_set detect_equalities() const;
+  inline isl::val dim_max_val(int pos) const;
+  inline isl::basic_set flatten() const;
+  inline isl::basic_set gist(isl::basic_set context) const;
+  inline isl::basic_set intersect(isl::basic_set bset2) const;
+  inline isl::basic_set intersect_params(isl::basic_set bset2) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::basic_set &bset2) const;
+  inline bool is_subset(const isl::basic_set &bset2) const;
+  inline bool is_wrapping() const;
+  inline isl::set lexmax() const;
+  inline isl::set lexmin() const;
+  inline isl::basic_set params() const;
+  inline isl::basic_set sample() const;
+  inline isl::point sample_point() const;
+  inline isl::set unite(isl::basic_set bset2) const;
+};
+
+// declarations for isl::fixed_box
+inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+class fixed_box {
+  friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+  friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+protected:
+  isl_fixed_box *ptr = nullptr;
+
+  inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
+
+public:
+  inline /* implicit */ fixed_box();
+  inline /* implicit */ fixed_box(const fixed_box &obj);
+  inline fixed_box &operator=(fixed_box obj);
+  inline ~fixed_box();
+  inline __isl_give isl_fixed_box *copy() const &;
+  inline __isl_give isl_fixed_box *copy() && = delete;
+  inline __isl_keep isl_fixed_box *get() const;
+  inline __isl_give isl_fixed_box *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_aff offset() const;
+  inline isl::multi_aff get_offset() const;
+  inline isl::multi_val size() const;
+  inline isl::multi_val get_size() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline bool is_valid() const;
+};
+
+// declarations for isl::id
+inline id manage(__isl_take isl_id *ptr);
+inline id manage_copy(__isl_keep isl_id *ptr);
+
+class id {
+  friend inline id manage(__isl_take isl_id *ptr);
+  friend inline id manage_copy(__isl_keep isl_id *ptr);
+
+protected:
+  isl_id *ptr = nullptr;
+
+  inline explicit id(__isl_take isl_id *ptr);
+
+public:
+  inline /* implicit */ id();
+  inline /* implicit */ id(const id &obj);
+  inline explicit id(isl::ctx ctx, const std::string &str);
+  inline id &operator=(id obj);
+  inline ~id();
+  inline __isl_give isl_id *copy() const &;
+  inline __isl_give isl_id *copy() && = delete;
+  inline __isl_keep isl_id *get() const;
+  inline __isl_give isl_id *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline std::string name() const;
+  inline std::string get_name() const;
+};
+
+// declarations for isl::id_list
+inline id_list manage(__isl_take isl_id_list *ptr);
+inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+class id_list {
+  friend inline id_list manage(__isl_take isl_id_list *ptr);
+  friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+protected:
+  isl_id_list *ptr = nullptr;
+
+  inline explicit id_list(__isl_take isl_id_list *ptr);
+
+public:
+  inline /* implicit */ id_list();
+  inline /* implicit */ id_list(const id_list &obj);
+  inline explicit id_list(isl::ctx ctx, int n);
+  inline explicit id_list(isl::id el);
+  inline id_list &operator=(id_list obj);
+  inline ~id_list();
+  inline __isl_give isl_id_list *copy() const &;
+  inline __isl_give isl_id_list *copy() && = delete;
+  inline __isl_keep isl_id_list *get() const;
+  inline __isl_give isl_id_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::id_list add(isl::id el) const;
+  inline isl::id_list add(const std::string &el) const;
+  inline isl::id_list clear() const;
+  inline isl::id_list concat(isl::id_list list2) const;
+  inline isl::id_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::id)> &fn) const;
+  inline isl::id at(int index) const;
+  inline isl::id get_at(int index) const;
+  inline isl::id_list insert(unsigned int pos, isl::id el) const;
+  inline isl::id_list insert(unsigned int pos, const std::string &el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::map
+inline map manage(__isl_take isl_map *ptr);
+inline map manage_copy(__isl_keep isl_map *ptr);
+
+class map {
+  friend inline map manage(__isl_take isl_map *ptr);
+  friend inline map manage_copy(__isl_keep isl_map *ptr);
+
+protected:
+  isl_map *ptr = nullptr;
+
+  inline explicit map(__isl_take isl_map *ptr);
+
+public:
+  inline /* implicit */ map();
+  inline /* implicit */ map(const map &obj);
+  inline /* implicit */ map(isl::basic_map bmap);
+  inline explicit map(isl::ctx ctx, const std::string &str);
+  inline map &operator=(map obj);
+  inline ~map();
+  inline __isl_give isl_map *copy() const &;
+  inline __isl_give isl_map *copy() && = delete;
+  inline __isl_keep isl_map *get() const;
+  inline __isl_give isl_map *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::basic_map affine_hull() const;
+  inline isl::map apply_domain(isl::map map2) const;
+  inline isl::map apply_range(isl::map map2) const;
+  inline isl::set bind_domain(isl::multi_id tuple) const;
+  inline isl::set bind_range(isl::multi_id tuple) const;
+  inline isl::map coalesce() const;
+  inline isl::map complement() const;
+  inline isl::map curry() const;
+  inline isl::set deltas() const;
+  inline isl::map detect_equalities() const;
+  inline isl::set domain() const;
+  inline isl::map domain_factor_domain() const;
+  inline isl::map domain_factor_range() const;
+  inline isl::map domain_product(isl::map map2) const;
+  static inline isl::map empty(isl::space space);
+  inline isl::map eq_at(isl::multi_pw_aff mpa) const;
+  inline isl::map factor_domain() const;
+  inline isl::map factor_range() const;
+  inline isl::map flatten() const;
+  inline isl::map flatten_domain() const;
+  inline isl::map flatten_range() const;
+  inline void foreach_basic_map(const std::function<void(isl::basic_map)> &fn) const;
+  inline isl::fixed_box range_simple_fixed_box_hull() const;
+  inline isl::fixed_box get_range_simple_fixed_box_hull() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::map gist(isl::map context) const;
+  inline isl::map gist_domain(isl::set context) const;
+  inline isl::map intersect(isl::map map2) const;
+  inline isl::map intersect_domain(isl::set set) const;
+  inline isl::map intersect_params(isl::set params) const;
+  inline isl::map intersect_range(isl::set set) const;
+  inline bool is_bijective() const;
+  inline bool is_disjoint(const isl::map &map2) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::map &map2) const;
+  inline bool is_injective() const;
+  inline bool is_single_valued() const;
+  inline bool is_strict_subset(const isl::map &map2) const;
+  inline bool is_subset(const isl::map &map2) const;
+  inline isl::map lex_ge_at(isl::multi_pw_aff mpa) const;
+  inline isl::map lex_gt_at(isl::multi_pw_aff mpa) const;
+  inline isl::map lex_le_at(isl::multi_pw_aff mpa) const;
+  inline isl::map lex_lt_at(isl::multi_pw_aff mpa) const;
+  inline isl::map lexmax() const;
+  inline isl::pw_multi_aff lexmax_pw_multi_aff() const;
+  inline isl::map lexmin() const;
+  inline isl::pw_multi_aff lexmin_pw_multi_aff() const;
+  inline isl::map lower_bound(isl::multi_pw_aff lower) const;
+  inline isl::map lower_bound(isl::multi_val lower) const;
+  inline isl::multi_pw_aff max_multi_pw_aff() const;
+  inline isl::multi_pw_aff min_multi_pw_aff() const;
+  inline isl::basic_map polyhedral_hull() const;
+  inline isl::map preimage_domain(isl::multi_aff ma) const;
+  inline isl::map preimage_domain(isl::multi_pw_aff mpa) const;
+  inline isl::map preimage_domain(isl::pw_multi_aff pma) const;
+  inline isl::map preimage_range(isl::multi_aff ma) const;
+  inline isl::map preimage_range(isl::pw_multi_aff pma) const;
+  inline isl::map project_out_all_params() const;
+  inline isl::set range() const;
+  inline isl::map range_factor_domain() const;
+  inline isl::map range_factor_range() const;
+  inline isl::map range_product(isl::map map2) const;
+  inline isl::map range_reverse() const;
+  inline isl::map reverse() const;
+  inline isl::basic_map sample() const;
+  inline isl::map subtract(isl::map map2) const;
+  inline isl::map uncurry() const;
+  inline isl::map unite(isl::map map2) const;
+  static inline isl::map universe(isl::space space);
+  inline isl::basic_map unshifted_simple_hull() const;
+  inline isl::map upper_bound(isl::multi_pw_aff upper) const;
+  inline isl::map upper_bound(isl::multi_val upper) const;
+  inline isl::set wrap() const;
+};
+
+// declarations for isl::multi_aff
+inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+class multi_aff {
+  friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+  friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+protected:
+  isl_multi_aff *ptr = nullptr;
+
+  inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
+
+public:
+  inline /* implicit */ multi_aff();
+  inline /* implicit */ multi_aff(const multi_aff &obj);
+  inline /* implicit */ multi_aff(isl::aff aff);
+  inline explicit multi_aff(isl::space space, isl::aff_list list);
+  inline explicit multi_aff(isl::ctx ctx, const std::string &str);
+  inline multi_aff &operator=(multi_aff obj);
+  inline ~multi_aff();
+  inline __isl_give isl_multi_aff *copy() const &;
+  inline __isl_give isl_multi_aff *copy() && = delete;
+  inline __isl_keep isl_multi_aff *get() const;
+  inline __isl_give isl_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_aff add(isl::multi_aff multi2) const;
+  inline isl::multi_aff add_constant(isl::multi_val mv) const;
+  inline isl::multi_aff add_constant(isl::val v) const;
+  inline isl::multi_aff add_constant(long v) const;
+  inline isl::basic_set bind(isl::multi_id tuple) const;
+  inline isl::multi_aff bind_domain(isl::multi_id tuple) const;
+  inline isl::multi_aff bind_domain_wrapped_domain(isl::multi_id tuple) const;
+  static inline isl::multi_aff domain_map(isl::space space);
+  inline isl::multi_aff flat_range_product(isl::multi_aff multi2) const;
+  inline isl::multi_aff floor() const;
+  inline isl::aff at(int pos) const;
+  inline isl::aff get_at(int pos) const;
+  inline isl::multi_val constant_multi_val() const;
+  inline isl::multi_val get_constant_multi_val() const;
+  inline isl::aff_list list() const;
+  inline isl::aff_list get_list() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::multi_aff gist(isl::set context) const;
+  inline isl::multi_aff identity() const;
+  static inline isl::multi_aff identity_on_domain(isl::space space);
+  inline isl::multi_aff insert_domain(isl::space domain) const;
+  inline bool involves_locals() const;
+  inline isl::multi_aff neg() const;
+  inline bool plain_is_equal(const isl::multi_aff &multi2) const;
+  inline isl::multi_aff product(isl::multi_aff multi2) const;
+  inline isl::multi_aff pullback(isl::multi_aff ma2) const;
+  static inline isl::multi_aff range_map(isl::space space);
+  inline isl::multi_aff range_product(isl::multi_aff multi2) const;
+  inline isl::multi_aff scale(isl::multi_val mv) const;
+  inline isl::multi_aff scale(isl::val v) const;
+  inline isl::multi_aff scale(long v) const;
+  inline isl::multi_aff scale_down(isl::multi_val mv) const;
+  inline isl::multi_aff scale_down(isl::val v) const;
+  inline isl::multi_aff scale_down(long v) const;
+  inline isl::multi_aff set_at(int pos, isl::aff el) const;
+  inline unsigned size() const;
+  inline isl::multi_aff sub(isl::multi_aff multi2) const;
+  inline isl::multi_aff unbind_params_insert_domain(isl::multi_id domain) const;
+  static inline isl::multi_aff zero(isl::space space);
+};
+
+// declarations for isl::multi_id
+inline multi_id manage(__isl_take isl_multi_id *ptr);
+inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
+
+class multi_id {
+  friend inline multi_id manage(__isl_take isl_multi_id *ptr);
+  friend inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
+
+protected:
+  isl_multi_id *ptr = nullptr;
+
+  inline explicit multi_id(__isl_take isl_multi_id *ptr);
+
+public:
+  inline /* implicit */ multi_id();
+  inline /* implicit */ multi_id(const multi_id &obj);
+  inline explicit multi_id(isl::space space, isl::id_list list);
+  inline explicit multi_id(isl::ctx ctx, const std::string &str);
+  inline multi_id &operator=(multi_id obj);
+  inline ~multi_id();
+  inline __isl_give isl_multi_id *copy() const &;
+  inline __isl_give isl_multi_id *copy() && = delete;
+  inline __isl_keep isl_multi_id *get() const;
+  inline __isl_give isl_multi_id *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_id flat_range_product(isl::multi_id multi2) const;
+  inline isl::id at(int pos) const;
+  inline isl::id get_at(int pos) const;
+  inline isl::id_list list() const;
+  inline isl::id_list get_list() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline bool plain_is_equal(const isl::multi_id &multi2) const;
+  inline isl::multi_id range_product(isl::multi_id multi2) const;
+  inline isl::multi_id set_at(int pos, isl::id el) const;
+  inline isl::multi_id set_at(int pos, const std::string &el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::multi_pw_aff
+inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+class multi_pw_aff {
+  friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+  friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+protected:
+  isl_multi_pw_aff *ptr = nullptr;
+
+  inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_pw_aff();
+  inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
+  inline /* implicit */ multi_pw_aff(isl::aff aff);
+  inline /* implicit */ multi_pw_aff(isl::multi_aff ma);
+  inline /* implicit */ multi_pw_aff(isl::pw_aff pa);
+  inline explicit multi_pw_aff(isl::space space, isl::pw_aff_list list);
+  inline /* implicit */ multi_pw_aff(isl::pw_multi_aff pma);
+  inline explicit multi_pw_aff(isl::ctx ctx, const std::string &str);
+  inline multi_pw_aff &operator=(multi_pw_aff obj);
+  inline ~multi_pw_aff();
+  inline __isl_give isl_multi_pw_aff *copy() const &;
+  inline __isl_give isl_multi_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_pw_aff *get() const;
+  inline __isl_give isl_multi_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_pw_aff add(isl::multi_pw_aff multi2) const;
+  inline isl::multi_pw_aff add_constant(isl::multi_val mv) const;
+  inline isl::multi_pw_aff add_constant(isl::val v) const;
+  inline isl::multi_pw_aff add_constant(long v) const;
+  inline isl::set bind(isl::multi_id tuple) const;
+  inline isl::multi_pw_aff bind_domain(isl::multi_id tuple) const;
+  inline isl::multi_pw_aff bind_domain_wrapped_domain(isl::multi_id tuple) const;
+  inline isl::multi_pw_aff coalesce() const;
+  inline isl::set domain() const;
+  inline isl::multi_pw_aff flat_range_product(isl::multi_pw_aff multi2) const;
+  inline isl::pw_aff at(int pos) const;
+  inline isl::pw_aff get_at(int pos) const;
+  inline isl::pw_aff_list list() const;
+  inline isl::pw_aff_list get_list() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::multi_pw_aff gist(isl::set set) const;
+  inline isl::multi_pw_aff identity() const;
+  static inline isl::multi_pw_aff identity_on_domain(isl::space space);
+  inline isl::multi_pw_aff insert_domain(isl::space domain) const;
+  inline isl::multi_pw_aff intersect_domain(isl::set domain) const;
+  inline isl::multi_pw_aff intersect_params(isl::set set) const;
+  inline bool involves_param(const isl::id &id) const;
+  inline bool involves_param(const std::string &id) const;
+  inline bool involves_param(const isl::id_list &list) const;
+  inline isl::multi_pw_aff max(isl::multi_pw_aff multi2) const;
+  inline isl::multi_val max_multi_val() const;
+  inline isl::multi_pw_aff min(isl::multi_pw_aff multi2) const;
+  inline isl::multi_val min_multi_val() const;
+  inline isl::multi_pw_aff neg() const;
+  inline bool plain_is_equal(const isl::multi_pw_aff &multi2) const;
+  inline isl::multi_pw_aff product(isl::multi_pw_aff multi2) const;
+  inline isl::multi_pw_aff pullback(isl::multi_aff ma) const;
+  inline isl::multi_pw_aff pullback(isl::multi_pw_aff mpa2) const;
+  inline isl::multi_pw_aff pullback(isl::pw_multi_aff pma) const;
+  inline isl::multi_pw_aff range_product(isl::multi_pw_aff multi2) const;
+  inline isl::multi_pw_aff scale(isl::multi_val mv) const;
+  inline isl::multi_pw_aff scale(isl::val v) const;
+  inline isl::multi_pw_aff scale(long v) const;
+  inline isl::multi_pw_aff scale_down(isl::multi_val mv) const;
+  inline isl::multi_pw_aff scale_down(isl::val v) const;
+  inline isl::multi_pw_aff scale_down(long v) const;
+  inline isl::multi_pw_aff set_at(int pos, isl::pw_aff el) const;
+  inline unsigned size() const;
+  inline isl::multi_pw_aff sub(isl::multi_pw_aff multi2) const;
+  inline isl::multi_pw_aff unbind_params_insert_domain(isl::multi_id domain) const;
+  inline isl::multi_pw_aff union_add(isl::multi_pw_aff mpa2) const;
+  static inline isl::multi_pw_aff zero(isl::space space);
+};
+
+// declarations for isl::multi_union_pw_aff
+inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+class multi_union_pw_aff {
+  friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+  friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+protected:
+  isl_multi_union_pw_aff *ptr = nullptr;
+
+  inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_union_pw_aff();
+  inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
+  inline /* implicit */ multi_union_pw_aff(isl::multi_pw_aff mpa);
+  inline /* implicit */ multi_union_pw_aff(isl::union_pw_aff upa);
+  inline explicit multi_union_pw_aff(isl::space space, isl::union_pw_aff_list list);
+  inline explicit multi_union_pw_aff(isl::ctx ctx, const std::string &str);
+  inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
+  inline ~multi_union_pw_aff();
+  inline __isl_give isl_multi_union_pw_aff *copy() const &;
+  inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_union_pw_aff *get() const;
+  inline __isl_give isl_multi_union_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_union_pw_aff add(isl::multi_union_pw_aff multi2) const;
+  inline isl::union_set bind(isl::multi_id tuple) const;
+  inline isl::multi_union_pw_aff coalesce() const;
+  inline isl::union_set domain() const;
+  inline isl::multi_union_pw_aff flat_range_product(isl::multi_union_pw_aff multi2) const;
+  inline isl::union_pw_aff at(int pos) const;
+  inline isl::union_pw_aff get_at(int pos) const;
+  inline isl::union_pw_aff_list list() const;
+  inline isl::union_pw_aff_list get_list() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::multi_union_pw_aff gist(isl::union_set context) const;
+  inline isl::multi_union_pw_aff intersect_domain(isl::union_set uset) const;
+  inline isl::multi_union_pw_aff intersect_params(isl::set params) const;
+  inline isl::multi_union_pw_aff neg() const;
+  inline bool plain_is_equal(const isl::multi_union_pw_aff &multi2) const;
+  inline isl::multi_union_pw_aff pullback(isl::union_pw_multi_aff upma) const;
+  inline isl::multi_union_pw_aff range_product(isl::multi_union_pw_aff multi2) const;
+  inline isl::multi_union_pw_aff scale(isl::multi_val mv) const;
+  inline isl::multi_union_pw_aff scale(isl::val v) const;
+  inline isl::multi_union_pw_aff scale(long v) const;
+  inline isl::multi_union_pw_aff scale_down(isl::multi_val mv) const;
+  inline isl::multi_union_pw_aff scale_down(isl::val v) const;
+  inline isl::multi_union_pw_aff scale_down(long v) const;
+  inline isl::multi_union_pw_aff set_at(int pos, isl::union_pw_aff el) const;
+  inline unsigned size() const;
+  inline isl::multi_union_pw_aff sub(isl::multi_union_pw_aff multi2) const;
+  inline isl::multi_union_pw_aff union_add(isl::multi_union_pw_aff mupa2) const;
+  static inline isl::multi_union_pw_aff zero(isl::space space);
+};
+
+// declarations for isl::multi_val
+inline multi_val manage(__isl_take isl_multi_val *ptr);
+inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+class multi_val {
+  friend inline multi_val manage(__isl_take isl_multi_val *ptr);
+  friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+protected:
+  isl_multi_val *ptr = nullptr;
+
+  inline explicit multi_val(__isl_take isl_multi_val *ptr);
+
+public:
+  inline /* implicit */ multi_val();
+  inline /* implicit */ multi_val(const multi_val &obj);
+  inline explicit multi_val(isl::space space, isl::val_list list);
+  inline explicit multi_val(isl::ctx ctx, const std::string &str);
+  inline multi_val &operator=(multi_val obj);
+  inline ~multi_val();
+  inline __isl_give isl_multi_val *copy() const &;
+  inline __isl_give isl_multi_val *copy() && = delete;
+  inline __isl_keep isl_multi_val *get() const;
+  inline __isl_give isl_multi_val *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_val add(isl::multi_val multi2) const;
+  inline isl::multi_val add(isl::val v) const;
+  inline isl::multi_val add(long v) const;
+  inline isl::multi_val flat_range_product(isl::multi_val multi2) const;
+  inline isl::val at(int pos) const;
+  inline isl::val get_at(int pos) const;
+  inline isl::val_list list() const;
+  inline isl::val_list get_list() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::multi_val max(isl::multi_val multi2) const;
+  inline isl::multi_val min(isl::multi_val multi2) const;
+  inline isl::multi_val neg() const;
+  inline bool plain_is_equal(const isl::multi_val &multi2) const;
+  inline isl::multi_val product(isl::multi_val multi2) const;
+  inline isl::multi_val range_product(isl::multi_val multi2) const;
+  inline isl::multi_val scale(isl::multi_val mv) const;
+  inline isl::multi_val scale(isl::val v) const;
+  inline isl::multi_val scale(long v) const;
+  inline isl::multi_val scale_down(isl::multi_val mv) const;
+  inline isl::multi_val scale_down(isl::val v) const;
+  inline isl::multi_val scale_down(long v) const;
+  inline isl::multi_val set_at(int pos, isl::val el) const;
+  inline isl::multi_val set_at(int pos, long el) const;
+  inline unsigned size() const;
+  inline isl::multi_val sub(isl::multi_val multi2) const;
+  static inline isl::multi_val zero(isl::space space);
+};
+
+// declarations for isl::point
+inline point manage(__isl_take isl_point *ptr);
+inline point manage_copy(__isl_keep isl_point *ptr);
+
+class point {
+  friend inline point manage(__isl_take isl_point *ptr);
+  friend inline point manage_copy(__isl_keep isl_point *ptr);
+
+protected:
+  isl_point *ptr = nullptr;
+
+  inline explicit point(__isl_take isl_point *ptr);
+
+public:
+  inline /* implicit */ point();
+  inline /* implicit */ point(const point &obj);
+  inline point &operator=(point obj);
+  inline ~point();
+  inline __isl_give isl_point *copy() const &;
+  inline __isl_give isl_point *copy() && = delete;
+  inline __isl_keep isl_point *get() const;
+  inline __isl_give isl_point *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::multi_val multi_val() const;
+  inline isl::multi_val get_multi_val() const;
+};
+
+// declarations for isl::pw_aff
+inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+class pw_aff {
+  friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+  friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+protected:
+  isl_pw_aff *ptr = nullptr;
+
+  inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
+
+public:
+  inline /* implicit */ pw_aff();
+  inline /* implicit */ pw_aff(const pw_aff &obj);
+  inline /* implicit */ pw_aff(isl::aff aff);
+  inline explicit pw_aff(isl::ctx ctx, const std::string &str);
+  inline pw_aff &operator=(pw_aff obj);
+  inline ~pw_aff();
+  inline __isl_give isl_pw_aff *copy() const &;
+  inline __isl_give isl_pw_aff *copy() && = delete;
+  inline __isl_keep isl_pw_aff *get() const;
+  inline __isl_give isl_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::pw_aff add(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff add_constant(isl::val v) const;
+  inline isl::pw_aff add_constant(long v) const;
+  inline isl::aff as_aff() const;
+  inline isl::set bind(isl::id id) const;
+  inline isl::set bind(const std::string &id) const;
+  inline isl::pw_aff bind_domain(isl::multi_id tuple) const;
+  inline isl::pw_aff bind_domain_wrapped_domain(isl::multi_id tuple) const;
+  inline isl::pw_aff ceil() const;
+  inline isl::pw_aff coalesce() const;
+  inline isl::pw_aff cond(isl::pw_aff pwaff_true, isl::pw_aff pwaff_false) const;
+  inline isl::pw_aff div(isl::pw_aff pa2) const;
+  inline isl::set domain() const;
+  inline isl::set eq_set(isl::pw_aff pwaff2) const;
+  inline isl::val eval(isl::point pnt) const;
+  inline isl::pw_aff floor() const;
+  inline isl::set ge_set(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff gist(isl::set context) const;
+  inline isl::set gt_set(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff insert_domain(isl::space domain) const;
+  inline isl::pw_aff intersect_domain(isl::set set) const;
+  inline isl::pw_aff intersect_params(isl::set set) const;
+  inline bool isa_aff() const;
+  inline isl::set le_set(isl::pw_aff pwaff2) const;
+  inline isl::set lt_set(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff max(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff min(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff mod(isl::val mod) const;
+  inline isl::pw_aff mod(long mod) const;
+  inline isl::pw_aff mul(isl::pw_aff pwaff2) const;
+  inline isl::set ne_set(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff neg() const;
+  static inline isl::pw_aff param_on_domain(isl::set domain, isl::id id);
+  inline isl::pw_aff pullback(isl::multi_aff ma) const;
+  inline isl::pw_aff pullback(isl::multi_pw_aff mpa) const;
+  inline isl::pw_aff pullback(isl::pw_multi_aff pma) const;
+  inline isl::pw_aff scale(isl::val v) const;
+  inline isl::pw_aff scale(long v) const;
+  inline isl::pw_aff scale_down(isl::val f) const;
+  inline isl::pw_aff scale_down(long f) const;
+  inline isl::pw_aff sub(isl::pw_aff pwaff2) const;
+  inline isl::pw_aff subtract_domain(isl::set set) const;
+  inline isl::pw_aff tdiv_q(isl::pw_aff pa2) const;
+  inline isl::pw_aff tdiv_r(isl::pw_aff pa2) const;
+  inline isl::pw_aff union_add(isl::pw_aff pwaff2) const;
+};
+
+// declarations for isl::pw_aff_list
+inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+class pw_aff_list {
+  friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+  friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+protected:
+  isl_pw_aff_list *ptr = nullptr;
+
+  inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_aff_list();
+  inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
+  inline explicit pw_aff_list(isl::ctx ctx, int n);
+  inline explicit pw_aff_list(isl::pw_aff el);
+  inline pw_aff_list &operator=(pw_aff_list obj);
+  inline ~pw_aff_list();
+  inline __isl_give isl_pw_aff_list *copy() const &;
+  inline __isl_give isl_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_aff_list *get() const;
+  inline __isl_give isl_pw_aff_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::pw_aff_list add(isl::pw_aff el) const;
+  inline isl::pw_aff_list clear() const;
+  inline isl::pw_aff_list concat(isl::pw_aff_list list2) const;
+  inline isl::pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::pw_aff)> &fn) const;
+  inline isl::pw_aff at(int index) const;
+  inline isl::pw_aff get_at(int index) const;
+  inline isl::pw_aff_list insert(unsigned int pos, isl::pw_aff el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::pw_multi_aff
+inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+class pw_multi_aff {
+  friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+  friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+protected:
+  isl_pw_multi_aff *ptr = nullptr;
+
+  inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff();
+  inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
+  inline /* implicit */ pw_multi_aff(isl::multi_aff ma);
+  inline /* implicit */ pw_multi_aff(isl::pw_aff pa);
+  inline explicit pw_multi_aff(isl::ctx ctx, const std::string &str);
+  inline pw_multi_aff &operator=(pw_multi_aff obj);
+  inline ~pw_multi_aff();
+  inline __isl_give isl_pw_multi_aff *copy() const &;
+  inline __isl_give isl_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff *get() const;
+  inline __isl_give isl_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::pw_multi_aff add(isl::pw_multi_aff pma2) const;
+  inline isl::pw_multi_aff add_constant(isl::multi_val mv) const;
+  inline isl::pw_multi_aff add_constant(isl::val v) const;
+  inline isl::pw_multi_aff add_constant(long v) const;
+  inline isl::multi_aff as_multi_aff() const;
+  inline isl::pw_multi_aff bind_domain(isl::multi_id tuple) const;
+  inline isl::pw_multi_aff bind_domain_wrapped_domain(isl::multi_id tuple) const;
+  inline isl::pw_multi_aff coalesce() const;
+  inline isl::set domain() const;
+  static inline isl::pw_multi_aff domain_map(isl::space space);
+  inline isl::pw_multi_aff flat_range_product(isl::pw_multi_aff pma2) const;
+  inline void foreach_piece(const std::function<void(isl::set, isl::multi_aff)> &fn) const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::pw_multi_aff gist(isl::set set) const;
+  inline isl::pw_multi_aff insert_domain(isl::space domain) const;
+  inline isl::pw_multi_aff intersect_domain(isl::set set) const;
+  inline isl::pw_multi_aff intersect_params(isl::set set) const;
+  inline bool involves_locals() const;
+  inline bool isa_multi_aff() const;
+  inline isl::multi_val max_multi_val() const;
+  inline isl::multi_val min_multi_val() const;
+  inline unsigned n_piece() const;
+  inline isl::pw_multi_aff product(isl::pw_multi_aff pma2) const;
+  inline isl::pw_multi_aff pullback(isl::multi_aff ma) const;
+  inline isl::pw_multi_aff pullback(isl::pw_multi_aff pma2) const;
+  inline isl::pw_multi_aff range_factor_domain() const;
+  inline isl::pw_multi_aff range_factor_range() const;
+  static inline isl::pw_multi_aff range_map(isl::space space);
+  inline isl::pw_multi_aff range_product(isl::pw_multi_aff pma2) const;
+  inline isl::pw_multi_aff scale(isl::val v) const;
+  inline isl::pw_multi_aff scale(long v) const;
+  inline isl::pw_multi_aff scale_down(isl::val v) const;
+  inline isl::pw_multi_aff scale_down(long v) const;
+  inline isl::pw_multi_aff sub(isl::pw_multi_aff pma2) const;
+  inline isl::pw_multi_aff subtract_domain(isl::set set) const;
+  inline isl::pw_multi_aff union_add(isl::pw_multi_aff pma2) const;
+  static inline isl::pw_multi_aff zero(isl::space space);
+};
+
+// declarations for isl::pw_multi_aff_list
+inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+class pw_multi_aff_list {
+  friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+  friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+protected:
+  isl_pw_multi_aff_list *ptr = nullptr;
+
+  inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff_list();
+  inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
+  inline explicit pw_multi_aff_list(isl::ctx ctx, int n);
+  inline explicit pw_multi_aff_list(isl::pw_multi_aff el);
+  inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
+  inline ~pw_multi_aff_list();
+  inline __isl_give isl_pw_multi_aff_list *copy() const &;
+  inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff_list *get() const;
+  inline __isl_give isl_pw_multi_aff_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::pw_multi_aff_list add(isl::pw_multi_aff el) const;
+  inline isl::pw_multi_aff_list clear() const;
+  inline isl::pw_multi_aff_list concat(isl::pw_multi_aff_list list2) const;
+  inline isl::pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::pw_multi_aff)> &fn) const;
+  inline isl::pw_multi_aff at(int index) const;
+  inline isl::pw_multi_aff get_at(int index) const;
+  inline isl::pw_multi_aff_list insert(unsigned int pos, isl::pw_multi_aff el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::schedule
+inline schedule manage(__isl_take isl_schedule *ptr);
+inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+class schedule {
+  friend inline schedule manage(__isl_take isl_schedule *ptr);
+  friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+protected:
+  isl_schedule *ptr = nullptr;
+
+  inline explicit schedule(__isl_take isl_schedule *ptr);
+
+public:
+  inline /* implicit */ schedule();
+  inline /* implicit */ schedule(const schedule &obj);
+  inline explicit schedule(isl::ctx ctx, const std::string &str);
+  inline schedule &operator=(schedule obj);
+  inline ~schedule();
+  inline __isl_give isl_schedule *copy() const &;
+  inline __isl_give isl_schedule *copy() && = delete;
+  inline __isl_keep isl_schedule *get() const;
+  inline __isl_give isl_schedule *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  static inline isl::schedule from_domain(isl::union_set domain);
+  inline isl::union_map map() const;
+  inline isl::union_map get_map() const;
+  inline isl::schedule_node root() const;
+  inline isl::schedule_node get_root() const;
+  inline isl::schedule pullback(isl::union_pw_multi_aff upma) const;
+};
+
+// declarations for isl::schedule_constraints
+inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+class schedule_constraints {
+  friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+  friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+protected:
+  isl_schedule_constraints *ptr = nullptr;
+
+  inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
+
+public:
+  inline /* implicit */ schedule_constraints();
+  inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
+  inline explicit schedule_constraints(isl::ctx ctx, const std::string &str);
+  inline schedule_constraints &operator=(schedule_constraints obj);
+  inline ~schedule_constraints();
+  inline __isl_give isl_schedule_constraints *copy() const &;
+  inline __isl_give isl_schedule_constraints *copy() && = delete;
+  inline __isl_keep isl_schedule_constraints *get() const;
+  inline __isl_give isl_schedule_constraints *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::schedule compute_schedule() const;
+  inline isl::union_map coincidence() const;
+  inline isl::union_map get_coincidence() const;
+  inline isl::union_map conditional_validity() const;
+  inline isl::union_map get_conditional_validity() const;
+  inline isl::union_map conditional_validity_condition() const;
+  inline isl::union_map get_conditional_validity_condition() const;
+  inline isl::set context() const;
+  inline isl::set get_context() const;
+  inline isl::union_set domain() const;
+  inline isl::union_set get_domain() const;
+  inline isl::union_map proximity() const;
+  inline isl::union_map get_proximity() const;
+  inline isl::union_map validity() const;
+  inline isl::union_map get_validity() const;
+  static inline isl::schedule_constraints on_domain(isl::union_set domain);
+  inline isl::schedule_constraints set_coincidence(isl::union_map coincidence) const;
+  inline isl::schedule_constraints set_conditional_validity(isl::union_map condition, isl::union_map validity) const;
+  inline isl::schedule_constraints set_context(isl::set context) const;
+  inline isl::schedule_constraints set_proximity(isl::union_map proximity) const;
+  inline isl::schedule_constraints set_validity(isl::union_map validity) const;
+};
+
+// declarations for isl::schedule_node
+inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+class schedule_node {
+  friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+  friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+protected:
+  isl_schedule_node *ptr = nullptr;
+
+  inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node();
+  inline /* implicit */ schedule_node(const schedule_node &obj);
+  inline schedule_node &operator=(schedule_node obj);
+  inline ~schedule_node();
+  inline __isl_give isl_schedule_node *copy() const &;
+  inline __isl_give isl_schedule_node *copy() && = delete;
+  inline __isl_keep isl_schedule_node *get() const;
+  inline __isl_give isl_schedule_node *release();
+  inline bool is_null() const;
+private:
+  template <typename T,
+          typename = typename std::enable_if<std::is_same<
+                  const decltype(isl_schedule_node_get_type(NULL)),
+                  const T>::value>::type>
+  inline bool isa_type(T subtype) const;
+public:
+  template <class T> inline bool isa() const;
+  template <class T> inline T as() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::schedule_node ancestor(int generation) const;
+  inline isl::schedule_node child(int pos) const;
+  inline bool every_descendant(const std::function<bool(isl::schedule_node)> &test) const;
+  inline isl::schedule_node first_child() const;
+  inline void foreach_ancestor_top_down(const std::function<void(isl::schedule_node)> &fn) const;
+  inline void foreach_descendant_top_down(const std::function<bool(isl::schedule_node)> &fn) const;
+  static inline isl::schedule_node from_domain(isl::union_set domain);
+  static inline isl::schedule_node from_extension(isl::union_map extension);
+  inline unsigned ancestor_child_position(const isl::schedule_node &ancestor) const;
+  inline unsigned get_ancestor_child_position(const isl::schedule_node &ancestor) const;
+  inline unsigned child_position() const;
+  inline unsigned get_child_position() const;
+  inline isl::multi_union_pw_aff prefix_schedule_multi_union_pw_aff() const;
+  inline isl::multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
+  inline isl::union_map prefix_schedule_union_map() const;
+  inline isl::union_map get_prefix_schedule_union_map() const;
+  inline isl::union_pw_multi_aff prefix_schedule_union_pw_multi_aff() const;
+  inline isl::union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
+  inline isl::schedule schedule() const;
+  inline isl::schedule get_schedule() const;
+  inline isl::schedule_node shared_ancestor(const isl::schedule_node &node2) const;
+  inline isl::schedule_node get_shared_ancestor(const isl::schedule_node &node2) const;
+  inline unsigned tree_depth() const;
+  inline unsigned get_tree_depth() const;
+  inline isl::schedule_node graft_after(isl::schedule_node graft) const;
+  inline isl::schedule_node graft_before(isl::schedule_node graft) const;
+  inline bool has_children() const;
+  inline bool has_next_sibling() const;
+  inline bool has_parent() const;
+  inline bool has_previous_sibling() const;
+  inline isl::schedule_node insert_context(isl::set context) const;
+  inline isl::schedule_node insert_filter(isl::union_set filter) const;
+  inline isl::schedule_node insert_guard(isl::set context) const;
+  inline isl::schedule_node insert_mark(isl::id mark) const;
+  inline isl::schedule_node insert_mark(const std::string &mark) const;
+  inline isl::schedule_node insert_partial_schedule(isl::multi_union_pw_aff schedule) const;
+  inline isl::schedule_node insert_sequence(isl::union_set_list filters) const;
+  inline isl::schedule_node insert_set(isl::union_set_list filters) const;
+  inline bool is_equal(const isl::schedule_node &node2) const;
+  inline bool is_subtree_anchored() const;
+  inline isl::schedule_node map_descendant_bottom_up(const std::function<isl::schedule_node(isl::schedule_node)> &fn) const;
+  inline unsigned n_children() const;
+  inline isl::schedule_node next_sibling() const;
+  inline isl::schedule_node order_after(isl::union_set filter) const;
+  inline isl::schedule_node order_before(isl::union_set filter) const;
+  inline isl::schedule_node parent() const;
+  inline isl::schedule_node previous_sibling() const;
+  inline isl::schedule_node root() const;
+};
+
+// declarations for isl::schedule_node_band
+
+class schedule_node_band : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_band schedule_node::as<schedule_node_band>() const;
+  static const auto type = isl_schedule_node_band;
+
+protected:
+  inline explicit schedule_node_band(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_band();
+  inline /* implicit */ schedule_node_band(const schedule_node_band &obj);
+  inline schedule_node_band &operator=(schedule_node_band obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::union_set ast_build_options() const;
+  inline isl::union_set get_ast_build_options() const;
+  inline isl::set ast_isolate_option() const;
+  inline isl::set get_ast_isolate_option() const;
+  inline isl::multi_union_pw_aff partial_schedule() const;
+  inline isl::multi_union_pw_aff get_partial_schedule() const;
+  inline bool permutable() const;
+  inline bool get_permutable() const;
+  inline bool member_get_coincident(int pos) const;
+  inline schedule_node_band member_set_coincident(int pos, int coincident) const;
+  inline schedule_node_band mod(isl::multi_val mv) const;
+  inline unsigned n_member() const;
+  inline schedule_node_band scale(isl::multi_val mv) const;
+  inline schedule_node_band scale_down(isl::multi_val mv) const;
+  inline schedule_node_band set_ast_build_options(isl::union_set options) const;
+  inline schedule_node_band set_permutable(int permutable) const;
+  inline schedule_node_band shift(isl::multi_union_pw_aff shift) const;
+  inline schedule_node_band split(int pos) const;
+  inline schedule_node_band tile(isl::multi_val sizes) const;
+  inline schedule_node_band member_set_ast_loop_default(int pos) const;
+  inline schedule_node_band member_set_ast_loop_atomic(int pos) const;
+  inline schedule_node_band member_set_ast_loop_unroll(int pos) const;
+  inline schedule_node_band member_set_ast_loop_separate(int pos) const;
+};
+
+// declarations for isl::schedule_node_context
+
+class schedule_node_context : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_context schedule_node::as<schedule_node_context>() const;
+  static const auto type = isl_schedule_node_context;
+
+protected:
+  inline explicit schedule_node_context(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_context();
+  inline /* implicit */ schedule_node_context(const schedule_node_context &obj);
+  inline schedule_node_context &operator=(schedule_node_context obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::set context() const;
+  inline isl::set get_context() const;
+};
+
+// declarations for isl::schedule_node_domain
+
+class schedule_node_domain : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_domain schedule_node::as<schedule_node_domain>() const;
+  static const auto type = isl_schedule_node_domain;
+
+protected:
+  inline explicit schedule_node_domain(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_domain();
+  inline /* implicit */ schedule_node_domain(const schedule_node_domain &obj);
+  inline schedule_node_domain &operator=(schedule_node_domain obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::union_set domain() const;
+  inline isl::union_set get_domain() const;
+};
+
+// declarations for isl::schedule_node_expansion
+
+class schedule_node_expansion : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_expansion schedule_node::as<schedule_node_expansion>() const;
+  static const auto type = isl_schedule_node_expansion;
+
+protected:
+  inline explicit schedule_node_expansion(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_expansion();
+  inline /* implicit */ schedule_node_expansion(const schedule_node_expansion &obj);
+  inline schedule_node_expansion &operator=(schedule_node_expansion obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::union_pw_multi_aff contraction() const;
+  inline isl::union_pw_multi_aff get_contraction() const;
+  inline isl::union_map expansion() const;
+  inline isl::union_map get_expansion() const;
+};
+
+// declarations for isl::schedule_node_extension
+
+class schedule_node_extension : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_extension schedule_node::as<schedule_node_extension>() const;
+  static const auto type = isl_schedule_node_extension;
+
+protected:
+  inline explicit schedule_node_extension(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_extension();
+  inline /* implicit */ schedule_node_extension(const schedule_node_extension &obj);
+  inline schedule_node_extension &operator=(schedule_node_extension obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::union_map extension() const;
+  inline isl::union_map get_extension() const;
+};
+
+// declarations for isl::schedule_node_filter
+
+class schedule_node_filter : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_filter schedule_node::as<schedule_node_filter>() const;
+  static const auto type = isl_schedule_node_filter;
+
+protected:
+  inline explicit schedule_node_filter(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_filter();
+  inline /* implicit */ schedule_node_filter(const schedule_node_filter &obj);
+  inline schedule_node_filter &operator=(schedule_node_filter obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::union_set filter() const;
+  inline isl::union_set get_filter() const;
+};
+
+// declarations for isl::schedule_node_guard
+
+class schedule_node_guard : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_guard schedule_node::as<schedule_node_guard>() const;
+  static const auto type = isl_schedule_node_guard;
+
+protected:
+  inline explicit schedule_node_guard(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_guard();
+  inline /* implicit */ schedule_node_guard(const schedule_node_guard &obj);
+  inline schedule_node_guard &operator=(schedule_node_guard obj);
+  inline isl::ctx ctx() const;
+
+  inline isl::set guard() const;
+  inline isl::set get_guard() const;
+};
+
+// declarations for isl::schedule_node_leaf
+
+class schedule_node_leaf : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_leaf schedule_node::as<schedule_node_leaf>() const;
+  static const auto type = isl_schedule_node_leaf;
+
+protected:
+  inline explicit schedule_node_leaf(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_leaf();
+  inline /* implicit */ schedule_node_leaf(const schedule_node_leaf &obj);
+  inline schedule_node_leaf &operator=(schedule_node_leaf obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_mark
+
+class schedule_node_mark : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_mark schedule_node::as<schedule_node_mark>() const;
+  static const auto type = isl_schedule_node_mark;
+
+protected:
+  inline explicit schedule_node_mark(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_mark();
+  inline /* implicit */ schedule_node_mark(const schedule_node_mark &obj);
+  inline schedule_node_mark &operator=(schedule_node_mark obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_sequence
+
+class schedule_node_sequence : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_sequence schedule_node::as<schedule_node_sequence>() const;
+  static const auto type = isl_schedule_node_sequence;
+
+protected:
+  inline explicit schedule_node_sequence(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_sequence();
+  inline /* implicit */ schedule_node_sequence(const schedule_node_sequence &obj);
+  inline schedule_node_sequence &operator=(schedule_node_sequence obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::schedule_node_set
+
+class schedule_node_set : public schedule_node {
+  template <class T>
+  friend bool schedule_node::isa() const;
+  friend schedule_node_set schedule_node::as<schedule_node_set>() const;
+  static const auto type = isl_schedule_node_set;
+
+protected:
+  inline explicit schedule_node_set(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node_set();
+  inline /* implicit */ schedule_node_set(const schedule_node_set &obj);
+  inline schedule_node_set &operator=(schedule_node_set obj);
+  inline isl::ctx ctx() const;
+
+};
+
+// declarations for isl::set
+inline set manage(__isl_take isl_set *ptr);
+inline set manage_copy(__isl_keep isl_set *ptr);
+
+class set {
+  friend inline set manage(__isl_take isl_set *ptr);
+  friend inline set manage_copy(__isl_keep isl_set *ptr);
+
+protected:
+  isl_set *ptr = nullptr;
+
+  inline explicit set(__isl_take isl_set *ptr);
+
+public:
+  inline /* implicit */ set();
+  inline /* implicit */ set(const set &obj);
+  inline /* implicit */ set(isl::basic_set bset);
+  inline /* implicit */ set(isl::point pnt);
+  inline explicit set(isl::ctx ctx, const std::string &str);
+  inline set &operator=(set obj);
+  inline ~set();
+  inline __isl_give isl_set *copy() const &;
+  inline __isl_give isl_set *copy() && = delete;
+  inline __isl_keep isl_set *get() const;
+  inline __isl_give isl_set *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::basic_set affine_hull() const;
+  inline isl::set apply(isl::map map) const;
+  inline isl::set bind(isl::multi_id tuple) const;
+  inline isl::set coalesce() const;
+  inline isl::set complement() const;
+  inline isl::set detect_equalities() const;
+  inline isl::val dim_max_val(int pos) const;
+  inline isl::val dim_min_val(int pos) const;
+  static inline isl::set empty(isl::space space);
+  inline isl::set flatten() const;
+  inline void foreach_basic_set(const std::function<void(isl::basic_set)> &fn) const;
+  inline void foreach_point(const std::function<void(isl::point)> &fn) const;
+  inline isl::multi_val plain_multi_val_if_fixed() const;
+  inline isl::multi_val get_plain_multi_val_if_fixed() const;
+  inline isl::fixed_box simple_fixed_box_hull() const;
+  inline isl::fixed_box get_simple_fixed_box_hull() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::val stride(int pos) const;
+  inline isl::val get_stride(int pos) const;
+  inline isl::set gist(isl::set context) const;
+  inline isl::map identity() const;
+  inline isl::pw_aff indicator_function() const;
+  inline isl::map insert_domain(isl::space domain) const;
+  inline isl::set intersect(isl::set set2) const;
+  inline isl::set intersect_params(isl::set params) const;
+  inline bool involves_locals() const;
+  inline bool is_disjoint(const isl::set &set2) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::set &set2) const;
+  inline bool is_singleton() const;
+  inline bool is_strict_subset(const isl::set &set2) const;
+  inline bool is_subset(const isl::set &set2) const;
+  inline bool is_wrapping() const;
+  inline isl::set lexmax() const;
+  inline isl::pw_multi_aff lexmax_pw_multi_aff() const;
+  inline isl::set lexmin() const;
+  inline isl::pw_multi_aff lexmin_pw_multi_aff() const;
+  inline isl::set lower_bound(isl::multi_pw_aff lower) const;
+  inline isl::set lower_bound(isl::multi_val lower) const;
+  inline isl::multi_pw_aff max_multi_pw_aff() const;
+  inline isl::val max_val(const isl::aff &obj) const;
+  inline isl::multi_pw_aff min_multi_pw_aff() const;
+  inline isl::val min_val(const isl::aff &obj) const;
+  inline isl::set params() const;
+  inline isl::basic_set polyhedral_hull() const;
+  inline isl::set preimage(isl::multi_aff ma) const;
+  inline isl::set preimage(isl::multi_pw_aff mpa) const;
+  inline isl::set preimage(isl::pw_multi_aff pma) const;
+  inline isl::set product(isl::set set2) const;
+  inline isl::set project_out_all_params() const;
+  inline isl::set project_out_param(isl::id id) const;
+  inline isl::set project_out_param(const std::string &id) const;
+  inline isl::set project_out_param(isl::id_list list) const;
+  inline isl::basic_set sample() const;
+  inline isl::point sample_point() const;
+  inline isl::set subtract(isl::set set2) const;
+  inline isl::set unbind_params(isl::multi_id tuple) const;
+  inline isl::map unbind_params_insert_domain(isl::multi_id domain) const;
+  inline isl::set unite(isl::set set2) const;
+  static inline isl::set universe(isl::space space);
+  inline isl::basic_set unshifted_simple_hull() const;
+  inline isl::map unwrap() const;
+  inline isl::set upper_bound(isl::multi_pw_aff upper) const;
+  inline isl::set upper_bound(isl::multi_val upper) const;
+};
+
+// declarations for isl::space
+inline space manage(__isl_take isl_space *ptr);
+inline space manage_copy(__isl_keep isl_space *ptr);
+
+class space {
+  friend inline space manage(__isl_take isl_space *ptr);
+  friend inline space manage_copy(__isl_keep isl_space *ptr);
+
+protected:
+  isl_space *ptr = nullptr;
+
+  inline explicit space(__isl_take isl_space *ptr);
+
+public:
+  inline /* implicit */ space();
+  inline /* implicit */ space(const space &obj);
+  inline space &operator=(space obj);
+  inline ~space();
+  inline __isl_give isl_space *copy() const &;
+  inline __isl_give isl_space *copy() && = delete;
+  inline __isl_keep isl_space *get() const;
+  inline __isl_give isl_space *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::space add_named_tuple(isl::id tuple_id, unsigned int dim) const;
+  inline isl::space add_named_tuple(const std::string &tuple_id, unsigned int dim) const;
+  inline isl::space add_unnamed_tuple(unsigned int dim) const;
+  inline isl::space domain() const;
+  inline isl::space flatten_domain() const;
+  inline isl::space flatten_range() const;
+  inline bool is_equal(const isl::space &space2) const;
+  inline bool is_wrapping() const;
+  inline isl::space map_from_set() const;
+  inline isl::space params() const;
+  inline isl::space range() const;
+  static inline isl::space unit(isl::ctx ctx);
+  inline isl::space unwrap() const;
+  inline isl::space wrap() const;
+};
+
+// declarations for isl::union_access_info
+inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+class union_access_info {
+  friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+  friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+protected:
+  isl_union_access_info *ptr = nullptr;
+
+  inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
+
+public:
+  inline /* implicit */ union_access_info();
+  inline /* implicit */ union_access_info(const union_access_info &obj);
+  inline explicit union_access_info(isl::union_map sink);
+  inline union_access_info &operator=(union_access_info obj);
+  inline ~union_access_info();
+  inline __isl_give isl_union_access_info *copy() const &;
+  inline __isl_give isl_union_access_info *copy() && = delete;
+  inline __isl_keep isl_union_access_info *get() const;
+  inline __isl_give isl_union_access_info *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_flow compute_flow() const;
+  inline isl::union_access_info set_kill(isl::union_map kill) const;
+  inline isl::union_access_info set_may_source(isl::union_map may_source) const;
+  inline isl::union_access_info set_must_source(isl::union_map must_source) const;
+  inline isl::union_access_info set_schedule(isl::schedule schedule) const;
+  inline isl::union_access_info set_schedule_map(isl::union_map schedule_map) const;
+};
+
+// declarations for isl::union_flow
+inline union_flow manage(__isl_take isl_union_flow *ptr);
+inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+class union_flow {
+  friend inline union_flow manage(__isl_take isl_union_flow *ptr);
+  friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+protected:
+  isl_union_flow *ptr = nullptr;
+
+  inline explicit union_flow(__isl_take isl_union_flow *ptr);
+
+public:
+  inline /* implicit */ union_flow();
+  inline /* implicit */ union_flow(const union_flow &obj);
+  inline union_flow &operator=(union_flow obj);
+  inline ~union_flow();
+  inline __isl_give isl_union_flow *copy() const &;
+  inline __isl_give isl_union_flow *copy() && = delete;
+  inline __isl_keep isl_union_flow *get() const;
+  inline __isl_give isl_union_flow *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_map full_may_dependence() const;
+  inline isl::union_map get_full_may_dependence() const;
+  inline isl::union_map full_must_dependence() const;
+  inline isl::union_map get_full_must_dependence() const;
+  inline isl::union_map may_dependence() const;
+  inline isl::union_map get_may_dependence() const;
+  inline isl::union_map may_no_source() const;
+  inline isl::union_map get_may_no_source() const;
+  inline isl::union_map must_dependence() const;
+  inline isl::union_map get_must_dependence() const;
+  inline isl::union_map must_no_source() const;
+  inline isl::union_map get_must_no_source() const;
+};
+
+// declarations for isl::union_map
+inline union_map manage(__isl_take isl_union_map *ptr);
+inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+class union_map {
+  friend inline union_map manage(__isl_take isl_union_map *ptr);
+  friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+protected:
+  isl_union_map *ptr = nullptr;
+
+  inline explicit union_map(__isl_take isl_union_map *ptr);
+
+public:
+  inline /* implicit */ union_map();
+  inline /* implicit */ union_map(const union_map &obj);
+  inline /* implicit */ union_map(isl::basic_map bmap);
+  inline /* implicit */ union_map(isl::map map);
+  inline explicit union_map(isl::ctx ctx, const std::string &str);
+  inline union_map &operator=(union_map obj);
+  inline ~union_map();
+  inline __isl_give isl_union_map *copy() const &;
+  inline __isl_give isl_union_map *copy() && = delete;
+  inline __isl_keep isl_union_map *get() const;
+  inline __isl_give isl_union_map *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_map affine_hull() const;
+  inline isl::union_map apply_domain(isl::union_map umap2) const;
+  inline isl::union_map apply_range(isl::union_map umap2) const;
+  inline isl::union_set bind_range(isl::multi_id tuple) const;
+  inline isl::union_map coalesce() const;
+  inline isl::union_map compute_divs() const;
+  inline isl::union_map curry() const;
+  inline isl::union_set deltas() const;
+  inline isl::union_map detect_equalities() const;
+  inline isl::union_set domain() const;
+  inline isl::union_map domain_factor_domain() const;
+  inline isl::union_map domain_factor_range() const;
+  inline isl::union_map domain_map() const;
+  inline isl::union_pw_multi_aff domain_map_union_pw_multi_aff() const;
+  inline isl::union_map domain_product(isl::union_map umap2) const;
+  static inline isl::union_map empty(isl::ctx ctx);
+  inline isl::union_map eq_at(isl::multi_union_pw_aff mupa) const;
+  inline bool every_map(const std::function<bool(isl::map)> &test) const;
+  inline isl::map extract_map(isl::space space) const;
+  inline isl::union_map factor_domain() const;
+  inline isl::union_map factor_range() const;
+  inline isl::union_map fixed_power(isl::val exp) const;
+  inline isl::union_map fixed_power(long exp) const;
+  inline void foreach_map(const std::function<void(isl::map)> &fn) const;
+  static inline isl::union_map from(isl::multi_union_pw_aff mupa);
+  static inline isl::union_map from(isl::union_pw_multi_aff upma);
+  static inline isl::union_map from_domain(isl::union_set uset);
+  static inline isl::union_map from_domain_and_range(isl::union_set domain, isl::union_set range);
+  static inline isl::union_map from_range(isl::union_set uset);
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::union_map gist(isl::union_map context) const;
+  inline isl::union_map gist_domain(isl::union_set uset) const;
+  inline isl::union_map gist_params(isl::set set) const;
+  inline isl::union_map gist_range(isl::union_set uset) const;
+  inline isl::union_map intersect(isl::union_map umap2) const;
+  inline isl::union_map intersect_domain(isl::space space) const;
+  inline isl::union_map intersect_domain(isl::union_set uset) const;
+  inline isl::union_map intersect_params(isl::set set) const;
+  inline isl::union_map intersect_range(isl::space space) const;
+  inline isl::union_map intersect_range(isl::union_set uset) const;
+  inline bool is_bijective() const;
+  inline bool is_disjoint(const isl::union_map &umap2) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::union_map &umap2) const;
+  inline bool is_injective() const;
+  inline bool is_single_valued() const;
+  inline bool is_strict_subset(const isl::union_map &umap2) const;
+  inline bool is_subset(const isl::union_map &umap2) const;
+  inline bool isa_map() const;
+  inline isl::union_map lexmax() const;
+  inline isl::union_map lexmin() const;
+  inline isl::union_map polyhedral_hull() const;
+  inline isl::union_map preimage_domain(isl::multi_aff ma) const;
+  inline isl::union_map preimage_domain(isl::multi_pw_aff mpa) const;
+  inline isl::union_map preimage_domain(isl::pw_multi_aff pma) const;
+  inline isl::union_map preimage_domain(isl::union_pw_multi_aff upma) const;
+  inline isl::union_map preimage_range(isl::multi_aff ma) const;
+  inline isl::union_map preimage_range(isl::pw_multi_aff pma) const;
+  inline isl::union_map preimage_range(isl::union_pw_multi_aff upma) const;
+  inline isl::union_map product(isl::union_map umap2) const;
+  inline isl::union_map project_out_all_params() const;
+  inline isl::union_set range() const;
+  inline isl::union_map range_factor_domain() const;
+  inline isl::union_map range_factor_range() const;
+  inline isl::union_map range_map() const;
+  inline isl::union_map range_product(isl::union_map umap2) const;
+  inline isl::union_map range_reverse() const;
+  inline isl::union_map reverse() const;
+  inline isl::union_map subtract(isl::union_map umap2) const;
+  inline isl::union_map subtract_domain(isl::union_set dom) const;
+  inline isl::union_map subtract_range(isl::union_set dom) const;
+  inline isl::union_map uncurry() const;
+  inline isl::union_map unite(isl::union_map umap2) const;
+  inline isl::union_map universe() const;
+  inline isl::union_set wrap() const;
+  inline isl::union_map zip() const;
+};
+
+// declarations for isl::union_pw_aff
+inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+class union_pw_aff {
+  friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+  friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+protected:
+  isl_union_pw_aff *ptr = nullptr;
+
+  inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff();
+  inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
+  inline /* implicit */ union_pw_aff(isl::aff aff);
+  inline /* implicit */ union_pw_aff(isl::pw_aff pa);
+  inline explicit union_pw_aff(isl::ctx ctx, const std::string &str);
+  inline union_pw_aff &operator=(union_pw_aff obj);
+  inline ~union_pw_aff();
+  inline __isl_give isl_union_pw_aff *copy() const &;
+  inline __isl_give isl_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff *get() const;
+  inline __isl_give isl_union_pw_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_pw_aff add(isl::union_pw_aff upa2) const;
+  inline isl::union_set bind(isl::id id) const;
+  inline isl::union_set bind(const std::string &id) const;
+  inline isl::union_pw_aff coalesce() const;
+  inline isl::union_set domain() const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::union_pw_aff gist(isl::union_set context) const;
+  inline isl::union_pw_aff intersect_domain(isl::space space) const;
+  inline isl::union_pw_aff intersect_domain(isl::union_set uset) const;
+  inline isl::union_pw_aff intersect_domain_wrapped_domain(isl::union_set uset) const;
+  inline isl::union_pw_aff intersect_domain_wrapped_range(isl::union_set uset) const;
+  inline isl::union_pw_aff intersect_params(isl::set set) const;
+  inline isl::union_pw_aff pullback(isl::union_pw_multi_aff upma) const;
+  inline isl::union_pw_aff sub(isl::union_pw_aff upa2) const;
+  inline isl::union_pw_aff subtract_domain(isl::space space) const;
+  inline isl::union_pw_aff subtract_domain(isl::union_set uset) const;
+  inline isl::union_pw_aff union_add(isl::union_pw_aff upa2) const;
+};
+
+// declarations for isl::union_pw_aff_list
+inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+class union_pw_aff_list {
+  friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+  friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+protected:
+  isl_union_pw_aff_list *ptr = nullptr;
+
+  inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff_list();
+  inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
+  inline explicit union_pw_aff_list(isl::ctx ctx, int n);
+  inline explicit union_pw_aff_list(isl::union_pw_aff el);
+  inline union_pw_aff_list &operator=(union_pw_aff_list obj);
+  inline ~union_pw_aff_list();
+  inline __isl_give isl_union_pw_aff_list *copy() const &;
+  inline __isl_give isl_union_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff_list *get() const;
+  inline __isl_give isl_union_pw_aff_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_pw_aff_list add(isl::union_pw_aff el) const;
+  inline isl::union_pw_aff_list clear() const;
+  inline isl::union_pw_aff_list concat(isl::union_pw_aff_list list2) const;
+  inline isl::union_pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::union_pw_aff)> &fn) const;
+  inline isl::union_pw_aff at(int index) const;
+  inline isl::union_pw_aff get_at(int index) const;
+  inline isl::union_pw_aff_list insert(unsigned int pos, isl::union_pw_aff el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::union_pw_multi_aff
+inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+class union_pw_multi_aff {
+  friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+  friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+protected:
+  isl_union_pw_multi_aff *ptr = nullptr;
+
+  inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_multi_aff();
+  inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
+  inline /* implicit */ union_pw_multi_aff(isl::multi_aff ma);
+  inline /* implicit */ union_pw_multi_aff(isl::pw_multi_aff pma);
+  inline /* implicit */ union_pw_multi_aff(isl::union_pw_aff upa);
+  inline explicit union_pw_multi_aff(isl::ctx ctx, const std::string &str);
+  inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
+  inline ~union_pw_multi_aff();
+  inline __isl_give isl_union_pw_multi_aff *copy() const &;
+  inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_multi_aff *get() const;
+  inline __isl_give isl_union_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_pw_multi_aff add(isl::union_pw_multi_aff upma2) const;
+  inline isl::union_pw_multi_aff apply(isl::union_pw_multi_aff upma2) const;
+  inline isl::pw_multi_aff as_pw_multi_aff() const;
+  inline isl::union_pw_multi_aff coalesce() const;
+  inline isl::union_set domain() const;
+  static inline isl::union_pw_multi_aff empty(isl::ctx ctx);
+  inline isl::pw_multi_aff extract_pw_multi_aff(isl::space space) const;
+  inline isl::union_pw_multi_aff flat_range_product(isl::union_pw_multi_aff upma2) const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::union_pw_multi_aff gist(isl::union_set context) const;
+  inline isl::union_pw_multi_aff intersect_domain(isl::space space) const;
+  inline isl::union_pw_multi_aff intersect_domain(isl::union_set uset) const;
+  inline isl::union_pw_multi_aff intersect_domain_wrapped_domain(isl::union_set uset) const;
+  inline isl::union_pw_multi_aff intersect_domain_wrapped_range(isl::union_set uset) const;
+  inline isl::union_pw_multi_aff intersect_params(isl::set set) const;
+  inline bool involves_locals() const;
+  inline bool isa_pw_multi_aff() const;
+  inline bool plain_is_empty() const;
+  inline isl::union_pw_multi_aff pullback(isl::union_pw_multi_aff upma2) const;
+  inline isl::union_pw_multi_aff range_factor_domain() const;
+  inline isl::union_pw_multi_aff range_factor_range() const;
+  inline isl::union_pw_multi_aff range_product(isl::union_pw_multi_aff upma2) const;
+  inline isl::union_pw_multi_aff sub(isl::union_pw_multi_aff upma2) const;
+  inline isl::union_pw_multi_aff subtract_domain(isl::space space) const;
+  inline isl::union_pw_multi_aff subtract_domain(isl::union_set uset) const;
+  inline isl::union_pw_multi_aff union_add(isl::union_pw_multi_aff upma2) const;
+};
+
+// declarations for isl::union_set
+inline union_set manage(__isl_take isl_union_set *ptr);
+inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+class union_set {
+  friend inline union_set manage(__isl_take isl_union_set *ptr);
+  friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+protected:
+  isl_union_set *ptr = nullptr;
+
+  inline explicit union_set(__isl_take isl_union_set *ptr);
+
+public:
+  inline /* implicit */ union_set();
+  inline /* implicit */ union_set(const union_set &obj);
+  inline /* implicit */ union_set(isl::basic_set bset);
+  inline /* implicit */ union_set(isl::point pnt);
+  inline /* implicit */ union_set(isl::set set);
+  inline explicit union_set(isl::ctx ctx, const std::string &str);
+  inline union_set &operator=(union_set obj);
+  inline ~union_set();
+  inline __isl_give isl_union_set *copy() const &;
+  inline __isl_give isl_union_set *copy() && = delete;
+  inline __isl_keep isl_union_set *get() const;
+  inline __isl_give isl_union_set *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_set affine_hull() const;
+  inline isl::union_set apply(isl::union_map umap) const;
+  inline isl::union_set coalesce() const;
+  inline isl::union_set compute_divs() const;
+  inline isl::union_set detect_equalities() const;
+  static inline isl::union_set empty(isl::ctx ctx);
+  inline bool every_set(const std::function<bool(isl::set)> &test) const;
+  inline isl::set extract_set(isl::space space) const;
+  inline void foreach_point(const std::function<void(isl::point)> &fn) const;
+  inline void foreach_set(const std::function<void(isl::set)> &fn) const;
+  inline isl::space space() const;
+  inline isl::space get_space() const;
+  inline isl::union_set gist(isl::union_set context) const;
+  inline isl::union_set gist_params(isl::set set) const;
+  inline isl::union_map identity() const;
+  inline isl::union_set intersect(isl::union_set uset2) const;
+  inline isl::union_set intersect_params(isl::set set) const;
+  inline bool is_disjoint(const isl::union_set &uset2) const;
+  inline bool is_empty() const;
+  inline bool is_equal(const isl::union_set &uset2) const;
+  inline bool is_strict_subset(const isl::union_set &uset2) const;
+  inline bool is_subset(const isl::union_set &uset2) const;
+  inline bool isa_set() const;
+  inline isl::union_set lexmax() const;
+  inline isl::union_set lexmin() const;
+  inline isl::union_set polyhedral_hull() const;
+  inline isl::union_set preimage(isl::multi_aff ma) const;
+  inline isl::union_set preimage(isl::pw_multi_aff pma) const;
+  inline isl::union_set preimage(isl::union_pw_multi_aff upma) const;
+  inline isl::point sample_point() const;
+  inline isl::union_set subtract(isl::union_set uset2) const;
+  inline isl::union_set unite(isl::union_set uset2) const;
+  inline isl::union_set universe() const;
+  inline isl::union_map unwrap() const;
+};
+
+// declarations for isl::union_set_list
+inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+class union_set_list {
+  friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+  friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+protected:
+  isl_union_set_list *ptr = nullptr;
+
+  inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
+
+public:
+  inline /* implicit */ union_set_list();
+  inline /* implicit */ union_set_list(const union_set_list &obj);
+  inline explicit union_set_list(isl::ctx ctx, int n);
+  inline explicit union_set_list(isl::union_set el);
+  inline union_set_list &operator=(union_set_list obj);
+  inline ~union_set_list();
+  inline __isl_give isl_union_set_list *copy() const &;
+  inline __isl_give isl_union_set_list *copy() && = delete;
+  inline __isl_keep isl_union_set_list *get() const;
+  inline __isl_give isl_union_set_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::union_set_list add(isl::union_set el) const;
+  inline isl::union_set_list clear() const;
+  inline isl::union_set_list concat(isl::union_set_list list2) const;
+  inline isl::union_set_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::union_set)> &fn) const;
+  inline isl::union_set at(int index) const;
+  inline isl::union_set get_at(int index) const;
+  inline isl::union_set_list insert(unsigned int pos, isl::union_set el) const;
+  inline unsigned size() const;
+};
+
+// declarations for isl::val
+inline val manage(__isl_take isl_val *ptr);
+inline val manage_copy(__isl_keep isl_val *ptr);
+
+class val {
+  friend inline val manage(__isl_take isl_val *ptr);
+  friend inline val manage_copy(__isl_keep isl_val *ptr);
+
+protected:
+  isl_val *ptr = nullptr;
+
+  inline explicit val(__isl_take isl_val *ptr);
+
+public:
+  inline /* implicit */ val();
+  inline /* implicit */ val(const val &obj);
+  inline explicit val(isl::ctx ctx, long i);
+  inline explicit val(isl::ctx ctx, const std::string &str);
+  inline val &operator=(val obj);
+  inline ~val();
+  inline __isl_give isl_val *copy() const &;
+  inline __isl_give isl_val *copy() && = delete;
+  inline __isl_keep isl_val *get() const;
+  inline __isl_give isl_val *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::val abs() const;
+  inline bool abs_eq(const isl::val &v2) const;
+  inline bool abs_eq(long v2) const;
+  inline isl::val add(isl::val v2) const;
+  inline isl::val add(long v2) const;
+  inline isl::val ceil() const;
+  inline int cmp_si(long i) const;
+  inline isl::val div(isl::val v2) const;
+  inline isl::val div(long v2) const;
+  inline bool eq(const isl::val &v2) const;
+  inline bool eq(long v2) const;
+  inline isl::val floor() const;
+  inline isl::val gcd(isl::val v2) const;
+  inline isl::val gcd(long v2) const;
+  inline bool ge(const isl::val &v2) const;
+  inline bool ge(long v2) const;
+  inline long den_si() const;
+  inline long get_den_si() const;
+  inline long num_si() const;
+  inline long get_num_si() const;
+  inline bool gt(const isl::val &v2) const;
+  inline bool gt(long v2) const;
+  static inline isl::val infty(isl::ctx ctx);
+  inline isl::val inv() const;
+  inline bool is_divisible_by(const isl::val &v2) const;
+  inline bool is_divisible_by(long v2) const;
+  inline bool is_infty() const;
+  inline bool is_int() const;
+  inline bool is_nan() const;
+  inline bool is_neg() const;
+  inline bool is_neginfty() const;
+  inline bool is_negone() const;
+  inline bool is_nonneg() const;
+  inline bool is_nonpos() const;
+  inline bool is_one() const;
+  inline bool is_pos() const;
+  inline bool is_rat() const;
+  inline bool is_zero() const;
+  inline bool le(const isl::val &v2) const;
+  inline bool le(long v2) const;
+  inline bool lt(const isl::val &v2) const;
+  inline bool lt(long v2) const;
+  inline isl::val max(isl::val v2) const;
+  inline isl::val max(long v2) const;
+  inline isl::val min(isl::val v2) const;
+  inline isl::val min(long v2) const;
+  inline isl::val mod(isl::val v2) const;
+  inline isl::val mod(long v2) const;
+  inline isl::val mul(isl::val v2) const;
+  inline isl::val mul(long v2) const;
+  static inline isl::val nan(isl::ctx ctx);
+  inline bool ne(const isl::val &v2) const;
+  inline bool ne(long v2) const;
+  inline isl::val neg() const;
+  static inline isl::val neginfty(isl::ctx ctx);
+  static inline isl::val negone(isl::ctx ctx);
+  static inline isl::val one(isl::ctx ctx);
+  inline isl::val pow2() const;
+  inline int sgn() const;
+  inline isl::val sub(isl::val v2) const;
+  inline isl::val sub(long v2) const;
+  inline isl::val trunc() const;
+  static inline isl::val zero(isl::ctx ctx);
+};
+
+// declarations for isl::val_list
+inline val_list manage(__isl_take isl_val_list *ptr);
+inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+class val_list {
+  friend inline val_list manage(__isl_take isl_val_list *ptr);
+  friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+protected:
+  isl_val_list *ptr = nullptr;
+
+  inline explicit val_list(__isl_take isl_val_list *ptr);
+
+public:
+  inline /* implicit */ val_list();
+  inline /* implicit */ val_list(const val_list &obj);
+  inline explicit val_list(isl::ctx ctx, int n);
+  inline explicit val_list(isl::val el);
+  inline val_list &operator=(val_list obj);
+  inline ~val_list();
+  inline __isl_give isl_val_list *copy() const &;
+  inline __isl_give isl_val_list *copy() && = delete;
+  inline __isl_keep isl_val_list *get() const;
+  inline __isl_give isl_val_list *release();
+  inline bool is_null() const;
+  inline isl::ctx ctx() const;
+
+  inline isl::val_list add(isl::val el) const;
+  inline isl::val_list add(long el) const;
+  inline isl::val_list clear() const;
+  inline isl::val_list concat(isl::val_list list2) const;
+  inline isl::val_list drop(unsigned int first, unsigned int n) const;
+  inline void foreach(const std::function<void(isl::val)> &fn) const;
+  inline isl::val at(int index) const;
+  inline isl::val get_at(int index) const;
+  inline isl::val_list insert(unsigned int pos, isl::val el) const;
+  inline isl::val_list insert(unsigned int pos, long el) const;
+  inline unsigned size() const;
+};
+
+// implementations for isl::aff
+aff manage(__isl_take isl_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return aff(ptr);
+}
+aff manage_copy(__isl_keep isl_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return aff(ptr);
+}
+
+aff::aff()
+    : ptr(nullptr) {}
+
+aff::aff(const aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+aff::aff(__isl_take isl_aff *ptr)
+    : ptr(ptr) {}
+
+aff::aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+aff &aff::operator=(aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff::~aff() {
+  if (ptr)
+    isl_aff_free(ptr);
+}
+
+__isl_give isl_aff *aff::copy() const & {
+  return isl_aff_copy(ptr);
+}
+
+__isl_keep isl_aff *aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff *aff::release() {
+  isl_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx aff::ctx() const {
+  return isl::ctx(isl_aff_get_ctx(ptr));
+}
+
+isl::aff aff::add(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_add(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::add_constant(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_add_constant_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::add_constant(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_constant(isl::val(ctx(), v));
+}
+
+isl::basic_set aff::bind(isl::id id) const
+{
+  if (!ptr || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_bind_id(copy(), id.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set aff::bind(const std::string &id) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->bind(isl::id(ctx(), id));
+}
+
+isl::aff aff::ceil() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_ceil(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::div(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_div(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::eq_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_eq_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val aff::eval(isl::point pnt) const
+{
+  if (!ptr || pnt.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_eval(copy(), pnt.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::floor() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_floor(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::ge_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_ge_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::gist(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::gt_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_gt_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::le_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_le_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::lt_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_lt_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::mod(isl::val mod) const
+{
+  if (!ptr || mod.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_mod_val(copy(), mod.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::mod(long mod) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->mod(isl::val(ctx(), mod));
+}
+
+isl::aff aff::mul(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_mul(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set aff::ne_set(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_ne_set(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::pullback(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::aff aff::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::aff aff::sub(isl::aff aff2) const
+{
+  if (!ptr || aff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_sub(copy(), aff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::unbind_params_insert_domain(isl::multi_id domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_unbind_params_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff::zero_on_domain(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_zero_on_domain_space(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::aff_list
+aff_list manage(__isl_take isl_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return aff_list(ptr);
+}
+aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_aff_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return aff_list(ptr);
+}
+
+aff_list::aff_list()
+    : ptr(nullptr) {}
+
+aff_list::aff_list(const aff_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+aff_list::aff_list(__isl_take isl_aff_list *ptr)
+    : ptr(ptr) {}
+
+aff_list::aff_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+aff_list::aff_list(isl::aff el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_from_aff(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+aff_list &aff_list::operator=(aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff_list::~aff_list() {
+  if (ptr)
+    isl_aff_list_free(ptr);
+}
+
+__isl_give isl_aff_list *aff_list::copy() const & {
+  return isl_aff_list_copy(ptr);
+}
+
+__isl_keep isl_aff_list *aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff_list *aff_list::release() {
+  isl_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx aff_list::ctx() const {
+  return isl::ctx(isl_aff_list_get_ctx(ptr));
+}
+
+isl::aff_list aff_list::add(isl::aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff_list aff_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff_list aff_list::concat(isl::aff_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff_list aff_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void aff_list::foreach(const std::function<void(isl::aff)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::aff)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::aff aff_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::aff_list aff_list::insert(unsigned int pos, isl::aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned aff_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_aff_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const aff_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_aff_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_aff_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_build
+ast_build manage(__isl_take isl_ast_build *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return ast_build(ptr);
+}
+ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_build_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_ast_build_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return ast_build(ptr);
+}
+
+ast_build::ast_build()
+    : ptr(nullptr) {}
+
+ast_build::ast_build(const ast_build &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_build_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  copy_callbacks(obj);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+ast_build::ast_build(__isl_take isl_ast_build *ptr)
+    : ptr(ptr) {}
+
+ast_build::ast_build(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_alloc(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+ast_build &ast_build::operator=(ast_build obj) {
+  std::swap(this->ptr, obj.ptr);
+  copy_callbacks(obj);
+  return *this;
+}
+
+ast_build::~ast_build() {
+  if (ptr)
+    isl_ast_build_free(ptr);
+}
+
+__isl_give isl_ast_build *ast_build::copy() const & {
+  return isl_ast_build_copy(ptr);
+}
+
+__isl_keep isl_ast_build *ast_build::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_build *ast_build::release() {
+  if (at_each_domain_data)
+    exception::throw_invalid("cannot release object with persistent callbacks", __FILE__, __LINE__);
+  isl_ast_build *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_build::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx ast_build::ctx() const {
+  return isl::ctx(isl_ast_build_get_ctx(ptr));
+}
+
+ast_build &ast_build::copy_callbacks(const ast_build &obj)
+{
+  at_each_domain_data = obj.at_each_domain_data;
+  return *this;
+}
+
+isl_ast_node *ast_build::at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2)
+{
+  auto *data = static_cast<struct at_each_domain_data *>(arg_2);
+  ISL_CPP_TRY {
+    auto ret = (data->func)(manage(arg_0), manage_copy(arg_1));
+    return ret.release();
+  } ISL_CPP_CATCH_ALL {
+    data->eptr = std::current_exception();
+    return NULL;
+  }
+}
+
+void ast_build::set_at_each_domain_data(const std::function<isl::ast_node(isl::ast_node, isl::ast_build)> &fn)
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_build_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  at_each_domain_data = std::make_shared<struct at_each_domain_data>();
+  at_each_domain_data->func = fn;
+  ptr = isl_ast_build_set_at_each_domain(ptr, &at_each_domain, at_each_domain_data.get());
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+isl::ast_build ast_build::set_at_each_domain(const std::function<isl::ast_node(isl::ast_node, isl::ast_build)> &fn) const
+{
+  auto copy = *this;
+  copy.set_at_each_domain_data(fn);
+  return copy;
+}
+
+isl::ast_expr ast_build::access_from(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_build::access_from(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_build::call_from(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_build::call_from(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_build::expr_from(isl::pw_aff pa) const
+{
+  if (!ptr || pa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_build::expr_from(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_expr_from_set(get(), set.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_build ast_build::from_context(isl::set set)
+{
+  if (set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = set.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_from_context(set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map ast_build::schedule() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_get_schedule(get());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map ast_build::get_schedule() const
+{
+  return schedule();
+}
+
+isl::ast_node ast_build::node_from(isl::schedule schedule) const
+{
+  if (!ptr || schedule.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_build::node_from_schedule_map(isl::union_map schedule) const
+{
+  if (!ptr || schedule.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
+  if (at_each_domain_data && at_each_domain_data->eptr) {
+    std::exception_ptr eptr = at_each_domain_data->eptr;
+    at_each_domain_data->eptr = nullptr;
+    std::rethrow_exception(eptr);
+  }
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+// implementations for isl::ast_expr
+ast_expr manage(__isl_take isl_ast_expr *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return ast_expr(ptr);
+}
+ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_ast_expr_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return ast_expr(ptr);
+}
+
+ast_expr::ast_expr()
+    : ptr(nullptr) {}
+
+ast_expr::ast_expr(const ast_expr &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
+    : ptr(ptr) {}
+
+ast_expr &ast_expr::operator=(ast_expr obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_expr::~ast_expr() {
+  if (ptr)
+    isl_ast_expr_free(ptr);
+}
+
+__isl_give isl_ast_expr *ast_expr::copy() const & {
+  return isl_ast_expr_copy(ptr);
+}
+
+__isl_keep isl_ast_expr *ast_expr::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_expr *ast_expr::release() {
+  isl_ast_expr *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_expr::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+bool ast_expr::isa_type(T subtype) const
+{
+  if (is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return isl_ast_expr_get_type(get()) == subtype;
+}
+template <class T>
+bool ast_expr::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_expr::as() const
+{
+ if (!isa<T>())
+    exception::throw_invalid("not an object of the requested subtype", __FILE__, __LINE__);
+  return T(copy());
+}
+
+isl::ctx ast_expr::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+std::string ast_expr::to_C_str() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_expr_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_id
+ast_expr_id::ast_expr_id()
+    : ast_expr() {}
+
+ast_expr_id::ast_expr_id(const ast_expr_id &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_id::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::id ast_expr_id::id() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_expr_id_get_id(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id ast_expr_id::get_id() const
+{
+  return id();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_id &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_int
+ast_expr_int::ast_expr_int()
+    : ast_expr() {}
+
+ast_expr_int::ast_expr_int(const ast_expr_int &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_int::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::val ast_expr_int::val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_expr_int_get_val(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val ast_expr_int::get_val() const
+{
+  return val();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_int &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op
+ast_expr_op::ast_expr_op()
+    : ast_expr() {}
+
+ast_expr_op::ast_expr_op(const ast_expr_op &obj)
+    : ast_expr(obj)
+{
+}
+
+ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr)
+    : ast_expr(ptr) {}
+
+ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+template <typename T, typename>
+bool ast_expr_op::isa_type(T subtype) const
+{
+  if (is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return isl_ast_expr_op_get_type(get()) == subtype;
+}
+template <class T>
+bool ast_expr_op::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_expr_op::as() const
+{
+ if (!isa<T>())
+    exception::throw_invalid("not an object of the requested subtype", __FILE__, __LINE__);
+  return T(copy());
+}
+
+isl::ctx ast_expr_op::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+isl::ast_expr ast_expr_op::arg(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_expr_op_get_arg(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_expr_op::get_arg(int pos) const
+{
+  return arg(pos);
+}
+
+unsigned ast_expr_op::n_arg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_expr_op_get_n_arg(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+unsigned ast_expr_op::get_n_arg() const
+{
+  return n_arg();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_access
+ast_expr_op_access::ast_expr_op_access()
+    : ast_expr_op() {}
+
+ast_expr_op_access::ast_expr_op_access(const ast_expr_op_access &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_access::ast_expr_op_access(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_access &ast_expr_op_access::operator=(ast_expr_op_access obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_access::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_access &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_add
+ast_expr_op_add::ast_expr_op_add()
+    : ast_expr_op() {}
+
+ast_expr_op_add::ast_expr_op_add(const ast_expr_op_add &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_add::ast_expr_op_add(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_add &ast_expr_op_add::operator=(ast_expr_op_add obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_add::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_add &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_address_of
+ast_expr_op_address_of::ast_expr_op_address_of()
+    : ast_expr_op() {}
+
+ast_expr_op_address_of::ast_expr_op_address_of(const ast_expr_op_address_of &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_address_of::ast_expr_op_address_of(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_address_of &ast_expr_op_address_of::operator=(ast_expr_op_address_of obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_address_of::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_address_of &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_and
+ast_expr_op_and::ast_expr_op_and()
+    : ast_expr_op() {}
+
+ast_expr_op_and::ast_expr_op_and(const ast_expr_op_and &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_and::ast_expr_op_and(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_and &ast_expr_op_and::operator=(ast_expr_op_and obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_and::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_and_then
+ast_expr_op_and_then::ast_expr_op_and_then()
+    : ast_expr_op() {}
+
+ast_expr_op_and_then::ast_expr_op_and_then(const ast_expr_op_and_then &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_and_then::ast_expr_op_and_then(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_and_then &ast_expr_op_and_then::operator=(ast_expr_op_and_then obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_and_then::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and_then &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_call
+ast_expr_op_call::ast_expr_op_call()
+    : ast_expr_op() {}
+
+ast_expr_op_call::ast_expr_op_call(const ast_expr_op_call &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_call::ast_expr_op_call(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_call &ast_expr_op_call::operator=(ast_expr_op_call obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_call::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_call &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_cond
+ast_expr_op_cond::ast_expr_op_cond()
+    : ast_expr_op() {}
+
+ast_expr_op_cond::ast_expr_op_cond(const ast_expr_op_cond &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_cond::ast_expr_op_cond(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_cond &ast_expr_op_cond::operator=(ast_expr_op_cond obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_cond::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_cond &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_div
+ast_expr_op_div::ast_expr_op_div()
+    : ast_expr_op() {}
+
+ast_expr_op_div::ast_expr_op_div(const ast_expr_op_div &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_div::ast_expr_op_div(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_div &ast_expr_op_div::operator=(ast_expr_op_div obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_div::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_div &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_eq
+ast_expr_op_eq::ast_expr_op_eq()
+    : ast_expr_op() {}
+
+ast_expr_op_eq::ast_expr_op_eq(const ast_expr_op_eq &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_eq::ast_expr_op_eq(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_eq &ast_expr_op_eq::operator=(ast_expr_op_eq obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_eq::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_eq &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_fdiv_q
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q()
+    : ast_expr_op() {}
+
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_fdiv_q &ast_expr_op_fdiv_q::operator=(ast_expr_op_fdiv_q obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_fdiv_q::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_fdiv_q &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_ge
+ast_expr_op_ge::ast_expr_op_ge()
+    : ast_expr_op() {}
+
+ast_expr_op_ge::ast_expr_op_ge(const ast_expr_op_ge &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_ge::ast_expr_op_ge(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_ge &ast_expr_op_ge::operator=(ast_expr_op_ge obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_ge::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_ge &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_gt
+ast_expr_op_gt::ast_expr_op_gt()
+    : ast_expr_op() {}
+
+ast_expr_op_gt::ast_expr_op_gt(const ast_expr_op_gt &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_gt::ast_expr_op_gt(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_gt &ast_expr_op_gt::operator=(ast_expr_op_gt obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_gt::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_gt &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_le
+ast_expr_op_le::ast_expr_op_le()
+    : ast_expr_op() {}
+
+ast_expr_op_le::ast_expr_op_le(const ast_expr_op_le &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_le::ast_expr_op_le(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_le &ast_expr_op_le::operator=(ast_expr_op_le obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_le::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_le &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_lt
+ast_expr_op_lt::ast_expr_op_lt()
+    : ast_expr_op() {}
+
+ast_expr_op_lt::ast_expr_op_lt(const ast_expr_op_lt &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_lt::ast_expr_op_lt(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_lt &ast_expr_op_lt::operator=(ast_expr_op_lt obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_lt::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_lt &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_max
+ast_expr_op_max::ast_expr_op_max()
+    : ast_expr_op() {}
+
+ast_expr_op_max::ast_expr_op_max(const ast_expr_op_max &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_max::ast_expr_op_max(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_max &ast_expr_op_max::operator=(ast_expr_op_max obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_max::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_max &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_member
+ast_expr_op_member::ast_expr_op_member()
+    : ast_expr_op() {}
+
+ast_expr_op_member::ast_expr_op_member(const ast_expr_op_member &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_member::ast_expr_op_member(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_member &ast_expr_op_member::operator=(ast_expr_op_member obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_member::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_member &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_min
+ast_expr_op_min::ast_expr_op_min()
+    : ast_expr_op() {}
+
+ast_expr_op_min::ast_expr_op_min(const ast_expr_op_min &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_min::ast_expr_op_min(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_min &ast_expr_op_min::operator=(ast_expr_op_min obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_min::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_min &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_minus
+ast_expr_op_minus::ast_expr_op_minus()
+    : ast_expr_op() {}
+
+ast_expr_op_minus::ast_expr_op_minus(const ast_expr_op_minus &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_minus::ast_expr_op_minus(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_minus &ast_expr_op_minus::operator=(ast_expr_op_minus obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_minus::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_minus &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_mul
+ast_expr_op_mul::ast_expr_op_mul()
+    : ast_expr_op() {}
+
+ast_expr_op_mul::ast_expr_op_mul(const ast_expr_op_mul &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_mul::ast_expr_op_mul(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_mul &ast_expr_op_mul::operator=(ast_expr_op_mul obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_mul::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_mul &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_or
+ast_expr_op_or::ast_expr_op_or()
+    : ast_expr_op() {}
+
+ast_expr_op_or::ast_expr_op_or(const ast_expr_op_or &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_or::ast_expr_op_or(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_or &ast_expr_op_or::operator=(ast_expr_op_or obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_or::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_or_else
+ast_expr_op_or_else::ast_expr_op_or_else()
+    : ast_expr_op() {}
+
+ast_expr_op_or_else::ast_expr_op_or_else(const ast_expr_op_or_else &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_or_else::ast_expr_op_or_else(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_or_else &ast_expr_op_or_else::operator=(ast_expr_op_or_else obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_or_else::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or_else &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_pdiv_q
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q()
+    : ast_expr_op() {}
+
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_pdiv_q &ast_expr_op_pdiv_q::operator=(ast_expr_op_pdiv_q obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_pdiv_q::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_q &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_pdiv_r
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r()
+    : ast_expr_op() {}
+
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_pdiv_r &ast_expr_op_pdiv_r::operator=(ast_expr_op_pdiv_r obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_pdiv_r::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_r &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_select
+ast_expr_op_select::ast_expr_op_select()
+    : ast_expr_op() {}
+
+ast_expr_op_select::ast_expr_op_select(const ast_expr_op_select &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_select::ast_expr_op_select(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_select &ast_expr_op_select::operator=(ast_expr_op_select obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_select::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_select &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_sub
+ast_expr_op_sub::ast_expr_op_sub()
+    : ast_expr_op() {}
+
+ast_expr_op_sub::ast_expr_op_sub(const ast_expr_op_sub &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_sub::ast_expr_op_sub(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_sub &ast_expr_op_sub::operator=(ast_expr_op_sub obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_sub::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_sub &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_expr_op_zdiv_r
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r()
+    : ast_expr_op() {}
+
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj)
+    : ast_expr_op(obj)
+{
+}
+
+ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr)
+    : ast_expr_op(ptr) {}
+
+ast_expr_op_zdiv_r &ast_expr_op_zdiv_r::operator=(ast_expr_op_zdiv_r obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_expr_op_zdiv_r::ctx() const {
+  return isl::ctx(isl_ast_expr_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_zdiv_r &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_expr_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_expr_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node
+ast_node manage(__isl_take isl_ast_node *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return ast_node(ptr);
+}
+ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_ast_node_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return ast_node(ptr);
+}
+
+ast_node::ast_node()
+    : ptr(nullptr) {}
+
+ast_node::ast_node(const ast_node &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+ast_node::ast_node(__isl_take isl_ast_node *ptr)
+    : ptr(ptr) {}
+
+ast_node &ast_node::operator=(ast_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node::~ast_node() {
+  if (ptr)
+    isl_ast_node_free(ptr);
+}
+
+__isl_give isl_ast_node *ast_node::copy() const & {
+  return isl_ast_node_copy(ptr);
+}
+
+__isl_keep isl_ast_node *ast_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node *ast_node::release() {
+  isl_ast_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+bool ast_node::isa_type(T subtype) const
+{
+  if (is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return isl_ast_node_get_type(get()) == subtype;
+}
+template <class T>
+bool ast_node::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T ast_node::as() const
+{
+ if (!isa<T>())
+    exception::throw_invalid("not an object of the requested subtype", __FILE__, __LINE__);
+  return T(copy());
+}
+
+isl::ctx ast_node::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+std::string ast_node::to_C_str() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_block
+ast_node_block::ast_node_block()
+    : ast_node() {}
+
+ast_node_block::ast_node_block(const ast_node_block &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_block &ast_node_block::operator=(ast_node_block obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_node_block::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::ast_node_list ast_node_block::children() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_block_get_children(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node_list ast_node_block::get_children() const
+{
+  return children();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_block &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_for
+ast_node_for::ast_node_for()
+    : ast_node() {}
+
+ast_node_for::ast_node_for(const ast_node_for &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_for &ast_node_for::operator=(ast_node_for obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_node_for::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::ast_node ast_node_for::body() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_get_body(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_node_for::get_body() const
+{
+  return body();
+}
+
+isl::ast_expr ast_node_for::cond() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_get_cond(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_for::get_cond() const
+{
+  return cond();
+}
+
+isl::ast_expr ast_node_for::inc() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_get_inc(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_for::get_inc() const
+{
+  return inc();
+}
+
+isl::ast_expr ast_node_for::init() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_get_init(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_for::get_init() const
+{
+  return init();
+}
+
+isl::ast_expr ast_node_for::iterator() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_get_iterator(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_for::get_iterator() const
+{
+  return iterator();
+}
+
+bool ast_node_for::is_degenerate() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_for_is_degenerate(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_for &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_if
+ast_node_if::ast_node_if()
+    : ast_node() {}
+
+ast_node_if::ast_node_if(const ast_node_if &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_if &ast_node_if::operator=(ast_node_if obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_node_if::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::ast_expr ast_node_if::cond() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_if_get_cond(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_if::get_cond() const
+{
+  return cond();
+}
+
+isl::ast_node ast_node_if::else_node() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_if_get_else_node(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_node_if::get_else_node() const
+{
+  return else_node();
+}
+
+isl::ast_node ast_node_if::then_node() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_if_get_then_node(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_node_if::get_then_node() const
+{
+  return then_node();
+}
+
+bool ast_node_if::has_else_node() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_if_has_else_node(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_if &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_list
+ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return ast_node_list(ptr);
+}
+ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_ast_node_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return ast_node_list(ptr);
+}
+
+ast_node_list::ast_node_list()
+    : ptr(nullptr) {}
+
+ast_node_list::ast_node_list(const ast_node_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
+    : ptr(ptr) {}
+
+ast_node_list::ast_node_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+ast_node_list::ast_node_list(isl::ast_node el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_from_ast_node(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+ast_node_list &ast_node_list::operator=(ast_node_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node_list::~ast_node_list() {
+  if (ptr)
+    isl_ast_node_list_free(ptr);
+}
+
+__isl_give isl_ast_node_list *ast_node_list::copy() const & {
+  return isl_ast_node_list_copy(ptr);
+}
+
+__isl_keep isl_ast_node_list *ast_node_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node_list *ast_node_list::release() {
+  isl_ast_node_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx ast_node_list::ctx() const {
+  return isl::ctx(isl_ast_node_list_get_ctx(ptr));
+}
+
+isl::ast_node_list ast_node_list::add(isl::ast_node el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node_list ast_node_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node_list ast_node_list::concat(isl::ast_node_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void ast_node_list::foreach(const std::function<void(isl::ast_node)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::ast_node)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::ast_node ast_node_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_node_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::ast_node_list ast_node_list::insert(unsigned int pos, isl::ast_node el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned ast_node_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_mark
+ast_node_mark::ast_node_mark()
+    : ast_node() {}
+
+ast_node_mark::ast_node_mark(const ast_node_mark &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_node_mark::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::id ast_node_mark::id() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_mark_get_id(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id ast_node_mark::get_id() const
+{
+  return id();
+}
+
+isl::ast_node ast_node_mark::node() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_mark_get_node(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_node ast_node_mark::get_node() const
+{
+  return node();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_mark &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::ast_node_user
+ast_node_user::ast_node_user()
+    : ast_node() {}
+
+ast_node_user::ast_node_user(const ast_node_user &obj)
+    : ast_node(obj)
+{
+}
+
+ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr)
+    : ast_node(ptr) {}
+
+ast_node_user &ast_node_user::operator=(ast_node_user obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx ast_node_user::ctx() const {
+  return isl::ctx(isl_ast_node_get_ctx(ptr));
+}
+
+isl::ast_expr ast_node_user::expr() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_ast_node_user_get_expr(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::ast_expr ast_node_user::get_expr() const
+{
+  return expr();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const ast_node_user &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_ast_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_ast_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::basic_map
+basic_map manage(__isl_take isl_basic_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return basic_map(ptr);
+}
+basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_map_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_basic_map_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return basic_map(ptr);
+}
+
+basic_map::basic_map()
+    : ptr(nullptr) {}
+
+basic_map::basic_map(const basic_map &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_map_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+basic_map::basic_map(__isl_take isl_basic_map *ptr)
+    : ptr(ptr) {}
+
+basic_map::basic_map(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+basic_map &basic_map::operator=(basic_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_map::~basic_map() {
+  if (ptr)
+    isl_basic_map_free(ptr);
+}
+
+__isl_give isl_basic_map *basic_map::copy() const & {
+  return isl_basic_map_copy(ptr);
+}
+
+__isl_keep isl_basic_map *basic_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_map *basic_map::release() {
+  isl_basic_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx basic_map::ctx() const {
+  return isl::ctx(isl_basic_map_get_ctx(ptr));
+}
+
+isl::basic_map basic_map::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::apply_domain(isl::basic_map bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::apply_range(isl::basic_map bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_apply_range(copy(), bmap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_map::deltas() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_deltas(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::flatten() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_flatten(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::flatten_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_flatten_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::flatten_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_flatten_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::gist(isl::basic_map context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::intersect(isl::basic_map bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_intersect(copy(), bmap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::intersect_domain(isl::basic_set bset) const
+{
+  if (!ptr || bset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_intersect_domain(copy(), bset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::intersect_range(isl::basic_set bset) const
+{
+  if (!ptr || bset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_intersect_range(copy(), bset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool basic_map::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool basic_map::is_equal(const isl::basic_map &bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_is_equal(get(), bmap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool basic_map::is_subset(const isl::basic_map &bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_is_subset(get(), bmap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::map basic_map::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map basic_map::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::reverse() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_reverse(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map basic_map::sample() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_sample(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map basic_map::unite(isl::basic_map bmap2) const
+{
+  if (!ptr || bmap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_map_union(copy(), bmap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const basic_map &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_map_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_basic_map_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::basic_set
+basic_set manage(__isl_take isl_basic_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return basic_set(ptr);
+}
+basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_set_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_basic_set_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return basic_set(ptr);
+}
+
+basic_set::basic_set()
+    : ptr(nullptr) {}
+
+basic_set::basic_set(const basic_set &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_set_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+basic_set::basic_set(__isl_take isl_basic_set *ptr)
+    : ptr(ptr) {}
+
+basic_set::basic_set(isl::point pnt)
+{
+  if (pnt.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pnt.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_from_point(pnt.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+basic_set::basic_set(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+basic_set &basic_set::operator=(basic_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_set::~basic_set() {
+  if (ptr)
+    isl_basic_set_free(ptr);
+}
+
+__isl_give isl_basic_set *basic_set::copy() const & {
+  return isl_basic_set_copy(ptr);
+}
+
+__isl_keep isl_basic_set *basic_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_set *basic_set::release() {
+  isl_basic_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx basic_set::ctx() const {
+  return isl::ctx(isl_basic_set_get_ctx(ptr));
+}
+
+isl::basic_set basic_set::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::apply(isl::basic_map bmap) const
+{
+  if (!ptr || bmap.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_apply(copy(), bmap.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val basic_set::dim_max_val(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_dim_max_val(copy(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::flatten() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_flatten(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::gist(isl::basic_set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::intersect(isl::basic_set bset2) const
+{
+  if (!ptr || bset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_intersect(copy(), bset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::intersect_params(isl::basic_set bset2) const
+{
+  if (!ptr || bset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_intersect_params(copy(), bset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool basic_set::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool basic_set::is_equal(const isl::basic_set &bset2) const
+{
+  if (!ptr || bset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_is_equal(get(), bset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool basic_set::is_subset(const isl::basic_set &bset2) const
+{
+  if (!ptr || bset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_is_subset(get(), bset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool basic_set::is_wrapping() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_is_wrapping(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::set basic_set::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set basic_set::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set basic_set::sample() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_sample(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::point basic_set::sample_point() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_sample_point(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set basic_set::unite(isl::basic_set bset2) const
+{
+  if (!ptr || bset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_basic_set_union(copy(), bset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const basic_set &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_basic_set_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_basic_set_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::fixed_box
+fixed_box manage(__isl_take isl_fixed_box *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return fixed_box(ptr);
+}
+fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_fixed_box_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_fixed_box_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return fixed_box(ptr);
+}
+
+fixed_box::fixed_box()
+    : ptr(nullptr) {}
+
+fixed_box::fixed_box(const fixed_box &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_fixed_box_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
+    : ptr(ptr) {}
+
+fixed_box &fixed_box::operator=(fixed_box obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+fixed_box::~fixed_box() {
+  if (ptr)
+    isl_fixed_box_free(ptr);
+}
+
+__isl_give isl_fixed_box *fixed_box::copy() const & {
+  return isl_fixed_box_copy(ptr);
+}
+
+__isl_keep isl_fixed_box *fixed_box::get() const {
+  return ptr;
+}
+
+__isl_give isl_fixed_box *fixed_box::release() {
+  isl_fixed_box *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool fixed_box::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx fixed_box::ctx() const {
+  return isl::ctx(isl_fixed_box_get_ctx(ptr));
+}
+
+isl::multi_aff fixed_box::offset() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_fixed_box_get_offset(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff fixed_box::get_offset() const
+{
+  return offset();
+}
+
+isl::multi_val fixed_box::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_fixed_box_get_size(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val fixed_box::get_size() const
+{
+  return size();
+}
+
+isl::space fixed_box::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_fixed_box_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space fixed_box::get_space() const
+{
+  return space();
+}
+
+bool fixed_box::is_valid() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_fixed_box_is_valid(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const fixed_box &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_fixed_box_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_fixed_box_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::id
+id manage(__isl_take isl_id *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return id(ptr);
+}
+id manage_copy(__isl_keep isl_id *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_id_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return id(ptr);
+}
+
+id::id()
+    : ptr(nullptr) {}
+
+id::id(const id &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+id::id(__isl_take isl_id *ptr)
+    : ptr(ptr) {}
+
+id::id(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+id &id::operator=(id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id::~id() {
+  if (ptr)
+    isl_id_free(ptr);
+}
+
+__isl_give isl_id *id::copy() const & {
+  return isl_id_copy(ptr);
+}
+
+__isl_keep isl_id *id::get() const {
+  return ptr;
+}
+
+__isl_give isl_id *id::release() {
+  isl_id *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx id::ctx() const {
+  return isl::ctx(isl_id_get_ctx(ptr));
+}
+
+std::string id::name() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_get_name(get());
+  std::string tmp(res);
+  return tmp;
+}
+
+std::string id::get_name() const
+{
+  return name();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const id &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_id_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::id_list
+id_list manage(__isl_take isl_id_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return id_list(ptr);
+}
+id_list manage_copy(__isl_keep isl_id_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_id_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return id_list(ptr);
+}
+
+id_list::id_list()
+    : ptr(nullptr) {}
+
+id_list::id_list(const id_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+id_list::id_list(__isl_take isl_id_list *ptr)
+    : ptr(ptr) {}
+
+id_list::id_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+id_list::id_list(isl::id el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_from_id(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+id_list &id_list::operator=(id_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id_list::~id_list() {
+  if (ptr)
+    isl_id_list_free(ptr);
+}
+
+__isl_give isl_id_list *id_list::copy() const & {
+  return isl_id_list_copy(ptr);
+}
+
+__isl_keep isl_id_list *id_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_id_list *id_list::release() {
+  isl_id_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx id_list::ctx() const {
+  return isl::ctx(isl_id_list_get_ctx(ptr));
+}
+
+isl::id_list id_list::add(isl::id el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id_list id_list::add(const std::string &el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add(isl::id(ctx(), el));
+}
+
+isl::id_list id_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id_list id_list::concat(isl::id_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id_list id_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void id_list::foreach(const std::function<void(isl::id)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::id)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::id id_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id id_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::id_list id_list::insert(unsigned int pos, isl::id el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id_list id_list::insert(unsigned int pos, const std::string &el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->insert(pos, isl::id(ctx(), el));
+}
+
+unsigned id_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_id_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const id_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_id_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_id_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::map
+map manage(__isl_take isl_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return map(ptr);
+}
+map manage_copy(__isl_keep isl_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_map_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_map_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return map(ptr);
+}
+
+map::map()
+    : ptr(nullptr) {}
+
+map::map(const map &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_map_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+map::map(__isl_take isl_map *ptr)
+    : ptr(ptr) {}
+
+map::map(isl::basic_map bmap)
+{
+  if (bmap.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = bmap.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_from_basic_map(bmap.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+map::map(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+map &map::operator=(map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+map::~map() {
+  if (ptr)
+    isl_map_free(ptr);
+}
+
+__isl_give isl_map *map::copy() const & {
+  return isl_map_copy(ptr);
+}
+
+__isl_keep isl_map *map::get() const {
+  return ptr;
+}
+
+__isl_give isl_map *map::release() {
+  isl_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx map::ctx() const {
+  return isl::ctx(isl_map_get_ctx(ptr));
+}
+
+isl::basic_map map::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::apply_domain(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_apply_domain(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::apply_range(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_apply_range(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::bind_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_bind_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::bind_range(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_bind_range(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::complement() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_complement(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::curry() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_curry(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::deltas() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_deltas(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::domain_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_domain_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::domain_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_domain_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::domain_product(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_domain_product(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::empty(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_empty(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::eq_at(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_eq_at_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::flatten() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_flatten(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::flatten_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_flatten_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::flatten_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_flatten_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void map::foreach_basic_map(const std::function<void(isl::basic_map)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::basic_map)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::fixed_box map::range_simple_fixed_box_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_get_range_simple_fixed_box_hull(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::fixed_box map::get_range_simple_fixed_box_hull() const
+{
+  return range_simple_fixed_box_hull();
+}
+
+isl::space map::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space map::get_space() const
+{
+  return space();
+}
+
+isl::map map::gist(isl::map context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::gist_domain(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_gist_domain(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::intersect(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_intersect(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::intersect_domain(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_intersect_domain(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::intersect_params(isl::set params) const
+{
+  if (!ptr || params.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_intersect_params(copy(), params.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::intersect_range(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_intersect_range(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool map::is_bijective() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_bijective(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_disjoint(const isl::map &map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_disjoint(get(), map2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_equal(const isl::map &map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_equal(get(), map2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_injective() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_injective(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_single_valued() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_single_valued(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_strict_subset(const isl::map &map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_strict_subset(get(), map2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool map::is_subset(const isl::map &map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_is_subset(get(), map2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::map map::lex_ge_at(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lex_ge_at_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lex_gt_at(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lex_gt_at_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lex_le_at(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lex_le_at_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lex_lt_at(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lex_lt_at_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff map::lexmax_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lexmax_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff map::lexmin_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lexmin_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lower_bound(isl::multi_pw_aff lower) const
+{
+  if (!ptr || lower.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lower_bound_multi_pw_aff(copy(), lower.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::lower_bound(isl::multi_val lower) const
+{
+  if (!ptr || lower.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_lower_bound_multi_val(copy(), lower.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff map::max_multi_pw_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_max_multi_pw_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff map::min_multi_pw_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_min_multi_pw_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map map::polyhedral_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_polyhedral_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::preimage_domain(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::preimage_domain(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::preimage_domain(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::preimage_range(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::preimage_range(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::project_out_all_params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_project_out_all_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::range_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_range_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::range_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_range_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::range_product(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_range_product(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::range_reverse() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_range_reverse(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::reverse() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_reverse(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map map::sample() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_sample(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::subtract(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_subtract(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::uncurry() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_uncurry(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::unite(isl::map map2) const
+{
+  if (!ptr || map2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_union(copy(), map2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::universe(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_universe(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_map map::unshifted_simple_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_unshifted_simple_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::upper_bound(isl::multi_pw_aff upper) const
+{
+  if (!ptr || upper.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_upper_bound_multi_pw_aff(copy(), upper.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map map::upper_bound(isl::multi_val upper) const
+{
+  if (!ptr || upper.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_upper_bound_multi_val(copy(), upper.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set map::wrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_map_wrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const map &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_map_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_map_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_aff
+multi_aff manage(__isl_take isl_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return multi_aff(ptr);
+}
+multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_multi_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return multi_aff(ptr);
+}
+
+multi_aff::multi_aff()
+    : ptr(nullptr) {}
+
+multi_aff::multi_aff(const multi_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
+    : ptr(ptr) {}
+
+multi_aff::multi_aff(isl::aff aff)
+{
+  if (aff.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = aff.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_from_aff(aff.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_aff::multi_aff(isl::space space, isl::aff_list list)
+{
+  if (space.is_null() || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_aff::multi_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_aff &multi_aff::operator=(multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_aff::~multi_aff() {
+  if (ptr)
+    isl_multi_aff_free(ptr);
+}
+
+__isl_give isl_multi_aff *multi_aff::copy() const & {
+  return isl_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_aff *multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_aff *multi_aff::release() {
+  isl_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx multi_aff::ctx() const {
+  return isl::ctx(isl_multi_aff_get_ctx(ptr));
+}
+
+isl::multi_aff multi_aff::add(isl::multi_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_add(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::add_constant(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_add_constant_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::add_constant(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_add_constant_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::add_constant(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_constant(isl::val(ctx(), v));
+}
+
+isl::basic_set multi_aff::bind(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_bind(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::bind_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_bind_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::bind_domain_wrapped_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::domain_map(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_domain_map(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::flat_range_product(isl::multi_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::floor() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_floor(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff multi_aff::at(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_get_at(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff multi_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::multi_val multi_aff::constant_multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_get_constant_multi_val(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_aff::get_constant_multi_val() const
+{
+  return constant_multi_val();
+}
+
+isl::aff_list multi_aff::list() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_get_list(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::aff_list multi_aff::get_list() const
+{
+  return list();
+}
+
+isl::space multi_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::multi_aff multi_aff::gist(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::identity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_identity_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::identity_on_domain(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_identity_on_domain_space(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::insert_domain(isl::space domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_aff::involves_locals() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_involves_locals(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_aff multi_aff::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_aff::plain_is_equal(const isl::multi_aff &multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_aff multi_aff::product(isl::multi_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::pullback(isl::multi_aff ma2) const
+{
+  if (!ptr || ma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::range_map(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_range_map(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::range_product(isl::multi_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::scale(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::multi_aff multi_aff::scale_down(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::multi_aff multi_aff::set_at(int pos, isl::aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_set_at(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned multi_aff::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_aff multi_aff::sub(isl::multi_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_sub(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::unbind_params_insert_domain(isl::multi_id domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_unbind_params_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_aff multi_aff::zero(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_aff_zero(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_multi_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_id
+multi_id manage(__isl_take isl_multi_id *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return multi_id(ptr);
+}
+multi_id manage_copy(__isl_keep isl_multi_id *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_id_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_multi_id_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return multi_id(ptr);
+}
+
+multi_id::multi_id()
+    : ptr(nullptr) {}
+
+multi_id::multi_id(const multi_id &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_id_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+multi_id::multi_id(__isl_take isl_multi_id *ptr)
+    : ptr(ptr) {}
+
+multi_id::multi_id(isl::space space, isl::id_list list)
+{
+  if (space.is_null() || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_from_id_list(space.release(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_id::multi_id(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_id &multi_id::operator=(multi_id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_id::~multi_id() {
+  if (ptr)
+    isl_multi_id_free(ptr);
+}
+
+__isl_give isl_multi_id *multi_id::copy() const & {
+  return isl_multi_id_copy(ptr);
+}
+
+__isl_keep isl_multi_id *multi_id::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_id *multi_id::release() {
+  isl_multi_id *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_id::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx multi_id::ctx() const {
+  return isl::ctx(isl_multi_id_get_ctx(ptr));
+}
+
+isl::multi_id multi_id::flat_range_product(isl::multi_id multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_flat_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id multi_id::at(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_get_at(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id multi_id::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::id_list multi_id::list() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_get_list(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::id_list multi_id::get_list() const
+{
+  return list();
+}
+
+isl::space multi_id::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space multi_id::get_space() const
+{
+  return space();
+}
+
+bool multi_id::plain_is_equal(const isl::multi_id &multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_plain_is_equal(get(), multi2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_id multi_id::range_product(isl::multi_id multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_id multi_id::set_at(int pos, isl::id el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_set_at(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_id multi_id::set_at(int pos, const std::string &el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->set_at(pos, isl::id(ctx(), el));
+}
+
+unsigned multi_id::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_id_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_id &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_id_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_multi_id_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_pw_aff
+multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return multi_pw_aff(ptr);
+}
+multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_pw_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_multi_pw_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return multi_pw_aff(ptr);
+}
+
+multi_pw_aff::multi_pw_aff()
+    : ptr(nullptr) {}
+
+multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_pw_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_pw_aff::multi_pw_aff(isl::aff aff)
+{
+  if (aff.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = aff.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_from_aff(aff.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::multi_aff ma)
+{
+  if (ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::pw_aff pa)
+{
+  if (pa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::space space, isl::pw_aff_list list)
+{
+  if (space.is_null() || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::pw_multi_aff pma)
+{
+  if (pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff::multi_pw_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_pw_aff::~multi_pw_aff() {
+  if (ptr)
+    isl_multi_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
+  return isl_multi_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::release() {
+  isl_multi_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx multi_pw_aff::ctx() const {
+  return isl::ctx(isl_multi_pw_aff_get_ctx(ptr));
+}
+
+isl::multi_pw_aff multi_pw_aff::add(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_add(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::add_constant(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_add_constant_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::add_constant(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_add_constant_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::add_constant(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_constant(isl::val(ctx(), v));
+}
+
+isl::set multi_pw_aff::bind(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_bind(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::bind_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_bind_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::bind_domain_wrapped_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set multi_pw_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::flat_range_product(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff multi_pw_aff::at(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_get_at(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff multi_pw_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::pw_aff_list multi_pw_aff::list() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_get_list(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff_list multi_pw_aff::get_list() const
+{
+  return list();
+}
+
+isl::space multi_pw_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space multi_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::multi_pw_aff multi_pw_aff::gist(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_gist(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::identity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_identity_multi_pw_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::identity_on_domain(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_identity_on_domain_space(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::insert_domain(isl::space domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::intersect_domain(isl::set domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_pw_aff::involves_param(const isl::id &id) const
+{
+  if (!ptr || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_involves_param_id(get(), id.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool multi_pw_aff::involves_param(const std::string &id) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->involves_param(isl::id(ctx(), id));
+}
+
+bool multi_pw_aff::involves_param(const isl::id_list &list) const
+{
+  if (!ptr || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_involves_param_id_list(get(), list.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_pw_aff multi_pw_aff::max(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_max(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_pw_aff::max_multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_max_multi_val(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::min(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_min(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_pw_aff::min_multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_min_multi_val(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_pw_aff::plain_is_equal(const isl::multi_pw_aff &multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_pw_aff multi_pw_aff::product(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::pullback(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::pullback(isl::multi_pw_aff mpa2) const
+{
+  if (!ptr || mpa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::pullback(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::range_product(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::scale(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::multi_pw_aff multi_pw_aff::scale_down(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::multi_pw_aff multi_pw_aff::set_at(int pos, isl::pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_set_at(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned multi_pw_aff::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_pw_aff multi_pw_aff::sub(isl::multi_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::unbind_params_insert_domain(isl::multi_id domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_unbind_params_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::union_add(isl::multi_pw_aff mpa2) const
+{
+  if (!ptr || mpa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_union_add(copy(), mpa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff multi_pw_aff::zero(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_pw_aff_zero(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_pw_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_pw_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_multi_pw_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_union_pw_aff
+multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return multi_union_pw_aff(ptr);
+}
+multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_union_pw_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_multi_union_pw_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return multi_union_pw_aff(ptr);
+}
+
+multi_union_pw_aff::multi_union_pw_aff()
+    : ptr(nullptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_union_pw_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::multi_pw_aff mpa)
+{
+  if (mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = mpa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::union_pw_aff upa)
+{
+  if (upa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = upa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::space space, isl::union_pw_aff_list list)
+{
+  if (space.is_null() || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_union_pw_aff::multi_union_pw_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_union_pw_aff::~multi_union_pw_aff() {
+  if (ptr)
+    isl_multi_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
+  return isl_multi_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
+  isl_multi_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx multi_union_pw_aff::ctx() const {
+  return isl::ctx(isl_multi_union_pw_aff_get_ctx(ptr));
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::add(isl::multi_union_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set multi_union_pw_aff::bind(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_bind(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set multi_union_pw_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::flat_range_product(isl::multi_union_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff multi_union_pw_aff::at(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_get_at(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff multi_union_pw_aff::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::union_pw_aff_list multi_union_pw_aff::list() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_get_list(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff_list multi_union_pw_aff::get_list() const
+{
+  return list();
+}
+
+isl::space multi_union_pw_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space multi_union_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::gist(isl::union_set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::intersect_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::intersect_params(isl::set params) const
+{
+  if (!ptr || params.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_union_pw_aff::plain_is_equal(const isl::multi_union_pw_aff &multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::pullback(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::range_product(isl::multi_union_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::set_at(int pos, isl::union_pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_set_at(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned multi_union_pw_aff::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::sub(isl::multi_union_pw_aff multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::union_add(isl::multi_union_pw_aff mupa2) const
+{
+  if (!ptr || mupa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff multi_union_pw_aff::zero(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_union_pw_aff_zero(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_union_pw_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_union_pw_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_multi_union_pw_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::multi_val
+multi_val manage(__isl_take isl_multi_val *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return multi_val(ptr);
+}
+multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_val_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_multi_val_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return multi_val(ptr);
+}
+
+multi_val::multi_val()
+    : ptr(nullptr) {}
+
+multi_val::multi_val(const multi_val &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_val_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+multi_val::multi_val(__isl_take isl_multi_val *ptr)
+    : ptr(ptr) {}
+
+multi_val::multi_val(isl::space space, isl::val_list list)
+{
+  if (space.is_null() || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_from_val_list(space.release(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_val::multi_val(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+multi_val &multi_val::operator=(multi_val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_val::~multi_val() {
+  if (ptr)
+    isl_multi_val_free(ptr);
+}
+
+__isl_give isl_multi_val *multi_val::copy() const & {
+  return isl_multi_val_copy(ptr);
+}
+
+__isl_keep isl_multi_val *multi_val::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_val *multi_val::release() {
+  isl_multi_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_val::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx multi_val::ctx() const {
+  return isl::ctx(isl_multi_val_get_ctx(ptr));
+}
+
+isl::multi_val multi_val::add(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_add(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::add(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_add_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::add(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add(isl::val(ctx(), v));
+}
+
+isl::multi_val multi_val::flat_range_product(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val multi_val::at(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_get_at(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val multi_val::get_at(int pos) const
+{
+  return at(pos);
+}
+
+isl::val_list multi_val::list() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_get_list(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val_list multi_val::get_list() const
+{
+  return list();
+}
+
+isl::space multi_val::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space multi_val::get_space() const
+{
+  return space();
+}
+
+isl::multi_val multi_val::max(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_max(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::min(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_min(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool multi_val::plain_is_equal(const isl::multi_val &multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_val multi_val::product(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::range_product(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_range_product(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::scale(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::multi_val multi_val::scale_down(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::multi_val multi_val::set_at(int pos, isl::val el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_set_at(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::set_at(int pos, long el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->set_at(pos, isl::val(ctx(), el));
+}
+
+unsigned multi_val::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_val multi_val::sub(isl::multi_val multi2) const
+{
+  if (!ptr || multi2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_sub(copy(), multi2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val multi_val::zero(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_multi_val_zero(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const multi_val &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_multi_val_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_multi_val_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::point
+point manage(__isl_take isl_point *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return point(ptr);
+}
+point manage_copy(__isl_keep isl_point *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_point_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_point_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return point(ptr);
+}
+
+point::point()
+    : ptr(nullptr) {}
+
+point::point(const point &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_point_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+point::point(__isl_take isl_point *ptr)
+    : ptr(ptr) {}
+
+point &point::operator=(point obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+point::~point() {
+  if (ptr)
+    isl_point_free(ptr);
+}
+
+__isl_give isl_point *point::copy() const & {
+  return isl_point_copy(ptr);
+}
+
+__isl_keep isl_point *point::get() const {
+  return ptr;
+}
+
+__isl_give isl_point *point::release() {
+  isl_point *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool point::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx point::ctx() const {
+  return isl::ctx(isl_point_get_ctx(ptr));
+}
+
+isl::multi_val point::multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_point_get_multi_val(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val point::get_multi_val() const
+{
+  return multi_val();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const point &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_point_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_point_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_aff
+pw_aff manage(__isl_take isl_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return pw_aff(ptr);
+}
+pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_pw_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return pw_aff(ptr);
+}
+
+pw_aff::pw_aff()
+    : ptr(nullptr) {}
+
+pw_aff::pw_aff(const pw_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
+    : ptr(ptr) {}
+
+pw_aff::pw_aff(isl::aff aff)
+{
+  if (aff.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = aff.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_from_aff(aff.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_aff::pw_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_aff &pw_aff::operator=(pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff::~pw_aff() {
+  if (ptr)
+    isl_pw_aff_free(ptr);
+}
+
+__isl_give isl_pw_aff *pw_aff::copy() const & {
+  return isl_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_aff *pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff *pw_aff::release() {
+  isl_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx pw_aff::ctx() const {
+  return isl::ctx(isl_pw_aff_get_ctx(ptr));
+}
+
+isl::pw_aff pw_aff::add(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_add(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::add_constant(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_add_constant_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::add_constant(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_constant(isl::val(ctx(), v));
+}
+
+isl::aff pw_aff::as_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_as_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::bind(isl::id id) const
+{
+  if (!ptr || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_bind_id(copy(), id.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::bind(const std::string &id) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->bind(isl::id(ctx(), id));
+}
+
+isl::pw_aff pw_aff::bind_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_bind_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::bind_domain_wrapped_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::ceil() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_ceil(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::cond(isl::pw_aff pwaff_true, isl::pw_aff pwaff_false) const
+{
+  if (!ptr || pwaff_true.is_null() || pwaff_false.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::div(isl::pw_aff pa2) const
+{
+  if (!ptr || pa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_div(copy(), pa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::eq_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val pw_aff::eval(isl::point pnt) const
+{
+  if (!ptr || pnt.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_eval(copy(), pnt.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::floor() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_floor(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::ge_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::gist(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::gt_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::insert_domain(isl::space domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::intersect_domain(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_intersect_domain(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool pw_aff::isa_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_isa_aff(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::set pw_aff::le_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::lt_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::max(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_max(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::min(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_min(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::mod(isl::val mod) const
+{
+  if (!ptr || mod.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_mod_val(copy(), mod.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::mod(long mod) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->mod(isl::val(ctx(), mod));
+}
+
+isl::pw_aff pw_aff::mul(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_mul(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_aff::ne_set(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::param_on_domain(isl::set domain, isl::id id)
+{
+  if (domain.is_null() || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = domain.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_param_on_domain_id(domain.release(), id.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::pullback(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::pullback(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::pullback(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::pw_aff pw_aff::scale_down(isl::val f) const
+{
+  if (!ptr || f.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_scale_down_val(copy(), f.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::scale_down(long f) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), f));
+}
+
+isl::pw_aff pw_aff::sub(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_sub(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::subtract_domain(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_subtract_domain(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::tdiv_q(isl::pw_aff pa2) const
+{
+  if (!ptr || pa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::tdiv_r(isl::pw_aff pa2) const
+{
+  if (!ptr || pa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff::union_add(isl::pw_aff pwaff2) const
+{
+  if (!ptr || pwaff2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_pw_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_aff_list
+pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return pw_aff_list(ptr);
+}
+pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_pw_aff_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return pw_aff_list(ptr);
+}
+
+pw_aff_list::pw_aff_list()
+    : ptr(nullptr) {}
+
+pw_aff_list::pw_aff_list(const pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+pw_aff_list::pw_aff_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_aff_list::pw_aff_list(isl::pw_aff el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_from_pw_aff(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff_list::~pw_aff_list() {
+  if (ptr)
+    isl_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
+  return isl_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_aff_list *pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::release() {
+  isl_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx pw_aff_list::ctx() const {
+  return isl::ctx(isl_pw_aff_list_get_ctx(ptr));
+}
+
+isl::pw_aff_list pw_aff_list::add(isl::pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff_list pw_aff_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff_list pw_aff_list::concat(isl::pw_aff_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void pw_aff_list::foreach(const std::function<void(isl::pw_aff)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::pw_aff)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::pw_aff pw_aff_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff pw_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::pw_aff_list pw_aff_list::insert(unsigned int pos, isl::pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned pw_aff_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_aff_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_aff_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_aff_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_pw_aff_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_multi_aff
+pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return pw_multi_aff(ptr);
+}
+pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_pw_multi_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return pw_multi_aff(ptr);
+}
+
+pw_multi_aff::pw_multi_aff()
+    : ptr(nullptr) {}
+
+pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+pw_multi_aff::pw_multi_aff(isl::multi_aff ma)
+{
+  if (ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_multi_aff::pw_multi_aff(isl::pw_aff pa)
+{
+  if (pa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_multi_aff::pw_multi_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff::~pw_multi_aff() {
+  if (ptr)
+    isl_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
+  return isl_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::release() {
+  isl_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx pw_multi_aff::ctx() const {
+  return isl::ctx(isl_pw_multi_aff_get_ctx(ptr));
+}
+
+isl::pw_multi_aff pw_multi_aff::add(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_add(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::add_constant(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_add_constant_multi_val(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::add_constant(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_add_constant_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::add_constant(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_constant(isl::val(ctx(), v));
+}
+
+isl::multi_aff pw_multi_aff::as_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_as_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::bind_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_bind_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::bind_domain_wrapped_domain(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set pw_multi_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::domain_map(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_domain_map(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::flat_range_product(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void pw_multi_aff::foreach_piece(const std::function<void(isl::set, isl::multi_aff)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::set, isl::multi_aff)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0), manage(arg_1));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::space pw_multi_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space pw_multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::pw_multi_aff pw_multi_aff::gist(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_gist(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::insert_domain(isl::space domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::intersect_domain(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool pw_multi_aff::involves_locals() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_involves_locals(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool pw_multi_aff::isa_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_isa_multi_aff(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::multi_val pw_multi_aff::max_multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_max_multi_val(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val pw_multi_aff::min_multi_val() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_min_multi_val(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned pw_multi_aff::n_piece() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_n_piece(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::pw_multi_aff pw_multi_aff::product(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_product(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::pullback(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::pullback(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::range_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_range_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::range_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_range_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::range_map(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_range_map(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::range_product(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::scale(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::scale(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale(isl::val(ctx(), v));
+}
+
+isl::pw_multi_aff pw_multi_aff::scale_down(isl::val v) const
+{
+  if (!ptr || v.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::scale_down(long v) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->scale_down(isl::val(ctx(), v));
+}
+
+isl::pw_multi_aff pw_multi_aff::sub(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::subtract_domain(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::union_add(isl::pw_multi_aff pma2) const
+{
+  if (!ptr || pma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff::zero(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_zero(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_pw_multi_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::pw_multi_aff_list
+pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return pw_multi_aff_list(ptr);
+}
+pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_pw_multi_aff_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return pw_multi_aff_list(ptr);
+}
+
+pw_multi_aff_list::pw_multi_aff_list()
+    : ptr(nullptr) {}
+
+pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
+    : ptr(ptr) {}
+
+pw_multi_aff_list::pw_multi_aff_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_multi_aff_list::pw_multi_aff_list(isl::pw_multi_aff el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff_list::~pw_multi_aff_list() {
+  if (ptr)
+    isl_pw_multi_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
+  return isl_pw_multi_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
+  isl_pw_multi_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx pw_multi_aff_list::ctx() const {
+  return isl::ctx(isl_pw_multi_aff_list_get_ctx(ptr));
+}
+
+isl::pw_multi_aff_list pw_multi_aff_list::add(isl::pw_multi_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff_list pw_multi_aff_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff_list pw_multi_aff_list::concat(isl::pw_multi_aff_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void pw_multi_aff_list::foreach(const std::function<void(isl::pw_multi_aff)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::pw_multi_aff)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::pw_multi_aff pw_multi_aff_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff pw_multi_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, isl::pw_multi_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned pw_multi_aff_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_pw_multi_aff_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_pw_multi_aff_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_pw_multi_aff_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule
+schedule manage(__isl_take isl_schedule *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return schedule(ptr);
+}
+schedule manage_copy(__isl_keep isl_schedule *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_schedule_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return schedule(ptr);
+}
+
+schedule::schedule()
+    : ptr(nullptr) {}
+
+schedule::schedule(const schedule &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+schedule::schedule(__isl_take isl_schedule *ptr)
+    : ptr(ptr) {}
+
+schedule::schedule(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+schedule &schedule::operator=(schedule obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule::~schedule() {
+  if (ptr)
+    isl_schedule_free(ptr);
+}
+
+__isl_give isl_schedule *schedule::copy() const & {
+  return isl_schedule_copy(ptr);
+}
+
+__isl_keep isl_schedule *schedule::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule *schedule::release() {
+  isl_schedule *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx schedule::ctx() const {
+  return isl::ctx(isl_schedule_get_ctx(ptr));
+}
+
+isl::schedule schedule::from_domain(isl::union_set domain)
+{
+  if (domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = domain.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_from_domain(domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule::map() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_get_map(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule::get_map() const
+{
+  return map();
+}
+
+isl::schedule_node schedule::root() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_get_root(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule::get_root() const
+{
+  return root();
+}
+
+isl::schedule schedule::pullback(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_constraints
+schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return schedule_constraints(ptr);
+}
+schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_constraints_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_schedule_constraints_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return schedule_constraints(ptr);
+}
+
+schedule_constraints::schedule_constraints()
+    : ptr(nullptr) {}
+
+schedule_constraints::schedule_constraints(const schedule_constraints &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_constraints_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
+    : ptr(ptr) {}
+
+schedule_constraints::schedule_constraints(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_constraints::~schedule_constraints() {
+  if (ptr)
+    isl_schedule_constraints_free(ptr);
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
+  return isl_schedule_constraints_copy(ptr);
+}
+
+__isl_keep isl_schedule_constraints *schedule_constraints::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::release() {
+  isl_schedule_constraints *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_constraints::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx schedule_constraints::ctx() const {
+  return isl::ctx(isl_schedule_constraints_get_ctx(ptr));
+}
+
+isl::schedule schedule_constraints::compute_schedule() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_compute_schedule(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::coincidence() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_coincidence(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::get_coincidence() const
+{
+  return coincidence();
+}
+
+isl::union_map schedule_constraints::conditional_validity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_conditional_validity(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::get_conditional_validity() const
+{
+  return conditional_validity();
+}
+
+isl::union_map schedule_constraints::conditional_validity_condition() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::get_conditional_validity_condition() const
+{
+  return conditional_validity_condition();
+}
+
+isl::set schedule_constraints::context() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_context(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set schedule_constraints::get_context() const
+{
+  return context();
+}
+
+isl::union_set schedule_constraints::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_domain(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set schedule_constraints::get_domain() const
+{
+  return domain();
+}
+
+isl::union_map schedule_constraints::proximity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_proximity(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::get_proximity() const
+{
+  return proximity();
+}
+
+isl::union_map schedule_constraints::validity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_get_validity(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_constraints::get_validity() const
+{
+  return validity();
+}
+
+isl::schedule_constraints schedule_constraints::on_domain(isl::union_set domain)
+{
+  if (domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = domain.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_on_domain(domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_constraints schedule_constraints::set_coincidence(isl::union_map coincidence) const
+{
+  if (!ptr || coincidence.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_constraints schedule_constraints::set_conditional_validity(isl::union_map condition, isl::union_map validity) const
+{
+  if (!ptr || condition.is_null() || validity.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_constraints schedule_constraints::set_context(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_set_context(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_constraints schedule_constraints::set_proximity(isl::union_map proximity) const
+{
+  if (!ptr || proximity.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_constraints schedule_constraints::set_validity(isl::union_map validity) const
+{
+  if (!ptr || validity.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_constraints &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_constraints_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_constraints_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node
+schedule_node manage(__isl_take isl_schedule_node *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return schedule_node(ptr);
+}
+schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_schedule_node_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return schedule_node(ptr);
+}
+
+schedule_node::schedule_node()
+    : ptr(nullptr) {}
+
+schedule_node::schedule_node(const schedule_node &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
+    : ptr(ptr) {}
+
+schedule_node &schedule_node::operator=(schedule_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_node::~schedule_node() {
+  if (ptr)
+    isl_schedule_node_free(ptr);
+}
+
+__isl_give isl_schedule_node *schedule_node::copy() const & {
+  return isl_schedule_node_copy(ptr);
+}
+
+__isl_keep isl_schedule_node *schedule_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_node *schedule_node::release() {
+  isl_schedule_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_node::is_null() const {
+  return ptr == nullptr;
+}
+
+template <typename T, typename>
+bool schedule_node::isa_type(T subtype) const
+{
+  if (is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return isl_schedule_node_get_type(get()) == subtype;
+}
+template <class T>
+bool schedule_node::isa() const
+{
+  return isa_type<decltype(T::type)>(T::type);
+}
+template <class T>
+T schedule_node::as() const
+{
+ if (!isa<T>())
+    exception::throw_invalid("not an object of the requested subtype", __FILE__, __LINE__);
+  return T(copy());
+}
+
+isl::ctx schedule_node::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::schedule_node schedule_node::ancestor(int generation) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_ancestor(copy(), generation);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::child(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_child(copy(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool schedule_node::every_descendant(const std::function<bool(isl::schedule_node)> &test) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct test_data {
+    std::function<bool(isl::schedule_node)> func;
+    std::exception_ptr eptr;
+  } test_data = { test };
+  auto test_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    ISL_CPP_TRY {
+      auto ret = (data->func)(manage_copy(arg_0));
+      return ret ? isl_bool_true : isl_bool_false;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_bool_error;
+    }
+  };
+  auto res = isl_schedule_node_every_descendant(get(), test_lambda, &test_data);
+  if (test_data.eptr)
+    std::rethrow_exception(test_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::schedule_node schedule_node::first_child() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_first_child(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void schedule_node::foreach_ancestor_top_down(const std::function<void(isl::schedule_node)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::schedule_node)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage_copy(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+void schedule_node::foreach_descendant_top_down(const std::function<bool(isl::schedule_node)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<bool(isl::schedule_node)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      auto ret = (data->func)(manage_copy(arg_0));
+      return ret ? isl_bool_true : isl_bool_false;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_bool_error;
+    }
+  };
+  auto res = isl_schedule_node_foreach_descendant_top_down(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::schedule_node schedule_node::from_domain(isl::union_set domain)
+{
+  if (domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = domain.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_from_domain(domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::from_extension(isl::union_map extension)
+{
+  if (extension.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = extension.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_from_extension(extension.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned schedule_node::ancestor_child_position(const isl::schedule_node &ancestor) const
+{
+  if (!ptr || ancestor.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+unsigned schedule_node::get_ancestor_child_position(const isl::schedule_node &ancestor) const
+{
+  return ancestor_child_position(ancestor);
+}
+
+unsigned schedule_node::child_position() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_child_position(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+unsigned schedule_node::get_child_position() const
+{
+  return child_position();
+}
+
+isl::multi_union_pw_aff schedule_node::prefix_schedule_multi_union_pw_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
+{
+  return prefix_schedule_multi_union_pw_aff();
+}
+
+isl::union_map schedule_node::prefix_schedule_union_map() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_node::get_prefix_schedule_union_map() const
+{
+  return prefix_schedule_union_map();
+}
+
+isl::union_pw_multi_aff schedule_node::prefix_schedule_union_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
+{
+  return prefix_schedule_union_pw_multi_aff();
+}
+
+isl::schedule schedule_node::schedule() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_schedule(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule schedule_node::get_schedule() const
+{
+  return schedule();
+}
+
+isl::schedule_node schedule_node::shared_ancestor(const isl::schedule_node &node2) const
+{
+  if (!ptr || node2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::get_shared_ancestor(const isl::schedule_node &node2) const
+{
+  return shared_ancestor(node2);
+}
+
+unsigned schedule_node::tree_depth() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_get_tree_depth(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+unsigned schedule_node::get_tree_depth() const
+{
+  return tree_depth();
+}
+
+isl::schedule_node schedule_node::graft_after(isl::schedule_node graft) const
+{
+  if (!ptr || graft.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_graft_after(copy(), graft.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::graft_before(isl::schedule_node graft) const
+{
+  if (!ptr || graft.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_graft_before(copy(), graft.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool schedule_node::has_children() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_has_children(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool schedule_node::has_next_sibling() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_has_next_sibling(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool schedule_node::has_parent() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_has_parent(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool schedule_node::has_previous_sibling() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_has_previous_sibling(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::schedule_node schedule_node::insert_context(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_context(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_filter(isl::union_set filter) const
+{
+  if (!ptr || filter.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_filter(copy(), filter.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_guard(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_guard(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_mark(isl::id mark) const
+{
+  if (!ptr || mark.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_mark(copy(), mark.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_mark(const std::string &mark) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->insert_mark(isl::id(ctx(), mark));
+}
+
+isl::schedule_node schedule_node::insert_partial_schedule(isl::multi_union_pw_aff schedule) const
+{
+  if (!ptr || schedule.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_sequence(isl::union_set_list filters) const
+{
+  if (!ptr || filters.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::insert_set(isl::union_set_list filters) const
+{
+  if (!ptr || filters.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_insert_set(copy(), filters.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool schedule_node::is_equal(const isl::schedule_node &node2) const
+{
+  if (!ptr || node2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_is_equal(get(), node2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool schedule_node::is_subtree_anchored() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_is_subtree_anchored(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::schedule_node schedule_node::map_descendant_bottom_up(const std::function<isl::schedule_node(isl::schedule_node)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<isl::schedule_node(isl::schedule_node)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_schedule_node * {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      auto ret = (data->func)(manage(arg_0));
+      return ret.release();
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return NULL;
+    }
+  };
+  auto res = isl_schedule_node_map_descendant_bottom_up(copy(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned schedule_node::n_children() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_n_children(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::schedule_node schedule_node::next_sibling() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_next_sibling(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::order_after(isl::union_set filter) const
+{
+  if (!ptr || filter.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_order_after(copy(), filter.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::order_before(isl::union_set filter) const
+{
+  if (!ptr || filter.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_order_before(copy(), filter.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::parent() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_parent(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::previous_sibling() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_previous_sibling(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::schedule_node schedule_node::root() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_root(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_band
+schedule_node_band::schedule_node_band()
+    : schedule_node() {}
+
+schedule_node_band::schedule_node_band(const schedule_node_band &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_band::schedule_node_band(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_band &schedule_node_band::operator=(schedule_node_band obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_band::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::union_set schedule_node_band::ast_build_options() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_get_ast_build_options(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set schedule_node_band::get_ast_build_options() const
+{
+  return ast_build_options();
+}
+
+isl::set schedule_node_band::ast_isolate_option() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_get_ast_isolate_option(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set schedule_node_band::get_ast_isolate_option() const
+{
+  return ast_isolate_option();
+}
+
+isl::multi_union_pw_aff schedule_node_band::partial_schedule() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_get_partial_schedule(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_union_pw_aff schedule_node_band::get_partial_schedule() const
+{
+  return partial_schedule();
+}
+
+bool schedule_node_band::permutable() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_get_permutable(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool schedule_node_band::get_permutable() const
+{
+  return permutable();
+}
+
+bool schedule_node_band::member_get_coincident(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::mod(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_mod(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+unsigned schedule_node_band::n_member() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_n_member(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+schedule_node_band schedule_node_band::scale(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_scale(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::scale_down(isl::multi_val mv) const
+{
+  if (!ptr || mv.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_scale_down(copy(), mv.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::set_ast_build_options(isl::union_set options) const
+{
+  if (!ptr || options.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::set_permutable(int permutable) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_set_permutable(copy(), permutable);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::shift(isl::multi_union_pw_aff shift) const
+{
+  if (!ptr || shift.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_shift(copy(), shift.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::split(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_split(copy(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+schedule_node_band schedule_node_band::tile(isl::multi_val sizes) const
+{
+  if (!ptr || sizes.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_tile(copy(), sizes.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_default);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_atomic);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_unroll);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+
+schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_separate);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res).as<schedule_node_band>();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_band &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_context
+schedule_node_context::schedule_node_context()
+    : schedule_node() {}
+
+schedule_node_context::schedule_node_context(const schedule_node_context &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_context::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::set schedule_node_context::context() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_context_get_context(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set schedule_node_context::get_context() const
+{
+  return context();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_context &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_domain
+schedule_node_domain::schedule_node_domain()
+    : schedule_node() {}
+
+schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_domain::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::union_set schedule_node_domain::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_domain_get_domain(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set schedule_node_domain::get_domain() const
+{
+  return domain();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_domain &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_expansion
+schedule_node_expansion::schedule_node_expansion()
+    : schedule_node() {}
+
+schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_expansion::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::union_pw_multi_aff schedule_node_expansion::contraction() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_expansion_get_contraction(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff schedule_node_expansion::get_contraction() const
+{
+  return contraction();
+}
+
+isl::union_map schedule_node_expansion::expansion() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_expansion_get_expansion(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_node_expansion::get_expansion() const
+{
+  return expansion();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_expansion &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_extension
+schedule_node_extension::schedule_node_extension()
+    : schedule_node() {}
+
+schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_extension::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::union_map schedule_node_extension::extension() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_extension_get_extension(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map schedule_node_extension::get_extension() const
+{
+  return extension();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_extension &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_filter
+schedule_node_filter::schedule_node_filter()
+    : schedule_node() {}
+
+schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_filter::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::union_set schedule_node_filter::filter() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_filter_get_filter(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set schedule_node_filter::get_filter() const
+{
+  return filter();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_filter &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_guard
+schedule_node_guard::schedule_node_guard()
+    : schedule_node() {}
+
+schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_guard::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+isl::set schedule_node_guard::guard() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_schedule_node_guard_get_guard(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set schedule_node_guard::get_guard() const
+{
+  return guard();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_guard &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_leaf
+schedule_node_leaf::schedule_node_leaf()
+    : schedule_node() {}
+
+schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_leaf::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_leaf &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_mark
+schedule_node_mark::schedule_node_mark()
+    : schedule_node() {}
+
+schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_mark::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_mark &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_sequence
+schedule_node_sequence::schedule_node_sequence()
+    : schedule_node() {}
+
+schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_sequence::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_sequence &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::schedule_node_set
+schedule_node_set::schedule_node_set()
+    : schedule_node() {}
+
+schedule_node_set::schedule_node_set(const schedule_node_set &obj)
+    : schedule_node(obj)
+{
+}
+
+schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr)
+    : schedule_node(ptr) {}
+
+schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+isl::ctx schedule_node_set::ctx() const {
+  return isl::ctx(isl_schedule_node_get_ctx(ptr));
+}
+
+inline std::ostream &operator<<(std::ostream &os, const schedule_node_set &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_schedule_node_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_schedule_node_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::set
+set manage(__isl_take isl_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return set(ptr);
+}
+set manage_copy(__isl_keep isl_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_set_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_set_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return set(ptr);
+}
+
+set::set()
+    : ptr(nullptr) {}
+
+set::set(const set &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_set_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+set::set(__isl_take isl_set *ptr)
+    : ptr(ptr) {}
+
+set::set(isl::basic_set bset)
+{
+  if (bset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = bset.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_from_basic_set(bset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+set::set(isl::point pnt)
+{
+  if (pnt.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pnt.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_from_point(pnt.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+set::set(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+set &set::operator=(set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+set::~set() {
+  if (ptr)
+    isl_set_free(ptr);
+}
+
+__isl_give isl_set *set::copy() const & {
+  return isl_set_copy(ptr);
+}
+
+__isl_keep isl_set *set::get() const {
+  return ptr;
+}
+
+__isl_give isl_set *set::release() {
+  isl_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx set::ctx() const {
+  return isl::ctx(isl_set_get_ctx(ptr));
+}
+
+isl::basic_set set::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::apply(isl::map map) const
+{
+  if (!ptr || map.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_apply(copy(), map.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::bind(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_bind(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::complement() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_complement(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val set::dim_max_val(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_dim_max_val(copy(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val set::dim_min_val(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_dim_min_val(copy(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::empty(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_empty(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::flatten() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_flatten(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void set::foreach_basic_set(const std::function<void(isl::basic_set)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::basic_set)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+void set::foreach_point(const std::function<void(isl::point)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::point)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::multi_val set::plain_multi_val_if_fixed() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_get_plain_multi_val_if_fixed(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_val set::get_plain_multi_val_if_fixed() const
+{
+  return plain_multi_val_if_fixed();
+}
+
+isl::fixed_box set::simple_fixed_box_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_get_simple_fixed_box_hull(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::fixed_box set::get_simple_fixed_box_hull() const
+{
+  return simple_fixed_box_hull();
+}
+
+isl::space set::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space set::get_space() const
+{
+  return space();
+}
+
+isl::val set::stride(int pos) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_get_stride(get(), pos);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val set::get_stride(int pos) const
+{
+  return stride(pos);
+}
+
+isl::set set::gist(isl::set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map set::identity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_identity(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_aff set::indicator_function() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_indicator_function(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map set::insert_domain(isl::space domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::intersect(isl::set set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_intersect(copy(), set2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::intersect_params(isl::set params) const
+{
+  if (!ptr || params.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_intersect_params(copy(), params.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool set::involves_locals() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_involves_locals(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_disjoint(const isl::set &set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_disjoint(get(), set2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_equal(const isl::set &set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_equal(get(), set2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_singleton() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_singleton(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_strict_subset(const isl::set &set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_strict_subset(get(), set2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_subset(const isl::set &set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_subset(get(), set2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool set::is_wrapping() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_is_wrapping(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::set set::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff set::lexmax_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lexmax_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff set::lexmin_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lexmin_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::lower_bound(isl::multi_pw_aff lower) const
+{
+  if (!ptr || lower.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lower_bound_multi_pw_aff(copy(), lower.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::lower_bound(isl::multi_val lower) const
+{
+  if (!ptr || lower.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_lower_bound_multi_val(copy(), lower.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff set::max_multi_pw_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_max_multi_pw_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val set::max_val(const isl::aff &obj) const
+{
+  if (!ptr || obj.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_max_val(get(), obj.get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::multi_pw_aff set::min_multi_pw_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_min_multi_pw_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val set::min_val(const isl::aff &obj) const
+{
+  if (!ptr || obj.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_min_val(get(), obj.get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set set::polyhedral_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_polyhedral_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::preimage(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_preimage_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::preimage(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::preimage(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::product(isl::set set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_product(copy(), set2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::project_out_all_params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_project_out_all_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::project_out_param(isl::id id) const
+{
+  if (!ptr || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_project_out_param_id(copy(), id.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::project_out_param(const std::string &id) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->project_out_param(isl::id(ctx(), id));
+}
+
+isl::set set::project_out_param(isl::id_list list) const
+{
+  if (!ptr || list.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_project_out_param_id_list(copy(), list.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set set::sample() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_sample(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::point set::sample_point() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_sample_point(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::subtract(isl::set set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_subtract(copy(), set2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::unbind_params(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_unbind_params(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map set::unbind_params_insert_domain(isl::multi_id domain) const
+{
+  if (!ptr || domain.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_unbind_params_insert_domain(copy(), domain.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::unite(isl::set set2) const
+{
+  if (!ptr || set2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_union(copy(), set2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::universe(isl::space space)
+{
+  if (space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = space.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_universe(space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::basic_set set::unshifted_simple_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_unshifted_simple_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::map set::unwrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_unwrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::upper_bound(isl::multi_pw_aff upper) const
+{
+  if (!ptr || upper.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_upper_bound_multi_pw_aff(copy(), upper.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::set set::upper_bound(isl::multi_val upper) const
+{
+  if (!ptr || upper.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_set_upper_bound_multi_val(copy(), upper.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const set &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_set_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_set_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::space
+space manage(__isl_take isl_space *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return space(ptr);
+}
+space manage_copy(__isl_keep isl_space *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_space_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_space_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return space(ptr);
+}
+
+space::space()
+    : ptr(nullptr) {}
+
+space::space(const space &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_space_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+space::space(__isl_take isl_space *ptr)
+    : ptr(ptr) {}
+
+space &space::operator=(space obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+space::~space() {
+  if (ptr)
+    isl_space_free(ptr);
+}
+
+__isl_give isl_space *space::copy() const & {
+  return isl_space_copy(ptr);
+}
+
+__isl_keep isl_space *space::get() const {
+  return ptr;
+}
+
+__isl_give isl_space *space::release() {
+  isl_space *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool space::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx space::ctx() const {
+  return isl::ctx(isl_space_get_ctx(ptr));
+}
+
+isl::space space::add_named_tuple(isl::id tuple_id, unsigned int dim) const
+{
+  if (!ptr || tuple_id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_add_named_tuple_id_ui(copy(), tuple_id.release(), dim);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::add_named_tuple(const std::string &tuple_id, unsigned int dim) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add_named_tuple(isl::id(ctx(), tuple_id), dim);
+}
+
+isl::space space::add_unnamed_tuple(unsigned int dim) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_add_unnamed_tuple_ui(copy(), dim);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::flatten_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_flatten_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::flatten_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_flatten_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool space::is_equal(const isl::space &space2) const
+{
+  if (!ptr || space2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_is_equal(get(), space2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool space::is_wrapping() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_is_wrapping(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::space space::map_from_set() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_map_from_set(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::unit(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_unit(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::unwrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_unwrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space space::wrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_space_wrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const space &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_space_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_space_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_access_info
+union_access_info manage(__isl_take isl_union_access_info *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_access_info(ptr);
+}
+union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_access_info_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_access_info_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_access_info(ptr);
+}
+
+union_access_info::union_access_info()
+    : ptr(nullptr) {}
+
+union_access_info::union_access_info(const union_access_info &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_access_info_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
+    : ptr(ptr) {}
+
+union_access_info::union_access_info(isl::union_map sink)
+{
+  if (sink.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = sink.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_from_sink(sink.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_access_info &union_access_info::operator=(union_access_info obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_access_info::~union_access_info() {
+  if (ptr)
+    isl_union_access_info_free(ptr);
+}
+
+__isl_give isl_union_access_info *union_access_info::copy() const & {
+  return isl_union_access_info_copy(ptr);
+}
+
+__isl_keep isl_union_access_info *union_access_info::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_access_info *union_access_info::release() {
+  isl_union_access_info *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_access_info::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_access_info::ctx() const {
+  return isl::ctx(isl_union_access_info_get_ctx(ptr));
+}
+
+isl::union_flow union_access_info::compute_flow() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_compute_flow(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_access_info union_access_info::set_kill(isl::union_map kill) const
+{
+  if (!ptr || kill.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_set_kill(copy(), kill.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_access_info union_access_info::set_may_source(isl::union_map may_source) const
+{
+  if (!ptr || may_source.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_access_info union_access_info::set_must_source(isl::union_map must_source) const
+{
+  if (!ptr || must_source.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_access_info union_access_info::set_schedule(isl::schedule schedule) const
+{
+  if (!ptr || schedule.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_access_info union_access_info::set_schedule_map(isl::union_map schedule_map) const
+{
+  if (!ptr || schedule_map.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_access_info &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_access_info_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_access_info_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_flow
+union_flow manage(__isl_take isl_union_flow *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_flow(ptr);
+}
+union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_flow_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_flow_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_flow(ptr);
+}
+
+union_flow::union_flow()
+    : ptr(nullptr) {}
+
+union_flow::union_flow(const union_flow &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_flow_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_flow::union_flow(__isl_take isl_union_flow *ptr)
+    : ptr(ptr) {}
+
+union_flow &union_flow::operator=(union_flow obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_flow::~union_flow() {
+  if (ptr)
+    isl_union_flow_free(ptr);
+}
+
+__isl_give isl_union_flow *union_flow::copy() const & {
+  return isl_union_flow_copy(ptr);
+}
+
+__isl_keep isl_union_flow *union_flow::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_flow *union_flow::release() {
+  isl_union_flow *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_flow::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_flow::ctx() const {
+  return isl::ctx(isl_union_flow_get_ctx(ptr));
+}
+
+isl::union_map union_flow::full_may_dependence() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_full_may_dependence(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_full_may_dependence() const
+{
+  return full_may_dependence();
+}
+
+isl::union_map union_flow::full_must_dependence() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_full_must_dependence(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_full_must_dependence() const
+{
+  return full_must_dependence();
+}
+
+isl::union_map union_flow::may_dependence() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_may_dependence(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_may_dependence() const
+{
+  return may_dependence();
+}
+
+isl::union_map union_flow::may_no_source() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_may_no_source(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_may_no_source() const
+{
+  return may_no_source();
+}
+
+isl::union_map union_flow::must_dependence() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_must_dependence(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_must_dependence() const
+{
+  return must_dependence();
+}
+
+isl::union_map union_flow::must_no_source() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_flow_get_must_no_source(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_flow::get_must_no_source() const
+{
+  return must_no_source();
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_flow &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_flow_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_flow_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_map
+union_map manage(__isl_take isl_union_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_map(ptr);
+}
+union_map manage_copy(__isl_keep isl_union_map *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_map_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_map_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_map(ptr);
+}
+
+union_map::union_map()
+    : ptr(nullptr) {}
+
+union_map::union_map(const union_map &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_map_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_map::union_map(__isl_take isl_union_map *ptr)
+    : ptr(ptr) {}
+
+union_map::union_map(isl::basic_map bmap)
+{
+  if (bmap.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = bmap.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_basic_map(bmap.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_map::union_map(isl::map map)
+{
+  if (map.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = map.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_map(map.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_map::union_map(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_map &union_map::operator=(union_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_map::~union_map() {
+  if (ptr)
+    isl_union_map_free(ptr);
+}
+
+__isl_give isl_union_map *union_map::copy() const & {
+  return isl_union_map_copy(ptr);
+}
+
+__isl_keep isl_union_map *union_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_map *union_map::release() {
+  isl_union_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_map::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_map::ctx() const {
+  return isl::ctx(isl_union_map_get_ctx(ptr));
+}
+
+isl::union_map union_map::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::apply_domain(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_apply_domain(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::apply_range(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_apply_range(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_map::bind_range(isl::multi_id tuple) const
+{
+  if (!ptr || tuple.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_bind_range(copy(), tuple.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::compute_divs() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_compute_divs(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::curry() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_curry(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_map::deltas() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_deltas(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_map::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::domain_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::domain_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::domain_map() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain_map(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::domain_product(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_domain_product(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::empty(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_empty_ctx(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::eq_at(isl::multi_union_pw_aff mupa) const
+{
+  if (!ptr || mupa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool union_map::every_map(const std::function<bool(isl::map)> &test) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct test_data {
+    std::function<bool(isl::map)> func;
+    std::exception_ptr eptr;
+  } test_data = { test };
+  auto test_lambda = [](isl_map *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    ISL_CPP_TRY {
+      auto ret = (data->func)(manage_copy(arg_0));
+      return ret ? isl_bool_true : isl_bool_false;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_bool_error;
+    }
+  };
+  auto res = isl_union_map_every_map(get(), test_lambda, &test_data);
+  if (test_data.eptr)
+    std::rethrow_exception(test_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::map union_map::extract_map(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_extract_map(get(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::fixed_power(isl::val exp) const
+{
+  if (!ptr || exp.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_fixed_power_val(copy(), exp.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::fixed_power(long exp) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->fixed_power(isl::val(ctx(), exp));
+}
+
+void union_map::foreach_map(const std::function<void(isl::map)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::map)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::union_map union_map::from(isl::multi_union_pw_aff mupa)
+{
+  if (mupa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = mupa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::from(isl::union_pw_multi_aff upma)
+{
+  if (upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = upma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::from_domain(isl::union_set uset)
+{
+  if (uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = uset.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_domain(uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::from_domain_and_range(isl::union_set domain, isl::union_set range)
+{
+  if (domain.is_null() || range.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = domain.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::from_range(isl::union_set uset)
+{
+  if (uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = uset.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_from_range(uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_map::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_map::get_space() const
+{
+  return space();
+}
+
+isl::union_map union_map::gist(isl::union_map context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::gist_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_gist_domain(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::gist_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_gist_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::gist_range(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_gist_range(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect_domain(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect_domain_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect_domain_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect_range(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect_range_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::intersect_range(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_intersect_range_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool union_map::is_bijective() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_bijective(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_disjoint(const isl::union_map &umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_disjoint(get(), umap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_equal(const isl::union_map &umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_equal(get(), umap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_injective() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_injective(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_single_valued() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_single_valued(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_strict_subset(const isl::union_map &umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_strict_subset(get(), umap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::is_subset(const isl::union_map &umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_is_subset(get(), umap2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_map::isa_map() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_isa_map(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::union_map union_map::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::polyhedral_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_polyhedral_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_domain(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_domain(isl::multi_pw_aff mpa) const
+{
+  if (!ptr || mpa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_domain(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_domain(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_range(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_range(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::preimage_range(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::product(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_product(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::project_out_all_params() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_project_out_all_params(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_map::range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::range_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::range_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::range_map() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range_map(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::range_product(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range_product(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::range_reverse() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_range_reverse(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::reverse() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_reverse(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::subtract(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_subtract(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::subtract_domain(isl::union_set dom) const
+{
+  if (!ptr || dom.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_subtract_domain(copy(), dom.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::subtract_range(isl::union_set dom) const
+{
+  if (!ptr || dom.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_subtract_range(copy(), dom.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::uncurry() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_uncurry(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::unite(isl::union_map umap2) const
+{
+  if (!ptr || umap2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_union(copy(), umap2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::universe() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_universe(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_map::wrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_wrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_map::zip() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_map_zip(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_map &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_map_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_map_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_aff
+union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_pw_aff(ptr);
+}
+union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_pw_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_pw_aff(ptr);
+}
+
+union_pw_aff::union_pw_aff()
+    : ptr(nullptr) {}
+
+union_pw_aff::union_pw_aff(const union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_aff::union_pw_aff(isl::aff aff)
+{
+  if (aff.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = aff.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_from_aff(aff.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_aff::union_pw_aff(isl::pw_aff pa)
+{
+  if (pa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_from_pw_aff(pa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_aff::union_pw_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff::~union_pw_aff() {
+  if (ptr)
+    isl_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
+  return isl_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff *union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::release() {
+  isl_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_pw_aff::ctx() const {
+  return isl::ctx(isl_union_pw_aff_get_ctx(ptr));
+}
+
+isl::union_pw_aff union_pw_aff::add(isl::union_pw_aff upa2) const
+{
+  if (!ptr || upa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_add(copy(), upa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_pw_aff::bind(isl::id id) const
+{
+  if (!ptr || id.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_bind_id(copy(), id.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_pw_aff::bind(const std::string &id) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->bind(isl::id(ctx(), id));
+}
+
+isl::union_pw_aff union_pw_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_pw_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_pw_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_pw_aff::get_space() const
+{
+  return space();
+}
+
+isl::union_pw_aff union_pw_aff::gist(isl::union_set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::intersect_domain(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_intersect_domain_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::intersect_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_intersect_domain_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::intersect_domain_wrapped_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_intersect_domain_wrapped_domain(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::intersect_domain_wrapped_range(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_intersect_domain_wrapped_range(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::pullback(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::sub(isl::union_pw_aff upa2) const
+{
+  if (!ptr || upa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_sub(copy(), upa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::subtract_domain(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_subtract_domain_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::subtract_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_subtract_domain_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff::union_add(isl::union_pw_aff upa2) const
+{
+  if (!ptr || upa2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_pw_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_aff_list
+union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_pw_aff_list(ptr);
+}
+union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_pw_aff_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_pw_aff_list(ptr);
+}
+
+union_pw_aff_list::union_pw_aff_list()
+    : ptr(nullptr) {}
+
+union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+union_pw_aff_list::union_pw_aff_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_aff_list::union_pw_aff_list(isl::union_pw_aff el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff_list::~union_pw_aff_list() {
+  if (ptr)
+    isl_union_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
+  return isl_union_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
+  isl_union_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_pw_aff_list::ctx() const {
+  return isl::ctx(isl_union_pw_aff_list_get_ctx(ptr));
+}
+
+isl::union_pw_aff_list union_pw_aff_list::add(isl::union_pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff_list union_pw_aff_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff_list union_pw_aff_list::concat(isl::union_pw_aff_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void union_pw_aff_list::foreach(const std::function<void(isl::union_pw_aff)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::union_pw_aff)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::union_pw_aff union_pw_aff_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_aff union_pw_aff_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, isl::union_pw_aff el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned union_pw_aff_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_aff_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_aff_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_aff_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_pw_aff_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_pw_multi_aff
+union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_pw_multi_aff(ptr);
+}
+union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_multi_aff_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_pw_multi_aff_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_pw_multi_aff(ptr);
+}
+
+union_pw_multi_aff::union_pw_multi_aff()
+    : ptr(nullptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_multi_aff_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::multi_aff ma)
+{
+  if (ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_from_multi_aff(ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::pw_multi_aff pma)
+{
+  if (pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pma.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::union_pw_aff upa)
+{
+  if (upa.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = upa.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_multi_aff::union_pw_multi_aff(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_multi_aff::~union_pw_multi_aff() {
+  if (ptr)
+    isl_union_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
+  return isl_union_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
+  isl_union_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_pw_multi_aff::ctx() const {
+  return isl::ctx(isl_union_pw_multi_aff_get_ctx(ptr));
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::add(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::apply(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_apply_union_pw_multi_aff(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff union_pw_multi_aff::as_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_as_pw_multi_aff(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_pw_multi_aff::domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::empty(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_empty_ctx(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::flat_range_product(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_pw_multi_aff::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_pw_multi_aff::get_space() const
+{
+  return space();
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::gist(isl::union_set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_intersect_domain_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_intersect_domain_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_domain(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_range(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_range(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool union_pw_multi_aff::involves_locals() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_involves_locals(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_pw_multi_aff::isa_pw_multi_aff() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_isa_pw_multi_aff(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_pw_multi_aff::plain_is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_plain_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::pullback(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::range_factor_domain() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_range_factor_domain(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::range_factor_range() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_range_factor_range(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::range_product(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_range_product(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::sub(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_subtract_domain_space(copy(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::union_set uset) const
+{
+  if (!ptr || uset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_subtract_domain_union_set(copy(), uset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_pw_multi_aff union_pw_multi_aff::union_add(isl::union_pw_multi_aff upma2) const
+{
+  if (!ptr || upma2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_pw_multi_aff &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_pw_multi_aff_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_pw_multi_aff_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_set
+union_set manage(__isl_take isl_union_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_set(ptr);
+}
+union_set manage_copy(__isl_keep isl_union_set *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_set_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_set(ptr);
+}
+
+union_set::union_set()
+    : ptr(nullptr) {}
+
+union_set::union_set(const union_set &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_set::union_set(__isl_take isl_union_set *ptr)
+    : ptr(ptr) {}
+
+union_set::union_set(isl::basic_set bset)
+{
+  if (bset.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = bset.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_from_basic_set(bset.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set::union_set(isl::point pnt)
+{
+  if (pnt.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = pnt.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_from_point(pnt.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set::union_set(isl::set set)
+{
+  if (set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = set.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_from_set(set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set::union_set(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set &union_set::operator=(union_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set::~union_set() {
+  if (ptr)
+    isl_union_set_free(ptr);
+}
+
+__isl_give isl_union_set *union_set::copy() const & {
+  return isl_union_set_copy(ptr);
+}
+
+__isl_keep isl_union_set *union_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set *union_set::release() {
+  isl_union_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_set::ctx() const {
+  return isl::ctx(isl_union_set_get_ctx(ptr));
+}
+
+isl::union_set union_set::affine_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_affine_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::apply(isl::union_map umap) const
+{
+  if (!ptr || umap.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_apply(copy(), umap.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::coalesce() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_coalesce(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::compute_divs() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_compute_divs(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::detect_equalities() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_detect_equalities(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::empty(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_empty_ctx(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool union_set::every_set(const std::function<bool(isl::set)> &test) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct test_data {
+    std::function<bool(isl::set)> func;
+    std::exception_ptr eptr;
+  } test_data = { test };
+  auto test_lambda = [](isl_set *arg_0, void *arg_1) -> isl_bool {
+    auto *data = static_cast<struct test_data *>(arg_1);
+    ISL_CPP_TRY {
+      auto ret = (data->func)(manage_copy(arg_0));
+      return ret ? isl_bool_true : isl_bool_false;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_bool_error;
+    }
+  };
+  auto res = isl_union_set_every_set(get(), test_lambda, &test_data);
+  if (test_data.eptr)
+    std::rethrow_exception(test_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::set union_set::extract_set(isl::space space) const
+{
+  if (!ptr || space.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_extract_set(get(), space.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void union_set::foreach_point(const std::function<void(isl::point)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::point)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+void union_set::foreach_set(const std::function<void(isl::set)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::set)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::space union_set::space() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_get_space(get());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::space union_set::get_space() const
+{
+  return space();
+}
+
+isl::union_set union_set::gist(isl::union_set context) const
+{
+  if (!ptr || context.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_gist(copy(), context.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::gist_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_gist_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_set::identity() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_identity(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::intersect(isl::union_set uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_intersect(copy(), uset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::intersect_params(isl::set set) const
+{
+  if (!ptr || set.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_intersect_params(copy(), set.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool union_set::is_disjoint(const isl::union_set &uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_is_disjoint(get(), uset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_set::is_empty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_is_empty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_set::is_equal(const isl::union_set &uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_is_equal(get(), uset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_set::is_strict_subset(const isl::union_set &uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_is_strict_subset(get(), uset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_set::is_subset(const isl::union_set &uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_is_subset(get(), uset2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool union_set::isa_set() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_isa_set(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+isl::union_set union_set::lexmax() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_lexmax(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::lexmin() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_lexmin(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::polyhedral_hull() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_polyhedral_hull(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::preimage(isl::multi_aff ma) const
+{
+  if (!ptr || ma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::preimage(isl::pw_multi_aff pma) const
+{
+  if (!ptr || pma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::preimage(isl::union_pw_multi_aff upma) const
+{
+  if (!ptr || upma.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::point union_set::sample_point() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_sample_point(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::subtract(isl::union_set uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_subtract(copy(), uset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::unite(isl::union_set uset2) const
+{
+  if (!ptr || uset2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_union(copy(), uset2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set::universe() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_universe(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_map union_set::unwrap() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_unwrap(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_set &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_set_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::union_set_list
+union_set_list manage(__isl_take isl_union_set_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return union_set_list(ptr);
+}
+union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_union_set_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return union_set_list(ptr);
+}
+
+union_set_list::union_set_list()
+    : ptr(nullptr) {}
+
+union_set_list::union_set_list(const union_set_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
+    : ptr(ptr) {}
+
+union_set_list::union_set_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set_list::union_set_list(isl::union_set el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_from_union_set(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+union_set_list &union_set_list::operator=(union_set_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set_list::~union_set_list() {
+  if (ptr)
+    isl_union_set_list_free(ptr);
+}
+
+__isl_give isl_union_set_list *union_set_list::copy() const & {
+  return isl_union_set_list_copy(ptr);
+}
+
+__isl_keep isl_union_set_list *union_set_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set_list *union_set_list::release() {
+  isl_union_set_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx union_set_list::ctx() const {
+  return isl::ctx(isl_union_set_list_get_ctx(ptr));
+}
+
+isl::union_set_list union_set_list::add(isl::union_set el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set_list union_set_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set_list union_set_list::concat(isl::union_set_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void union_set_list::foreach(const std::function<void(isl::union_set)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::union_set)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::union_set union_set_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::union_set union_set_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::union_set_list union_set_list::insert(unsigned int pos, isl::union_set el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+unsigned union_set_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_union_set_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const union_set_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_union_set_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_union_set_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::val
+val manage(__isl_take isl_val *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return val(ptr);
+}
+val manage_copy(__isl_keep isl_val *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_val_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return val(ptr);
+}
+
+val::val()
+    : ptr(nullptr) {}
+
+val::val(const val &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+val::val(__isl_take isl_val *ptr)
+    : ptr(ptr) {}
+
+val::val(isl::ctx ctx, long i)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_int_from_si(ctx.release(), i);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+val::val(isl::ctx ctx, const std::string &str)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_read_from_str(ctx.release(), str.c_str());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+val &val::operator=(val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val::~val() {
+  if (ptr)
+    isl_val_free(ptr);
+}
+
+__isl_give isl_val *val::copy() const & {
+  return isl_val_copy(ptr);
+}
+
+__isl_keep isl_val *val::get() const {
+  return ptr;
+}
+
+__isl_give isl_val *val::release() {
+  isl_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx val::ctx() const {
+  return isl::ctx(isl_val_get_ctx(ptr));
+}
+
+isl::val val::abs() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_abs(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool val::abs_eq(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_abs_eq(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::abs_eq(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->abs_eq(isl::val(ctx(), v2));
+}
+
+isl::val val::add(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_add(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::add(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add(isl::val(ctx(), v2));
+}
+
+isl::val val::ceil() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_ceil(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+int val::cmp_si(long i) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_cmp_si(get(), i);
+  return res;
+}
+
+isl::val val::div(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_div(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::div(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->div(isl::val(ctx(), v2));
+}
+
+bool val::eq(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_eq(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::eq(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->eq(isl::val(ctx(), v2));
+}
+
+isl::val val::floor() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_floor(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::gcd(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_gcd(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::gcd(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->gcd(isl::val(ctx(), v2));
+}
+
+bool val::ge(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_ge(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::ge(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->ge(isl::val(ctx(), v2));
+}
+
+long val::den_si() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_get_den_si(get());
+  return res;
+}
+
+long val::get_den_si() const
+{
+  return den_si();
+}
+
+long val::num_si() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_get_num_si(get());
+  return res;
+}
+
+long val::get_num_si() const
+{
+  return num_si();
+}
+
+bool val::gt(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_gt(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::gt(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->gt(isl::val(ctx(), v2));
+}
+
+isl::val val::infty(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_infty(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::inv() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_inv(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool val::is_divisible_by(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_divisible_by(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_divisible_by(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->is_divisible_by(isl::val(ctx(), v2));
+}
+
+bool val::is_infty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_infty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_int() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_int(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_nan() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_nan(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_neg(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_neginfty() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_neginfty(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_negone() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_negone(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_nonneg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_nonneg(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_nonpos() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_nonpos(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_one() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_one(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_pos() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_pos(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_rat() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_rat(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::is_zero() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_is_zero(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::le(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_le(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::le(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->le(isl::val(ctx(), v2));
+}
+
+bool val::lt(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_lt(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::lt(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->lt(isl::val(ctx(), v2));
+}
+
+isl::val val::max(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_max(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::max(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->max(isl::val(ctx(), v2));
+}
+
+isl::val val::min(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_min(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::min(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->min(isl::val(ctx(), v2));
+}
+
+isl::val val::mod(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_mod(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::mod(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->mod(isl::val(ctx(), v2));
+}
+
+isl::val val::mul(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_mul(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::mul(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->mul(isl::val(ctx(), v2));
+}
+
+isl::val val::nan(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_nan(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+bool val::ne(const isl::val &v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_ne(get(), v2.get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+bool val::ne(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->ne(isl::val(ctx(), v2));
+}
+
+isl::val val::neg() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_neg(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::neginfty(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_neginfty(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::negone(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_negone(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::one(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_one(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::pow2() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_pow2(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+int val::sgn() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_sgn(get());
+  return res;
+}
+
+isl::val val::sub(isl::val v2) const
+{
+  if (!ptr || v2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_sub(copy(), v2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::sub(long v2) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->sub(isl::val(ctx(), v2));
+}
+
+isl::val val::trunc() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_trunc(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val::zero(isl::ctx ctx)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_zero(ctx.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+inline std::ostream &operator<<(std::ostream &os, const val &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_val_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+
+// implementations for isl::val_list
+val_list manage(__isl_take isl_val_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return val_list(ptr);
+}
+val_list manage_copy(__isl_keep isl_val_list *ptr) {
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_list_get_ctx(ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = isl_val_list_copy(ptr);
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+  return val_list(ptr);
+}
+
+val_list::val_list()
+    : ptr(nullptr) {}
+
+val_list::val_list(const val_list &obj)
+    : ptr(nullptr)
+{
+  if (!obj.ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_list_get_ctx(obj.ptr);
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  ptr = obj.copy();
+  if (!ptr)
+    exception::throw_last_error(saved_ctx);
+}
+
+val_list::val_list(__isl_take isl_val_list *ptr)
+    : ptr(ptr) {}
+
+val_list::val_list(isl::ctx ctx, int n)
+{
+  auto saved_ctx = ctx;
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_alloc(ctx.release(), n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+val_list::val_list(isl::val el)
+{
+  if (el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = el.ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_from_val(el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  ptr = res;
+}
+
+val_list &val_list::operator=(val_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val_list::~val_list() {
+  if (ptr)
+    isl_val_list_free(ptr);
+}
+
+__isl_give isl_val_list *val_list::copy() const & {
+  return isl_val_list_copy(ptr);
+}
+
+__isl_keep isl_val_list *val_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_val_list *val_list::release() {
+  isl_val_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val_list::is_null() const {
+  return ptr == nullptr;
+}
+
+isl::ctx val_list::ctx() const {
+  return isl::ctx(isl_val_list_get_ctx(ptr));
+}
+
+isl::val_list val_list::add(isl::val el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_add(copy(), el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val_list val_list::add(long el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->add(isl::val(ctx(), el));
+}
+
+isl::val_list val_list::clear() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_clear(copy());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val_list val_list::concat(isl::val_list list2) const
+{
+  if (!ptr || list2.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_concat(copy(), list2.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val_list val_list::drop(unsigned int first, unsigned int n) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_drop(copy(), first, n);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+void val_list::foreach(const std::function<void(isl::val)> &fn) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  struct fn_data {
+    std::function<void(isl::val)> func;
+    std::exception_ptr eptr;
+  } fn_data = { fn };
+  auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    ISL_CPP_TRY {
+      (data->func)(manage(arg_0));
+      return isl_stat_ok;
+    } ISL_CPP_CATCH_ALL {
+      data->eptr = std::current_exception();
+      return isl_stat_error;
+    }
+  };
+  auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
+  if (fn_data.eptr)
+    std::rethrow_exception(fn_data.eptr);
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return;
+}
+
+isl::val val_list::at(int index) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_get_at(get(), index);
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val val_list::get_at(int index) const
+{
+  return at(index);
+}
+
+isl::val_list val_list::insert(unsigned int pos, isl::val el) const
+{
+  if (!ptr || el.is_null())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_insert(copy(), pos, el.release());
+  if (!res)
+    exception::throw_last_error(saved_ctx);
+  return manage(res);
+}
+
+isl::val_list val_list::insert(unsigned int pos, long el) const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  return this->insert(pos, isl::val(ctx(), el));
+}
+
+unsigned val_list::size() const
+{
+  if (!ptr)
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = ctx();
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  auto res = isl_val_list_size(get());
+  if (res < 0)
+    exception::throw_last_error(saved_ctx);
+  return res;
+}
+
+inline std::ostream &operator<<(std::ostream &os, const val_list &obj)
+{
+  if (!obj.get())
+    exception::throw_invalid("NULL input", __FILE__, __LINE__);
+  auto saved_ctx = isl_val_list_get_ctx(obj.get());
+  options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
+  char *str = isl_val_list_to_str(obj.get());
+  if (!str)
+    exception::throw_last_error(saved_ctx);
+  os << str;
+  free(str);
+  return os;
+}
+} // namespace isl
+
+#endif /* ISL_CPP */
diff --git a/linux-x64/clang/include/polly/isl/ctx.h b/linux-x64/clang/include/polly/isl/ctx.h
new file mode 100644
index 0000000..ecd9272
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/ctx.h
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_CTX_H
+#define ISL_CTX_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <isl/arg.h>
+
+#ifndef __isl_give
+#define __isl_give
+#endif
+#ifndef __isl_take
+#define __isl_take
+#endif
+#ifndef __isl_keep
+#define __isl_keep
+#endif
+#ifndef __isl_null
+#define __isl_null
+#endif
+#ifndef __isl_export
+#define __isl_export
+#endif
+#ifndef __isl_overload
+#define __isl_overload
+#endif
+#ifndef __isl_constructor
+#define __isl_constructor
+#endif
+#ifndef __isl_subclass
+#define __isl_subclass(super)
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* Nearly all isa functions require a struct isl_ctx allocated using
+ * isl_ctx_alloc.  This ctx contains (or will contain) options that
+ * control the behavior of the library and some caches.
+ *
+ * An object allocated within a given ctx should never be used inside
+ * another ctx.  Functions for moving objects from one ctx to another
+ * will be added as the need arises.
+ *
+ * A given context should only be used inside a single thread.
+ * A global context for synchronization between different threads
+ * as well as functions for moving a context to a different thread
+ * will be added as the need arises.
+ *
+ * If anything goes wrong (out of memory, failed assertion), then
+ * the library will currently simply abort.  This will be made
+ * configurable in the future.
+ * Users of the library should expect functions that return
+ * a pointer to a structure, to return NULL, indicating failure.
+ * Any function accepting a pointer to a structure will treat
+ * a NULL argument as a failure, resulting in the function freeing
+ * the remaining structures (if any) and returning NULL itself
+ * (in case of pointer return type).
+ * The only exception is the isl_ctx argument, which should never be NULL.
+ */
+struct isl_stats {
+	long	gbr_solved_lps;
+};
+enum isl_error {
+	isl_error_none = 0,
+	isl_error_abort,
+	isl_error_alloc,
+	isl_error_unknown,
+	isl_error_internal,
+	isl_error_invalid,
+	isl_error_quota,
+	isl_error_unsupported
+};
+typedef enum {
+	isl_stat_error = -1,
+	isl_stat_ok = 0
+} isl_stat;
+isl_stat isl_stat_non_null(void *obj);
+typedef enum {
+	isl_bool_error = -1,
+	isl_bool_false = 0,
+	isl_bool_true = 1
+} isl_bool;
+isl_bool isl_bool_not(isl_bool b);
+isl_bool isl_bool_ok(int b);
+typedef int	isl_size;
+#define isl_size_error	((int) -1)
+struct isl_ctx;
+typedef struct isl_ctx isl_ctx;
+
+/* Some helper macros */
+
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#define ISL_DEPRECATED	__attribute__((__deprecated__))
+#else
+#define ISL_DEPRECATED
+#endif
+
+#define ISL_FL_INIT(l, f)   (l) = (f)               /* Specific flags location. */
+#define ISL_FL_SET(l, f)    ((l) |= (f))
+#define ISL_FL_CLR(l, f)    ((l) &= ~(f))
+#define ISL_FL_ISSET(l, f)  (!!((l) & (f)))
+
+#define ISL_F_INIT(p, f)    ISL_FL_INIT((p)->flags, f)  /* Structure element flags. */
+#define ISL_F_SET(p, f)     ISL_FL_SET((p)->flags, f)
+#define ISL_F_CLR(p, f)     ISL_FL_CLR((p)->flags, f)
+#define ISL_F_ISSET(p, f)   ISL_FL_ISSET((p)->flags, f)
+
+void *isl_malloc_or_die(isl_ctx *ctx, size_t size);
+void *isl_calloc_or_die(isl_ctx *ctx, size_t nmemb, size_t size);
+void *isl_realloc_or_die(isl_ctx *ctx, void *ptr, size_t size);
+
+#define isl_alloc(ctx,type,size)	((type *)isl_malloc_or_die(ctx, size))
+#define isl_calloc(ctx,type,size)	((type *)isl_calloc_or_die(ctx,\
+								    1, size))
+#define isl_realloc(ctx,ptr,type,size)	((type *)isl_realloc_or_die(ctx,\
+								    ptr, size))
+#define isl_alloc_type(ctx,type)	isl_alloc(ctx,type,sizeof(type))
+#define isl_calloc_type(ctx,type)	isl_calloc(ctx,type,sizeof(type))
+#define isl_realloc_type(ctx,ptr,type)	isl_realloc(ctx,ptr,type,sizeof(type))
+#define isl_alloc_array(ctx,type,n)	isl_alloc(ctx,type,(n)*sizeof(type))
+#define isl_calloc_array(ctx,type,n)	((type *)isl_calloc_or_die(ctx,\
+							    n, sizeof(type)))
+#define isl_realloc_array(ctx,ptr,type,n) \
+				    isl_realloc(ctx,ptr,type,(n)*sizeof(type))
+
+#define isl_die(ctx,errno,msg,code)					\
+	do {								\
+		isl_handle_error(ctx, errno, msg, __FILE__, __LINE__);	\
+		code;							\
+	} while (0)
+
+void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
+	const char *file, int line);
+
+#define isl_assert4(ctx,test,code,errno)				\
+	do {								\
+		if (test)						\
+			break;						\
+		isl_die(ctx, errno, "Assertion \"" #test "\" failed", code);	\
+	} while (0)
+#define isl_assert(ctx,test,code)					\
+	isl_assert4(ctx,test,code,isl_error_unknown)
+
+#define isl_min(a,b)			((a < b) ? (a) : (b))
+
+/* struct isl_ctx functions */
+
+struct isl_options *isl_ctx_options(isl_ctx *ctx);
+
+isl_ctx *isl_ctx_alloc_with_options(struct isl_args *args,
+	__isl_take void *opt);
+isl_ctx *isl_ctx_alloc(void);
+void *isl_ctx_peek_options(isl_ctx *ctx, struct isl_args *args);
+int isl_ctx_parse_options(isl_ctx *ctx, int argc, char **argv, unsigned flags);
+void isl_ctx_ref(struct isl_ctx *ctx);
+void isl_ctx_deref(struct isl_ctx *ctx);
+void isl_ctx_free(isl_ctx *ctx);
+
+void isl_ctx_abort(isl_ctx *ctx);
+void isl_ctx_resume(isl_ctx *ctx);
+int isl_ctx_aborted(isl_ctx *ctx);
+
+void isl_ctx_set_max_operations(isl_ctx *ctx, unsigned long max_operations);
+unsigned long isl_ctx_get_max_operations(isl_ctx *ctx);
+void isl_ctx_reset_operations(isl_ctx *ctx);
+
+#define ISL_ARG_CTX_DECL(prefix,st,args)				\
+st *isl_ctx_peek_ ## prefix(isl_ctx *ctx);
+
+#define ISL_ARG_CTX_DEF(prefix,st,args)					\
+st *isl_ctx_peek_ ## prefix(isl_ctx *ctx)				\
+{									\
+	return (st *)isl_ctx_peek_options(ctx, &(args));		\
+}
+
+#define ISL_CTX_GET_INT_DEF(prefix,st,args,field)			\
+int prefix ## _get_ ## field(isl_ctx *ctx)				\
+{									\
+	st *options;							\
+	options = isl_ctx_peek_ ## prefix(ctx);				\
+	if (!options)							\
+		isl_die(ctx, isl_error_invalid,				\
+			"isl_ctx does not reference " #prefix,		\
+			return -1);					\
+	return options->field;						\
+}
+
+#define ISL_CTX_SET_INT_DEF(prefix,st,args,field)			\
+isl_stat prefix ## _set_ ## field(isl_ctx *ctx, int val)		\
+{									\
+	st *options;							\
+	options = isl_ctx_peek_ ## prefix(ctx);				\
+	if (!options)							\
+		isl_die(ctx, isl_error_invalid,				\
+			"isl_ctx does not reference " #prefix,		\
+			return isl_stat_error);				\
+	options->field = val;						\
+	return isl_stat_ok;						\
+}
+
+#define ISL_CTX_GET_STR_DEF(prefix,st,args,field)			\
+const char *prefix ## _get_ ## field(isl_ctx *ctx)			\
+{									\
+	st *options;							\
+	options = isl_ctx_peek_ ## prefix(ctx);				\
+	if (!options)							\
+		isl_die(ctx, isl_error_invalid,				\
+			"isl_ctx does not reference " #prefix,		\
+			return NULL);					\
+	return options->field;						\
+}
+
+#define ISL_CTX_SET_STR_DEF(prefix,st,args,field)			\
+isl_stat prefix ## _set_ ## field(isl_ctx *ctx, const char *val)	\
+{									\
+	st *options;							\
+	options = isl_ctx_peek_ ## prefix(ctx);				\
+	if (!options)							\
+		isl_die(ctx, isl_error_invalid,				\
+			"isl_ctx does not reference " #prefix,		\
+			return isl_stat_error);				\
+	if (!val)							\
+		return isl_stat_error;					\
+	free(options->field);						\
+	options->field = strdup(val);					\
+	if (!options->field)						\
+		return isl_stat_error;					\
+	return isl_stat_ok;						\
+}
+
+#define ISL_CTX_GET_BOOL_DEF(prefix,st,args,field)			\
+	ISL_CTX_GET_INT_DEF(prefix,st,args,field)
+
+#define ISL_CTX_SET_BOOL_DEF(prefix,st,args,field)			\
+	ISL_CTX_SET_INT_DEF(prefix,st,args,field)
+
+#define ISL_CTX_GET_CHOICE_DEF(prefix,st,args,field)			\
+	ISL_CTX_GET_INT_DEF(prefix,st,args,field)
+
+#define ISL_CTX_SET_CHOICE_DEF(prefix,st,args,field)			\
+	ISL_CTX_SET_INT_DEF(prefix,st,args,field)
+
+enum isl_error isl_ctx_last_error(isl_ctx *ctx);
+const char *isl_ctx_last_error_msg(isl_ctx *ctx);
+const char *isl_ctx_last_error_file(isl_ctx *ctx);
+int isl_ctx_last_error_line(isl_ctx *ctx);
+void isl_ctx_reset_error(isl_ctx *ctx);
+void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/fixed_box.h b/linux-x64/clang/include/polly/isl/fixed_box.h
new file mode 100644
index 0000000..d8c78e3
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/fixed_box.h
@@ -0,0 +1,43 @@
+/*
+ * Use of this software is governed by the MIT license
+ */
+
+#ifndef ISL_FIXED_BOX_H
+#define ISL_FIXED_BOX_H
+
+#include <isl/ctx.h>
+#include <isl/val_type.h>
+#include <isl/space_type.h>
+#include <isl/aff_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_fixed_box;
+typedef struct isl_fixed_box isl_fixed_box;
+
+isl_ctx *isl_fixed_box_get_ctx(__isl_keep isl_fixed_box *box);
+__isl_export
+__isl_give isl_space *isl_fixed_box_get_space(__isl_keep isl_fixed_box *box);
+__isl_export
+isl_bool isl_fixed_box_is_valid(__isl_keep isl_fixed_box *box);
+__isl_export
+__isl_give isl_multi_aff *isl_fixed_box_get_offset(
+	__isl_keep isl_fixed_box *box);
+__isl_export
+__isl_give isl_multi_val *isl_fixed_box_get_size(__isl_keep isl_fixed_box *box);
+
+__isl_give isl_fixed_box *isl_fixed_box_copy(__isl_keep isl_fixed_box *box);
+__isl_null isl_fixed_box *isl_fixed_box_free(__isl_take isl_fixed_box *box);
+
+__isl_give isl_printer *isl_printer_print_fixed_box(
+	__isl_take isl_printer *p, __isl_keep isl_fixed_box *box);
+__isl_give char *isl_fixed_box_to_str(__isl_keep isl_fixed_box *box);
+void isl_fixed_box_dump(__isl_keep isl_fixed_box *box);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/flow.h b/linux-x64/clang/include/polly/isl/flow.h
new file mode 100644
index 0000000..be2f6c5
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/flow.h
@@ -0,0 +1,156 @@
+#ifndef ISL_FLOW_H
+#define ISL_FLOW_H
+
+#include <stdio.h>
+
+#include <isl/set_type.h>
+#include <isl/map_type.h>
+#include <isl/union_set_type.h>
+#include <isl/union_map_type.h>
+#include <isl/schedule.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/* Let n (>= 0) be the number of iterators shared by first and second.
+ * If first precedes second textually return 2 * n + 1,
+ * otherwise return 2 * n.
+ */
+typedef int (*isl_access_level_before)(void *first, void *second);
+
+struct isl_restriction;
+typedef struct isl_restriction isl_restriction;
+
+__isl_null isl_restriction *isl_restriction_free(
+	__isl_take isl_restriction *restr);
+__isl_give isl_restriction *isl_restriction_empty(
+	__isl_take isl_map *source_map);
+__isl_give isl_restriction *isl_restriction_none(
+	__isl_take isl_map *source_map);
+__isl_give isl_restriction *isl_restriction_input(
+	__isl_take isl_set *source_restr, __isl_take isl_set *sink_restr);
+__isl_give isl_restriction *isl_restriction_output(
+	__isl_take isl_set *source_restr);
+
+isl_ctx *isl_restriction_get_ctx(__isl_keep isl_restriction *restr);
+
+typedef __isl_give isl_restriction *(*isl_access_restrict)(
+	__isl_keep isl_map *source_map, __isl_keep isl_set *sink,
+	void *source_user, void *user);
+
+struct isl_access_info;
+typedef struct isl_access_info isl_access_info;
+struct isl_flow;
+typedef struct isl_flow isl_flow;
+
+__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink,
+	void *sink_user, isl_access_level_before fn, int max_source);
+__isl_give isl_access_info *isl_access_info_set_restrict(
+	__isl_take isl_access_info *acc, isl_access_restrict fn, void *user);
+__isl_give isl_access_info *isl_access_info_add_source(
+	__isl_take isl_access_info *acc, __isl_take isl_map *source,
+	int must, void *source_user);
+__isl_null isl_access_info *isl_access_info_free(
+	__isl_take isl_access_info *acc);
+
+isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc);
+
+__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc);
+isl_stat isl_flow_foreach(__isl_keep isl_flow *deps,
+	isl_stat (*fn)(__isl_take isl_map *dep, int must, void *dep_user,
+		void *user),
+	void *user);
+__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must);
+__isl_null isl_flow *isl_flow_free(__isl_take isl_flow *deps);
+
+isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps);
+
+struct __isl_export isl_union_access_info;
+typedef struct isl_union_access_info isl_union_access_info;
+struct __isl_export isl_union_flow;
+typedef struct isl_union_flow isl_union_flow;
+
+__isl_constructor
+__isl_give isl_union_access_info *isl_union_access_info_from_sink(
+	__isl_take isl_union_map *sink);
+__isl_export
+__isl_give isl_union_access_info *isl_union_access_info_set_must_source(
+	__isl_take isl_union_access_info *access,
+	__isl_take isl_union_map *must_source);
+__isl_export
+__isl_give isl_union_access_info *isl_union_access_info_set_may_source(
+	__isl_take isl_union_access_info *access,
+	__isl_take isl_union_map *may_source);
+__isl_export
+__isl_give isl_union_access_info *isl_union_access_info_set_kill(
+	__isl_take isl_union_access_info *access,
+	__isl_take isl_union_map *kill);
+__isl_export
+__isl_give isl_union_access_info *isl_union_access_info_set_schedule(
+	__isl_take isl_union_access_info *access,
+	__isl_take isl_schedule *schedule);
+__isl_export
+__isl_give isl_union_access_info *isl_union_access_info_set_schedule_map(
+	__isl_take isl_union_access_info *access,
+	__isl_take isl_union_map *schedule_map);
+__isl_give isl_union_access_info *isl_union_access_info_copy(
+	__isl_keep isl_union_access_info *access);
+__isl_null isl_union_access_info *isl_union_access_info_free(
+	__isl_take isl_union_access_info *access);
+
+isl_ctx *isl_union_access_info_get_ctx(
+	__isl_keep isl_union_access_info *access);
+
+__isl_give isl_union_access_info *isl_union_access_info_read_from_file(
+	isl_ctx *ctx, FILE *input);
+__isl_give isl_printer *isl_printer_print_union_access_info(
+	__isl_take isl_printer *p, __isl_keep isl_union_access_info *access);
+__isl_give char *isl_union_access_info_to_str(
+	__isl_keep isl_union_access_info *access);
+
+__isl_export
+__isl_give isl_union_flow *isl_union_access_info_compute_flow(
+	__isl_take isl_union_access_info *access);
+
+isl_ctx *isl_union_flow_get_ctx(__isl_keep isl_union_flow *flow);
+__isl_give isl_union_flow *isl_union_flow_copy(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_must_dependence(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_may_dependence(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_full_must_dependence(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_full_may_dependence(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_must_no_source(
+	__isl_keep isl_union_flow *flow);
+__isl_export
+__isl_give isl_union_map *isl_union_flow_get_may_no_source(
+	__isl_keep isl_union_flow *flow);
+__isl_null isl_union_flow *isl_union_flow_free(__isl_take isl_union_flow *flow);
+
+__isl_give isl_printer *isl_printer_print_union_flow(
+	__isl_take isl_printer *p, __isl_keep isl_union_flow *flow);
+__isl_give char *isl_union_flow_to_str(__isl_keep isl_union_flow *flow);
+
+int isl_union_map_compute_flow(__isl_take isl_union_map *sink,
+	__isl_take isl_union_map *must_source,
+	__isl_take isl_union_map *may_source,
+	__isl_take isl_union_map *schedule,
+	__isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep,
+	__isl_give isl_union_map **must_no_source,
+	__isl_give isl_union_map **may_no_source);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/hash.h b/linux-x64/clang/include/polly/isl/hash.h
new file mode 100644
index 0000000..7ef3d2e
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/hash.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_HASH_H
+#define ISL_HASH_H
+
+#include <stdlib.h>
+#include <isl/stdint.h>
+#include <isl/ctx.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define isl_hash_init()		(2166136261u)
+#define isl_hash_byte(h,b)	do {					\
+					h *= 16777619;			\
+					h ^= b;				\
+				} while(0)
+#define isl_hash_hash(h,h2)						\
+	do {								\
+		isl_hash_byte(h, (h2) & 0xFF);				\
+		isl_hash_byte(h, ((h2) >> 8) & 0xFF);			\
+		isl_hash_byte(h, ((h2) >> 16) & 0xFF);			\
+		isl_hash_byte(h, ((h2) >> 24) & 0xFF);			\
+	} while(0)
+#define isl_hash_bits(h,bits)						\
+	((bits) == 32) ? (h) :						\
+	((bits) >= 16) ?						\
+	      ((h) >> (bits)) ^ ((h) & (((uint32_t)1 << (bits)) - 1)) :	\
+	      (((h) >> (bits)) ^ (h)) & (((uint32_t)1 << (bits)) - 1)
+
+uint32_t isl_hash_string(uint32_t hash, const char *s);
+uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len);
+
+#define isl_hash_builtin(h,l)	isl_hash_mem(h, &l, sizeof(l))
+
+struct isl_hash_table_entry
+{
+	uint32_t  hash;
+	void     *data;
+};
+
+struct isl_hash_table {
+	int    bits;
+	int    n;
+	struct isl_hash_table_entry *entries;
+};
+
+struct isl_hash_table *isl_hash_table_alloc(struct isl_ctx *ctx, int min_size);
+void isl_hash_table_free(struct isl_ctx *ctx, struct isl_hash_table *table);
+
+int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table,
+			int min_size);
+void isl_hash_table_clear(struct isl_hash_table *table);
+extern struct isl_hash_table_entry *isl_hash_table_entry_none;
+struct isl_hash_table_entry *isl_hash_table_find(struct isl_ctx *ctx,
+			    struct isl_hash_table *table,
+			    uint32_t key_hash,
+			    isl_bool (*eq)(const void *entry, const void *val),
+			    const void *val, int reserve);
+isl_stat isl_hash_table_foreach(isl_ctx *ctx, struct isl_hash_table *table,
+	isl_stat (*fn)(void **entry, void *user), void *user);
+void isl_hash_table_remove(struct isl_ctx *ctx,
+				struct isl_hash_table *table,
+				struct isl_hash_table_entry *entry);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/hmap.h b/linux-x64/clang/include/polly/isl/hmap.h
new file mode 100644
index 0000000..2161221
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/hmap.h
@@ -0,0 +1,55 @@
+#include <isl/ctx.h>
+#include <isl/maybe.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define ISL_xCAT(A,B) A ## B
+#define ISL_CAT(A,B) ISL_xCAT(A,B)
+#define ISL_xFN(TYPE,NAME) TYPE ## _ ## NAME
+#define ISL_FN(TYPE,NAME) ISL_xFN(TYPE,NAME)
+
+struct ISL_HMAP;
+typedef struct ISL_HMAP	ISL_HMAP;
+
+__isl_give ISL_HMAP *ISL_FN(ISL_HMAP,alloc)(isl_ctx *ctx, int min_size);
+__isl_give ISL_HMAP *ISL_FN(ISL_HMAP,copy)(__isl_keep ISL_HMAP *hmap);
+__isl_null ISL_HMAP *ISL_FN(ISL_HMAP,free)(__isl_take ISL_HMAP *hmap);
+
+isl_ctx *ISL_FN(ISL_HMAP,get_ctx)(__isl_keep ISL_HMAP *hmap);
+
+__isl_give ISL_MAYBE(ISL_VAL) ISL_FN(ISL_HMAP,try_get)(
+	__isl_keep ISL_HMAP *hmap, __isl_keep ISL_KEY *key);
+isl_bool ISL_FN(ISL_HMAP,has)(__isl_keep ISL_HMAP *hmap,
+	__isl_keep ISL_KEY *key);
+__isl_give ISL_VAL *ISL_FN(ISL_HMAP,get)(__isl_keep ISL_HMAP *hmap,
+	__isl_take ISL_KEY *key);
+__isl_give ISL_HMAP *ISL_FN(ISL_HMAP,set)(__isl_take ISL_HMAP *hmap,
+	__isl_take ISL_KEY *key, __isl_take ISL_VAL *val);
+__isl_give ISL_HMAP *ISL_FN(ISL_HMAP,drop)(__isl_take ISL_HMAP *hmap,
+	__isl_take ISL_KEY *key);
+
+isl_stat ISL_FN(ISL_HMAP,foreach)(__isl_keep ISL_HMAP *hmap,
+	isl_stat (*fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val,
+		void *user),
+	void *user);
+
+__isl_give isl_printer *ISL_FN(isl_printer_print,ISL_HMAP_SUFFIX)(
+	__isl_take isl_printer *p, __isl_keep ISL_HMAP *hmap);
+void ISL_FN(ISL_HMAP,dump)(__isl_keep ISL_HMAP *hmap);
+
+#undef ISL_xCAT
+#undef ISL_CAT
+#undef ISL_KEY
+#undef ISL_VAL
+#undef ISL_xFN
+#undef ISL_FN
+#undef ISL_xHMAP
+#undef ISL_yHMAP
+#undef ISL_HMAP
+
+#if defined(__cplusplus)
+}
+#endif
diff --git a/linux-x64/clang/include/polly/isl/id.h b/linux-x64/clang/include/polly/isl/id.h
new file mode 100644
index 0000000..956b962
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/id.h
@@ -0,0 +1,53 @@
+#ifndef ISL_ID_H
+#define ISL_ID_H
+
+#include <isl/ctx.h>
+#include <isl/id_type.h>
+#include <isl/list.h>
+#include <isl/multi.h>
+#include <isl/printer_type.h>
+#include <isl/stdint.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+ISL_DECLARE_EXPORTED_LIST_FN(id)
+
+ISL_DECLARE_MULTI(id)
+
+isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id);
+uint32_t isl_id_get_hash(__isl_keep isl_id *id);
+
+__isl_give isl_id *isl_id_alloc(isl_ctx *ctx,
+	__isl_keep const char *name, void *user);
+__isl_give isl_id *isl_id_copy(isl_id *id);
+__isl_null isl_id *isl_id_free(__isl_take isl_id *id);
+
+void *isl_id_get_user(__isl_keep isl_id *id);
+__isl_export
+__isl_keep const char *isl_id_get_name(__isl_keep isl_id *id);
+
+__isl_give isl_id *isl_id_set_free_user(__isl_take isl_id *id,
+	void (*free_user)(void *user));
+
+__isl_constructor
+__isl_give isl_id *isl_id_read_from_str(isl_ctx *ctx, const char *str);
+__isl_give char *isl_id_to_str(__isl_keep isl_id *id);
+__isl_give isl_printer *isl_printer_print_id(__isl_take isl_printer *p,
+	__isl_keep isl_id *id);
+void isl_id_dump(__isl_keep isl_id *id);
+
+__isl_constructor
+__isl_give isl_multi_id *isl_multi_id_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give isl_printer *isl_printer_print_multi_id(__isl_take isl_printer *p,
+	__isl_keep isl_multi_id *mi);
+void isl_multi_id_dump(__isl_keep isl_multi_id *mi);
+__isl_give char *isl_multi_id_to_str(__isl_keep isl_multi_id *mi);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/id_to_ast_expr.h b/linux-x64/clang/include/polly/isl/id_to_ast_expr.h
new file mode 100644
index 0000000..5822241
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/id_to_ast_expr.h
@@ -0,0 +1,18 @@
+#ifndef ISL_ID_TO_AST_EXPR_H
+#define ISL_ID_TO_AST_EXPR_H
+
+#include <isl/id_type.h>
+#include <isl/ast_type.h>
+#include <isl/maybe_ast_expr.h>
+
+#define ISL_KEY		isl_id
+#define ISL_VAL		isl_ast_expr
+#define ISL_HMAP_SUFFIX	id_to_ast_expr
+#define ISL_HMAP	isl_id_to_ast_expr
+#include <isl/hmap.h>
+#undef ISL_KEY
+#undef ISL_VAL
+#undef ISL_HMAP_SUFFIX
+#undef ISL_HMAP
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/id_to_id.h b/linux-x64/clang/include/polly/isl/id_to_id.h
new file mode 100644
index 0000000..3090115
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/id_to_id.h
@@ -0,0 +1,17 @@
+#ifndef ISL_ID_TO_ID_H
+#define ISL_ID_TO_ID_H
+
+#include <isl/id_type.h>
+#include <isl/maybe_id.h>
+
+#define ISL_KEY		isl_id
+#define ISL_VAL		isl_id
+#define ISL_HMAP_SUFFIX	id_to_id
+#define ISL_HMAP	isl_id_to_id
+#include <isl/hmap.h>
+#undef ISL_KEY
+#undef ISL_VAL
+#undef ISL_HMAP_SUFFIX
+#undef ISL_HMAP
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/id_to_pw_aff.h b/linux-x64/clang/include/polly/isl/id_to_pw_aff.h
new file mode 100644
index 0000000..bcbea66
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/id_to_pw_aff.h
@@ -0,0 +1,18 @@
+#ifndef ISL_ID_TO_PW_AFF_H
+#define ISL_ID_TO_PW_AFF_H
+
+#include <isl/id_type.h>
+#include <isl/aff_type.h>
+#include <isl/maybe_pw_aff.h>
+
+#define ISL_KEY		isl_id
+#define ISL_VAL		isl_pw_aff
+#define ISL_HMAP_SUFFIX	id_to_pw_aff
+#define ISL_HMAP	isl_id_to_pw_aff
+#include <isl/hmap.h>
+#undef ISL_KEY
+#undef ISL_VAL
+#undef ISL_HMAP_SUFFIX
+#undef ISL_HMAP
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/id_type.h b/linux-x64/clang/include/polly/isl/id_type.h
new file mode 100644
index 0000000..0cb3c1c
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/id_type.h
@@ -0,0 +1,22 @@
+#ifndef ISL_ID_TYPE_H
+#define ISL_ID_TYPE_H
+
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_id;
+typedef struct isl_id isl_id;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(id)
+
+struct __isl_export isl_multi_id;
+typedef struct isl_multi_id isl_multi_id;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/ilp.h b/linux-x64/clang/include/polly/isl/ilp.h
new file mode 100644
index 0000000..a2be08e
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/ilp.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_ILP_H
+#define ISL_ILP_H
+
+#include <isl/aff_type.h>
+#include <isl/set_type.h>
+#include <isl/union_set_type.h>
+#include <isl/val_type.h>
+#include <isl/vec.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_give isl_val *isl_basic_set_max_val(__isl_keep isl_basic_set *bset,
+	__isl_keep isl_aff *obj);
+__isl_export
+__isl_give isl_val *isl_set_min_val(__isl_keep isl_set *set,
+	__isl_keep isl_aff *obj);
+__isl_export
+__isl_give isl_val *isl_set_max_val(__isl_keep isl_set *set,
+	__isl_keep isl_aff *obj);
+__isl_give isl_multi_val *isl_union_set_min_multi_union_pw_aff(
+	__isl_keep isl_union_set *uset, __isl_keep isl_multi_union_pw_aff *obj);
+
+__isl_export
+__isl_give isl_multi_val *isl_pw_multi_aff_min_multi_val(
+	__isl_take isl_pw_multi_aff *pma);
+__isl_export
+__isl_give isl_multi_val *isl_pw_multi_aff_max_multi_val(
+	__isl_take isl_pw_multi_aff *pma);
+__isl_export
+__isl_give isl_multi_val *isl_multi_pw_aff_min_multi_val(
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_export
+__isl_give isl_multi_val *isl_multi_pw_aff_max_multi_val(
+	__isl_take isl_multi_pw_aff *mpa);
+
+__isl_give isl_val *isl_union_pw_aff_min_val(__isl_take isl_union_pw_aff *upa);
+__isl_give isl_val *isl_union_pw_aff_max_val(__isl_take isl_union_pw_aff *upa);
+
+__isl_give isl_multi_val *isl_multi_union_pw_aff_min_multi_val(
+	__isl_take isl_multi_union_pw_aff *mupa);
+__isl_give isl_multi_val *isl_multi_union_pw_aff_max_multi_val(
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_export
+__isl_give isl_val *isl_basic_set_dim_max_val(__isl_take isl_basic_set *bset,
+	int pos);
+__isl_export
+__isl_give isl_val *isl_set_dim_min_val(__isl_take isl_set *set, int pos);
+__isl_export
+__isl_give isl_val *isl_set_dim_max_val(__isl_take isl_set *set, int pos);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/isl-noexceptions.h b/linux-x64/clang/include/polly/isl/isl-noexceptions.h
new file mode 100644
index 0000000..bb87b88
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/isl-noexceptions.h
@@ -0,0 +1,19778 @@
+/// These are automatically generated checked C++ bindings for isl.
+///
+/// isl is a library for computing with integer sets and maps described by
+/// Presburger formulas. On top of this, isl provides various tools for
+/// polyhedral compilation, ranging from dependence analysis over scheduling
+/// to AST generation.
+
+#ifndef ISL_CPP_CHECKED
+#define ISL_CPP_CHECKED
+
+#include <isl/val.h>
+#include <isl/aff.h>
+#include <isl/set.h>
+#include <isl/space.h>
+#include <isl/id.h>
+#include <isl/map.h>
+#include <isl/vec.h>
+#include <isl/ilp.h>
+#include <isl/union_set.h>
+#include <isl/union_map.h>
+#include <isl/flow.h>
+#include <isl/schedule.h>
+#include <isl/schedule_node.h>
+#include <isl/ast_build.h>
+#include <isl/constraint.h>
+#include <isl/polynomial.h>
+#include <isl/mat.h>
+#include <isl/fixed_box.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <functional>
+#include <string>
+
+namespace isl {
+inline namespace noexceptions {
+
+#define ISLPP_STRINGIZE_(X) #X
+#define ISLPP_STRINGIZE(X) ISLPP_STRINGIZE_(X)
+
+#define ISLPP_ASSERT(test, message)                          \
+  do {                                                       \
+    if (test)                                                \
+      break;                                                 \
+    fputs("Assertion \"" #test "\" failed at " __FILE__      \
+      ":" ISLPP_STRINGIZE(__LINE__) "\n  " message "\n",     \
+      stderr);                                               \
+    abort();                                                 \
+  } while (0)
+
+class boolean {
+private:
+  mutable bool checked = false;
+  isl_bool val;
+
+  friend boolean manage(isl_bool val);
+  boolean(isl_bool val): val(val) {}
+public:
+  boolean()
+      : val(isl_bool_error) {}
+  ~boolean() {
+    // ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
+  }
+
+  /* implicit */ boolean(bool val)
+      : val(val ? isl_bool_true : isl_bool_false) {}
+
+  bool is_error() const { checked = true; return val == isl_bool_error; }
+  bool is_false() const { checked = true; return val == isl_bool_false; }
+  bool is_true() const { checked = true; return val == isl_bool_true; }
+
+  operator bool() const {
+    // ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked error state");
+    ISLPP_ASSERT(!is_error(), "IMPLEMENTATION ERROR: Unhandled error state");
+    return is_true();
+  }
+
+  boolean operator!() const {
+    if (is_error())
+      return *this;
+    return !is_true();
+  }
+};
+
+inline boolean manage(isl_bool val) {
+  return boolean(val);
+}
+
+class ctx {
+  isl_ctx *ptr;
+public:
+  /* implicit */ ctx(isl_ctx *ctx)
+      : ptr(ctx) {}
+  isl_ctx *release() {
+    auto tmp = ptr;
+    ptr = nullptr;
+    return tmp;
+  }
+  isl_ctx *get() {
+    return ptr;
+  }
+};
+
+/* Class encapsulating an isl_stat value.
+ */
+class stat {
+private:
+	mutable bool checked = false;
+	isl_stat val;
+
+	friend stat manage(isl_stat val);
+public:
+	constexpr stat(isl_stat val) : val(val) {}
+	static stat ok() {
+		return stat(isl_stat_ok);
+	}
+	static stat error() {
+		return stat(isl_stat_error);
+	}
+	stat() : val(isl_stat_error) {}
+	~stat() {
+		// ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
+	}
+
+	isl_stat release() {
+		checked = true;
+		return val;
+	}
+
+	bool is_error() const {
+		checked = true;
+		return val == isl_stat_error;
+	}
+	bool is_ok() const {
+		checked = true;
+		return val == isl_stat_ok;
+	}
+};
+
+
+inline stat manage(isl_stat val)
+{
+	return stat(val);
+}
+
+enum class dim {
+  cst = isl_dim_cst,
+  param = isl_dim_param,
+  in = isl_dim_in,
+  out = isl_dim_out,
+  set = isl_dim_set,
+  div = isl_dim_div,
+  all = isl_dim_all
+};
+
+}
+} // namespace isl
+
+namespace isl {
+
+inline namespace noexceptions {
+
+// forward declarations
+class aff;
+class aff_list;
+class ast_build;
+class ast_expr;
+class ast_expr_list;
+class ast_node;
+class ast_node_list;
+class basic_map;
+class basic_map_list;
+class basic_set;
+class basic_set_list;
+class constraint;
+class constraint_list;
+class fixed_box;
+class id;
+class id_list;
+class id_to_ast_expr;
+class local_space;
+class map;
+class map_list;
+class mat;
+class multi_aff;
+class multi_pw_aff;
+class multi_union_pw_aff;
+class multi_val;
+class point;
+class pw_aff;
+class pw_aff_list;
+class pw_multi_aff;
+class pw_multi_aff_list;
+class pw_qpolynomial;
+class pw_qpolynomial_fold_list;
+class pw_qpolynomial_list;
+class qpolynomial;
+class schedule;
+class schedule_constraints;
+class schedule_node;
+class set;
+class set_list;
+class space;
+class term;
+class union_access_info;
+class union_flow;
+class union_map;
+class union_map_list;
+class union_pw_aff;
+class union_pw_aff_list;
+class union_pw_multi_aff;
+class union_pw_multi_aff_list;
+class union_pw_qpolynomial;
+class union_set;
+class union_set_list;
+class val;
+class val_list;
+class vec;
+
+// declarations for isl::aff
+inline aff manage(__isl_take isl_aff *ptr);
+inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+class aff {
+  friend inline aff manage(__isl_take isl_aff *ptr);
+  friend inline aff manage_copy(__isl_keep isl_aff *ptr);
+
+  isl_aff *ptr = nullptr;
+
+  inline explicit aff(__isl_take isl_aff *ptr);
+
+public:
+  inline /* implicit */ aff();
+  inline /* implicit */ aff(const aff &obj);
+  inline /* implicit */ aff(std::nullptr_t);
+  inline explicit aff(local_space ls);
+  inline explicit aff(local_space ls, val val);
+  inline explicit aff(ctx ctx, const std::string &str);
+  inline aff &operator=(aff obj);
+  inline ~aff();
+  inline __isl_give isl_aff *copy() const &;
+  inline __isl_give isl_aff *copy() && = delete;
+  inline __isl_keep isl_aff *get() const;
+  inline __isl_give isl_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline aff add(aff aff2) const;
+  inline aff add_coefficient_si(isl::dim type, int pos, int v) const;
+  inline aff add_coefficient_val(isl::dim type, int pos, val v) const;
+  inline aff add_constant_num_si(int v) const;
+  inline aff add_constant_si(int v) const;
+  inline aff add_constant_val(val v) const;
+  inline aff add_dims(isl::dim type, unsigned int n) const;
+  inline aff align_params(space model) const;
+  inline aff ceil() const;
+  inline int coefficient_sgn(isl::dim type, int pos) const;
+  inline int dim(isl::dim type) const;
+  inline aff div(aff aff2) const;
+  inline aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set eq_basic_set(aff aff2) const;
+  inline set eq_set(aff aff2) const;
+  inline val eval(point pnt) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline aff floor() const;
+  inline aff from_range() const;
+  inline basic_set ge_basic_set(aff aff2) const;
+  inline set ge_set(aff aff2) const;
+  inline val get_coefficient_val(isl::dim type, int pos) const;
+  inline val get_constant_val() const;
+  inline val get_denominator_val() const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline aff get_div(int pos) const;
+  inline local_space get_domain_local_space() const;
+  inline space get_domain_space() const;
+  inline uint32_t get_hash() const;
+  inline local_space get_local_space() const;
+  inline space get_space() const;
+  inline aff gist(set context) const;
+  inline aff gist_params(set context) const;
+  inline basic_set gt_basic_set(aff aff2) const;
+  inline set gt_set(aff aff2) const;
+  inline aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_cst() const;
+  inline boolean is_nan() const;
+  inline basic_set le_basic_set(aff aff2) const;
+  inline set le_set(aff aff2) const;
+  inline basic_set lt_basic_set(aff aff2) const;
+  inline set lt_set(aff aff2) const;
+  inline aff mod(val mod) const;
+  inline aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline aff mul(aff aff2) const;
+  static inline aff nan_on_domain(local_space ls);
+  inline set ne_set(aff aff2) const;
+  inline aff neg() const;
+  inline basic_set neg_basic_set() const;
+  static inline aff param_on_domain_space_id(space space, id id);
+  inline boolean plain_is_equal(const aff &aff2) const;
+  inline boolean plain_is_zero() const;
+  inline aff project_domain_on_params() const;
+  inline aff pullback(multi_aff ma) const;
+  inline aff pullback_aff(aff aff2) const;
+  inline aff scale(val v) const;
+  inline aff scale_down(val v) const;
+  inline aff scale_down_ui(unsigned int f) const;
+  inline aff set_coefficient_si(isl::dim type, int pos, int v) const;
+  inline aff set_coefficient_val(isl::dim type, int pos, val v) const;
+  inline aff set_constant_si(int v) const;
+  inline aff set_constant_val(val v) const;
+  inline aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline aff set_tuple_id(isl::dim type, id id) const;
+  inline aff sub(aff aff2) const;
+  static inline aff var_on_domain(local_space ls, isl::dim type, unsigned int pos);
+  inline basic_set zero_basic_set() const;
+};
+
+// declarations for isl::aff_list
+inline aff_list manage(__isl_take isl_aff_list *ptr);
+inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+class aff_list {
+  friend inline aff_list manage(__isl_take isl_aff_list *ptr);
+  friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
+
+  isl_aff_list *ptr = nullptr;
+
+  inline explicit aff_list(__isl_take isl_aff_list *ptr);
+
+public:
+  inline /* implicit */ aff_list();
+  inline /* implicit */ aff_list(const aff_list &obj);
+  inline /* implicit */ aff_list(std::nullptr_t);
+  inline aff_list &operator=(aff_list obj);
+  inline ~aff_list();
+  inline __isl_give isl_aff_list *copy() const &;
+  inline __isl_give isl_aff_list *copy() && = delete;
+  inline __isl_keep isl_aff_list *get() const;
+  inline __isl_give isl_aff_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline aff_list add(aff el) const;
+  static inline aff_list alloc(ctx ctx, int n);
+  inline aff_list concat(aff_list list2) const;
+  inline aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(aff)> &fn) const;
+  static inline aff_list from_aff(aff el);
+  inline aff get_aff(int index) const;
+  inline aff get_at(int index) const;
+  inline aff_list insert(unsigned int pos, aff el) const;
+  inline int n_aff() const;
+  inline aff_list reverse() const;
+  inline aff_list set_aff(int index, aff el) const;
+  inline int size() const;
+  inline aff_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::ast_build
+inline ast_build manage(__isl_take isl_ast_build *ptr);
+inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+class ast_build {
+  friend inline ast_build manage(__isl_take isl_ast_build *ptr);
+  friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
+
+  isl_ast_build *ptr = nullptr;
+
+  inline explicit ast_build(__isl_take isl_ast_build *ptr);
+
+public:
+  inline /* implicit */ ast_build();
+  inline /* implicit */ ast_build(const ast_build &obj);
+  inline /* implicit */ ast_build(std::nullptr_t);
+  inline explicit ast_build(ctx ctx);
+  inline ast_build &operator=(ast_build obj);
+  inline ~ast_build();
+  inline __isl_give isl_ast_build *copy() const &;
+  inline __isl_give isl_ast_build *copy() && = delete;
+  inline __isl_keep isl_ast_build *get() const;
+  inline __isl_give isl_ast_build *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+
+  inline ast_expr access_from(pw_multi_aff pma) const;
+  inline ast_expr access_from(multi_pw_aff mpa) const;
+  inline ast_node ast_from_schedule(union_map schedule) const;
+  inline ast_expr call_from(pw_multi_aff pma) const;
+  inline ast_expr call_from(multi_pw_aff mpa) const;
+  inline ast_expr expr_from(set set) const;
+  inline ast_expr expr_from(pw_aff pa) const;
+  static inline ast_build from_context(set set);
+  inline union_map get_schedule() const;
+  inline space get_schedule_space() const;
+  inline ast_node node_from_schedule(schedule schedule) const;
+  inline ast_node node_from_schedule_map(union_map schedule) const;
+  inline ast_build restrict(set set) const;
+};
+
+// declarations for isl::ast_expr
+inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+class ast_expr {
+  friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
+  friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
+
+  isl_ast_expr *ptr = nullptr;
+
+  inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
+
+public:
+  inline /* implicit */ ast_expr();
+  inline /* implicit */ ast_expr(const ast_expr &obj);
+  inline /* implicit */ ast_expr(std::nullptr_t);
+  inline ast_expr &operator=(ast_expr obj);
+  inline ~ast_expr();
+  inline __isl_give isl_ast_expr *copy() const &;
+  inline __isl_give isl_ast_expr *copy() && = delete;
+  inline __isl_keep isl_ast_expr *get() const;
+  inline __isl_give isl_ast_expr *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline ast_expr access(ast_expr_list indices) const;
+  inline ast_expr add(ast_expr expr2) const;
+  inline ast_expr address_of() const;
+  inline ast_expr call(ast_expr_list arguments) const;
+  inline ast_expr div(ast_expr expr2) const;
+  inline ast_expr eq(ast_expr expr2) const;
+  static inline ast_expr from_id(id id);
+  static inline ast_expr from_val(val v);
+  inline ast_expr ge(ast_expr expr2) const;
+  inline id get_id() const;
+  inline ast_expr get_op_arg(int pos) const;
+  inline int get_op_n_arg() const;
+  inline val get_val() const;
+  inline ast_expr gt(ast_expr expr2) const;
+  inline boolean is_equal(const ast_expr &expr2) const;
+  inline ast_expr le(ast_expr expr2) const;
+  inline ast_expr lt(ast_expr expr2) const;
+  inline ast_expr mul(ast_expr expr2) const;
+  inline ast_expr neg() const;
+  inline ast_expr pdiv_q(ast_expr expr2) const;
+  inline ast_expr pdiv_r(ast_expr expr2) const;
+  inline ast_expr set_op_arg(int pos, ast_expr arg) const;
+  inline ast_expr sub(ast_expr expr2) const;
+  inline ast_expr substitute_ids(id_to_ast_expr id2expr) const;
+  inline std::string to_C_str() const;
+};
+
+// declarations for isl::ast_expr_list
+inline ast_expr_list manage(__isl_take isl_ast_expr_list *ptr);
+inline ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr);
+
+class ast_expr_list {
+  friend inline ast_expr_list manage(__isl_take isl_ast_expr_list *ptr);
+  friend inline ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr);
+
+  isl_ast_expr_list *ptr = nullptr;
+
+  inline explicit ast_expr_list(__isl_take isl_ast_expr_list *ptr);
+
+public:
+  inline /* implicit */ ast_expr_list();
+  inline /* implicit */ ast_expr_list(const ast_expr_list &obj);
+  inline /* implicit */ ast_expr_list(std::nullptr_t);
+  inline ast_expr_list &operator=(ast_expr_list obj);
+  inline ~ast_expr_list();
+  inline __isl_give isl_ast_expr_list *copy() const &;
+  inline __isl_give isl_ast_expr_list *copy() && = delete;
+  inline __isl_keep isl_ast_expr_list *get() const;
+  inline __isl_give isl_ast_expr_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline ast_expr_list add(ast_expr el) const;
+  static inline ast_expr_list alloc(ctx ctx, int n);
+  inline ast_expr_list concat(ast_expr_list list2) const;
+  inline ast_expr_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(ast_expr)> &fn) const;
+  static inline ast_expr_list from_ast_expr(ast_expr el);
+  inline ast_expr get_ast_expr(int index) const;
+  inline ast_expr get_at(int index) const;
+  inline ast_expr_list insert(unsigned int pos, ast_expr el) const;
+  inline int n_ast_expr() const;
+  inline ast_expr_list reverse() const;
+  inline ast_expr_list set_ast_expr(int index, ast_expr el) const;
+  inline int size() const;
+  inline ast_expr_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::ast_node
+inline ast_node manage(__isl_take isl_ast_node *ptr);
+inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+class ast_node {
+  friend inline ast_node manage(__isl_take isl_ast_node *ptr);
+  friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
+
+  isl_ast_node *ptr = nullptr;
+
+  inline explicit ast_node(__isl_take isl_ast_node *ptr);
+
+public:
+  inline /* implicit */ ast_node();
+  inline /* implicit */ ast_node(const ast_node &obj);
+  inline /* implicit */ ast_node(std::nullptr_t);
+  inline ast_node &operator=(ast_node obj);
+  inline ~ast_node();
+  inline __isl_give isl_ast_node *copy() const &;
+  inline __isl_give isl_ast_node *copy() && = delete;
+  inline __isl_keep isl_ast_node *get() const;
+  inline __isl_give isl_ast_node *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  static inline ast_node alloc_user(ast_expr expr);
+  inline ast_node_list block_get_children() const;
+  inline ast_node for_get_body() const;
+  inline ast_expr for_get_cond() const;
+  inline ast_expr for_get_inc() const;
+  inline ast_expr for_get_init() const;
+  inline ast_expr for_get_iterator() const;
+  inline boolean for_is_degenerate() const;
+  inline id get_annotation() const;
+  inline ast_expr if_get_cond() const;
+  inline ast_node if_get_else() const;
+  inline ast_node if_get_then() const;
+  inline boolean if_has_else() const;
+  inline id mark_get_id() const;
+  inline ast_node mark_get_node() const;
+  inline ast_node set_annotation(id annotation) const;
+  inline std::string to_C_str() const;
+  inline ast_expr user_get_expr() const;
+};
+
+// declarations for isl::ast_node_list
+inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+class ast_node_list {
+  friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
+  friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
+
+  isl_ast_node_list *ptr = nullptr;
+
+  inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
+
+public:
+  inline /* implicit */ ast_node_list();
+  inline /* implicit */ ast_node_list(const ast_node_list &obj);
+  inline /* implicit */ ast_node_list(std::nullptr_t);
+  inline ast_node_list &operator=(ast_node_list obj);
+  inline ~ast_node_list();
+  inline __isl_give isl_ast_node_list *copy() const &;
+  inline __isl_give isl_ast_node_list *copy() && = delete;
+  inline __isl_keep isl_ast_node_list *get() const;
+  inline __isl_give isl_ast_node_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline ast_node_list add(ast_node el) const;
+  static inline ast_node_list alloc(ctx ctx, int n);
+  inline ast_node_list concat(ast_node_list list2) const;
+  inline ast_node_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(ast_node)> &fn) const;
+  static inline ast_node_list from_ast_node(ast_node el);
+  inline ast_node get_ast_node(int index) const;
+  inline ast_node get_at(int index) const;
+  inline ast_node_list insert(unsigned int pos, ast_node el) const;
+  inline int n_ast_node() const;
+  inline ast_node_list reverse() const;
+  inline ast_node_list set_ast_node(int index, ast_node el) const;
+  inline int size() const;
+  inline ast_node_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::basic_map
+inline basic_map manage(__isl_take isl_basic_map *ptr);
+inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+class basic_map {
+  friend inline basic_map manage(__isl_take isl_basic_map *ptr);
+  friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
+
+  isl_basic_map *ptr = nullptr;
+
+  inline explicit basic_map(__isl_take isl_basic_map *ptr);
+
+public:
+  inline /* implicit */ basic_map();
+  inline /* implicit */ basic_map(const basic_map &obj);
+  inline /* implicit */ basic_map(std::nullptr_t);
+  inline explicit basic_map(ctx ctx, const std::string &str);
+  inline basic_map &operator=(basic_map obj);
+  inline ~basic_map();
+  inline __isl_give isl_basic_map *copy() const &;
+  inline __isl_give isl_basic_map *copy() && = delete;
+  inline __isl_keep isl_basic_map *get() const;
+  inline __isl_give isl_basic_map *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline basic_map add_constraint(constraint constraint) const;
+  inline basic_map add_dims(isl::dim type, unsigned int n) const;
+  inline basic_map affine_hull() const;
+  inline basic_map align_params(space model) const;
+  inline basic_map apply_domain(basic_map bmap2) const;
+  inline basic_map apply_range(basic_map bmap2) const;
+  inline boolean can_curry() const;
+  inline boolean can_uncurry() const;
+  inline boolean can_zip() const;
+  inline basic_map curry() const;
+  inline basic_set deltas() const;
+  inline basic_map deltas_map() const;
+  inline basic_map detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline basic_set domain() const;
+  inline basic_map domain_map() const;
+  inline basic_map domain_product(basic_map bmap2) const;
+  inline basic_map drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_map drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_map drop_unused_params() const;
+  inline basic_map eliminate(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline basic_map empty(space space);
+  static inline basic_map equal(space dim, unsigned int n_equal);
+  inline mat equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const;
+  inline basic_map equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline basic_map fix_si(isl::dim type, unsigned int pos, int value) const;
+  inline basic_map fix_val(isl::dim type, unsigned int pos, val v) const;
+  inline basic_map flat_product(basic_map bmap2) const;
+  inline basic_map flat_range_product(basic_map bmap2) const;
+  inline basic_map flatten() const;
+  inline basic_map flatten_domain() const;
+  inline basic_map flatten_range() const;
+  inline stat foreach_constraint(const std::function<stat(constraint)> &fn) const;
+  static inline basic_map from_aff(aff aff);
+  static inline basic_map from_aff_list(space domain_space, aff_list list);
+  static inline basic_map from_constraint(constraint constraint);
+  static inline basic_map from_domain(basic_set bset);
+  static inline basic_map from_domain_and_range(basic_set domain, basic_set range);
+  static inline basic_map from_multi_aff(multi_aff maff);
+  static inline basic_map from_qpolynomial(qpolynomial qp);
+  static inline basic_map from_range(basic_set bset);
+  inline constraint_list get_constraint_list() const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline aff get_div(int pos) const;
+  inline local_space get_local_space() const;
+  inline space get_space() const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline basic_map gist(basic_map context) const;
+  inline basic_map gist_domain(basic_set context) const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  static inline basic_map identity(space dim);
+  inline boolean image_is_bounded() const;
+  inline mat inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const;
+  inline basic_map insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
+  inline basic_map intersect(basic_map bmap2) const;
+  inline basic_map intersect_domain(basic_set bset) const;
+  inline basic_map intersect_range(basic_set bset) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_disjoint(const basic_map &bmap2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const basic_map &bmap2) const;
+  inline boolean is_rational() const;
+  inline boolean is_single_valued() const;
+  inline boolean is_strict_subset(const basic_map &bmap2) const;
+  inline boolean is_subset(const basic_map &bmap2) const;
+  inline boolean is_universe() const;
+  static inline basic_map less_at(space dim, unsigned int pos);
+  inline map lexmax() const;
+  inline map lexmin() const;
+  inline pw_multi_aff lexmin_pw_multi_aff() const;
+  inline basic_map lower_bound_si(isl::dim type, unsigned int pos, int value) const;
+  static inline basic_map more_at(space dim, unsigned int pos);
+  inline basic_map move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline int n_constraint() const;
+  static inline basic_map nat_universe(space dim);
+  inline basic_map neg() const;
+  inline basic_map order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline basic_map order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
+  inline boolean plain_is_empty() const;
+  inline boolean plain_is_universe() const;
+  inline basic_map preimage_domain_multi_aff(multi_aff ma) const;
+  inline basic_map preimage_range_multi_aff(multi_aff ma) const;
+  inline basic_map product(basic_map bmap2) const;
+  inline basic_map project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set range() const;
+  inline basic_map range_map() const;
+  inline basic_map range_product(basic_map bmap2) const;
+  inline basic_map remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_map remove_divs() const;
+  inline basic_map remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_map remove_redundancies() const;
+  inline basic_map reverse() const;
+  inline basic_map sample() const;
+  inline basic_map set_tuple_id(isl::dim type, id id) const;
+  inline basic_map set_tuple_name(isl::dim type, const std::string &s) const;
+  inline basic_map sum(basic_map bmap2) const;
+  inline basic_map uncurry() const;
+  inline map unite(basic_map bmap2) const;
+  static inline basic_map universe(space space);
+  inline basic_map upper_bound_si(isl::dim type, unsigned int pos, int value) const;
+  inline basic_set wrap() const;
+  inline basic_map zip() const;
+};
+
+// declarations for isl::basic_map_list
+inline basic_map_list manage(__isl_take isl_basic_map_list *ptr);
+inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr);
+
+class basic_map_list {
+  friend inline basic_map_list manage(__isl_take isl_basic_map_list *ptr);
+  friend inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr);
+
+  isl_basic_map_list *ptr = nullptr;
+
+  inline explicit basic_map_list(__isl_take isl_basic_map_list *ptr);
+
+public:
+  inline /* implicit */ basic_map_list();
+  inline /* implicit */ basic_map_list(const basic_map_list &obj);
+  inline /* implicit */ basic_map_list(std::nullptr_t);
+  inline basic_map_list &operator=(basic_map_list obj);
+  inline ~basic_map_list();
+  inline __isl_give isl_basic_map_list *copy() const &;
+  inline __isl_give isl_basic_map_list *copy() && = delete;
+  inline __isl_keep isl_basic_map_list *get() const;
+  inline __isl_give isl_basic_map_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline basic_map_list add(basic_map el) const;
+  static inline basic_map_list alloc(ctx ctx, int n);
+  inline basic_map_list concat(basic_map_list list2) const;
+  inline basic_map_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(basic_map)> &fn) const;
+  static inline basic_map_list from_basic_map(basic_map el);
+  inline basic_map get_at(int index) const;
+  inline basic_map get_basic_map(int index) const;
+  inline basic_map_list insert(unsigned int pos, basic_map el) const;
+  inline int n_basic_map() const;
+  inline basic_map_list reverse() const;
+  inline basic_map_list set_basic_map(int index, basic_map el) const;
+  inline int size() const;
+  inline basic_map_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::basic_set
+inline basic_set manage(__isl_take isl_basic_set *ptr);
+inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+class basic_set {
+  friend inline basic_set manage(__isl_take isl_basic_set *ptr);
+  friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
+
+  isl_basic_set *ptr = nullptr;
+
+  inline explicit basic_set(__isl_take isl_basic_set *ptr);
+
+public:
+  inline /* implicit */ basic_set();
+  inline /* implicit */ basic_set(const basic_set &obj);
+  inline /* implicit */ basic_set(std::nullptr_t);
+  inline explicit basic_set(ctx ctx, const std::string &str);
+  inline /* implicit */ basic_set(point pnt);
+  inline basic_set &operator=(basic_set obj);
+  inline ~basic_set();
+  inline __isl_give isl_basic_set *copy() const &;
+  inline __isl_give isl_basic_set *copy() && = delete;
+  inline __isl_keep isl_basic_set *get() const;
+  inline __isl_give isl_basic_set *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline basic_set affine_hull() const;
+  inline basic_set align_params(space model) const;
+  inline basic_set apply(basic_map bmap) const;
+  static inline basic_set box_from_points(point pnt1, point pnt2);
+  inline basic_set coefficients() const;
+  inline basic_set detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline val dim_max_val(int pos) const;
+  inline basic_set drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set drop_unused_params() const;
+  inline basic_set eliminate(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline basic_set empty(space space);
+  inline mat equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const;
+  inline basic_set fix_si(isl::dim type, unsigned int pos, int value) const;
+  inline basic_set fix_val(isl::dim type, unsigned int pos, val v) const;
+  inline basic_set flat_product(basic_set bset2) const;
+  inline basic_set flatten() const;
+  inline stat foreach_bound_pair(isl::dim type, unsigned int pos, const std::function<stat(constraint, constraint, basic_set)> &fn) const;
+  inline stat foreach_constraint(const std::function<stat(constraint)> &fn) const;
+  static inline basic_set from_constraint(constraint constraint);
+  static inline basic_set from_multi_aff(multi_aff ma);
+  inline basic_set from_params() const;
+  inline constraint_list get_constraint_list() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline aff get_div(int pos) const;
+  inline local_space get_local_space() const;
+  inline space get_space() const;
+  inline std::string get_tuple_name() const;
+  inline basic_set gist(basic_set context) const;
+  inline mat inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const;
+  inline basic_set insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
+  inline basic_set intersect(basic_set bset2) const;
+  inline basic_set intersect_params(basic_set bset2) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_bounded() const;
+  inline boolean is_disjoint(const basic_set &bset2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const basic_set &bset2) const;
+  inline int is_rational() const;
+  inline boolean is_subset(const basic_set &bset2) const;
+  inline boolean is_universe() const;
+  inline boolean is_wrapping() const;
+  inline set lexmax() const;
+  inline set lexmin() const;
+  inline basic_set lower_bound_val(isl::dim type, unsigned int pos, val value) const;
+  inline val max_val(const aff &obj) const;
+  inline basic_set move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline int n_constraint() const;
+  inline unsigned int n_dim() const;
+  static inline basic_set nat_universe(space dim);
+  inline basic_set neg() const;
+  inline basic_set params() const;
+  inline boolean plain_is_empty() const;
+  inline boolean plain_is_equal(const basic_set &bset2) const;
+  inline boolean plain_is_universe() const;
+  static inline basic_set positive_orthant(space space);
+  inline basic_set preimage_multi_aff(multi_aff ma) const;
+  inline basic_set project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline mat reduced_basis() const;
+  inline basic_set remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set remove_divs() const;
+  inline basic_set remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline basic_set remove_redundancies() const;
+  inline basic_set remove_unknown_divs() const;
+  inline basic_set sample() const;
+  inline point sample_point() const;
+  inline basic_set set_tuple_id(id id) const;
+  inline basic_set set_tuple_name(const std::string &s) const;
+  inline basic_set solutions() const;
+  inline set unite(basic_set bset2) const;
+  static inline basic_set universe(space space);
+  inline basic_map unwrap() const;
+  inline basic_set upper_bound_val(isl::dim type, unsigned int pos, val value) const;
+};
+
+// declarations for isl::basic_set_list
+inline basic_set_list manage(__isl_take isl_basic_set_list *ptr);
+inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr);
+
+class basic_set_list {
+  friend inline basic_set_list manage(__isl_take isl_basic_set_list *ptr);
+  friend inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr);
+
+  isl_basic_set_list *ptr = nullptr;
+
+  inline explicit basic_set_list(__isl_take isl_basic_set_list *ptr);
+
+public:
+  inline /* implicit */ basic_set_list();
+  inline /* implicit */ basic_set_list(const basic_set_list &obj);
+  inline /* implicit */ basic_set_list(std::nullptr_t);
+  inline basic_set_list &operator=(basic_set_list obj);
+  inline ~basic_set_list();
+  inline __isl_give isl_basic_set_list *copy() const &;
+  inline __isl_give isl_basic_set_list *copy() && = delete;
+  inline __isl_keep isl_basic_set_list *get() const;
+  inline __isl_give isl_basic_set_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline basic_set_list add(basic_set el) const;
+  static inline basic_set_list alloc(ctx ctx, int n);
+  inline basic_set_list coefficients() const;
+  inline basic_set_list concat(basic_set_list list2) const;
+  inline basic_set_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(basic_set)> &fn) const;
+  static inline basic_set_list from_basic_set(basic_set el);
+  inline basic_set get_at(int index) const;
+  inline basic_set get_basic_set(int index) const;
+  inline basic_set_list insert(unsigned int pos, basic_set el) const;
+  inline int n_basic_set() const;
+  inline basic_set_list reverse() const;
+  inline basic_set_list set_basic_set(int index, basic_set el) const;
+  inline int size() const;
+  inline basic_set_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::constraint
+inline constraint manage(__isl_take isl_constraint *ptr);
+inline constraint manage_copy(__isl_keep isl_constraint *ptr);
+
+class constraint {
+  friend inline constraint manage(__isl_take isl_constraint *ptr);
+  friend inline constraint manage_copy(__isl_keep isl_constraint *ptr);
+
+  isl_constraint *ptr = nullptr;
+
+  inline explicit constraint(__isl_take isl_constraint *ptr);
+
+public:
+  inline /* implicit */ constraint();
+  inline /* implicit */ constraint(const constraint &obj);
+  inline /* implicit */ constraint(std::nullptr_t);
+  inline constraint &operator=(constraint obj);
+  inline ~constraint();
+  inline __isl_give isl_constraint *copy() const &;
+  inline __isl_give isl_constraint *copy() && = delete;
+  inline __isl_keep isl_constraint *get() const;
+  inline __isl_give isl_constraint *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  static inline constraint alloc_equality(local_space ls);
+  static inline constraint alloc_inequality(local_space ls);
+  inline int cmp_last_non_zero(const constraint &c2) const;
+  inline aff get_aff() const;
+  inline aff get_bound(isl::dim type, int pos) const;
+  inline val get_coefficient_val(isl::dim type, int pos) const;
+  inline val get_constant_val() const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline aff get_div(int pos) const;
+  inline local_space get_local_space() const;
+  inline space get_space() const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline int is_div_constraint() const;
+  inline boolean is_lower_bound(isl::dim type, unsigned int pos) const;
+  inline boolean is_upper_bound(isl::dim type, unsigned int pos) const;
+  inline int plain_cmp(const constraint &c2) const;
+  inline constraint set_coefficient_si(isl::dim type, int pos, int v) const;
+  inline constraint set_coefficient_val(isl::dim type, int pos, val v) const;
+  inline constraint set_constant_si(int v) const;
+  inline constraint set_constant_val(val v) const;
+};
+
+// declarations for isl::constraint_list
+inline constraint_list manage(__isl_take isl_constraint_list *ptr);
+inline constraint_list manage_copy(__isl_keep isl_constraint_list *ptr);
+
+class constraint_list {
+  friend inline constraint_list manage(__isl_take isl_constraint_list *ptr);
+  friend inline constraint_list manage_copy(__isl_keep isl_constraint_list *ptr);
+
+  isl_constraint_list *ptr = nullptr;
+
+  inline explicit constraint_list(__isl_take isl_constraint_list *ptr);
+
+public:
+  inline /* implicit */ constraint_list();
+  inline /* implicit */ constraint_list(const constraint_list &obj);
+  inline /* implicit */ constraint_list(std::nullptr_t);
+  inline constraint_list &operator=(constraint_list obj);
+  inline ~constraint_list();
+  inline __isl_give isl_constraint_list *copy() const &;
+  inline __isl_give isl_constraint_list *copy() && = delete;
+  inline __isl_keep isl_constraint_list *get() const;
+  inline __isl_give isl_constraint_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline constraint_list add(constraint el) const;
+  static inline constraint_list alloc(ctx ctx, int n);
+  inline constraint_list concat(constraint_list list2) const;
+  inline constraint_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(constraint)> &fn) const;
+  static inline constraint_list from_constraint(constraint el);
+  inline constraint get_at(int index) const;
+  inline constraint get_constraint(int index) const;
+  inline constraint_list insert(unsigned int pos, constraint el) const;
+  inline int n_constraint() const;
+  inline constraint_list reverse() const;
+  inline constraint_list set_constraint(int index, constraint el) const;
+  inline int size() const;
+  inline constraint_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::fixed_box
+inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+class fixed_box {
+  friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
+  friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
+
+  isl_fixed_box *ptr = nullptr;
+
+  inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
+
+public:
+  inline /* implicit */ fixed_box();
+  inline /* implicit */ fixed_box(const fixed_box &obj);
+  inline /* implicit */ fixed_box(std::nullptr_t);
+  inline fixed_box &operator=(fixed_box obj);
+  inline ~fixed_box();
+  inline __isl_give isl_fixed_box *copy() const &;
+  inline __isl_give isl_fixed_box *copy() && = delete;
+  inline __isl_keep isl_fixed_box *get() const;
+  inline __isl_give isl_fixed_box *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+
+  inline multi_aff get_offset() const;
+  inline multi_val get_size() const;
+  inline space get_space() const;
+  inline boolean is_valid() const;
+};
+
+// declarations for isl::id
+inline id manage(__isl_take isl_id *ptr);
+inline id manage_copy(__isl_keep isl_id *ptr);
+
+class id {
+  friend inline id manage(__isl_take isl_id *ptr);
+  friend inline id manage_copy(__isl_keep isl_id *ptr);
+
+  isl_id *ptr = nullptr;
+
+  inline explicit id(__isl_take isl_id *ptr);
+
+public:
+  inline /* implicit */ id();
+  inline /* implicit */ id(const id &obj);
+  inline /* implicit */ id(std::nullptr_t);
+  inline id &operator=(id obj);
+  inline ~id();
+  inline __isl_give isl_id *copy() const &;
+  inline __isl_give isl_id *copy() && = delete;
+  inline __isl_keep isl_id *get() const;
+  inline __isl_give isl_id *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  static inline id alloc(ctx ctx, const std::string &name, void * user);
+  inline uint32_t get_hash() const;
+  inline std::string get_name() const;
+  inline void * get_user() const;
+};
+
+// declarations for isl::id_list
+inline id_list manage(__isl_take isl_id_list *ptr);
+inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+class id_list {
+  friend inline id_list manage(__isl_take isl_id_list *ptr);
+  friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
+
+  isl_id_list *ptr = nullptr;
+
+  inline explicit id_list(__isl_take isl_id_list *ptr);
+
+public:
+  inline /* implicit */ id_list();
+  inline /* implicit */ id_list(const id_list &obj);
+  inline /* implicit */ id_list(std::nullptr_t);
+  inline id_list &operator=(id_list obj);
+  inline ~id_list();
+  inline __isl_give isl_id_list *copy() const &;
+  inline __isl_give isl_id_list *copy() && = delete;
+  inline __isl_keep isl_id_list *get() const;
+  inline __isl_give isl_id_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline id_list add(id el) const;
+  static inline id_list alloc(ctx ctx, int n);
+  inline id_list concat(id_list list2) const;
+  inline id_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(id)> &fn) const;
+  static inline id_list from_id(id el);
+  inline id get_at(int index) const;
+  inline id get_id(int index) const;
+  inline id_list insert(unsigned int pos, id el) const;
+  inline int n_id() const;
+  inline id_list reverse() const;
+  inline id_list set_id(int index, id el) const;
+  inline int size() const;
+  inline id_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::id_to_ast_expr
+inline id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr);
+inline id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr);
+
+class id_to_ast_expr {
+  friend inline id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr);
+  friend inline id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr);
+
+  isl_id_to_ast_expr *ptr = nullptr;
+
+  inline explicit id_to_ast_expr(__isl_take isl_id_to_ast_expr *ptr);
+
+public:
+  inline /* implicit */ id_to_ast_expr();
+  inline /* implicit */ id_to_ast_expr(const id_to_ast_expr &obj);
+  inline /* implicit */ id_to_ast_expr(std::nullptr_t);
+  inline id_to_ast_expr &operator=(id_to_ast_expr obj);
+  inline ~id_to_ast_expr();
+  inline __isl_give isl_id_to_ast_expr *copy() const &;
+  inline __isl_give isl_id_to_ast_expr *copy() && = delete;
+  inline __isl_keep isl_id_to_ast_expr *get() const;
+  inline __isl_give isl_id_to_ast_expr *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  static inline id_to_ast_expr alloc(ctx ctx, int min_size);
+  inline id_to_ast_expr drop(id key) const;
+  inline stat foreach(const std::function<stat(id, ast_expr)> &fn) const;
+  inline ast_expr get(id key) const;
+  inline boolean has(const id &key) const;
+  inline id_to_ast_expr set(id key, ast_expr val) const;
+};
+
+// declarations for isl::local_space
+inline local_space manage(__isl_take isl_local_space *ptr);
+inline local_space manage_copy(__isl_keep isl_local_space *ptr);
+
+class local_space {
+  friend inline local_space manage(__isl_take isl_local_space *ptr);
+  friend inline local_space manage_copy(__isl_keep isl_local_space *ptr);
+
+  isl_local_space *ptr = nullptr;
+
+  inline explicit local_space(__isl_take isl_local_space *ptr);
+
+public:
+  inline /* implicit */ local_space();
+  inline /* implicit */ local_space(const local_space &obj);
+  inline /* implicit */ local_space(std::nullptr_t);
+  inline explicit local_space(space dim);
+  inline local_space &operator=(local_space obj);
+  inline ~local_space();
+  inline __isl_give isl_local_space *copy() const &;
+  inline __isl_give isl_local_space *copy() && = delete;
+  inline __isl_keep isl_local_space *get() const;
+  inline __isl_give isl_local_space *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline local_space add_dims(isl::dim type, unsigned int n) const;
+  inline int dim(isl::dim type) const;
+  inline local_space domain() const;
+  inline local_space drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline local_space flatten_domain() const;
+  inline local_space flatten_range() const;
+  inline local_space from_domain() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline aff get_div(int pos) const;
+  inline space get_space() const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
+  inline local_space insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline local_space intersect(local_space ls2) const;
+  inline boolean is_equal(const local_space &ls2) const;
+  inline boolean is_params() const;
+  inline boolean is_set() const;
+  inline local_space range() const;
+  inline local_space set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline local_space set_from_params() const;
+  inline local_space set_tuple_id(isl::dim type, id id) const;
+  inline local_space wrap() const;
+};
+
+// declarations for isl::map
+inline map manage(__isl_take isl_map *ptr);
+inline map manage_copy(__isl_keep isl_map *ptr);
+
+class map {
+  friend inline map manage(__isl_take isl_map *ptr);
+  friend inline map manage_copy(__isl_keep isl_map *ptr);
+
+  isl_map *ptr = nullptr;
+
+  inline explicit map(__isl_take isl_map *ptr);
+
+public:
+  inline /* implicit */ map();
+  inline /* implicit */ map(const map &obj);
+  inline /* implicit */ map(std::nullptr_t);
+  inline explicit map(ctx ctx, const std::string &str);
+  inline /* implicit */ map(basic_map bmap);
+  inline map &operator=(map obj);
+  inline ~map();
+  inline __isl_give isl_map *copy() const &;
+  inline __isl_give isl_map *copy() && = delete;
+  inline __isl_keep isl_map *get() const;
+  inline __isl_give isl_map *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline map add_constraint(constraint constraint) const;
+  inline map add_dims(isl::dim type, unsigned int n) const;
+  inline basic_map affine_hull() const;
+  inline map align_params(space model) const;
+  inline map apply_domain(map map2) const;
+  inline map apply_range(map map2) const;
+  inline boolean can_curry() const;
+  inline boolean can_range_curry() const;
+  inline boolean can_uncurry() const;
+  inline boolean can_zip() const;
+  inline map coalesce() const;
+  inline map complement() const;
+  inline basic_map convex_hull() const;
+  inline map curry() const;
+  inline set deltas() const;
+  inline map deltas_map() const;
+  inline map detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline pw_aff dim_max(int pos) const;
+  inline pw_aff dim_min(int pos) const;
+  inline set domain() const;
+  inline map domain_factor_domain() const;
+  inline map domain_factor_range() const;
+  inline boolean domain_is_wrapping() const;
+  inline map domain_map() const;
+  inline map domain_product(map map2) const;
+  inline map drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline map drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline map drop_unused_params() const;
+  inline map eliminate(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline map empty(space space);
+  inline map equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline map factor_domain() const;
+  inline map factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline map fix_si(isl::dim type, unsigned int pos, int value) const;
+  inline map fix_val(isl::dim type, unsigned int pos, val v) const;
+  inline map fixed_power_val(val exp) const;
+  inline map flat_domain_product(map map2) const;
+  inline map flat_product(map map2) const;
+  inline map flat_range_product(map map2) const;
+  inline map flatten() const;
+  inline map flatten_domain() const;
+  inline map flatten_range() const;
+  inline map floordiv_val(val d) const;
+  inline stat foreach_basic_map(const std::function<stat(basic_map)> &fn) const;
+  static inline map from_aff(aff aff);
+  static inline map from_domain(set set);
+  static inline map from_domain_and_range(set domain, set range);
+  static inline map from_multi_aff(multi_aff maff);
+  static inline map from_multi_pw_aff(multi_pw_aff mpa);
+  static inline map from_pw_aff(pw_aff pwaff);
+  static inline map from_pw_multi_aff(pw_multi_aff pma);
+  static inline map from_range(set set);
+  static inline map from_union_map(union_map umap);
+  inline basic_map_list get_basic_map_list() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline uint32_t get_hash() const;
+  inline fixed_box get_range_simple_fixed_box_hull() const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline map gist(map context) const;
+  inline map gist_basic_map(basic_map context) const;
+  inline map gist_domain(set context) const;
+  inline map gist_params(set context) const;
+  inline map gist_range(set context) const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
+  inline boolean has_equal_space(const map &map2) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline boolean has_tuple_name(isl::dim type) const;
+  static inline map identity(space dim);
+  inline map insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
+  inline map intersect(map map2) const;
+  inline map intersect_domain(set set) const;
+  inline map intersect_domain_factor_range(map factor) const;
+  inline map intersect_params(set params) const;
+  inline map intersect_range(set set) const;
+  inline map intersect_range_factor_range(map factor) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_bijective() const;
+  inline boolean is_disjoint(const map &map2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const map &map2) const;
+  inline boolean is_identity() const;
+  inline boolean is_injective() const;
+  inline boolean is_product() const;
+  inline boolean is_single_valued() const;
+  inline boolean is_strict_subset(const map &map2) const;
+  inline boolean is_subset(const map &map2) const;
+  inline int is_translation() const;
+  static inline map lex_ge(space set_dim);
+  static inline map lex_ge_first(space dim, unsigned int n);
+  inline map lex_ge_map(map map2) const;
+  static inline map lex_gt(space set_dim);
+  static inline map lex_gt_first(space dim, unsigned int n);
+  inline map lex_gt_map(map map2) const;
+  static inline map lex_le(space set_dim);
+  static inline map lex_le_first(space dim, unsigned int n);
+  inline map lex_le_map(map map2) const;
+  static inline map lex_lt(space set_dim);
+  static inline map lex_lt_first(space dim, unsigned int n);
+  inline map lex_lt_map(map map2) const;
+  inline map lexmax() const;
+  inline pw_multi_aff lexmax_pw_multi_aff() const;
+  inline map lexmin() const;
+  inline pw_multi_aff lexmin_pw_multi_aff() const;
+  inline map lower_bound_si(isl::dim type, unsigned int pos, int value) const;
+  inline map move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline int n_basic_map() const;
+  static inline map nat_universe(space dim);
+  inline map neg() const;
+  inline map oppose(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline map order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline map order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline map order_le(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline map order_lt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline set params() const;
+  inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
+  inline boolean plain_is_empty() const;
+  inline boolean plain_is_equal(const map &map2) const;
+  inline boolean plain_is_injective() const;
+  inline boolean plain_is_single_valued() const;
+  inline boolean plain_is_universe() const;
+  inline basic_map plain_unshifted_simple_hull() const;
+  inline basic_map polyhedral_hull() const;
+  inline map preimage_domain_multi_aff(multi_aff ma) const;
+  inline map preimage_domain_multi_pw_aff(multi_pw_aff mpa) const;
+  inline map preimage_domain_pw_multi_aff(pw_multi_aff pma) const;
+  inline map preimage_range_multi_aff(multi_aff ma) const;
+  inline map preimage_range_pw_multi_aff(pw_multi_aff pma) const;
+  inline map product(map map2) const;
+  inline map project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set range() const;
+  inline map range_curry() const;
+  inline map range_factor_domain() const;
+  inline map range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  inline map range_map() const;
+  inline map range_product(map map2) const;
+  inline map remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline map remove_divs() const;
+  inline map remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline map remove_redundancies() const;
+  inline map remove_unknown_divs() const;
+  inline map reset_tuple_id(isl::dim type) const;
+  inline map reset_user() const;
+  inline map reverse() const;
+  inline basic_map sample() const;
+  inline map set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline map set_tuple_id(isl::dim type, id id) const;
+  inline map set_tuple_name(isl::dim type, const std::string &s) const;
+  inline basic_map simple_hull() const;
+  inline map subtract(map map2) const;
+  inline map subtract_domain(set dom) const;
+  inline map subtract_range(set dom) const;
+  inline map sum(map map2) const;
+  inline map uncurry() const;
+  inline map unite(map map2) const;
+  static inline map universe(space space);
+  inline basic_map unshifted_simple_hull() const;
+  inline basic_map unshifted_simple_hull_from_map_list(map_list list) const;
+  inline map upper_bound_si(isl::dim type, unsigned int pos, int value) const;
+  inline set wrap() const;
+  inline map zip() const;
+};
+
+// declarations for isl::map_list
+inline map_list manage(__isl_take isl_map_list *ptr);
+inline map_list manage_copy(__isl_keep isl_map_list *ptr);
+
+class map_list {
+  friend inline map_list manage(__isl_take isl_map_list *ptr);
+  friend inline map_list manage_copy(__isl_keep isl_map_list *ptr);
+
+  isl_map_list *ptr = nullptr;
+
+  inline explicit map_list(__isl_take isl_map_list *ptr);
+
+public:
+  inline /* implicit */ map_list();
+  inline /* implicit */ map_list(const map_list &obj);
+  inline /* implicit */ map_list(std::nullptr_t);
+  inline map_list &operator=(map_list obj);
+  inline ~map_list();
+  inline __isl_give isl_map_list *copy() const &;
+  inline __isl_give isl_map_list *copy() && = delete;
+  inline __isl_keep isl_map_list *get() const;
+  inline __isl_give isl_map_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline map_list add(map el) const;
+  static inline map_list alloc(ctx ctx, int n);
+  inline map_list concat(map_list list2) const;
+  inline map_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(map)> &fn) const;
+  static inline map_list from_map(map el);
+  inline map get_at(int index) const;
+  inline map get_map(int index) const;
+  inline map_list insert(unsigned int pos, map el) const;
+  inline int n_map() const;
+  inline map_list reverse() const;
+  inline map_list set_map(int index, map el) const;
+  inline int size() const;
+  inline map_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::mat
+inline mat manage(__isl_take isl_mat *ptr);
+inline mat manage_copy(__isl_keep isl_mat *ptr);
+
+class mat {
+  friend inline mat manage(__isl_take isl_mat *ptr);
+  friend inline mat manage_copy(__isl_keep isl_mat *ptr);
+
+  isl_mat *ptr = nullptr;
+
+  inline explicit mat(__isl_take isl_mat *ptr);
+
+public:
+  inline /* implicit */ mat();
+  inline /* implicit */ mat(const mat &obj);
+  inline /* implicit */ mat(std::nullptr_t);
+  inline mat &operator=(mat obj);
+  inline ~mat();
+  inline __isl_give isl_mat *copy() const &;
+  inline __isl_give isl_mat *copy() && = delete;
+  inline __isl_keep isl_mat *get() const;
+  inline __isl_give isl_mat *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline mat add_rows(unsigned int n) const;
+  inline mat add_zero_cols(unsigned int n) const;
+  inline mat add_zero_rows(unsigned int n) const;
+  inline mat aff_direct_sum(mat right) const;
+  static inline mat alloc(ctx ctx, unsigned int n_row, unsigned int n_col);
+  inline int cols() const;
+  inline mat concat(mat bot) const;
+  inline mat diagonal(mat mat2) const;
+  inline mat drop_cols(unsigned int col, unsigned int n) const;
+  inline mat drop_rows(unsigned int row, unsigned int n) const;
+  static inline mat from_row_vec(vec vec);
+  inline val get_element_val(int row, int col) const;
+  inline boolean has_linearly_independent_rows(const mat &mat2) const;
+  inline int initial_non_zero_cols() const;
+  inline mat insert_cols(unsigned int col, unsigned int n) const;
+  inline mat insert_rows(unsigned int row, unsigned int n) const;
+  inline mat insert_zero_cols(unsigned int first, unsigned int n) const;
+  inline mat insert_zero_rows(unsigned int row, unsigned int n) const;
+  inline mat inverse_product(mat right) const;
+  inline boolean is_equal(const mat &mat2) const;
+  inline mat lin_to_aff() const;
+  inline mat move_cols(unsigned int dst_col, unsigned int src_col, unsigned int n) const;
+  inline mat normalize() const;
+  inline mat normalize_row(int row) const;
+  inline mat product(mat right) const;
+  inline int rank() const;
+  inline mat right_inverse() const;
+  inline mat right_kernel() const;
+  inline mat row_basis() const;
+  inline mat row_basis_extension(mat mat2) const;
+  inline int rows() const;
+  inline mat set_element_si(int row, int col, int v) const;
+  inline mat set_element_val(int row, int col, val v) const;
+  inline mat swap_cols(unsigned int i, unsigned int j) const;
+  inline mat swap_rows(unsigned int i, unsigned int j) const;
+  inline mat transpose() const;
+  inline mat unimodular_complete(int row) const;
+  inline mat vec_concat(vec bot) const;
+  inline vec vec_inverse_product(vec vec) const;
+  inline vec vec_product(vec vec) const;
+};
+
+// declarations for isl::multi_aff
+inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+class multi_aff {
+  friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
+  friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
+
+  isl_multi_aff *ptr = nullptr;
+
+  inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
+
+public:
+  inline /* implicit */ multi_aff();
+  inline /* implicit */ multi_aff(const multi_aff &obj);
+  inline /* implicit */ multi_aff(std::nullptr_t);
+  inline /* implicit */ multi_aff(aff aff);
+  inline explicit multi_aff(ctx ctx, const std::string &str);
+  inline multi_aff &operator=(multi_aff obj);
+  inline ~multi_aff();
+  inline __isl_give isl_multi_aff *copy() const &;
+  inline __isl_give isl_multi_aff *copy() && = delete;
+  inline __isl_keep isl_multi_aff *get() const;
+  inline __isl_give isl_multi_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline multi_aff add(multi_aff multi2) const;
+  inline multi_aff add_dims(isl::dim type, unsigned int n) const;
+  inline multi_aff align_params(space model) const;
+  inline unsigned int dim(isl::dim type) const;
+  static inline multi_aff domain_map(space space);
+  inline multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline multi_aff factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline multi_aff flat_range_product(multi_aff multi2) const;
+  inline multi_aff flatten_domain() const;
+  inline multi_aff flatten_range() const;
+  inline multi_aff floor() const;
+  static inline multi_aff from_aff_list(space space, aff_list list);
+  inline multi_aff from_range() const;
+  inline aff get_aff(int pos) const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline multi_aff gist(set context) const;
+  inline multi_aff gist_params(set context) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  static inline multi_aff identity(space space);
+  inline multi_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline set lex_ge_set(multi_aff ma2) const;
+  inline set lex_gt_set(multi_aff ma2) const;
+  inline set lex_le_set(multi_aff ma2) const;
+  inline set lex_lt_set(multi_aff ma2) const;
+  inline multi_aff mod_multi_val(multi_val mv) const;
+  inline multi_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  static inline multi_aff multi_val_on_space(space space, multi_val mv);
+  inline multi_aff neg() const;
+  inline int plain_cmp(const multi_aff &multi2) const;
+  inline boolean plain_is_equal(const multi_aff &multi2) const;
+  inline multi_aff product(multi_aff multi2) const;
+  inline multi_aff project_domain_on_params() const;
+  static inline multi_aff project_out_map(space space, isl::dim type, unsigned int first, unsigned int n);
+  inline multi_aff pullback(multi_aff ma2) const;
+  inline multi_aff range_factor_domain() const;
+  inline multi_aff range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  static inline multi_aff range_map(space space);
+  inline multi_aff range_product(multi_aff multi2) const;
+  inline multi_aff range_splice(unsigned int pos, multi_aff multi2) const;
+  inline multi_aff reset_tuple_id(isl::dim type) const;
+  inline multi_aff reset_user() const;
+  inline multi_aff scale_down_multi_val(multi_val mv) const;
+  inline multi_aff scale_down_val(val v) const;
+  inline multi_aff scale_multi_val(multi_val mv) const;
+  inline multi_aff scale_val(val v) const;
+  inline multi_aff set_aff(int pos, aff el) const;
+  inline multi_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline multi_aff set_tuple_id(isl::dim type, id id) const;
+  inline multi_aff set_tuple_name(isl::dim type, const std::string &s) const;
+  inline multi_aff splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const;
+  inline multi_aff sub(multi_aff multi2) const;
+  static inline multi_aff zero(space space);
+};
+
+// declarations for isl::multi_pw_aff
+inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+class multi_pw_aff {
+  friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
+  friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
+
+  isl_multi_pw_aff *ptr = nullptr;
+
+  inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_pw_aff();
+  inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
+  inline /* implicit */ multi_pw_aff(std::nullptr_t);
+  inline /* implicit */ multi_pw_aff(multi_aff ma);
+  inline /* implicit */ multi_pw_aff(pw_aff pa);
+  inline /* implicit */ multi_pw_aff(pw_multi_aff pma);
+  inline explicit multi_pw_aff(ctx ctx, const std::string &str);
+  inline multi_pw_aff &operator=(multi_pw_aff obj);
+  inline ~multi_pw_aff();
+  inline __isl_give isl_multi_pw_aff *copy() const &;
+  inline __isl_give isl_multi_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_pw_aff *get() const;
+  inline __isl_give isl_multi_pw_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline multi_pw_aff add(multi_pw_aff multi2) const;
+  inline multi_pw_aff add_dims(isl::dim type, unsigned int n) const;
+  inline multi_pw_aff align_params(space model) const;
+  inline multi_pw_aff coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline set domain() const;
+  inline multi_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline map eq_map(multi_pw_aff mpa2) const;
+  inline multi_pw_aff factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline multi_pw_aff flat_range_product(multi_pw_aff multi2) const;
+  inline multi_pw_aff flatten_range() const;
+  static inline multi_pw_aff from_pw_aff_list(space space, pw_aff_list list);
+  inline multi_pw_aff from_range() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline uint32_t get_hash() const;
+  inline pw_aff get_pw_aff(int pos) const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline multi_pw_aff gist(set set) const;
+  inline multi_pw_aff gist_params(set set) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  static inline multi_pw_aff identity(space space);
+  inline multi_pw_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline multi_pw_aff intersect_domain(set domain) const;
+  inline multi_pw_aff intersect_params(set set) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline boolean is_cst() const;
+  inline boolean is_equal(const multi_pw_aff &mpa2) const;
+  inline map lex_gt_map(multi_pw_aff mpa2) const;
+  inline map lex_lt_map(multi_pw_aff mpa2) const;
+  inline multi_pw_aff mod_multi_val(multi_val mv) const;
+  inline multi_pw_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline multi_pw_aff neg() const;
+  inline boolean plain_is_equal(const multi_pw_aff &multi2) const;
+  inline multi_pw_aff product(multi_pw_aff multi2) const;
+  inline multi_pw_aff project_domain_on_params() const;
+  inline multi_pw_aff pullback(multi_aff ma) const;
+  inline multi_pw_aff pullback(pw_multi_aff pma) const;
+  inline multi_pw_aff pullback(multi_pw_aff mpa2) const;
+  inline multi_pw_aff range_factor_domain() const;
+  inline multi_pw_aff range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  inline multi_pw_aff range_product(multi_pw_aff multi2) const;
+  inline multi_pw_aff range_splice(unsigned int pos, multi_pw_aff multi2) const;
+  inline multi_pw_aff reset_tuple_id(isl::dim type) const;
+  inline multi_pw_aff reset_user() const;
+  inline multi_pw_aff scale_down_multi_val(multi_val mv) const;
+  inline multi_pw_aff scale_down_val(val v) const;
+  inline multi_pw_aff scale_multi_val(multi_val mv) const;
+  inline multi_pw_aff scale_val(val v) const;
+  inline multi_pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline multi_pw_aff set_pw_aff(int pos, pw_aff el) const;
+  inline multi_pw_aff set_tuple_id(isl::dim type, id id) const;
+  inline multi_pw_aff set_tuple_name(isl::dim type, const std::string &s) const;
+  inline multi_pw_aff splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const;
+  inline multi_pw_aff sub(multi_pw_aff multi2) const;
+  static inline multi_pw_aff zero(space space);
+};
+
+// declarations for isl::multi_union_pw_aff
+inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+class multi_union_pw_aff {
+  friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
+  friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
+
+  isl_multi_union_pw_aff *ptr = nullptr;
+
+  inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ multi_union_pw_aff();
+  inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
+  inline /* implicit */ multi_union_pw_aff(std::nullptr_t);
+  inline /* implicit */ multi_union_pw_aff(union_pw_aff upa);
+  inline /* implicit */ multi_union_pw_aff(multi_pw_aff mpa);
+  inline explicit multi_union_pw_aff(union_pw_multi_aff upma);
+  inline explicit multi_union_pw_aff(ctx ctx, const std::string &str);
+  inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
+  inline ~multi_union_pw_aff();
+  inline __isl_give isl_multi_union_pw_aff *copy() const &;
+  inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_multi_union_pw_aff *get() const;
+  inline __isl_give isl_multi_union_pw_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline multi_union_pw_aff add(multi_union_pw_aff multi2) const;
+  inline multi_union_pw_aff align_params(space model) const;
+  inline union_pw_aff apply_aff(aff aff) const;
+  inline union_pw_aff apply_pw_aff(pw_aff pa) const;
+  inline multi_union_pw_aff apply_pw_multi_aff(pw_multi_aff pma) const;
+  inline multi_union_pw_aff coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline union_set domain() const;
+  inline multi_union_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline multi_pw_aff extract_multi_pw_aff(space space) const;
+  inline multi_union_pw_aff factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline multi_union_pw_aff flat_range_product(multi_union_pw_aff multi2) const;
+  inline multi_union_pw_aff flatten_range() const;
+  inline multi_union_pw_aff floor() const;
+  static inline multi_union_pw_aff from_multi_aff(multi_aff ma);
+  inline multi_union_pw_aff from_range() const;
+  static inline multi_union_pw_aff from_union_map(union_map umap);
+  static inline multi_union_pw_aff from_union_pw_aff_list(space space, union_pw_aff_list list);
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline union_pw_aff get_union_pw_aff(int pos) const;
+  inline multi_union_pw_aff gist(union_set context) const;
+  inline multi_union_pw_aff gist_params(set context) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline multi_union_pw_aff intersect_domain(union_set uset) const;
+  inline multi_union_pw_aff intersect_params(set params) const;
+  inline multi_union_pw_aff intersect_range(set set) const;
+  inline boolean involves_nan() const;
+  inline multi_val max_multi_val() const;
+  inline multi_val min_multi_val() const;
+  inline multi_union_pw_aff mod_multi_val(multi_val mv) const;
+  static inline multi_union_pw_aff multi_aff_on_domain(union_set domain, multi_aff ma);
+  static inline multi_union_pw_aff multi_val_on_domain(union_set domain, multi_val mv);
+  inline multi_union_pw_aff neg() const;
+  inline boolean plain_is_equal(const multi_union_pw_aff &multi2) const;
+  inline multi_union_pw_aff pullback(union_pw_multi_aff upma) const;
+  static inline multi_union_pw_aff pw_multi_aff_on_domain(union_set domain, pw_multi_aff pma);
+  inline multi_union_pw_aff range_factor_domain() const;
+  inline multi_union_pw_aff range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  inline multi_union_pw_aff range_product(multi_union_pw_aff multi2) const;
+  inline multi_union_pw_aff range_splice(unsigned int pos, multi_union_pw_aff multi2) const;
+  inline multi_union_pw_aff reset_tuple_id(isl::dim type) const;
+  inline multi_union_pw_aff reset_user() const;
+  inline multi_union_pw_aff scale_down_multi_val(multi_val mv) const;
+  inline multi_union_pw_aff scale_down_val(val v) const;
+  inline multi_union_pw_aff scale_multi_val(multi_val mv) const;
+  inline multi_union_pw_aff scale_val(val v) const;
+  inline multi_union_pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline multi_union_pw_aff set_tuple_id(isl::dim type, id id) const;
+  inline multi_union_pw_aff set_tuple_name(isl::dim type, const std::string &s) const;
+  inline multi_union_pw_aff set_union_pw_aff(int pos, union_pw_aff el) const;
+  inline multi_union_pw_aff sub(multi_union_pw_aff multi2) const;
+  inline multi_union_pw_aff union_add(multi_union_pw_aff mupa2) const;
+  static inline multi_union_pw_aff zero(space space);
+  inline union_set zero_union_set() const;
+};
+
+// declarations for isl::multi_val
+inline multi_val manage(__isl_take isl_multi_val *ptr);
+inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+class multi_val {
+  friend inline multi_val manage(__isl_take isl_multi_val *ptr);
+  friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
+
+  isl_multi_val *ptr = nullptr;
+
+  inline explicit multi_val(__isl_take isl_multi_val *ptr);
+
+public:
+  inline /* implicit */ multi_val();
+  inline /* implicit */ multi_val(const multi_val &obj);
+  inline /* implicit */ multi_val(std::nullptr_t);
+  inline multi_val &operator=(multi_val obj);
+  inline ~multi_val();
+  inline __isl_give isl_multi_val *copy() const &;
+  inline __isl_give isl_multi_val *copy() && = delete;
+  inline __isl_keep isl_multi_val *get() const;
+  inline __isl_give isl_multi_val *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline multi_val add(multi_val multi2) const;
+  inline multi_val add_dims(isl::dim type, unsigned int n) const;
+  inline multi_val add_val(val v) const;
+  inline multi_val align_params(space model) const;
+  inline unsigned int dim(isl::dim type) const;
+  inline multi_val drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline multi_val factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline multi_val flat_range_product(multi_val multi2) const;
+  inline multi_val flatten_range() const;
+  inline multi_val from_range() const;
+  static inline multi_val from_val_list(space space, val_list list);
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline val get_val(int pos) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline multi_val insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline multi_val mod_multi_val(multi_val mv) const;
+  inline multi_val mod_val(val v) const;
+  inline multi_val neg() const;
+  inline boolean plain_is_equal(const multi_val &multi2) const;
+  inline multi_val product(multi_val multi2) const;
+  inline multi_val project_domain_on_params() const;
+  inline multi_val range_factor_domain() const;
+  inline multi_val range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  inline multi_val range_product(multi_val multi2) const;
+  inline multi_val range_splice(unsigned int pos, multi_val multi2) const;
+  static inline multi_val read_from_str(ctx ctx, const std::string &str);
+  inline multi_val reset_tuple_id(isl::dim type) const;
+  inline multi_val reset_user() const;
+  inline multi_val scale_down_multi_val(multi_val mv) const;
+  inline multi_val scale_down_val(val v) const;
+  inline multi_val scale_multi_val(multi_val mv) const;
+  inline multi_val scale_val(val v) const;
+  inline multi_val set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline multi_val set_tuple_id(isl::dim type, id id) const;
+  inline multi_val set_tuple_name(isl::dim type, const std::string &s) const;
+  inline multi_val set_val(int pos, val el) const;
+  inline multi_val splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const;
+  inline multi_val sub(multi_val multi2) const;
+  static inline multi_val zero(space space);
+};
+
+// declarations for isl::point
+inline point manage(__isl_take isl_point *ptr);
+inline point manage_copy(__isl_keep isl_point *ptr);
+
+class point {
+  friend inline point manage(__isl_take isl_point *ptr);
+  friend inline point manage_copy(__isl_keep isl_point *ptr);
+
+  isl_point *ptr = nullptr;
+
+  inline explicit point(__isl_take isl_point *ptr);
+
+public:
+  inline /* implicit */ point();
+  inline /* implicit */ point(const point &obj);
+  inline /* implicit */ point(std::nullptr_t);
+  inline explicit point(space dim);
+  inline point &operator=(point obj);
+  inline ~point();
+  inline __isl_give isl_point *copy() const &;
+  inline __isl_give isl_point *copy() && = delete;
+  inline __isl_keep isl_point *get() const;
+  inline __isl_give isl_point *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline point add_ui(isl::dim type, int pos, unsigned int val) const;
+  inline val get_coordinate_val(isl::dim type, int pos) const;
+  inline space get_space() const;
+  inline point set_coordinate_val(isl::dim type, int pos, val v) const;
+  inline point sub_ui(isl::dim type, int pos, unsigned int val) const;
+};
+
+// declarations for isl::pw_aff
+inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+class pw_aff {
+  friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
+  friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
+
+  isl_pw_aff *ptr = nullptr;
+
+  inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
+
+public:
+  inline /* implicit */ pw_aff();
+  inline /* implicit */ pw_aff(const pw_aff &obj);
+  inline /* implicit */ pw_aff(std::nullptr_t);
+  inline /* implicit */ pw_aff(aff aff);
+  inline explicit pw_aff(local_space ls);
+  inline explicit pw_aff(set domain, val v);
+  inline explicit pw_aff(ctx ctx, const std::string &str);
+  inline pw_aff &operator=(pw_aff obj);
+  inline ~pw_aff();
+  inline __isl_give isl_pw_aff *copy() const &;
+  inline __isl_give isl_pw_aff *copy() && = delete;
+  inline __isl_keep isl_pw_aff *get() const;
+  inline __isl_give isl_pw_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline pw_aff add(pw_aff pwaff2) const;
+  inline pw_aff add_dims(isl::dim type, unsigned int n) const;
+  inline pw_aff align_params(space model) const;
+  static inline pw_aff alloc(set set, aff aff);
+  inline pw_aff ceil() const;
+  inline pw_aff coalesce() const;
+  inline pw_aff cond(pw_aff pwaff_true, pw_aff pwaff_false) const;
+  inline unsigned int dim(isl::dim type) const;
+  inline pw_aff div(pw_aff pa2) const;
+  inline set domain() const;
+  inline pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_aff drop_unused_params() const;
+  static inline pw_aff empty(space dim);
+  inline map eq_map(pw_aff pa2) const;
+  inline set eq_set(pw_aff pwaff2) const;
+  inline val eval(point pnt) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline pw_aff floor() const;
+  inline stat foreach_piece(const std::function<stat(set, aff)> &fn) const;
+  inline pw_aff from_range() const;
+  inline set ge_set(pw_aff pwaff2) const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline uint32_t get_hash() const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline pw_aff gist(set context) const;
+  inline pw_aff gist_params(set context) const;
+  inline map gt_map(pw_aff pa2) const;
+  inline set gt_set(pw_aff pwaff2) const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline pw_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_aff intersect_domain(set set) const;
+  inline pw_aff intersect_params(set set) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline boolean is_cst() const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const pw_aff &pa2) const;
+  inline set le_set(pw_aff pwaff2) const;
+  inline map lt_map(pw_aff pa2) const;
+  inline set lt_set(pw_aff pwaff2) const;
+  inline pw_aff max(pw_aff pwaff2) const;
+  inline pw_aff min(pw_aff pwaff2) const;
+  inline pw_aff mod(val mod) const;
+  inline pw_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline pw_aff mul(pw_aff pwaff2) const;
+  inline int n_piece() const;
+  static inline pw_aff nan_on_domain(local_space ls);
+  inline set ne_set(pw_aff pwaff2) const;
+  inline pw_aff neg() const;
+  inline set non_zero_set() const;
+  inline set nonneg_set() const;
+  inline set params() const;
+  inline int plain_cmp(const pw_aff &pa2) const;
+  inline boolean plain_is_equal(const pw_aff &pwaff2) const;
+  inline set pos_set() const;
+  inline pw_aff project_domain_on_params() const;
+  inline pw_aff pullback(multi_aff ma) const;
+  inline pw_aff pullback(pw_multi_aff pma) const;
+  inline pw_aff pullback(multi_pw_aff mpa) const;
+  inline pw_aff reset_tuple_id(isl::dim type) const;
+  inline pw_aff reset_user() const;
+  inline pw_aff scale(val v) const;
+  inline pw_aff scale_down(val f) const;
+  inline pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline pw_aff set_tuple_id(isl::dim type, id id) const;
+  inline pw_aff sub(pw_aff pwaff2) const;
+  inline pw_aff subtract_domain(set set) const;
+  inline pw_aff tdiv_q(pw_aff pa2) const;
+  inline pw_aff tdiv_r(pw_aff pa2) const;
+  inline pw_aff union_add(pw_aff pwaff2) const;
+  inline pw_aff union_max(pw_aff pwaff2) const;
+  inline pw_aff union_min(pw_aff pwaff2) const;
+  static inline pw_aff var_on_domain(local_space ls, isl::dim type, unsigned int pos);
+  inline set zero_set() const;
+};
+
+// declarations for isl::pw_aff_list
+inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+class pw_aff_list {
+  friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
+  friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
+
+  isl_pw_aff_list *ptr = nullptr;
+
+  inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_aff_list();
+  inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
+  inline /* implicit */ pw_aff_list(std::nullptr_t);
+  inline pw_aff_list &operator=(pw_aff_list obj);
+  inline ~pw_aff_list();
+  inline __isl_give isl_pw_aff_list *copy() const &;
+  inline __isl_give isl_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_aff_list *get() const;
+  inline __isl_give isl_pw_aff_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline pw_aff_list add(pw_aff el) const;
+  static inline pw_aff_list alloc(ctx ctx, int n);
+  inline pw_aff_list concat(pw_aff_list list2) const;
+  inline pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline set eq_set(pw_aff_list list2) const;
+  inline stat foreach(const std::function<stat(pw_aff)> &fn) const;
+  static inline pw_aff_list from_pw_aff(pw_aff el);
+  inline set ge_set(pw_aff_list list2) const;
+  inline pw_aff get_at(int index) const;
+  inline pw_aff get_pw_aff(int index) const;
+  inline set gt_set(pw_aff_list list2) const;
+  inline pw_aff_list insert(unsigned int pos, pw_aff el) const;
+  inline set le_set(pw_aff_list list2) const;
+  inline set lt_set(pw_aff_list list2) const;
+  inline pw_aff max() const;
+  inline pw_aff min() const;
+  inline int n_pw_aff() const;
+  inline set ne_set(pw_aff_list list2) const;
+  inline pw_aff_list reverse() const;
+  inline pw_aff_list set_pw_aff(int index, pw_aff el) const;
+  inline int size() const;
+  inline pw_aff_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::pw_multi_aff
+inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+class pw_multi_aff {
+  friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
+  friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
+
+  isl_pw_multi_aff *ptr = nullptr;
+
+  inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff();
+  inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
+  inline /* implicit */ pw_multi_aff(std::nullptr_t);
+  inline /* implicit */ pw_multi_aff(multi_aff ma);
+  inline /* implicit */ pw_multi_aff(pw_aff pa);
+  inline explicit pw_multi_aff(ctx ctx, const std::string &str);
+  inline pw_multi_aff &operator=(pw_multi_aff obj);
+  inline ~pw_multi_aff();
+  inline __isl_give isl_pw_multi_aff *copy() const &;
+  inline __isl_give isl_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff *get() const;
+  inline __isl_give isl_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline pw_multi_aff add(pw_multi_aff pma2) const;
+  inline pw_multi_aff align_params(space model) const;
+  static inline pw_multi_aff alloc(set set, multi_aff maff);
+  inline pw_multi_aff coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline set domain() const;
+  inline pw_multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_multi_aff drop_unused_params() const;
+  static inline pw_multi_aff empty(space space);
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline pw_multi_aff fix_si(isl::dim type, unsigned int pos, int value) const;
+  inline pw_multi_aff flat_range_product(pw_multi_aff pma2) const;
+  inline stat foreach_piece(const std::function<stat(set, multi_aff)> &fn) const;
+  static inline pw_multi_aff from_domain(set set);
+  static inline pw_multi_aff from_map(map map);
+  static inline pw_multi_aff from_multi_pw_aff(multi_pw_aff mpa);
+  static inline pw_multi_aff from_set(set set);
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline space get_domain_space() const;
+  inline pw_aff get_pw_aff(int pos) const;
+  inline space get_space() const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline pw_multi_aff gist(set set) const;
+  inline pw_multi_aff gist_params(set set) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline boolean has_tuple_name(isl::dim type) const;
+  static inline pw_multi_aff identity(space space);
+  inline pw_multi_aff intersect_domain(set set) const;
+  inline pw_multi_aff intersect_params(set set) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline boolean is_equal(const pw_multi_aff &pma2) const;
+  static inline pw_multi_aff multi_val_on_domain(set domain, multi_val mv);
+  inline int n_piece() const;
+  inline pw_multi_aff neg() const;
+  inline boolean plain_is_equal(const pw_multi_aff &pma2) const;
+  inline pw_multi_aff product(pw_multi_aff pma2) const;
+  inline pw_multi_aff project_domain_on_params() const;
+  static inline pw_multi_aff project_out_map(space space, isl::dim type, unsigned int first, unsigned int n);
+  inline pw_multi_aff pullback(multi_aff ma) const;
+  inline pw_multi_aff pullback(pw_multi_aff pma2) const;
+  static inline pw_multi_aff range_map(space space);
+  inline pw_multi_aff range_product(pw_multi_aff pma2) const;
+  inline pw_multi_aff reset_tuple_id(isl::dim type) const;
+  inline pw_multi_aff reset_user() const;
+  inline pw_multi_aff scale_down_val(val v) const;
+  inline pw_multi_aff scale_multi_val(multi_val mv) const;
+  inline pw_multi_aff scale_val(val v) const;
+  inline pw_multi_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline pw_multi_aff set_pw_aff(unsigned int pos, pw_aff pa) const;
+  inline pw_multi_aff set_tuple_id(isl::dim type, id id) const;
+  inline pw_multi_aff sub(pw_multi_aff pma2) const;
+  inline pw_multi_aff subtract_domain(set set) const;
+  inline pw_multi_aff union_add(pw_multi_aff pma2) const;
+  inline pw_multi_aff union_lexmax(pw_multi_aff pma2) const;
+  inline pw_multi_aff union_lexmin(pw_multi_aff pma2) const;
+  static inline pw_multi_aff zero(space space);
+};
+
+// declarations for isl::pw_multi_aff_list
+inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+class pw_multi_aff_list {
+  friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
+  friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
+
+  isl_pw_multi_aff_list *ptr = nullptr;
+
+  inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
+
+public:
+  inline /* implicit */ pw_multi_aff_list();
+  inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
+  inline /* implicit */ pw_multi_aff_list(std::nullptr_t);
+  inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
+  inline ~pw_multi_aff_list();
+  inline __isl_give isl_pw_multi_aff_list *copy() const &;
+  inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
+  inline __isl_keep isl_pw_multi_aff_list *get() const;
+  inline __isl_give isl_pw_multi_aff_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline pw_multi_aff_list add(pw_multi_aff el) const;
+  static inline pw_multi_aff_list alloc(ctx ctx, int n);
+  inline pw_multi_aff_list concat(pw_multi_aff_list list2) const;
+  inline pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(pw_multi_aff)> &fn) const;
+  static inline pw_multi_aff_list from_pw_multi_aff(pw_multi_aff el);
+  inline pw_multi_aff get_at(int index) const;
+  inline pw_multi_aff get_pw_multi_aff(int index) const;
+  inline pw_multi_aff_list insert(unsigned int pos, pw_multi_aff el) const;
+  inline int n_pw_multi_aff() const;
+  inline pw_multi_aff_list reverse() const;
+  inline pw_multi_aff_list set_pw_multi_aff(int index, pw_multi_aff el) const;
+  inline int size() const;
+  inline pw_multi_aff_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::pw_qpolynomial
+inline pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr);
+inline pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr);
+
+class pw_qpolynomial {
+  friend inline pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr);
+  friend inline pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr);
+
+  isl_pw_qpolynomial *ptr = nullptr;
+
+  inline explicit pw_qpolynomial(__isl_take isl_pw_qpolynomial *ptr);
+
+public:
+  inline /* implicit */ pw_qpolynomial();
+  inline /* implicit */ pw_qpolynomial(const pw_qpolynomial &obj);
+  inline /* implicit */ pw_qpolynomial(std::nullptr_t);
+  inline explicit pw_qpolynomial(ctx ctx, const std::string &str);
+  inline pw_qpolynomial &operator=(pw_qpolynomial obj);
+  inline ~pw_qpolynomial();
+  inline __isl_give isl_pw_qpolynomial *copy() const &;
+  inline __isl_give isl_pw_qpolynomial *copy() && = delete;
+  inline __isl_keep isl_pw_qpolynomial *get() const;
+  inline __isl_give isl_pw_qpolynomial *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline pw_qpolynomial add(pw_qpolynomial pwqp2) const;
+  inline pw_qpolynomial add_dims(isl::dim type, unsigned int n) const;
+  static inline pw_qpolynomial alloc(set set, qpolynomial qp);
+  inline pw_qpolynomial coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline set domain() const;
+  inline pw_qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_qpolynomial drop_unused_params() const;
+  inline val eval(point pnt) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline pw_qpolynomial fix_val(isl::dim type, unsigned int n, val v) const;
+  inline stat foreach_piece(const std::function<stat(set, qpolynomial)> &fn) const;
+  static inline pw_qpolynomial from_pw_aff(pw_aff pwaff);
+  static inline pw_qpolynomial from_qpolynomial(qpolynomial qp);
+  inline pw_qpolynomial from_range() const;
+  inline space get_domain_space() const;
+  inline space get_space() const;
+  inline pw_qpolynomial gist(set context) const;
+  inline pw_qpolynomial gist_params(set context) const;
+  inline boolean has_equal_space(const pw_qpolynomial &pwqp2) const;
+  inline pw_qpolynomial insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_qpolynomial intersect_domain(set set) const;
+  inline pw_qpolynomial intersect_params(set set) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_nan() const;
+  inline boolean is_zero() const;
+  inline val max() const;
+  inline val min() const;
+  inline pw_qpolynomial move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline pw_qpolynomial mul(pw_qpolynomial pwqp2) const;
+  inline int n_piece() const;
+  inline pw_qpolynomial neg() const;
+  inline boolean plain_is_equal(const pw_qpolynomial &pwqp2) const;
+  inline pw_qpolynomial pow(unsigned int exponent) const;
+  inline pw_qpolynomial project_domain_on_params() const;
+  inline pw_qpolynomial reset_domain_space(space dim) const;
+  inline pw_qpolynomial reset_user() const;
+  inline pw_qpolynomial scale_down_val(val v) const;
+  inline pw_qpolynomial scale_val(val v) const;
+  inline pw_qpolynomial split_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline pw_qpolynomial split_periods(int max_periods) const;
+  inline pw_qpolynomial sub(pw_qpolynomial pwqp2) const;
+  inline pw_qpolynomial subtract_domain(set set) const;
+  inline pw_qpolynomial to_polynomial(int sign) const;
+  static inline pw_qpolynomial zero(space dim);
+};
+
+// declarations for isl::pw_qpolynomial_fold_list
+inline pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr);
+inline pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr);
+
+class pw_qpolynomial_fold_list {
+  friend inline pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr);
+  friend inline pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr);
+
+  isl_pw_qpolynomial_fold_list *ptr = nullptr;
+
+  inline explicit pw_qpolynomial_fold_list(__isl_take isl_pw_qpolynomial_fold_list *ptr);
+
+public:
+  inline /* implicit */ pw_qpolynomial_fold_list();
+  inline /* implicit */ pw_qpolynomial_fold_list(const pw_qpolynomial_fold_list &obj);
+  inline /* implicit */ pw_qpolynomial_fold_list(std::nullptr_t);
+  inline pw_qpolynomial_fold_list &operator=(pw_qpolynomial_fold_list obj);
+  inline ~pw_qpolynomial_fold_list();
+  inline __isl_give isl_pw_qpolynomial_fold_list *copy() const &;
+  inline __isl_give isl_pw_qpolynomial_fold_list *copy() && = delete;
+  inline __isl_keep isl_pw_qpolynomial_fold_list *get() const;
+  inline __isl_give isl_pw_qpolynomial_fold_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+};
+
+// declarations for isl::pw_qpolynomial_list
+inline pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr);
+inline pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr);
+
+class pw_qpolynomial_list {
+  friend inline pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr);
+  friend inline pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr);
+
+  isl_pw_qpolynomial_list *ptr = nullptr;
+
+  inline explicit pw_qpolynomial_list(__isl_take isl_pw_qpolynomial_list *ptr);
+
+public:
+  inline /* implicit */ pw_qpolynomial_list();
+  inline /* implicit */ pw_qpolynomial_list(const pw_qpolynomial_list &obj);
+  inline /* implicit */ pw_qpolynomial_list(std::nullptr_t);
+  inline pw_qpolynomial_list &operator=(pw_qpolynomial_list obj);
+  inline ~pw_qpolynomial_list();
+  inline __isl_give isl_pw_qpolynomial_list *copy() const &;
+  inline __isl_give isl_pw_qpolynomial_list *copy() && = delete;
+  inline __isl_keep isl_pw_qpolynomial_list *get() const;
+  inline __isl_give isl_pw_qpolynomial_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline pw_qpolynomial_list add(pw_qpolynomial el) const;
+  static inline pw_qpolynomial_list alloc(ctx ctx, int n);
+  inline pw_qpolynomial_list concat(pw_qpolynomial_list list2) const;
+  inline pw_qpolynomial_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(pw_qpolynomial)> &fn) const;
+  static inline pw_qpolynomial_list from_pw_qpolynomial(pw_qpolynomial el);
+  inline pw_qpolynomial get_at(int index) const;
+  inline pw_qpolynomial get_pw_qpolynomial(int index) const;
+  inline pw_qpolynomial_list insert(unsigned int pos, pw_qpolynomial el) const;
+  inline int n_pw_qpolynomial() const;
+  inline pw_qpolynomial_list reverse() const;
+  inline pw_qpolynomial_list set_pw_qpolynomial(int index, pw_qpolynomial el) const;
+  inline int size() const;
+  inline pw_qpolynomial_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::qpolynomial
+inline qpolynomial manage(__isl_take isl_qpolynomial *ptr);
+inline qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr);
+
+class qpolynomial {
+  friend inline qpolynomial manage(__isl_take isl_qpolynomial *ptr);
+  friend inline qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr);
+
+  isl_qpolynomial *ptr = nullptr;
+
+  inline explicit qpolynomial(__isl_take isl_qpolynomial *ptr);
+
+public:
+  inline /* implicit */ qpolynomial();
+  inline /* implicit */ qpolynomial(const qpolynomial &obj);
+  inline /* implicit */ qpolynomial(std::nullptr_t);
+  inline qpolynomial &operator=(qpolynomial obj);
+  inline ~qpolynomial();
+  inline __isl_give isl_qpolynomial *copy() const &;
+  inline __isl_give isl_qpolynomial *copy() && = delete;
+  inline __isl_keep isl_qpolynomial *get() const;
+  inline __isl_give isl_qpolynomial *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline qpolynomial add(qpolynomial qp2) const;
+  inline qpolynomial add_dims(isl::dim type, unsigned int n) const;
+  inline qpolynomial align_params(space model) const;
+  inline stat as_polynomial_on_domain(const basic_set &bset, const std::function<stat(basic_set, qpolynomial)> &fn) const;
+  inline unsigned int dim(isl::dim type) const;
+  inline qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline val eval(point pnt) const;
+  inline stat foreach_term(const std::function<stat(term)> &fn) const;
+  static inline qpolynomial from_aff(aff aff);
+  static inline qpolynomial from_constraint(constraint c, isl::dim type, unsigned int pos);
+  static inline qpolynomial from_term(term term);
+  inline val get_constant_val() const;
+  inline space get_domain_space() const;
+  inline space get_space() const;
+  inline qpolynomial gist(set context) const;
+  inline qpolynomial gist_params(set context) const;
+  inline qpolynomial homogenize() const;
+  static inline qpolynomial infty_on_domain(space dim);
+  inline qpolynomial insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_infty() const;
+  inline boolean is_nan() const;
+  inline boolean is_neginfty() const;
+  inline boolean is_zero() const;
+  inline qpolynomial move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline qpolynomial mul(qpolynomial qp2) const;
+  static inline qpolynomial nan_on_domain(space dim);
+  inline qpolynomial neg() const;
+  static inline qpolynomial neginfty_on_domain(space dim);
+  static inline qpolynomial one_on_domain(space dim);
+  inline boolean plain_is_equal(const qpolynomial &qp2) const;
+  inline qpolynomial pow(unsigned int power) const;
+  inline qpolynomial project_domain_on_params() const;
+  inline qpolynomial scale_down_val(val v) const;
+  inline qpolynomial scale_val(val v) const;
+  inline int sgn() const;
+  inline qpolynomial sub(qpolynomial qp2) const;
+  static inline qpolynomial val_on_domain(space space, val val);
+  static inline qpolynomial var_on_domain(space dim, isl::dim type, unsigned int pos);
+  static inline qpolynomial zero_on_domain(space dim);
+};
+
+// declarations for isl::schedule
+inline schedule manage(__isl_take isl_schedule *ptr);
+inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+class schedule {
+  friend inline schedule manage(__isl_take isl_schedule *ptr);
+  friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
+
+  isl_schedule *ptr = nullptr;
+
+  inline explicit schedule(__isl_take isl_schedule *ptr);
+
+public:
+  inline /* implicit */ schedule();
+  inline /* implicit */ schedule(const schedule &obj);
+  inline /* implicit */ schedule(std::nullptr_t);
+  inline explicit schedule(ctx ctx, const std::string &str);
+  inline schedule &operator=(schedule obj);
+  inline ~schedule();
+  inline __isl_give isl_schedule *copy() const &;
+  inline __isl_give isl_schedule *copy() && = delete;
+  inline __isl_keep isl_schedule *get() const;
+  inline __isl_give isl_schedule *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline schedule align_params(space space) const;
+  static inline schedule empty(space space);
+  static inline schedule from_domain(union_set domain);
+  inline union_set get_domain() const;
+  inline union_map get_map() const;
+  inline schedule_node get_root() const;
+  inline schedule gist_domain_params(set context) const;
+  inline schedule insert_context(set context) const;
+  inline schedule insert_guard(set guard) const;
+  inline schedule insert_partial_schedule(multi_union_pw_aff partial) const;
+  inline schedule intersect_domain(union_set domain) const;
+  inline boolean plain_is_equal(const schedule &schedule2) const;
+  inline schedule pullback(union_pw_multi_aff upma) const;
+  inline schedule reset_user() const;
+  inline schedule sequence(schedule schedule2) const;
+};
+
+// declarations for isl::schedule_constraints
+inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+class schedule_constraints {
+  friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
+  friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
+
+  isl_schedule_constraints *ptr = nullptr;
+
+  inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
+
+public:
+  inline /* implicit */ schedule_constraints();
+  inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
+  inline /* implicit */ schedule_constraints(std::nullptr_t);
+  inline explicit schedule_constraints(ctx ctx, const std::string &str);
+  inline schedule_constraints &operator=(schedule_constraints obj);
+  inline ~schedule_constraints();
+  inline __isl_give isl_schedule_constraints *copy() const &;
+  inline __isl_give isl_schedule_constraints *copy() && = delete;
+  inline __isl_keep isl_schedule_constraints *get() const;
+  inline __isl_give isl_schedule_constraints *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline schedule_constraints apply(union_map umap) const;
+  inline schedule compute_schedule() const;
+  inline union_map get_coincidence() const;
+  inline union_map get_conditional_validity() const;
+  inline union_map get_conditional_validity_condition() const;
+  inline set get_context() const;
+  inline union_set get_domain() const;
+  inline union_map get_proximity() const;
+  inline union_map get_validity() const;
+  static inline schedule_constraints on_domain(union_set domain);
+  inline schedule_constraints set_coincidence(union_map coincidence) const;
+  inline schedule_constraints set_conditional_validity(union_map condition, union_map validity) const;
+  inline schedule_constraints set_context(set context) const;
+  inline schedule_constraints set_proximity(union_map proximity) const;
+  inline schedule_constraints set_validity(union_map validity) const;
+};
+
+// declarations for isl::schedule_node
+inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+class schedule_node {
+  friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
+  friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
+
+  isl_schedule_node *ptr = nullptr;
+
+  inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
+
+public:
+  inline /* implicit */ schedule_node();
+  inline /* implicit */ schedule_node(const schedule_node &obj);
+  inline /* implicit */ schedule_node(std::nullptr_t);
+  inline schedule_node &operator=(schedule_node obj);
+  inline ~schedule_node();
+  inline __isl_give isl_schedule_node *copy() const &;
+  inline __isl_give isl_schedule_node *copy() && = delete;
+  inline __isl_keep isl_schedule_node *get() const;
+  inline __isl_give isl_schedule_node *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline schedule_node align_params(space space) const;
+  inline schedule_node ancestor(int generation) const;
+  inline boolean band_member_get_coincident(int pos) const;
+  inline schedule_node band_member_set_coincident(int pos, int coincident) const;
+  inline schedule_node band_set_ast_build_options(union_set options) const;
+  inline schedule_node child(int pos) const;
+  inline set context_get_context() const;
+  inline schedule_node cut() const;
+  inline union_set domain_get_domain() const;
+  inline union_pw_multi_aff expansion_get_contraction() const;
+  inline union_map expansion_get_expansion() const;
+  inline union_map extension_get_extension() const;
+  inline union_set filter_get_filter() const;
+  inline schedule_node first_child() const;
+  inline stat foreach_ancestor_top_down(const std::function<stat(schedule_node)> &fn) const;
+  static inline schedule_node from_domain(union_set domain);
+  static inline schedule_node from_extension(union_map extension);
+  inline int get_ancestor_child_position(const schedule_node &ancestor) const;
+  inline schedule_node get_child(int pos) const;
+  inline int get_child_position() const;
+  inline union_set get_domain() const;
+  inline multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
+  inline union_map get_prefix_schedule_relation() const;
+  inline union_map get_prefix_schedule_union_map() const;
+  inline union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
+  inline schedule get_schedule() const;
+  inline int get_schedule_depth() const;
+  inline schedule_node get_shared_ancestor(const schedule_node &node2) const;
+  inline union_pw_multi_aff get_subtree_contraction() const;
+  inline union_map get_subtree_expansion() const;
+  inline union_map get_subtree_schedule_union_map() const;
+  inline int get_tree_depth() const;
+  inline union_set get_universe_domain() const;
+  inline schedule_node graft_after(schedule_node graft) const;
+  inline schedule_node graft_before(schedule_node graft) const;
+  inline schedule_node group(id group_id) const;
+  inline set guard_get_guard() const;
+  inline boolean has_children() const;
+  inline boolean has_next_sibling() const;
+  inline boolean has_parent() const;
+  inline boolean has_previous_sibling() const;
+  inline schedule_node insert_context(set context) const;
+  inline schedule_node insert_filter(union_set filter) const;
+  inline schedule_node insert_guard(set context) const;
+  inline schedule_node insert_mark(id mark) const;
+  inline schedule_node insert_partial_schedule(multi_union_pw_aff schedule) const;
+  inline schedule_node insert_sequence(union_set_list filters) const;
+  inline schedule_node insert_set(union_set_list filters) const;
+  inline boolean is_equal(const schedule_node &node2) const;
+  inline boolean is_subtree_anchored() const;
+  inline id mark_get_id() const;
+  inline int n_children() const;
+  inline schedule_node next_sibling() const;
+  inline schedule_node order_after(union_set filter) const;
+  inline schedule_node order_before(union_set filter) const;
+  inline schedule_node parent() const;
+  inline schedule_node previous_sibling() const;
+  inline schedule_node reset_user() const;
+  inline schedule_node root() const;
+  inline schedule_node sequence_splice_child(int pos) const;
+};
+
+// declarations for isl::set
+inline set manage(__isl_take isl_set *ptr);
+inline set manage_copy(__isl_keep isl_set *ptr);
+
+class set {
+  friend inline set manage(__isl_take isl_set *ptr);
+  friend inline set manage_copy(__isl_keep isl_set *ptr);
+
+  isl_set *ptr = nullptr;
+
+  inline explicit set(__isl_take isl_set *ptr);
+
+public:
+  inline /* implicit */ set();
+  inline /* implicit */ set(const set &obj);
+  inline /* implicit */ set(std::nullptr_t);
+  inline explicit set(ctx ctx, const std::string &str);
+  inline /* implicit */ set(basic_set bset);
+  inline /* implicit */ set(point pnt);
+  inline explicit set(union_set uset);
+  inline set &operator=(set obj);
+  inline ~set();
+  inline __isl_give isl_set *copy() const &;
+  inline __isl_give isl_set *copy() && = delete;
+  inline __isl_keep isl_set *get() const;
+  inline __isl_give isl_set *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline set add_constraint(constraint constraint) const;
+  inline set add_dims(isl::dim type, unsigned int n) const;
+  inline basic_set affine_hull() const;
+  inline set align_params(space model) const;
+  inline set apply(map map) const;
+  inline basic_set bounded_simple_hull() const;
+  static inline set box_from_points(point pnt1, point pnt2);
+  inline set coalesce() const;
+  inline basic_set coefficients() const;
+  inline set complement() const;
+  inline basic_set convex_hull() const;
+  inline val count_val() const;
+  inline set detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline boolean dim_has_any_lower_bound(isl::dim type, unsigned int pos) const;
+  inline boolean dim_has_any_upper_bound(isl::dim type, unsigned int pos) const;
+  inline boolean dim_has_lower_bound(isl::dim type, unsigned int pos) const;
+  inline boolean dim_has_upper_bound(isl::dim type, unsigned int pos) const;
+  inline boolean dim_is_bounded(isl::dim type, unsigned int pos) const;
+  inline pw_aff dim_max(int pos) const;
+  inline pw_aff dim_min(int pos) const;
+  inline set drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set drop_unused_params() const;
+  inline set eliminate(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline set empty(space space);
+  inline set equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline set fix_si(isl::dim type, unsigned int pos, int value) const;
+  inline set fix_val(isl::dim type, unsigned int pos, val v) const;
+  inline set flat_product(set set2) const;
+  inline set flatten() const;
+  inline map flatten_map() const;
+  inline int follows_at(const set &set2, int pos) const;
+  inline stat foreach_basic_set(const std::function<stat(basic_set)> &fn) const;
+  inline stat foreach_point(const std::function<stat(point)> &fn) const;
+  static inline set from_multi_aff(multi_aff ma);
+  static inline set from_multi_pw_aff(multi_pw_aff mpa);
+  inline set from_params() const;
+  static inline set from_pw_aff(pw_aff pwaff);
+  static inline set from_pw_multi_aff(pw_multi_aff pma);
+  inline basic_set_list get_basic_set_list() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline space get_space() const;
+  inline val get_stride(int pos) const;
+  inline id get_tuple_id() const;
+  inline std::string get_tuple_name() const;
+  inline set gist(set context) const;
+  inline set gist_basic_set(basic_set context) const;
+  inline set gist_params(set context) const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
+  inline boolean has_equal_space(const set &set2) const;
+  inline boolean has_tuple_id() const;
+  inline boolean has_tuple_name() const;
+  inline map identity() const;
+  inline pw_aff indicator_function() const;
+  inline set insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
+  inline set intersect(set set2) const;
+  inline set intersect_params(set params) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_bounded() const;
+  inline boolean is_box() const;
+  inline boolean is_disjoint(const set &set2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const set &set2) const;
+  inline boolean is_params() const;
+  inline boolean is_singleton() const;
+  inline boolean is_strict_subset(const set &set2) const;
+  inline boolean is_subset(const set &set2) const;
+  inline boolean is_wrapping() const;
+  inline map lex_ge_set(set set2) const;
+  inline map lex_gt_set(set set2) const;
+  inline map lex_le_set(set set2) const;
+  inline map lex_lt_set(set set2) const;
+  inline set lexmax() const;
+  inline pw_multi_aff lexmax_pw_multi_aff() const;
+  inline set lexmin() const;
+  inline pw_multi_aff lexmin_pw_multi_aff() const;
+  inline set lower_bound_si(isl::dim type, unsigned int pos, int value) const;
+  inline set lower_bound_val(isl::dim type, unsigned int pos, val value) const;
+  inline val max_val(const aff &obj) const;
+  inline val min_val(const aff &obj) const;
+  inline set move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline int n_basic_set() const;
+  inline unsigned int n_dim() const;
+  static inline set nat_universe(space dim);
+  inline set neg() const;
+  inline set params() const;
+  inline int plain_cmp(const set &set2) const;
+  inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
+  inline boolean plain_is_disjoint(const set &set2) const;
+  inline boolean plain_is_empty() const;
+  inline boolean plain_is_equal(const set &set2) const;
+  inline boolean plain_is_universe() const;
+  inline basic_set plain_unshifted_simple_hull() const;
+  inline basic_set polyhedral_hull() const;
+  inline set preimage_multi_aff(multi_aff ma) const;
+  inline set preimage_multi_pw_aff(multi_pw_aff mpa) const;
+  inline set preimage_pw_multi_aff(pw_multi_aff pma) const;
+  inline set product(set set2) const;
+  inline map project_onto_map(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set remove_divs() const;
+  inline set remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set remove_redundancies() const;
+  inline set remove_unknown_divs() const;
+  inline set reset_space(space dim) const;
+  inline set reset_tuple_id() const;
+  inline set reset_user() const;
+  inline basic_set sample() const;
+  inline point sample_point() const;
+  inline set set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline set set_tuple_id(id id) const;
+  inline set set_tuple_name(const std::string &s) const;
+  inline basic_set simple_hull() const;
+  inline int size() const;
+  inline basic_set solutions() const;
+  inline set split_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline set subtract(set set2) const;
+  inline set sum(set set2) const;
+  inline set unite(set set2) const;
+  static inline set universe(space space);
+  inline basic_set unshifted_simple_hull() const;
+  inline basic_set unshifted_simple_hull_from_set_list(set_list list) const;
+  inline map unwrap() const;
+  inline set upper_bound_si(isl::dim type, unsigned int pos, int value) const;
+  inline set upper_bound_val(isl::dim type, unsigned int pos, val value) const;
+  inline map wrapped_domain_map() const;
+};
+
+// declarations for isl::set_list
+inline set_list manage(__isl_take isl_set_list *ptr);
+inline set_list manage_copy(__isl_keep isl_set_list *ptr);
+
+class set_list {
+  friend inline set_list manage(__isl_take isl_set_list *ptr);
+  friend inline set_list manage_copy(__isl_keep isl_set_list *ptr);
+
+  isl_set_list *ptr = nullptr;
+
+  inline explicit set_list(__isl_take isl_set_list *ptr);
+
+public:
+  inline /* implicit */ set_list();
+  inline /* implicit */ set_list(const set_list &obj);
+  inline /* implicit */ set_list(std::nullptr_t);
+  inline set_list &operator=(set_list obj);
+  inline ~set_list();
+  inline __isl_give isl_set_list *copy() const &;
+  inline __isl_give isl_set_list *copy() && = delete;
+  inline __isl_keep isl_set_list *get() const;
+  inline __isl_give isl_set_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline set_list add(set el) const;
+  static inline set_list alloc(ctx ctx, int n);
+  inline set_list concat(set_list list2) const;
+  inline set_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(set)> &fn) const;
+  static inline set_list from_set(set el);
+  inline set get_at(int index) const;
+  inline set get_set(int index) const;
+  inline set_list insert(unsigned int pos, set el) const;
+  inline int n_set() const;
+  inline set_list reverse() const;
+  inline set_list set_set(int index, set el) const;
+  inline int size() const;
+  inline set_list swap(unsigned int pos1, unsigned int pos2) const;
+  inline set unite() const;
+};
+
+// declarations for isl::space
+inline space manage(__isl_take isl_space *ptr);
+inline space manage_copy(__isl_keep isl_space *ptr);
+
+class space {
+  friend inline space manage(__isl_take isl_space *ptr);
+  friend inline space manage_copy(__isl_keep isl_space *ptr);
+
+  isl_space *ptr = nullptr;
+
+  inline explicit space(__isl_take isl_space *ptr);
+
+public:
+  inline /* implicit */ space();
+  inline /* implicit */ space(const space &obj);
+  inline /* implicit */ space(std::nullptr_t);
+  inline explicit space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out);
+  inline explicit space(ctx ctx, unsigned int nparam, unsigned int dim);
+  inline space &operator=(space obj);
+  inline ~space();
+  inline __isl_give isl_space *copy() const &;
+  inline __isl_give isl_space *copy() && = delete;
+  inline __isl_keep isl_space *get() const;
+  inline __isl_give isl_space *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline space add_dims(isl::dim type, unsigned int n) const;
+  inline space add_param_id(id id) const;
+  inline space align_params(space dim2) const;
+  inline boolean can_curry() const;
+  inline boolean can_range_curry() const;
+  inline boolean can_uncurry() const;
+  inline boolean can_zip() const;
+  inline space curry() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline space domain() const;
+  inline space domain_factor_domain() const;
+  inline space domain_factor_range() const;
+  inline boolean domain_is_wrapping() const;
+  inline space domain_map() const;
+  inline space domain_product(space right) const;
+  inline space drop_dims(isl::dim type, unsigned int first, unsigned int num) const;
+  inline space factor_domain() const;
+  inline space factor_range() const;
+  inline int find_dim_by_id(isl::dim type, const id &id) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline space flatten_domain() const;
+  inline space flatten_range() const;
+  inline space from_domain() const;
+  inline space from_range() const;
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
+  inline id get_tuple_id(isl::dim type) const;
+  inline std::string get_tuple_name(isl::dim type) const;
+  inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
+  inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
+  inline boolean has_equal_params(const space &space2) const;
+  inline boolean has_equal_tuples(const space &space2) const;
+  inline boolean has_tuple_id(isl::dim type) const;
+  inline boolean has_tuple_name(isl::dim type) const;
+  inline space insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
+  inline boolean is_domain(const space &space2) const;
+  inline boolean is_equal(const space &space2) const;
+  inline boolean is_map() const;
+  inline boolean is_params() const;
+  inline boolean is_product() const;
+  inline boolean is_range(const space &space2) const;
+  inline boolean is_set() const;
+  inline boolean is_wrapping() const;
+  inline space join(space right) const;
+  inline space map_from_domain_and_range(space range) const;
+  inline space map_from_set() const;
+  inline space move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
+  inline space params() const;
+  static inline space params_alloc(ctx ctx, unsigned int nparam);
+  inline space product(space right) const;
+  inline space range() const;
+  inline space range_curry() const;
+  inline space range_factor_domain() const;
+  inline space range_factor_range() const;
+  inline boolean range_is_wrapping() const;
+  inline space range_map() const;
+  inline space range_product(space right) const;
+  inline space reset_tuple_id(isl::dim type) const;
+  inline space reset_user() const;
+  inline space reverse() const;
+  inline space set_dim_id(isl::dim type, unsigned int pos, id id) const;
+  inline space set_from_params() const;
+  inline space set_tuple_id(isl::dim type, id id) const;
+  inline space set_tuple_name(isl::dim type, const std::string &s) const;
+  inline boolean tuple_is_equal(isl::dim type1, const space &space2, isl::dim type2) const;
+  inline space uncurry() const;
+  inline space unwrap() const;
+  inline space wrap() const;
+  inline space zip() const;
+};
+
+// declarations for isl::term
+inline term manage(__isl_take isl_term *ptr);
+inline term manage_copy(__isl_keep isl_term *ptr);
+
+class term {
+  friend inline term manage(__isl_take isl_term *ptr);
+  friend inline term manage_copy(__isl_keep isl_term *ptr);
+
+  isl_term *ptr = nullptr;
+
+  inline explicit term(__isl_take isl_term *ptr);
+
+public:
+  inline /* implicit */ term();
+  inline /* implicit */ term(const term &obj);
+  inline /* implicit */ term(std::nullptr_t);
+  inline term &operator=(term obj);
+  inline ~term();
+  inline __isl_give isl_term *copy() const &;
+  inline __isl_give isl_term *copy() && = delete;
+  inline __isl_keep isl_term *get() const;
+  inline __isl_give isl_term *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+
+  inline unsigned int dim(isl::dim type) const;
+  inline val get_coefficient_val() const;
+  inline aff get_div(unsigned int pos) const;
+  inline int get_exp(isl::dim type, unsigned int pos) const;
+};
+
+// declarations for isl::union_access_info
+inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+class union_access_info {
+  friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
+  friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
+
+  isl_union_access_info *ptr = nullptr;
+
+  inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
+
+public:
+  inline /* implicit */ union_access_info();
+  inline /* implicit */ union_access_info(const union_access_info &obj);
+  inline /* implicit */ union_access_info(std::nullptr_t);
+  inline explicit union_access_info(union_map sink);
+  inline union_access_info &operator=(union_access_info obj);
+  inline ~union_access_info();
+  inline __isl_give isl_union_access_info *copy() const &;
+  inline __isl_give isl_union_access_info *copy() && = delete;
+  inline __isl_keep isl_union_access_info *get() const;
+  inline __isl_give isl_union_access_info *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+
+  inline union_flow compute_flow() const;
+  inline union_access_info set_kill(union_map kill) const;
+  inline union_access_info set_may_source(union_map may_source) const;
+  inline union_access_info set_must_source(union_map must_source) const;
+  inline union_access_info set_schedule(schedule schedule) const;
+  inline union_access_info set_schedule_map(union_map schedule_map) const;
+};
+
+// declarations for isl::union_flow
+inline union_flow manage(__isl_take isl_union_flow *ptr);
+inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+class union_flow {
+  friend inline union_flow manage(__isl_take isl_union_flow *ptr);
+  friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
+
+  isl_union_flow *ptr = nullptr;
+
+  inline explicit union_flow(__isl_take isl_union_flow *ptr);
+
+public:
+  inline /* implicit */ union_flow();
+  inline /* implicit */ union_flow(const union_flow &obj);
+  inline /* implicit */ union_flow(std::nullptr_t);
+  inline union_flow &operator=(union_flow obj);
+  inline ~union_flow();
+  inline __isl_give isl_union_flow *copy() const &;
+  inline __isl_give isl_union_flow *copy() && = delete;
+  inline __isl_keep isl_union_flow *get() const;
+  inline __isl_give isl_union_flow *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+
+  inline union_map get_full_may_dependence() const;
+  inline union_map get_full_must_dependence() const;
+  inline union_map get_may_dependence() const;
+  inline union_map get_may_no_source() const;
+  inline union_map get_must_dependence() const;
+  inline union_map get_must_no_source() const;
+};
+
+// declarations for isl::union_map
+inline union_map manage(__isl_take isl_union_map *ptr);
+inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+class union_map {
+  friend inline union_map manage(__isl_take isl_union_map *ptr);
+  friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
+
+  isl_union_map *ptr = nullptr;
+
+  inline explicit union_map(__isl_take isl_union_map *ptr);
+
+public:
+  inline /* implicit */ union_map();
+  inline /* implicit */ union_map(const union_map &obj);
+  inline /* implicit */ union_map(std::nullptr_t);
+  inline explicit union_map(union_pw_multi_aff upma);
+  inline /* implicit */ union_map(basic_map bmap);
+  inline /* implicit */ union_map(map map);
+  inline explicit union_map(ctx ctx, const std::string &str);
+  inline union_map &operator=(union_map obj);
+  inline ~union_map();
+  inline __isl_give isl_union_map *copy() const &;
+  inline __isl_give isl_union_map *copy() && = delete;
+  inline __isl_keep isl_union_map *get() const;
+  inline __isl_give isl_union_map *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline union_map add_map(map map) const;
+  inline union_map affine_hull() const;
+  inline union_map align_params(space model) const;
+  inline union_map apply_domain(union_map umap2) const;
+  inline union_map apply_range(union_map umap2) const;
+  inline union_map coalesce() const;
+  inline boolean contains(const space &space) const;
+  inline union_map curry() const;
+  inline union_set deltas() const;
+  inline union_map deltas_map() const;
+  inline union_map detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline union_set domain() const;
+  inline union_map domain_factor_domain() const;
+  inline union_map domain_factor_range() const;
+  inline union_map domain_map() const;
+  inline union_pw_multi_aff domain_map_union_pw_multi_aff() const;
+  inline union_map domain_product(union_map umap2) const;
+  static inline union_map empty(space space);
+  inline union_map eq_at(multi_union_pw_aff mupa) const;
+  inline map extract_map(space dim) const;
+  inline union_map factor_domain() const;
+  inline union_map factor_range() const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline union_map fixed_power(val exp) const;
+  inline union_map flat_domain_product(union_map umap2) const;
+  inline union_map flat_range_product(union_map umap2) const;
+  inline stat foreach_map(const std::function<stat(map)> &fn) const;
+  static inline union_map from(multi_union_pw_aff mupa);
+  static inline union_map from_domain(union_set uset);
+  static inline union_map from_domain_and_range(union_set domain, union_set range);
+  static inline union_map from_range(union_set uset);
+  static inline union_map from_union_pw_aff(union_pw_aff upa);
+  inline id get_dim_id(isl::dim type, unsigned int pos) const;
+  inline uint32_t get_hash() const;
+  inline map_list get_map_list() const;
+  inline space get_space() const;
+  inline union_map gist(union_map context) const;
+  inline union_map gist_domain(union_set uset) const;
+  inline union_map gist_params(set set) const;
+  inline union_map gist_range(union_set uset) const;
+  inline union_map intersect(union_map umap2) const;
+  inline union_map intersect_domain(union_set uset) const;
+  inline union_map intersect_params(set set) const;
+  inline union_map intersect_range(union_set uset) const;
+  inline union_map intersect_range_factor_range(union_map factor) const;
+  inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline boolean is_bijective() const;
+  inline boolean is_disjoint(const union_map &umap2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const union_map &umap2) const;
+  inline boolean is_identity() const;
+  inline boolean is_injective() const;
+  inline boolean is_single_valued() const;
+  inline boolean is_strict_subset(const union_map &umap2) const;
+  inline boolean is_subset(const union_map &umap2) const;
+  inline union_map lex_ge_union_map(union_map umap2) const;
+  inline union_map lex_gt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const;
+  inline union_map lex_gt_union_map(union_map umap2) const;
+  inline union_map lex_le_union_map(union_map umap2) const;
+  inline union_map lex_lt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const;
+  inline union_map lex_lt_union_map(union_map umap2) const;
+  inline union_map lexmax() const;
+  inline union_map lexmin() const;
+  inline int n_map() const;
+  inline set params() const;
+  inline boolean plain_is_empty() const;
+  inline boolean plain_is_injective() const;
+  inline union_map polyhedral_hull() const;
+  inline union_map preimage_domain_multi_aff(multi_aff ma) const;
+  inline union_map preimage_domain_multi_pw_aff(multi_pw_aff mpa) const;
+  inline union_map preimage_domain_pw_multi_aff(pw_multi_aff pma) const;
+  inline union_map preimage_domain_union_pw_multi_aff(union_pw_multi_aff upma) const;
+  inline union_map preimage_range_multi_aff(multi_aff ma) const;
+  inline union_map preimage_range_pw_multi_aff(pw_multi_aff pma) const;
+  inline union_map preimage_range_union_pw_multi_aff(union_pw_multi_aff upma) const;
+  inline union_map product(union_map umap2) const;
+  inline union_map project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline union_map project_out_all_params() const;
+  inline union_set range() const;
+  inline union_map range_curry() const;
+  inline union_map range_factor_domain() const;
+  inline union_map range_factor_range() const;
+  inline union_map range_map() const;
+  inline union_map range_product(union_map umap2) const;
+  inline union_map remove_divs() const;
+  inline union_map remove_redundancies() const;
+  inline union_map reset_user() const;
+  inline union_map reverse() const;
+  inline basic_map sample() const;
+  inline union_map simple_hull() const;
+  inline union_map subtract(union_map umap2) const;
+  inline union_map subtract_domain(union_set dom) const;
+  inline union_map subtract_range(union_set dom) const;
+  inline union_map uncurry() const;
+  inline union_map unite(union_map umap2) const;
+  inline union_map universe() const;
+  inline union_set wrap() const;
+  inline union_map zip() const;
+};
+
+// declarations for isl::union_map_list
+inline union_map_list manage(__isl_take isl_union_map_list *ptr);
+inline union_map_list manage_copy(__isl_keep isl_union_map_list *ptr);
+
+class union_map_list {
+  friend inline union_map_list manage(__isl_take isl_union_map_list *ptr);
+  friend inline union_map_list manage_copy(__isl_keep isl_union_map_list *ptr);
+
+  isl_union_map_list *ptr = nullptr;
+
+  inline explicit union_map_list(__isl_take isl_union_map_list *ptr);
+
+public:
+  inline /* implicit */ union_map_list();
+  inline /* implicit */ union_map_list(const union_map_list &obj);
+  inline /* implicit */ union_map_list(std::nullptr_t);
+  inline union_map_list &operator=(union_map_list obj);
+  inline ~union_map_list();
+  inline __isl_give isl_union_map_list *copy() const &;
+  inline __isl_give isl_union_map_list *copy() && = delete;
+  inline __isl_keep isl_union_map_list *get() const;
+  inline __isl_give isl_union_map_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline union_map_list add(union_map el) const;
+  static inline union_map_list alloc(ctx ctx, int n);
+  inline union_map_list concat(union_map_list list2) const;
+  inline union_map_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(union_map)> &fn) const;
+  static inline union_map_list from_union_map(union_map el);
+  inline union_map get_at(int index) const;
+  inline union_map get_union_map(int index) const;
+  inline union_map_list insert(unsigned int pos, union_map el) const;
+  inline int n_union_map() const;
+  inline union_map_list reverse() const;
+  inline union_map_list set_union_map(int index, union_map el) const;
+  inline int size() const;
+  inline union_map_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::union_pw_aff
+inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+class union_pw_aff {
+  friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
+  friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
+
+  isl_union_pw_aff *ptr = nullptr;
+
+  inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff();
+  inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
+  inline /* implicit */ union_pw_aff(std::nullptr_t);
+  inline /* implicit */ union_pw_aff(pw_aff pa);
+  inline explicit union_pw_aff(union_set domain, val v);
+  inline explicit union_pw_aff(ctx ctx, const std::string &str);
+  inline union_pw_aff &operator=(union_pw_aff obj);
+  inline ~union_pw_aff();
+  inline __isl_give isl_union_pw_aff *copy() const &;
+  inline __isl_give isl_union_pw_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff *get() const;
+  inline __isl_give isl_union_pw_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline union_pw_aff add(union_pw_aff upa2) const;
+  inline union_pw_aff add_pw_aff(pw_aff pa) const;
+  static inline union_pw_aff aff_on_domain(union_set domain, aff aff);
+  inline union_pw_aff align_params(space model) const;
+  inline union_pw_aff coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline union_set domain() const;
+  inline union_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline union_pw_aff empty(space space);
+  inline pw_aff extract_pw_aff(space space) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline union_pw_aff floor() const;
+  inline stat foreach_pw_aff(const std::function<stat(pw_aff)> &fn) const;
+  inline pw_aff_list get_pw_aff_list() const;
+  inline space get_space() const;
+  inline union_pw_aff gist(union_set context) const;
+  inline union_pw_aff gist_params(set context) const;
+  inline union_pw_aff intersect_domain(union_set uset) const;
+  inline union_pw_aff intersect_params(set set) const;
+  inline boolean involves_nan() const;
+  inline val max_val() const;
+  inline val min_val() const;
+  inline union_pw_aff mod_val(val f) const;
+  inline int n_pw_aff() const;
+  inline union_pw_aff neg() const;
+  static inline union_pw_aff param_on_domain_id(union_set domain, id id);
+  inline boolean plain_is_equal(const union_pw_aff &upa2) const;
+  inline union_pw_aff pullback(union_pw_multi_aff upma) const;
+  static inline union_pw_aff pw_aff_on_domain(union_set domain, pw_aff pa);
+  inline union_pw_aff reset_user() const;
+  inline union_pw_aff scale_down_val(val v) const;
+  inline union_pw_aff scale_val(val v) const;
+  inline union_pw_aff sub(union_pw_aff upa2) const;
+  inline union_pw_aff subtract_domain(union_set uset) const;
+  inline union_pw_aff union_add(union_pw_aff upa2) const;
+  inline union_set zero_union_set() const;
+};
+
+// declarations for isl::union_pw_aff_list
+inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+class union_pw_aff_list {
+  friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
+  friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
+
+  isl_union_pw_aff_list *ptr = nullptr;
+
+  inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
+
+public:
+  inline /* implicit */ union_pw_aff_list();
+  inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
+  inline /* implicit */ union_pw_aff_list(std::nullptr_t);
+  inline union_pw_aff_list &operator=(union_pw_aff_list obj);
+  inline ~union_pw_aff_list();
+  inline __isl_give isl_union_pw_aff_list *copy() const &;
+  inline __isl_give isl_union_pw_aff_list *copy() && = delete;
+  inline __isl_keep isl_union_pw_aff_list *get() const;
+  inline __isl_give isl_union_pw_aff_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline union_pw_aff_list add(union_pw_aff el) const;
+  static inline union_pw_aff_list alloc(ctx ctx, int n);
+  inline union_pw_aff_list concat(union_pw_aff_list list2) const;
+  inline union_pw_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(union_pw_aff)> &fn) const;
+  static inline union_pw_aff_list from_union_pw_aff(union_pw_aff el);
+  inline union_pw_aff get_at(int index) const;
+  inline union_pw_aff get_union_pw_aff(int index) const;
+  inline union_pw_aff_list insert(unsigned int pos, union_pw_aff el) const;
+  inline int n_union_pw_aff() const;
+  inline union_pw_aff_list reverse() const;
+  inline union_pw_aff_list set_union_pw_aff(int index, union_pw_aff el) const;
+  inline int size() const;
+  inline union_pw_aff_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::union_pw_multi_aff
+inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+class union_pw_multi_aff {
+  friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
+  friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
+
+  isl_union_pw_multi_aff *ptr = nullptr;
+
+  inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
+
+public:
+  inline /* implicit */ union_pw_multi_aff();
+  inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
+  inline /* implicit */ union_pw_multi_aff(std::nullptr_t);
+  inline /* implicit */ union_pw_multi_aff(aff aff);
+  inline /* implicit */ union_pw_multi_aff(pw_multi_aff pma);
+  inline explicit union_pw_multi_aff(union_set uset);
+  inline explicit union_pw_multi_aff(union_map umap);
+  inline explicit union_pw_multi_aff(ctx ctx, const std::string &str);
+  inline /* implicit */ union_pw_multi_aff(union_pw_aff upa);
+  inline explicit union_pw_multi_aff(multi_union_pw_aff mupa);
+  inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
+  inline ~union_pw_multi_aff();
+  inline __isl_give isl_union_pw_multi_aff *copy() const &;
+  inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
+  inline __isl_keep isl_union_pw_multi_aff *get() const;
+  inline __isl_give isl_union_pw_multi_aff *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline union_pw_multi_aff add(union_pw_multi_aff upma2) const;
+  inline union_pw_multi_aff add_pw_multi_aff(pw_multi_aff pma) const;
+  inline union_pw_multi_aff align_params(space model) const;
+  inline union_pw_multi_aff coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline union_set domain() const;
+  inline union_pw_multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  static inline union_pw_multi_aff empty(space space);
+  inline pw_multi_aff extract_pw_multi_aff(space space) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline union_pw_multi_aff flat_range_product(union_pw_multi_aff upma2) const;
+  inline stat foreach_pw_multi_aff(const std::function<stat(pw_multi_aff)> &fn) const;
+  static inline union_pw_multi_aff from_union_set(union_set uset);
+  inline pw_multi_aff_list get_pw_multi_aff_list() const;
+  inline space get_space() const;
+  inline union_pw_aff get_union_pw_aff(int pos) const;
+  inline union_pw_multi_aff gist(union_set context) const;
+  inline union_pw_multi_aff gist_params(set context) const;
+  inline union_pw_multi_aff intersect_domain(union_set uset) const;
+  inline union_pw_multi_aff intersect_params(set set) const;
+  inline boolean involves_nan() const;
+  static inline union_pw_multi_aff multi_val_on_domain(union_set domain, multi_val mv);
+  inline int n_pw_multi_aff() const;
+  inline union_pw_multi_aff neg() const;
+  inline boolean plain_is_equal(const union_pw_multi_aff &upma2) const;
+  inline union_pw_multi_aff pullback(union_pw_multi_aff upma2) const;
+  inline union_pw_multi_aff reset_user() const;
+  inline union_pw_multi_aff scale_down_val(val val) const;
+  inline union_pw_multi_aff scale_multi_val(multi_val mv) const;
+  inline union_pw_multi_aff scale_val(val val) const;
+  inline union_pw_multi_aff sub(union_pw_multi_aff upma2) const;
+  inline union_pw_multi_aff subtract_domain(union_set uset) const;
+  inline union_pw_multi_aff union_add(union_pw_multi_aff upma2) const;
+};
+
+// declarations for isl::union_pw_multi_aff_list
+inline union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr);
+inline union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr);
+
+class union_pw_multi_aff_list {
+  friend inline union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr);
+  friend inline union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr);
+
+  isl_union_pw_multi_aff_list *ptr = nullptr;
+
+  inline explicit union_pw_multi_aff_list(__isl_take isl_union_pw_multi_aff_list *ptr);
+
+public:
+  inline /* implicit */ union_pw_multi_aff_list();
+  inline /* implicit */ union_pw_multi_aff_list(const union_pw_multi_aff_list &obj);
+  inline /* implicit */ union_pw_multi_aff_list(std::nullptr_t);
+  inline union_pw_multi_aff_list &operator=(union_pw_multi_aff_list obj);
+  inline ~union_pw_multi_aff_list();
+  inline __isl_give isl_union_pw_multi_aff_list *copy() const &;
+  inline __isl_give isl_union_pw_multi_aff_list *copy() && = delete;
+  inline __isl_keep isl_union_pw_multi_aff_list *get() const;
+  inline __isl_give isl_union_pw_multi_aff_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline union_pw_multi_aff_list add(union_pw_multi_aff el) const;
+  static inline union_pw_multi_aff_list alloc(ctx ctx, int n);
+  inline union_pw_multi_aff_list concat(union_pw_multi_aff_list list2) const;
+  inline union_pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(union_pw_multi_aff)> &fn) const;
+  static inline union_pw_multi_aff_list from_union_pw_multi_aff(union_pw_multi_aff el);
+  inline union_pw_multi_aff get_at(int index) const;
+  inline union_pw_multi_aff get_union_pw_multi_aff(int index) const;
+  inline union_pw_multi_aff_list insert(unsigned int pos, union_pw_multi_aff el) const;
+  inline int n_union_pw_multi_aff() const;
+  inline union_pw_multi_aff_list reverse() const;
+  inline union_pw_multi_aff_list set_union_pw_multi_aff(int index, union_pw_multi_aff el) const;
+  inline int size() const;
+  inline union_pw_multi_aff_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::union_pw_qpolynomial
+inline union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr);
+inline union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr);
+
+class union_pw_qpolynomial {
+  friend inline union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr);
+  friend inline union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr);
+
+  isl_union_pw_qpolynomial *ptr = nullptr;
+
+  inline explicit union_pw_qpolynomial(__isl_take isl_union_pw_qpolynomial *ptr);
+
+public:
+  inline /* implicit */ union_pw_qpolynomial();
+  inline /* implicit */ union_pw_qpolynomial(const union_pw_qpolynomial &obj);
+  inline /* implicit */ union_pw_qpolynomial(std::nullptr_t);
+  inline explicit union_pw_qpolynomial(ctx ctx, const std::string &str);
+  inline union_pw_qpolynomial &operator=(union_pw_qpolynomial obj);
+  inline ~union_pw_qpolynomial();
+  inline __isl_give isl_union_pw_qpolynomial *copy() const &;
+  inline __isl_give isl_union_pw_qpolynomial *copy() && = delete;
+  inline __isl_keep isl_union_pw_qpolynomial *get() const;
+  inline __isl_give isl_union_pw_qpolynomial *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+
+  inline union_pw_qpolynomial add(union_pw_qpolynomial upwqp2) const;
+  inline union_pw_qpolynomial add_pw_qpolynomial(pw_qpolynomial pwqp) const;
+  inline union_pw_qpolynomial align_params(space model) const;
+  inline union_pw_qpolynomial coalesce() const;
+  inline unsigned int dim(isl::dim type) const;
+  inline union_set domain() const;
+  inline union_pw_qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
+  inline val eval(point pnt) const;
+  inline pw_qpolynomial extract_pw_qpolynomial(space dim) const;
+  inline int find_dim_by_name(isl::dim type, const std::string &name) const;
+  inline stat foreach_pw_qpolynomial(const std::function<stat(pw_qpolynomial)> &fn) const;
+  static inline union_pw_qpolynomial from_pw_qpolynomial(pw_qpolynomial pwqp);
+  inline pw_qpolynomial_list get_pw_qpolynomial_list() const;
+  inline space get_space() const;
+  inline union_pw_qpolynomial gist(union_set context) const;
+  inline union_pw_qpolynomial gist_params(set context) const;
+  inline union_pw_qpolynomial intersect_domain(union_set uset) const;
+  inline union_pw_qpolynomial intersect_params(set set) const;
+  inline boolean involves_nan() const;
+  inline union_pw_qpolynomial mul(union_pw_qpolynomial upwqp2) const;
+  inline int n_pw_qpolynomial() const;
+  inline union_pw_qpolynomial neg() const;
+  inline boolean plain_is_equal(const union_pw_qpolynomial &upwqp2) const;
+  inline union_pw_qpolynomial reset_user() const;
+  inline union_pw_qpolynomial scale_down_val(val v) const;
+  inline union_pw_qpolynomial scale_val(val v) const;
+  inline union_pw_qpolynomial sub(union_pw_qpolynomial upwqp2) const;
+  inline union_pw_qpolynomial subtract_domain(union_set uset) const;
+  inline union_pw_qpolynomial to_polynomial(int sign) const;
+  static inline union_pw_qpolynomial zero(space dim);
+};
+
+// declarations for isl::union_set
+inline union_set manage(__isl_take isl_union_set *ptr);
+inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+class union_set {
+  friend inline union_set manage(__isl_take isl_union_set *ptr);
+  friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
+
+  isl_union_set *ptr = nullptr;
+
+  inline explicit union_set(__isl_take isl_union_set *ptr);
+
+public:
+  inline /* implicit */ union_set();
+  inline /* implicit */ union_set(const union_set &obj);
+  inline /* implicit */ union_set(std::nullptr_t);
+  inline /* implicit */ union_set(basic_set bset);
+  inline /* implicit */ union_set(set set);
+  inline /* implicit */ union_set(point pnt);
+  inline explicit union_set(ctx ctx, const std::string &str);
+  inline union_set &operator=(union_set obj);
+  inline ~union_set();
+  inline __isl_give isl_union_set *copy() const &;
+  inline __isl_give isl_union_set *copy() && = delete;
+  inline __isl_keep isl_union_set *get() const;
+  inline __isl_give isl_union_set *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline union_set add_set(set set) const;
+  inline union_set affine_hull() const;
+  inline union_set align_params(space model) const;
+  inline union_set apply(union_map umap) const;
+  inline union_set coalesce() const;
+  inline union_set coefficients() const;
+  inline schedule compute_schedule(union_map validity, union_map proximity) const;
+  inline boolean contains(const space &space) const;
+  inline union_set detect_equalities() const;
+  inline unsigned int dim(isl::dim type) const;
+  static inline union_set empty(space space);
+  inline set extract_set(space dim) const;
+  inline stat foreach_point(const std::function<stat(point)> &fn) const;
+  inline stat foreach_set(const std::function<stat(set)> &fn) const;
+  inline basic_set_list get_basic_set_list() const;
+  inline uint32_t get_hash() const;
+  inline set_list get_set_list() const;
+  inline space get_space() const;
+  inline union_set gist(union_set context) const;
+  inline union_set gist_params(set set) const;
+  inline union_map identity() const;
+  inline union_pw_multi_aff identity_union_pw_multi_aff() const;
+  inline union_set intersect(union_set uset2) const;
+  inline union_set intersect_params(set set) const;
+  inline boolean is_disjoint(const union_set &uset2) const;
+  inline boolean is_empty() const;
+  inline boolean is_equal(const union_set &uset2) const;
+  inline boolean is_params() const;
+  inline boolean is_strict_subset(const union_set &uset2) const;
+  inline boolean is_subset(const union_set &uset2) const;
+  inline union_map lex_ge_union_set(union_set uset2) const;
+  inline union_map lex_gt_union_set(union_set uset2) const;
+  inline union_map lex_le_union_set(union_set uset2) const;
+  inline union_map lex_lt_union_set(union_set uset2) const;
+  inline union_set lexmax() const;
+  inline union_set lexmin() const;
+  inline multi_val min_multi_union_pw_aff(const multi_union_pw_aff &obj) const;
+  inline int n_set() const;
+  inline set params() const;
+  inline union_set polyhedral_hull() const;
+  inline union_set preimage(multi_aff ma) const;
+  inline union_set preimage(pw_multi_aff pma) const;
+  inline union_set preimage(union_pw_multi_aff upma) const;
+  inline union_set product(union_set uset2) const;
+  inline union_set project_out(isl::dim type, unsigned int first, unsigned int n) const;
+  inline union_set remove_divs() const;
+  inline union_set remove_redundancies() const;
+  inline union_set reset_user() const;
+  inline basic_set sample() const;
+  inline point sample_point() const;
+  inline union_set simple_hull() const;
+  inline union_set solutions() const;
+  inline union_set subtract(union_set uset2) const;
+  inline union_set unite(union_set uset2) const;
+  inline union_set universe() const;
+  inline union_map unwrap() const;
+  inline union_map wrapped_domain_map() const;
+};
+
+// declarations for isl::union_set_list
+inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+class union_set_list {
+  friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
+  friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
+
+  isl_union_set_list *ptr = nullptr;
+
+  inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
+
+public:
+  inline /* implicit */ union_set_list();
+  inline /* implicit */ union_set_list(const union_set_list &obj);
+  inline /* implicit */ union_set_list(std::nullptr_t);
+  inline union_set_list &operator=(union_set_list obj);
+  inline ~union_set_list();
+  inline __isl_give isl_union_set_list *copy() const &;
+  inline __isl_give isl_union_set_list *copy() && = delete;
+  inline __isl_keep isl_union_set_list *get() const;
+  inline __isl_give isl_union_set_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline union_set_list add(union_set el) const;
+  static inline union_set_list alloc(ctx ctx, int n);
+  inline union_set_list concat(union_set_list list2) const;
+  inline union_set_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(union_set)> &fn) const;
+  static inline union_set_list from_union_set(union_set el);
+  inline union_set get_at(int index) const;
+  inline union_set get_union_set(int index) const;
+  inline union_set_list insert(unsigned int pos, union_set el) const;
+  inline int n_union_set() const;
+  inline union_set_list reverse() const;
+  inline union_set_list set_union_set(int index, union_set el) const;
+  inline int size() const;
+  inline union_set_list swap(unsigned int pos1, unsigned int pos2) const;
+  inline union_set unite() const;
+};
+
+// declarations for isl::val
+inline val manage(__isl_take isl_val *ptr);
+inline val manage_copy(__isl_keep isl_val *ptr);
+
+class val {
+  friend inline val manage(__isl_take isl_val *ptr);
+  friend inline val manage_copy(__isl_keep isl_val *ptr);
+
+  isl_val *ptr = nullptr;
+
+  inline explicit val(__isl_take isl_val *ptr);
+
+public:
+  inline /* implicit */ val();
+  inline /* implicit */ val(const val &obj);
+  inline /* implicit */ val(std::nullptr_t);
+  inline explicit val(ctx ctx, const std::string &str);
+  inline explicit val(ctx ctx, long i);
+  inline val &operator=(val obj);
+  inline ~val();
+  inline __isl_give isl_val *copy() const &;
+  inline __isl_give isl_val *copy() && = delete;
+  inline __isl_keep isl_val *get() const;
+  inline __isl_give isl_val *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline std::string to_str() const;
+  inline void dump() const;
+
+  inline val abs() const;
+  inline boolean abs_eq(const val &v2) const;
+  inline val add(val v2) const;
+  inline val add_ui(unsigned long v2) const;
+  inline val ceil() const;
+  inline int cmp_si(long i) const;
+  inline val div(val v2) const;
+  inline val div_ui(unsigned long v2) const;
+  inline boolean eq(const val &v2) const;
+  inline val floor() const;
+  inline val gcd(val v2) const;
+  inline boolean ge(const val &v2) const;
+  inline uint32_t get_hash() const;
+  inline long get_num_si() const;
+  inline boolean gt(const val &v2) const;
+  inline boolean gt_si(long i) const;
+  static inline val infty(ctx ctx);
+  static inline val int_from_ui(ctx ctx, unsigned long u);
+  inline val inv() const;
+  inline boolean is_divisible_by(const val &v2) const;
+  inline boolean is_infty() const;
+  inline boolean is_int() const;
+  inline boolean is_nan() const;
+  inline boolean is_neg() const;
+  inline boolean is_neginfty() const;
+  inline boolean is_negone() const;
+  inline boolean is_nonneg() const;
+  inline boolean is_nonpos() const;
+  inline boolean is_one() const;
+  inline boolean is_pos() const;
+  inline boolean is_rat() const;
+  inline boolean is_zero() const;
+  inline boolean le(const val &v2) const;
+  inline boolean lt(const val &v2) const;
+  inline val max(val v2) const;
+  inline val min(val v2) const;
+  inline val mod(val v2) const;
+  inline val mul(val v2) const;
+  inline val mul_ui(unsigned long v2) const;
+  inline size_t n_abs_num_chunks(size_t size) const;
+  static inline val nan(ctx ctx);
+  inline boolean ne(const val &v2) const;
+  inline val neg() const;
+  static inline val neginfty(ctx ctx);
+  static inline val negone(ctx ctx);
+  static inline val one(ctx ctx);
+  inline val pow2() const;
+  inline val set_si(long i) const;
+  inline int sgn() const;
+  inline val sub(val v2) const;
+  inline val sub_ui(unsigned long v2) const;
+  inline val trunc() const;
+  static inline val zero(ctx ctx);
+};
+
+// declarations for isl::val_list
+inline val_list manage(__isl_take isl_val_list *ptr);
+inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+class val_list {
+  friend inline val_list manage(__isl_take isl_val_list *ptr);
+  friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
+
+  isl_val_list *ptr = nullptr;
+
+  inline explicit val_list(__isl_take isl_val_list *ptr);
+
+public:
+  inline /* implicit */ val_list();
+  inline /* implicit */ val_list(const val_list &obj);
+  inline /* implicit */ val_list(std::nullptr_t);
+  inline val_list &operator=(val_list obj);
+  inline ~val_list();
+  inline __isl_give isl_val_list *copy() const &;
+  inline __isl_give isl_val_list *copy() && = delete;
+  inline __isl_keep isl_val_list *get() const;
+  inline __isl_give isl_val_list *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline val_list add(val el) const;
+  static inline val_list alloc(ctx ctx, int n);
+  inline val_list concat(val_list list2) const;
+  inline val_list drop(unsigned int first, unsigned int n) const;
+  inline stat foreach(const std::function<stat(val)> &fn) const;
+  static inline val_list from_val(val el);
+  inline val get_at(int index) const;
+  inline val get_val(int index) const;
+  inline val_list insert(unsigned int pos, val el) const;
+  inline int n_val() const;
+  inline val_list reverse() const;
+  inline val_list set_val(int index, val el) const;
+  inline int size() const;
+  inline val_list swap(unsigned int pos1, unsigned int pos2) const;
+};
+
+// declarations for isl::vec
+inline vec manage(__isl_take isl_vec *ptr);
+inline vec manage_copy(__isl_keep isl_vec *ptr);
+
+class vec {
+  friend inline vec manage(__isl_take isl_vec *ptr);
+  friend inline vec manage_copy(__isl_keep isl_vec *ptr);
+
+  isl_vec *ptr = nullptr;
+
+  inline explicit vec(__isl_take isl_vec *ptr);
+
+public:
+  inline /* implicit */ vec();
+  inline /* implicit */ vec(const vec &obj);
+  inline /* implicit */ vec(std::nullptr_t);
+  inline vec &operator=(vec obj);
+  inline ~vec();
+  inline __isl_give isl_vec *copy() const &;
+  inline __isl_give isl_vec *copy() && = delete;
+  inline __isl_keep isl_vec *get() const;
+  inline __isl_give isl_vec *release();
+  inline bool is_null() const;
+  inline explicit operator bool() const;
+  inline ctx get_ctx() const;
+  inline void dump() const;
+
+  inline vec add(vec vec2) const;
+  inline vec add_els(unsigned int n) const;
+  static inline vec alloc(ctx ctx, unsigned int size);
+  inline vec ceil() const;
+  inline vec clr() const;
+  inline int cmp_element(const vec &vec2, int pos) const;
+  inline vec concat(vec vec2) const;
+  inline vec drop_els(unsigned int pos, unsigned int n) const;
+  inline vec extend(unsigned int size) const;
+  inline val get_element_val(int pos) const;
+  inline vec insert_els(unsigned int pos, unsigned int n) const;
+  inline vec insert_zero_els(unsigned int pos, unsigned int n) const;
+  inline boolean is_equal(const vec &vec2) const;
+  inline vec mat_product(mat mat) const;
+  inline vec move_els(unsigned int dst_col, unsigned int src_col, unsigned int n) const;
+  inline vec neg() const;
+  inline vec set_element_si(int pos, int v) const;
+  inline vec set_element_val(int pos, val v) const;
+  inline vec set_si(int v) const;
+  inline vec set_val(val v) const;
+  inline int size() const;
+  inline vec sort() const;
+  static inline vec zero(ctx ctx, unsigned int size);
+  inline vec zero_extend(unsigned int size) const;
+};
+
+// implementations for isl::aff
+aff manage(__isl_take isl_aff *ptr) {
+  return aff(ptr);
+}
+aff manage_copy(__isl_keep isl_aff *ptr) {
+  ptr = isl_aff_copy(ptr);
+  return aff(ptr);
+}
+
+aff::aff()
+    : ptr(nullptr) {}
+
+aff::aff(const aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+aff::aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+aff::aff(__isl_take isl_aff *ptr)
+    : ptr(ptr) {}
+
+aff::aff(local_space ls)
+{
+  auto res = isl_aff_zero_on_domain(ls.release());
+  ptr = res;
+}
+aff::aff(local_space ls, val val)
+{
+  auto res = isl_aff_val_on_domain(ls.release(), val.release());
+  ptr = res;
+}
+aff::aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+aff &aff::operator=(aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff::~aff() {
+  if (ptr)
+    isl_aff_free(ptr);
+}
+
+__isl_give isl_aff *aff::copy() const & {
+  return isl_aff_copy(ptr);
+}
+
+__isl_keep isl_aff *aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff *aff::release() {
+  isl_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff::is_null() const {
+  return ptr == nullptr;
+}
+aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx aff::get_ctx() const {
+  return ctx(isl_aff_get_ctx(ptr));
+}
+std::string aff::to_str() const {
+  char *Tmp = isl_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void aff::dump() const {
+  isl_aff_dump(get());
+}
+
+
+aff aff::add(aff aff2) const
+{
+  auto res = isl_aff_add(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::add_coefficient_si(isl::dim type, int pos, int v) const
+{
+  auto res = isl_aff_add_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
+  return manage(res);
+}
+
+aff aff::add_coefficient_val(isl::dim type, int pos, val v) const
+{
+  auto res = isl_aff_add_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+aff aff::add_constant_num_si(int v) const
+{
+  auto res = isl_aff_add_constant_num_si(copy(), v);
+  return manage(res);
+}
+
+aff aff::add_constant_si(int v) const
+{
+  auto res = isl_aff_add_constant_si(copy(), v);
+  return manage(res);
+}
+
+aff aff::add_constant_val(val v) const
+{
+  auto res = isl_aff_add_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+aff aff::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+aff aff::align_params(space model) const
+{
+  auto res = isl_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+aff aff::ceil() const
+{
+  auto res = isl_aff_ceil(copy());
+  return manage(res);
+}
+
+int aff::coefficient_sgn(isl::dim type, int pos) const
+{
+  auto res = isl_aff_coefficient_sgn(get(), static_cast<enum isl_dim_type>(type), pos);
+  return res;
+}
+
+int aff::dim(isl::dim type) const
+{
+  auto res = isl_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+aff aff::div(aff aff2) const
+{
+  auto res = isl_aff_div(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set aff::eq_basic_set(aff aff2) const
+{
+  auto res = isl_aff_eq_basic_set(copy(), aff2.release());
+  return manage(res);
+}
+
+set aff::eq_set(aff aff2) const
+{
+  auto res = isl_aff_eq_set(copy(), aff2.release());
+  return manage(res);
+}
+
+val aff::eval(point pnt) const
+{
+  auto res = isl_aff_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+int aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+aff aff::floor() const
+{
+  auto res = isl_aff_floor(copy());
+  return manage(res);
+}
+
+aff aff::from_range() const
+{
+  auto res = isl_aff_from_range(copy());
+  return manage(res);
+}
+
+basic_set aff::ge_basic_set(aff aff2) const
+{
+  auto res = isl_aff_ge_basic_set(copy(), aff2.release());
+  return manage(res);
+}
+
+set aff::ge_set(aff aff2) const
+{
+  auto res = isl_aff_ge_set(copy(), aff2.release());
+  return manage(res);
+}
+
+val aff::get_coefficient_val(isl::dim type, int pos) const
+{
+  auto res = isl_aff_get_coefficient_val(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+val aff::get_constant_val() const
+{
+  auto res = isl_aff_get_constant_val(get());
+  return manage(res);
+}
+
+val aff::get_denominator_val() const
+{
+  auto res = isl_aff_get_denominator_val(get());
+  return manage(res);
+}
+
+std::string aff::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+aff aff::get_div(int pos) const
+{
+  auto res = isl_aff_get_div(get(), pos);
+  return manage(res);
+}
+
+local_space aff::get_domain_local_space() const
+{
+  auto res = isl_aff_get_domain_local_space(get());
+  return manage(res);
+}
+
+space aff::get_domain_space() const
+{
+  auto res = isl_aff_get_domain_space(get());
+  return manage(res);
+}
+
+uint32_t aff::get_hash() const
+{
+  auto res = isl_aff_get_hash(get());
+  return res;
+}
+
+local_space aff::get_local_space() const
+{
+  auto res = isl_aff_get_local_space(get());
+  return manage(res);
+}
+
+space aff::get_space() const
+{
+  auto res = isl_aff_get_space(get());
+  return manage(res);
+}
+
+aff aff::gist(set context) const
+{
+  auto res = isl_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+aff aff::gist_params(set context) const
+{
+  auto res = isl_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+basic_set aff::gt_basic_set(aff aff2) const
+{
+  auto res = isl_aff_gt_basic_set(copy(), aff2.release());
+  return manage(res);
+}
+
+set aff::gt_set(aff aff2) const
+{
+  auto res = isl_aff_gt_set(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean aff::is_cst() const
+{
+  auto res = isl_aff_is_cst(get());
+  return manage(res);
+}
+
+boolean aff::is_nan() const
+{
+  auto res = isl_aff_is_nan(get());
+  return manage(res);
+}
+
+basic_set aff::le_basic_set(aff aff2) const
+{
+  auto res = isl_aff_le_basic_set(copy(), aff2.release());
+  return manage(res);
+}
+
+set aff::le_set(aff aff2) const
+{
+  auto res = isl_aff_le_set(copy(), aff2.release());
+  return manage(res);
+}
+
+basic_set aff::lt_basic_set(aff aff2) const
+{
+  auto res = isl_aff_lt_basic_set(copy(), aff2.release());
+  return manage(res);
+}
+
+set aff::lt_set(aff aff2) const
+{
+  auto res = isl_aff_lt_set(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::mod(val mod) const
+{
+  auto res = isl_aff_mod_val(copy(), mod.release());
+  return manage(res);
+}
+
+aff aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+aff aff::mul(aff aff2) const
+{
+  auto res = isl_aff_mul(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::nan_on_domain(local_space ls)
+{
+  auto res = isl_aff_nan_on_domain(ls.release());
+  return manage(res);
+}
+
+set aff::ne_set(aff aff2) const
+{
+  auto res = isl_aff_ne_set(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::neg() const
+{
+  auto res = isl_aff_neg(copy());
+  return manage(res);
+}
+
+basic_set aff::neg_basic_set() const
+{
+  auto res = isl_aff_neg_basic_set(copy());
+  return manage(res);
+}
+
+aff aff::param_on_domain_space_id(space space, id id)
+{
+  auto res = isl_aff_param_on_domain_space_id(space.release(), id.release());
+  return manage(res);
+}
+
+boolean aff::plain_is_equal(const aff &aff2) const
+{
+  auto res = isl_aff_plain_is_equal(get(), aff2.get());
+  return manage(res);
+}
+
+boolean aff::plain_is_zero() const
+{
+  auto res = isl_aff_plain_is_zero(get());
+  return manage(res);
+}
+
+aff aff::project_domain_on_params() const
+{
+  auto res = isl_aff_project_domain_on_params(copy());
+  return manage(res);
+}
+
+aff aff::pullback(multi_aff ma) const
+{
+  auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+aff aff::pullback_aff(aff aff2) const
+{
+  auto res = isl_aff_pullback_aff(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::scale(val v) const
+{
+  auto res = isl_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+aff aff::scale_down(val v) const
+{
+  auto res = isl_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+aff aff::scale_down_ui(unsigned int f) const
+{
+  auto res = isl_aff_scale_down_ui(copy(), f);
+  return manage(res);
+}
+
+aff aff::set_coefficient_si(isl::dim type, int pos, int v) const
+{
+  auto res = isl_aff_set_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
+  return manage(res);
+}
+
+aff aff::set_coefficient_val(isl::dim type, int pos, val v) const
+{
+  auto res = isl_aff_set_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+aff aff::set_constant_si(int v) const
+{
+  auto res = isl_aff_set_constant_si(copy(), v);
+  return manage(res);
+}
+
+aff aff::set_constant_val(val v) const
+{
+  auto res = isl_aff_set_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+aff aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+aff aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+aff aff::sub(aff aff2) const
+{
+  auto res = isl_aff_sub(copy(), aff2.release());
+  return manage(res);
+}
+
+aff aff::var_on_domain(local_space ls, isl::dim type, unsigned int pos)
+{
+  auto res = isl_aff_var_on_domain(ls.release(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+basic_set aff::zero_basic_set() const
+{
+  auto res = isl_aff_zero_basic_set(copy());
+  return manage(res);
+}
+
+// implementations for isl::aff_list
+aff_list manage(__isl_take isl_aff_list *ptr) {
+  return aff_list(ptr);
+}
+aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
+  ptr = isl_aff_list_copy(ptr);
+  return aff_list(ptr);
+}
+
+aff_list::aff_list()
+    : ptr(nullptr) {}
+
+aff_list::aff_list(const aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+aff_list::aff_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+aff_list::aff_list(__isl_take isl_aff_list *ptr)
+    : ptr(ptr) {}
+
+
+aff_list &aff_list::operator=(aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+aff_list::~aff_list() {
+  if (ptr)
+    isl_aff_list_free(ptr);
+}
+
+__isl_give isl_aff_list *aff_list::copy() const & {
+  return isl_aff_list_copy(ptr);
+}
+
+__isl_keep isl_aff_list *aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_aff_list *aff_list::release() {
+  isl_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool aff_list::is_null() const {
+  return ptr == nullptr;
+}
+aff_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx aff_list::get_ctx() const {
+  return ctx(isl_aff_list_get_ctx(ptr));
+}
+
+void aff_list::dump() const {
+  isl_aff_list_dump(get());
+}
+
+
+aff_list aff_list::add(aff el) const
+{
+  auto res = isl_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+aff_list aff_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_aff_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+aff_list aff_list::concat(aff_list list2) const
+{
+  auto res = isl_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+aff_list aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat aff_list::foreach(const std::function<stat(aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+aff_list aff_list::from_aff(aff el)
+{
+  auto res = isl_aff_list_from_aff(el.release());
+  return manage(res);
+}
+
+aff aff_list::get_aff(int index) const
+{
+  auto res = isl_aff_list_get_aff(get(), index);
+  return manage(res);
+}
+
+aff aff_list::get_at(int index) const
+{
+  auto res = isl_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+aff_list aff_list::insert(unsigned int pos, aff el) const
+{
+  auto res = isl_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int aff_list::n_aff() const
+{
+  auto res = isl_aff_list_n_aff(get());
+  return res;
+}
+
+aff_list aff_list::reverse() const
+{
+  auto res = isl_aff_list_reverse(copy());
+  return manage(res);
+}
+
+aff_list aff_list::set_aff(int index, aff el) const
+{
+  auto res = isl_aff_list_set_aff(copy(), index, el.release());
+  return manage(res);
+}
+
+int aff_list::size() const
+{
+  auto res = isl_aff_list_size(get());
+  return res;
+}
+
+aff_list aff_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_aff_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::ast_build
+ast_build manage(__isl_take isl_ast_build *ptr) {
+  return ast_build(ptr);
+}
+ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
+  ptr = isl_ast_build_copy(ptr);
+  return ast_build(ptr);
+}
+
+ast_build::ast_build()
+    : ptr(nullptr) {}
+
+ast_build::ast_build(const ast_build &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+ast_build::ast_build(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+ast_build::ast_build(__isl_take isl_ast_build *ptr)
+    : ptr(ptr) {}
+
+ast_build::ast_build(ctx ctx)
+{
+  auto res = isl_ast_build_alloc(ctx.release());
+  ptr = res;
+}
+
+ast_build &ast_build::operator=(ast_build obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_build::~ast_build() {
+  if (ptr)
+    isl_ast_build_free(ptr);
+}
+
+__isl_give isl_ast_build *ast_build::copy() const & {
+  return isl_ast_build_copy(ptr);
+}
+
+__isl_keep isl_ast_build *ast_build::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_build *ast_build::release() {
+  isl_ast_build *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_build::is_null() const {
+  return ptr == nullptr;
+}
+ast_build::operator bool() const {
+  return !is_null();
+}
+
+
+ctx ast_build::get_ctx() const {
+  return ctx(isl_ast_build_get_ctx(ptr));
+}
+
+
+ast_expr ast_build::access_from(pw_multi_aff pma) const
+{
+  auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
+  return manage(res);
+}
+
+ast_expr ast_build::access_from(multi_pw_aff mpa) const
+{
+  auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
+  return manage(res);
+}
+
+ast_node ast_build::ast_from_schedule(union_map schedule) const
+{
+  auto res = isl_ast_build_ast_from_schedule(get(), schedule.release());
+  return manage(res);
+}
+
+ast_expr ast_build::call_from(pw_multi_aff pma) const
+{
+  auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
+  return manage(res);
+}
+
+ast_expr ast_build::call_from(multi_pw_aff mpa) const
+{
+  auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
+  return manage(res);
+}
+
+ast_expr ast_build::expr_from(set set) const
+{
+  auto res = isl_ast_build_expr_from_set(get(), set.release());
+  return manage(res);
+}
+
+ast_expr ast_build::expr_from(pw_aff pa) const
+{
+  auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
+  return manage(res);
+}
+
+ast_build ast_build::from_context(set set)
+{
+  auto res = isl_ast_build_from_context(set.release());
+  return manage(res);
+}
+
+union_map ast_build::get_schedule() const
+{
+  auto res = isl_ast_build_get_schedule(get());
+  return manage(res);
+}
+
+space ast_build::get_schedule_space() const
+{
+  auto res = isl_ast_build_get_schedule_space(get());
+  return manage(res);
+}
+
+ast_node ast_build::node_from_schedule(schedule schedule) const
+{
+  auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
+  return manage(res);
+}
+
+ast_node ast_build::node_from_schedule_map(union_map schedule) const
+{
+  auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
+  return manage(res);
+}
+
+ast_build ast_build::restrict(set set) const
+{
+  auto res = isl_ast_build_restrict(copy(), set.release());
+  return manage(res);
+}
+
+// implementations for isl::ast_expr
+ast_expr manage(__isl_take isl_ast_expr *ptr) {
+  return ast_expr(ptr);
+}
+ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
+  ptr = isl_ast_expr_copy(ptr);
+  return ast_expr(ptr);
+}
+
+ast_expr::ast_expr()
+    : ptr(nullptr) {}
+
+ast_expr::ast_expr(const ast_expr &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+ast_expr::ast_expr(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
+    : ptr(ptr) {}
+
+
+ast_expr &ast_expr::operator=(ast_expr obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_expr::~ast_expr() {
+  if (ptr)
+    isl_ast_expr_free(ptr);
+}
+
+__isl_give isl_ast_expr *ast_expr::copy() const & {
+  return isl_ast_expr_copy(ptr);
+}
+
+__isl_keep isl_ast_expr *ast_expr::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_expr *ast_expr::release() {
+  isl_ast_expr *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_expr::is_null() const {
+  return ptr == nullptr;
+}
+ast_expr::operator bool() const {
+  return !is_null();
+}
+
+
+ctx ast_expr::get_ctx() const {
+  return ctx(isl_ast_expr_get_ctx(ptr));
+}
+std::string ast_expr::to_str() const {
+  char *Tmp = isl_ast_expr_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void ast_expr::dump() const {
+  isl_ast_expr_dump(get());
+}
+
+
+ast_expr ast_expr::access(ast_expr_list indices) const
+{
+  auto res = isl_ast_expr_access(copy(), indices.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::add(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_add(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::address_of() const
+{
+  auto res = isl_ast_expr_address_of(copy());
+  return manage(res);
+}
+
+ast_expr ast_expr::call(ast_expr_list arguments) const
+{
+  auto res = isl_ast_expr_call(copy(), arguments.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::div(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_div(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::eq(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_eq(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::from_id(id id)
+{
+  auto res = isl_ast_expr_from_id(id.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::from_val(val v)
+{
+  auto res = isl_ast_expr_from_val(v.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::ge(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_ge(copy(), expr2.release());
+  return manage(res);
+}
+
+id ast_expr::get_id() const
+{
+  auto res = isl_ast_expr_get_id(get());
+  return manage(res);
+}
+
+ast_expr ast_expr::get_op_arg(int pos) const
+{
+  auto res = isl_ast_expr_get_op_arg(get(), pos);
+  return manage(res);
+}
+
+int ast_expr::get_op_n_arg() const
+{
+  auto res = isl_ast_expr_get_op_n_arg(get());
+  return res;
+}
+
+val ast_expr::get_val() const
+{
+  auto res = isl_ast_expr_get_val(get());
+  return manage(res);
+}
+
+ast_expr ast_expr::gt(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_gt(copy(), expr2.release());
+  return manage(res);
+}
+
+boolean ast_expr::is_equal(const ast_expr &expr2) const
+{
+  auto res = isl_ast_expr_is_equal(get(), expr2.get());
+  return manage(res);
+}
+
+ast_expr ast_expr::le(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_le(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::lt(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_lt(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::mul(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_mul(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::neg() const
+{
+  auto res = isl_ast_expr_neg(copy());
+  return manage(res);
+}
+
+ast_expr ast_expr::pdiv_q(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_pdiv_q(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::pdiv_r(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_pdiv_r(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::set_op_arg(int pos, ast_expr arg) const
+{
+  auto res = isl_ast_expr_set_op_arg(copy(), pos, arg.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::sub(ast_expr expr2) const
+{
+  auto res = isl_ast_expr_sub(copy(), expr2.release());
+  return manage(res);
+}
+
+ast_expr ast_expr::substitute_ids(id_to_ast_expr id2expr) const
+{
+  auto res = isl_ast_expr_substitute_ids(copy(), id2expr.release());
+  return manage(res);
+}
+
+std::string ast_expr::to_C_str() const
+{
+  auto res = isl_ast_expr_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+// implementations for isl::ast_expr_list
+ast_expr_list manage(__isl_take isl_ast_expr_list *ptr) {
+  return ast_expr_list(ptr);
+}
+ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr) {
+  ptr = isl_ast_expr_list_copy(ptr);
+  return ast_expr_list(ptr);
+}
+
+ast_expr_list::ast_expr_list()
+    : ptr(nullptr) {}
+
+ast_expr_list::ast_expr_list(const ast_expr_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+ast_expr_list::ast_expr_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+ast_expr_list::ast_expr_list(__isl_take isl_ast_expr_list *ptr)
+    : ptr(ptr) {}
+
+
+ast_expr_list &ast_expr_list::operator=(ast_expr_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_expr_list::~ast_expr_list() {
+  if (ptr)
+    isl_ast_expr_list_free(ptr);
+}
+
+__isl_give isl_ast_expr_list *ast_expr_list::copy() const & {
+  return isl_ast_expr_list_copy(ptr);
+}
+
+__isl_keep isl_ast_expr_list *ast_expr_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_expr_list *ast_expr_list::release() {
+  isl_ast_expr_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_expr_list::is_null() const {
+  return ptr == nullptr;
+}
+ast_expr_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx ast_expr_list::get_ctx() const {
+  return ctx(isl_ast_expr_list_get_ctx(ptr));
+}
+
+void ast_expr_list::dump() const {
+  isl_ast_expr_list_dump(get());
+}
+
+
+ast_expr_list ast_expr_list::add(ast_expr el) const
+{
+  auto res = isl_ast_expr_list_add(copy(), el.release());
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_ast_expr_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::concat(ast_expr_list list2) const
+{
+  auto res = isl_ast_expr_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_ast_expr_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat ast_expr_list::foreach(const std::function<stat(ast_expr)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(ast_expr)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_ast_expr *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_ast_expr_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::from_ast_expr(ast_expr el)
+{
+  auto res = isl_ast_expr_list_from_ast_expr(el.release());
+  return manage(res);
+}
+
+ast_expr ast_expr_list::get_ast_expr(int index) const
+{
+  auto res = isl_ast_expr_list_get_ast_expr(get(), index);
+  return manage(res);
+}
+
+ast_expr ast_expr_list::get_at(int index) const
+{
+  auto res = isl_ast_expr_list_get_at(get(), index);
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::insert(unsigned int pos, ast_expr el) const
+{
+  auto res = isl_ast_expr_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int ast_expr_list::n_ast_expr() const
+{
+  auto res = isl_ast_expr_list_n_ast_expr(get());
+  return res;
+}
+
+ast_expr_list ast_expr_list::reverse() const
+{
+  auto res = isl_ast_expr_list_reverse(copy());
+  return manage(res);
+}
+
+ast_expr_list ast_expr_list::set_ast_expr(int index, ast_expr el) const
+{
+  auto res = isl_ast_expr_list_set_ast_expr(copy(), index, el.release());
+  return manage(res);
+}
+
+int ast_expr_list::size() const
+{
+  auto res = isl_ast_expr_list_size(get());
+  return res;
+}
+
+ast_expr_list ast_expr_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_ast_expr_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::ast_node
+ast_node manage(__isl_take isl_ast_node *ptr) {
+  return ast_node(ptr);
+}
+ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
+  ptr = isl_ast_node_copy(ptr);
+  return ast_node(ptr);
+}
+
+ast_node::ast_node()
+    : ptr(nullptr) {}
+
+ast_node::ast_node(const ast_node &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+ast_node::ast_node(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+ast_node::ast_node(__isl_take isl_ast_node *ptr)
+    : ptr(ptr) {}
+
+
+ast_node &ast_node::operator=(ast_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node::~ast_node() {
+  if (ptr)
+    isl_ast_node_free(ptr);
+}
+
+__isl_give isl_ast_node *ast_node::copy() const & {
+  return isl_ast_node_copy(ptr);
+}
+
+__isl_keep isl_ast_node *ast_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node *ast_node::release() {
+  isl_ast_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node::is_null() const {
+  return ptr == nullptr;
+}
+ast_node::operator bool() const {
+  return !is_null();
+}
+
+
+ctx ast_node::get_ctx() const {
+  return ctx(isl_ast_node_get_ctx(ptr));
+}
+std::string ast_node::to_str() const {
+  char *Tmp = isl_ast_node_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void ast_node::dump() const {
+  isl_ast_node_dump(get());
+}
+
+
+ast_node ast_node::alloc_user(ast_expr expr)
+{
+  auto res = isl_ast_node_alloc_user(expr.release());
+  return manage(res);
+}
+
+ast_node_list ast_node::block_get_children() const
+{
+  auto res = isl_ast_node_block_get_children(get());
+  return manage(res);
+}
+
+ast_node ast_node::for_get_body() const
+{
+  auto res = isl_ast_node_for_get_body(get());
+  return manage(res);
+}
+
+ast_expr ast_node::for_get_cond() const
+{
+  auto res = isl_ast_node_for_get_cond(get());
+  return manage(res);
+}
+
+ast_expr ast_node::for_get_inc() const
+{
+  auto res = isl_ast_node_for_get_inc(get());
+  return manage(res);
+}
+
+ast_expr ast_node::for_get_init() const
+{
+  auto res = isl_ast_node_for_get_init(get());
+  return manage(res);
+}
+
+ast_expr ast_node::for_get_iterator() const
+{
+  auto res = isl_ast_node_for_get_iterator(get());
+  return manage(res);
+}
+
+boolean ast_node::for_is_degenerate() const
+{
+  auto res = isl_ast_node_for_is_degenerate(get());
+  return manage(res);
+}
+
+id ast_node::get_annotation() const
+{
+  auto res = isl_ast_node_get_annotation(get());
+  return manage(res);
+}
+
+ast_expr ast_node::if_get_cond() const
+{
+  auto res = isl_ast_node_if_get_cond(get());
+  return manage(res);
+}
+
+ast_node ast_node::if_get_else() const
+{
+  auto res = isl_ast_node_if_get_else(get());
+  return manage(res);
+}
+
+ast_node ast_node::if_get_then() const
+{
+  auto res = isl_ast_node_if_get_then(get());
+  return manage(res);
+}
+
+boolean ast_node::if_has_else() const
+{
+  auto res = isl_ast_node_if_has_else(get());
+  return manage(res);
+}
+
+id ast_node::mark_get_id() const
+{
+  auto res = isl_ast_node_mark_get_id(get());
+  return manage(res);
+}
+
+ast_node ast_node::mark_get_node() const
+{
+  auto res = isl_ast_node_mark_get_node(get());
+  return manage(res);
+}
+
+ast_node ast_node::set_annotation(id annotation) const
+{
+  auto res = isl_ast_node_set_annotation(copy(), annotation.release());
+  return manage(res);
+}
+
+std::string ast_node::to_C_str() const
+{
+  auto res = isl_ast_node_to_C_str(get());
+  std::string tmp(res);
+  free(res);
+  return tmp;
+}
+
+ast_expr ast_node::user_get_expr() const
+{
+  auto res = isl_ast_node_user_get_expr(get());
+  return manage(res);
+}
+
+// implementations for isl::ast_node_list
+ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
+  return ast_node_list(ptr);
+}
+ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
+  ptr = isl_ast_node_list_copy(ptr);
+  return ast_node_list(ptr);
+}
+
+ast_node_list::ast_node_list()
+    : ptr(nullptr) {}
+
+ast_node_list::ast_node_list(const ast_node_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+ast_node_list::ast_node_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
+    : ptr(ptr) {}
+
+
+ast_node_list &ast_node_list::operator=(ast_node_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+ast_node_list::~ast_node_list() {
+  if (ptr)
+    isl_ast_node_list_free(ptr);
+}
+
+__isl_give isl_ast_node_list *ast_node_list::copy() const & {
+  return isl_ast_node_list_copy(ptr);
+}
+
+__isl_keep isl_ast_node_list *ast_node_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_ast_node_list *ast_node_list::release() {
+  isl_ast_node_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool ast_node_list::is_null() const {
+  return ptr == nullptr;
+}
+ast_node_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx ast_node_list::get_ctx() const {
+  return ctx(isl_ast_node_list_get_ctx(ptr));
+}
+
+void ast_node_list::dump() const {
+  isl_ast_node_list_dump(get());
+}
+
+
+ast_node_list ast_node_list::add(ast_node el) const
+{
+  auto res = isl_ast_node_list_add(copy(), el.release());
+  return manage(res);
+}
+
+ast_node_list ast_node_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_ast_node_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+ast_node_list ast_node_list::concat(ast_node_list list2) const
+{
+  auto res = isl_ast_node_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_ast_node_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat ast_node_list::foreach(const std::function<stat(ast_node)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(ast_node)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+ast_node_list ast_node_list::from_ast_node(ast_node el)
+{
+  auto res = isl_ast_node_list_from_ast_node(el.release());
+  return manage(res);
+}
+
+ast_node ast_node_list::get_ast_node(int index) const
+{
+  auto res = isl_ast_node_list_get_ast_node(get(), index);
+  return manage(res);
+}
+
+ast_node ast_node_list::get_at(int index) const
+{
+  auto res = isl_ast_node_list_get_at(get(), index);
+  return manage(res);
+}
+
+ast_node_list ast_node_list::insert(unsigned int pos, ast_node el) const
+{
+  auto res = isl_ast_node_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int ast_node_list::n_ast_node() const
+{
+  auto res = isl_ast_node_list_n_ast_node(get());
+  return res;
+}
+
+ast_node_list ast_node_list::reverse() const
+{
+  auto res = isl_ast_node_list_reverse(copy());
+  return manage(res);
+}
+
+ast_node_list ast_node_list::set_ast_node(int index, ast_node el) const
+{
+  auto res = isl_ast_node_list_set_ast_node(copy(), index, el.release());
+  return manage(res);
+}
+
+int ast_node_list::size() const
+{
+  auto res = isl_ast_node_list_size(get());
+  return res;
+}
+
+ast_node_list ast_node_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_ast_node_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::basic_map
+basic_map manage(__isl_take isl_basic_map *ptr) {
+  return basic_map(ptr);
+}
+basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
+  ptr = isl_basic_map_copy(ptr);
+  return basic_map(ptr);
+}
+
+basic_map::basic_map()
+    : ptr(nullptr) {}
+
+basic_map::basic_map(const basic_map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+basic_map::basic_map(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+basic_map::basic_map(__isl_take isl_basic_map *ptr)
+    : ptr(ptr) {}
+
+basic_map::basic_map(ctx ctx, const std::string &str)
+{
+  auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+basic_map &basic_map::operator=(basic_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_map::~basic_map() {
+  if (ptr)
+    isl_basic_map_free(ptr);
+}
+
+__isl_give isl_basic_map *basic_map::copy() const & {
+  return isl_basic_map_copy(ptr);
+}
+
+__isl_keep isl_basic_map *basic_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_map *basic_map::release() {
+  isl_basic_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_map::is_null() const {
+  return ptr == nullptr;
+}
+basic_map::operator bool() const {
+  return !is_null();
+}
+
+
+ctx basic_map::get_ctx() const {
+  return ctx(isl_basic_map_get_ctx(ptr));
+}
+std::string basic_map::to_str() const {
+  char *Tmp = isl_basic_map_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void basic_map::dump() const {
+  isl_basic_map_dump(get());
+}
+
+
+basic_map basic_map::add_constraint(constraint constraint) const
+{
+  auto res = isl_basic_map_add_constraint(copy(), constraint.release());
+  return manage(res);
+}
+
+basic_map basic_map::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_basic_map_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+basic_map basic_map::affine_hull() const
+{
+  auto res = isl_basic_map_affine_hull(copy());
+  return manage(res);
+}
+
+basic_map basic_map::align_params(space model) const
+{
+  auto res = isl_basic_map_align_params(copy(), model.release());
+  return manage(res);
+}
+
+basic_map basic_map::apply_domain(basic_map bmap2) const
+{
+  auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::apply_range(basic_map bmap2) const
+{
+  auto res = isl_basic_map_apply_range(copy(), bmap2.release());
+  return manage(res);
+}
+
+boolean basic_map::can_curry() const
+{
+  auto res = isl_basic_map_can_curry(get());
+  return manage(res);
+}
+
+boolean basic_map::can_uncurry() const
+{
+  auto res = isl_basic_map_can_uncurry(get());
+  return manage(res);
+}
+
+boolean basic_map::can_zip() const
+{
+  auto res = isl_basic_map_can_zip(get());
+  return manage(res);
+}
+
+basic_map basic_map::curry() const
+{
+  auto res = isl_basic_map_curry(copy());
+  return manage(res);
+}
+
+basic_set basic_map::deltas() const
+{
+  auto res = isl_basic_map_deltas(copy());
+  return manage(res);
+}
+
+basic_map basic_map::deltas_map() const
+{
+  auto res = isl_basic_map_deltas_map(copy());
+  return manage(res);
+}
+
+basic_map basic_map::detect_equalities() const
+{
+  auto res = isl_basic_map_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int basic_map::dim(isl::dim type) const
+{
+  auto res = isl_basic_map_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+basic_set basic_map::domain() const
+{
+  auto res = isl_basic_map_domain(copy());
+  return manage(res);
+}
+
+basic_map basic_map::domain_map() const
+{
+  auto res = isl_basic_map_domain_map(copy());
+  return manage(res);
+}
+
+basic_map basic_map::domain_product(basic_map bmap2) const
+{
+  auto res = isl_basic_map_domain_product(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_map basic_map::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_map basic_map::drop_unused_params() const
+{
+  auto res = isl_basic_map_drop_unused_params(copy());
+  return manage(res);
+}
+
+basic_map basic_map::eliminate(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_map basic_map::empty(space space)
+{
+  auto res = isl_basic_map_empty(space.release());
+  return manage(res);
+}
+
+basic_map basic_map::equal(space dim, unsigned int n_equal)
+{
+  auto res = isl_basic_map_equal(dim.release(), n_equal);
+  return manage(res);
+}
+
+mat basic_map::equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const
+{
+  auto res = isl_basic_map_equalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4), static_cast<enum isl_dim_type>(c5));
+  return manage(res);
+}
+
+basic_map basic_map::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_basic_map_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+int basic_map::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_basic_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+basic_map basic_map::fix_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_basic_map_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+basic_map basic_map::fix_val(isl::dim type, unsigned int pos, val v) const
+{
+  auto res = isl_basic_map_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+basic_map basic_map::flat_product(basic_map bmap2) const
+{
+  auto res = isl_basic_map_flat_product(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::flat_range_product(basic_map bmap2) const
+{
+  auto res = isl_basic_map_flat_range_product(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::flatten() const
+{
+  auto res = isl_basic_map_flatten(copy());
+  return manage(res);
+}
+
+basic_map basic_map::flatten_domain() const
+{
+  auto res = isl_basic_map_flatten_domain(copy());
+  return manage(res);
+}
+
+basic_map basic_map::flatten_range() const
+{
+  auto res = isl_basic_map_flatten_range(copy());
+  return manage(res);
+}
+
+stat basic_map::foreach_constraint(const std::function<stat(constraint)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(constraint)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_basic_map_foreach_constraint(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+basic_map basic_map::from_aff(aff aff)
+{
+  auto res = isl_basic_map_from_aff(aff.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_aff_list(space domain_space, aff_list list)
+{
+  auto res = isl_basic_map_from_aff_list(domain_space.release(), list.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_constraint(constraint constraint)
+{
+  auto res = isl_basic_map_from_constraint(constraint.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_domain(basic_set bset)
+{
+  auto res = isl_basic_map_from_domain(bset.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_domain_and_range(basic_set domain, basic_set range)
+{
+  auto res = isl_basic_map_from_domain_and_range(domain.release(), range.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_multi_aff(multi_aff maff)
+{
+  auto res = isl_basic_map_from_multi_aff(maff.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_qpolynomial(qpolynomial qp)
+{
+  auto res = isl_basic_map_from_qpolynomial(qp.release());
+  return manage(res);
+}
+
+basic_map basic_map::from_range(basic_set bset)
+{
+  auto res = isl_basic_map_from_range(bset.release());
+  return manage(res);
+}
+
+constraint_list basic_map::get_constraint_list() const
+{
+  auto res = isl_basic_map_get_constraint_list(get());
+  return manage(res);
+}
+
+std::string basic_map::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_basic_map_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+aff basic_map::get_div(int pos) const
+{
+  auto res = isl_basic_map_get_div(get(), pos);
+  return manage(res);
+}
+
+local_space basic_map::get_local_space() const
+{
+  auto res = isl_basic_map_get_local_space(get());
+  return manage(res);
+}
+
+space basic_map::get_space() const
+{
+  auto res = isl_basic_map_get_space(get());
+  return manage(res);
+}
+
+std::string basic_map::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_basic_map_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+basic_map basic_map::gist(basic_map context) const
+{
+  auto res = isl_basic_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+basic_map basic_map::gist_domain(basic_set context) const
+{
+  auto res = isl_basic_map_gist_domain(copy(), context.release());
+  return manage(res);
+}
+
+boolean basic_map::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_basic_map_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+basic_map basic_map::identity(space dim)
+{
+  auto res = isl_basic_map_identity(dim.release());
+  return manage(res);
+}
+
+boolean basic_map::image_is_bounded() const
+{
+  auto res = isl_basic_map_image_is_bounded(get());
+  return manage(res);
+}
+
+mat basic_map::inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const
+{
+  auto res = isl_basic_map_inequalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4), static_cast<enum isl_dim_type>(c5));
+  return manage(res);
+}
+
+basic_map basic_map::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
+{
+  auto res = isl_basic_map_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
+  return manage(res);
+}
+
+basic_map basic_map::intersect(basic_map bmap2) const
+{
+  auto res = isl_basic_map_intersect(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::intersect_domain(basic_set bset) const
+{
+  auto res = isl_basic_map_intersect_domain(copy(), bset.release());
+  return manage(res);
+}
+
+basic_map basic_map::intersect_range(basic_set bset) const
+{
+  auto res = isl_basic_map_intersect_range(copy(), bset.release());
+  return manage(res);
+}
+
+boolean basic_map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean basic_map::is_disjoint(const basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_disjoint(get(), bmap2.get());
+  return manage(res);
+}
+
+boolean basic_map::is_empty() const
+{
+  auto res = isl_basic_map_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_map::is_equal(const basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_equal(get(), bmap2.get());
+  return manage(res);
+}
+
+boolean basic_map::is_rational() const
+{
+  auto res = isl_basic_map_is_rational(get());
+  return manage(res);
+}
+
+boolean basic_map::is_single_valued() const
+{
+  auto res = isl_basic_map_is_single_valued(get());
+  return manage(res);
+}
+
+boolean basic_map::is_strict_subset(const basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_strict_subset(get(), bmap2.get());
+  return manage(res);
+}
+
+boolean basic_map::is_subset(const basic_map &bmap2) const
+{
+  auto res = isl_basic_map_is_subset(get(), bmap2.get());
+  return manage(res);
+}
+
+boolean basic_map::is_universe() const
+{
+  auto res = isl_basic_map_is_universe(get());
+  return manage(res);
+}
+
+basic_map basic_map::less_at(space dim, unsigned int pos)
+{
+  auto res = isl_basic_map_less_at(dim.release(), pos);
+  return manage(res);
+}
+
+map basic_map::lexmax() const
+{
+  auto res = isl_basic_map_lexmax(copy());
+  return manage(res);
+}
+
+map basic_map::lexmin() const
+{
+  auto res = isl_basic_map_lexmin(copy());
+  return manage(res);
+}
+
+pw_multi_aff basic_map::lexmin_pw_multi_aff() const
+{
+  auto res = isl_basic_map_lexmin_pw_multi_aff(copy());
+  return manage(res);
+}
+
+basic_map basic_map::lower_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_basic_map_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+basic_map basic_map::more_at(space dim, unsigned int pos)
+{
+  auto res = isl_basic_map_more_at(dim.release(), pos);
+  return manage(res);
+}
+
+basic_map basic_map::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_basic_map_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+int basic_map::n_constraint() const
+{
+  auto res = isl_basic_map_n_constraint(get());
+  return res;
+}
+
+basic_map basic_map::nat_universe(space dim)
+{
+  auto res = isl_basic_map_nat_universe(dim.release());
+  return manage(res);
+}
+
+basic_map basic_map::neg() const
+{
+  auto res = isl_basic_map_neg(copy());
+  return manage(res);
+}
+
+basic_map basic_map::order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_basic_map_order_ge(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+basic_map basic_map::order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_basic_map_order_gt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+val basic_map::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_basic_map_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean basic_map::plain_is_empty() const
+{
+  auto res = isl_basic_map_plain_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_map::plain_is_universe() const
+{
+  auto res = isl_basic_map_plain_is_universe(get());
+  return manage(res);
+}
+
+basic_map basic_map::preimage_domain_multi_aff(multi_aff ma) const
+{
+  auto res = isl_basic_map_preimage_domain_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+basic_map basic_map::preimage_range_multi_aff(multi_aff ma) const
+{
+  auto res = isl_basic_map_preimage_range_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+basic_map basic_map::product(basic_map bmap2) const
+{
+  auto res = isl_basic_map_product(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_map::range() const
+{
+  auto res = isl_basic_map_range(copy());
+  return manage(res);
+}
+
+basic_map basic_map::range_map() const
+{
+  auto res = isl_basic_map_range_map(copy());
+  return manage(res);
+}
+
+basic_map basic_map::range_product(basic_map bmap2) const
+{
+  auto res = isl_basic_map_range_product(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_map basic_map::remove_divs() const
+{
+  auto res = isl_basic_map_remove_divs(copy());
+  return manage(res);
+}
+
+basic_map basic_map::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_map basic_map::remove_redundancies() const
+{
+  auto res = isl_basic_map_remove_redundancies(copy());
+  return manage(res);
+}
+
+basic_map basic_map::reverse() const
+{
+  auto res = isl_basic_map_reverse(copy());
+  return manage(res);
+}
+
+basic_map basic_map::sample() const
+{
+  auto res = isl_basic_map_sample(copy());
+  return manage(res);
+}
+
+basic_map basic_map::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_basic_map_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+basic_map basic_map::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_basic_map_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+basic_map basic_map::sum(basic_map bmap2) const
+{
+  auto res = isl_basic_map_sum(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::uncurry() const
+{
+  auto res = isl_basic_map_uncurry(copy());
+  return manage(res);
+}
+
+map basic_map::unite(basic_map bmap2) const
+{
+  auto res = isl_basic_map_union(copy(), bmap2.release());
+  return manage(res);
+}
+
+basic_map basic_map::universe(space space)
+{
+  auto res = isl_basic_map_universe(space.release());
+  return manage(res);
+}
+
+basic_map basic_map::upper_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_basic_map_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+basic_set basic_map::wrap() const
+{
+  auto res = isl_basic_map_wrap(copy());
+  return manage(res);
+}
+
+basic_map basic_map::zip() const
+{
+  auto res = isl_basic_map_zip(copy());
+  return manage(res);
+}
+
+// implementations for isl::basic_map_list
+basic_map_list manage(__isl_take isl_basic_map_list *ptr) {
+  return basic_map_list(ptr);
+}
+basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr) {
+  ptr = isl_basic_map_list_copy(ptr);
+  return basic_map_list(ptr);
+}
+
+basic_map_list::basic_map_list()
+    : ptr(nullptr) {}
+
+basic_map_list::basic_map_list(const basic_map_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+basic_map_list::basic_map_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+basic_map_list::basic_map_list(__isl_take isl_basic_map_list *ptr)
+    : ptr(ptr) {}
+
+
+basic_map_list &basic_map_list::operator=(basic_map_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_map_list::~basic_map_list() {
+  if (ptr)
+    isl_basic_map_list_free(ptr);
+}
+
+__isl_give isl_basic_map_list *basic_map_list::copy() const & {
+  return isl_basic_map_list_copy(ptr);
+}
+
+__isl_keep isl_basic_map_list *basic_map_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_map_list *basic_map_list::release() {
+  isl_basic_map_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_map_list::is_null() const {
+  return ptr == nullptr;
+}
+basic_map_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx basic_map_list::get_ctx() const {
+  return ctx(isl_basic_map_list_get_ctx(ptr));
+}
+
+void basic_map_list::dump() const {
+  isl_basic_map_list_dump(get());
+}
+
+
+basic_map_list basic_map_list::add(basic_map el) const
+{
+  auto res = isl_basic_map_list_add(copy(), el.release());
+  return manage(res);
+}
+
+basic_map_list basic_map_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_basic_map_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+basic_map_list basic_map_list::concat(basic_map_list list2) const
+{
+  auto res = isl_basic_map_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+basic_map_list basic_map_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_map_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat basic_map_list::foreach(const std::function<stat(basic_map)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(basic_map)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_basic_map_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+basic_map_list basic_map_list::from_basic_map(basic_map el)
+{
+  auto res = isl_basic_map_list_from_basic_map(el.release());
+  return manage(res);
+}
+
+basic_map basic_map_list::get_at(int index) const
+{
+  auto res = isl_basic_map_list_get_at(get(), index);
+  return manage(res);
+}
+
+basic_map basic_map_list::get_basic_map(int index) const
+{
+  auto res = isl_basic_map_list_get_basic_map(get(), index);
+  return manage(res);
+}
+
+basic_map_list basic_map_list::insert(unsigned int pos, basic_map el) const
+{
+  auto res = isl_basic_map_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int basic_map_list::n_basic_map() const
+{
+  auto res = isl_basic_map_list_n_basic_map(get());
+  return res;
+}
+
+basic_map_list basic_map_list::reverse() const
+{
+  auto res = isl_basic_map_list_reverse(copy());
+  return manage(res);
+}
+
+basic_map_list basic_map_list::set_basic_map(int index, basic_map el) const
+{
+  auto res = isl_basic_map_list_set_basic_map(copy(), index, el.release());
+  return manage(res);
+}
+
+int basic_map_list::size() const
+{
+  auto res = isl_basic_map_list_size(get());
+  return res;
+}
+
+basic_map_list basic_map_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_basic_map_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::basic_set
+basic_set manage(__isl_take isl_basic_set *ptr) {
+  return basic_set(ptr);
+}
+basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
+  ptr = isl_basic_set_copy(ptr);
+  return basic_set(ptr);
+}
+
+basic_set::basic_set()
+    : ptr(nullptr) {}
+
+basic_set::basic_set(const basic_set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+basic_set::basic_set(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+basic_set::basic_set(__isl_take isl_basic_set *ptr)
+    : ptr(ptr) {}
+
+basic_set::basic_set(ctx ctx, const std::string &str)
+{
+  auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+basic_set::basic_set(point pnt)
+{
+  auto res = isl_basic_set_from_point(pnt.release());
+  ptr = res;
+}
+
+basic_set &basic_set::operator=(basic_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_set::~basic_set() {
+  if (ptr)
+    isl_basic_set_free(ptr);
+}
+
+__isl_give isl_basic_set *basic_set::copy() const & {
+  return isl_basic_set_copy(ptr);
+}
+
+__isl_keep isl_basic_set *basic_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_set *basic_set::release() {
+  isl_basic_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_set::is_null() const {
+  return ptr == nullptr;
+}
+basic_set::operator bool() const {
+  return !is_null();
+}
+
+
+ctx basic_set::get_ctx() const {
+  return ctx(isl_basic_set_get_ctx(ptr));
+}
+std::string basic_set::to_str() const {
+  char *Tmp = isl_basic_set_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void basic_set::dump() const {
+  isl_basic_set_dump(get());
+}
+
+
+basic_set basic_set::affine_hull() const
+{
+  auto res = isl_basic_set_affine_hull(copy());
+  return manage(res);
+}
+
+basic_set basic_set::align_params(space model) const
+{
+  auto res = isl_basic_set_align_params(copy(), model.release());
+  return manage(res);
+}
+
+basic_set basic_set::apply(basic_map bmap) const
+{
+  auto res = isl_basic_set_apply(copy(), bmap.release());
+  return manage(res);
+}
+
+basic_set basic_set::box_from_points(point pnt1, point pnt2)
+{
+  auto res = isl_basic_set_box_from_points(pnt1.release(), pnt2.release());
+  return manage(res);
+}
+
+basic_set basic_set::coefficients() const
+{
+  auto res = isl_basic_set_coefficients(copy());
+  return manage(res);
+}
+
+basic_set basic_set::detect_equalities() const
+{
+  auto res = isl_basic_set_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int basic_set::dim(isl::dim type) const
+{
+  auto res = isl_basic_set_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+val basic_set::dim_max_val(int pos) const
+{
+  auto res = isl_basic_set_dim_max_val(copy(), pos);
+  return manage(res);
+}
+
+basic_set basic_set::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_set::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_set::drop_unused_params() const
+{
+  auto res = isl_basic_set_drop_unused_params(copy());
+  return manage(res);
+}
+
+basic_set basic_set::eliminate(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_set::empty(space space)
+{
+  auto res = isl_basic_set_empty(space.release());
+  return manage(res);
+}
+
+mat basic_set::equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const
+{
+  auto res = isl_basic_set_equalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4));
+  return manage(res);
+}
+
+basic_set basic_set::fix_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_basic_set_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+basic_set basic_set::fix_val(isl::dim type, unsigned int pos, val v) const
+{
+  auto res = isl_basic_set_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+basic_set basic_set::flat_product(basic_set bset2) const
+{
+  auto res = isl_basic_set_flat_product(copy(), bset2.release());
+  return manage(res);
+}
+
+basic_set basic_set::flatten() const
+{
+  auto res = isl_basic_set_flatten(copy());
+  return manage(res);
+}
+
+stat basic_set::foreach_bound_pair(isl::dim type, unsigned int pos, const std::function<stat(constraint, constraint, basic_set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(constraint, constraint, basic_set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_constraint *arg_0, isl_constraint *arg_1, isl_basic_set *arg_2, void *arg_3) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_3);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1), manage(arg_2));
+    return ret.release();
+  };
+  auto res = isl_basic_set_foreach_bound_pair(get(), static_cast<enum isl_dim_type>(type), pos, fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat basic_set::foreach_constraint(const std::function<stat(constraint)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(constraint)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_basic_set_foreach_constraint(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+basic_set basic_set::from_constraint(constraint constraint)
+{
+  auto res = isl_basic_set_from_constraint(constraint.release());
+  return manage(res);
+}
+
+basic_set basic_set::from_multi_aff(multi_aff ma)
+{
+  auto res = isl_basic_set_from_multi_aff(ma.release());
+  return manage(res);
+}
+
+basic_set basic_set::from_params() const
+{
+  auto res = isl_basic_set_from_params(copy());
+  return manage(res);
+}
+
+constraint_list basic_set::get_constraint_list() const
+{
+  auto res = isl_basic_set_get_constraint_list(get());
+  return manage(res);
+}
+
+id basic_set::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_basic_set_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string basic_set::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_basic_set_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+aff basic_set::get_div(int pos) const
+{
+  auto res = isl_basic_set_get_div(get(), pos);
+  return manage(res);
+}
+
+local_space basic_set::get_local_space() const
+{
+  auto res = isl_basic_set_get_local_space(get());
+  return manage(res);
+}
+
+space basic_set::get_space() const
+{
+  auto res = isl_basic_set_get_space(get());
+  return manage(res);
+}
+
+std::string basic_set::get_tuple_name() const
+{
+  auto res = isl_basic_set_get_tuple_name(get());
+  std::string tmp(res);
+  return tmp;
+}
+
+basic_set basic_set::gist(basic_set context) const
+{
+  auto res = isl_basic_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+mat basic_set::inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const
+{
+  auto res = isl_basic_set_inequalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4));
+  return manage(res);
+}
+
+basic_set basic_set::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
+{
+  auto res = isl_basic_set_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
+  return manage(res);
+}
+
+basic_set basic_set::intersect(basic_set bset2) const
+{
+  auto res = isl_basic_set_intersect(copy(), bset2.release());
+  return manage(res);
+}
+
+basic_set basic_set::intersect_params(basic_set bset2) const
+{
+  auto res = isl_basic_set_intersect_params(copy(), bset2.release());
+  return manage(res);
+}
+
+boolean basic_set::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean basic_set::is_bounded() const
+{
+  auto res = isl_basic_set_is_bounded(get());
+  return manage(res);
+}
+
+boolean basic_set::is_disjoint(const basic_set &bset2) const
+{
+  auto res = isl_basic_set_is_disjoint(get(), bset2.get());
+  return manage(res);
+}
+
+boolean basic_set::is_empty() const
+{
+  auto res = isl_basic_set_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_set::is_equal(const basic_set &bset2) const
+{
+  auto res = isl_basic_set_is_equal(get(), bset2.get());
+  return manage(res);
+}
+
+int basic_set::is_rational() const
+{
+  auto res = isl_basic_set_is_rational(get());
+  return res;
+}
+
+boolean basic_set::is_subset(const basic_set &bset2) const
+{
+  auto res = isl_basic_set_is_subset(get(), bset2.get());
+  return manage(res);
+}
+
+boolean basic_set::is_universe() const
+{
+  auto res = isl_basic_set_is_universe(get());
+  return manage(res);
+}
+
+boolean basic_set::is_wrapping() const
+{
+  auto res = isl_basic_set_is_wrapping(get());
+  return manage(res);
+}
+
+set basic_set::lexmax() const
+{
+  auto res = isl_basic_set_lexmax(copy());
+  return manage(res);
+}
+
+set basic_set::lexmin() const
+{
+  auto res = isl_basic_set_lexmin(copy());
+  return manage(res);
+}
+
+basic_set basic_set::lower_bound_val(isl::dim type, unsigned int pos, val value) const
+{
+  auto res = isl_basic_set_lower_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
+  return manage(res);
+}
+
+val basic_set::max_val(const aff &obj) const
+{
+  auto res = isl_basic_set_max_val(get(), obj.get());
+  return manage(res);
+}
+
+basic_set basic_set::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_basic_set_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+int basic_set::n_constraint() const
+{
+  auto res = isl_basic_set_n_constraint(get());
+  return res;
+}
+
+unsigned int basic_set::n_dim() const
+{
+  auto res = isl_basic_set_n_dim(get());
+  return res;
+}
+
+basic_set basic_set::nat_universe(space dim)
+{
+  auto res = isl_basic_set_nat_universe(dim.release());
+  return manage(res);
+}
+
+basic_set basic_set::neg() const
+{
+  auto res = isl_basic_set_neg(copy());
+  return manage(res);
+}
+
+basic_set basic_set::params() const
+{
+  auto res = isl_basic_set_params(copy());
+  return manage(res);
+}
+
+boolean basic_set::plain_is_empty() const
+{
+  auto res = isl_basic_set_plain_is_empty(get());
+  return manage(res);
+}
+
+boolean basic_set::plain_is_equal(const basic_set &bset2) const
+{
+  auto res = isl_basic_set_plain_is_equal(get(), bset2.get());
+  return manage(res);
+}
+
+boolean basic_set::plain_is_universe() const
+{
+  auto res = isl_basic_set_plain_is_universe(get());
+  return manage(res);
+}
+
+basic_set basic_set::positive_orthant(space space)
+{
+  auto res = isl_basic_set_positive_orthant(space.release());
+  return manage(res);
+}
+
+basic_set basic_set::preimage_multi_aff(multi_aff ma) const
+{
+  auto res = isl_basic_set_preimage_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+basic_set basic_set::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+mat basic_set::reduced_basis() const
+{
+  auto res = isl_basic_set_reduced_basis(get());
+  return manage(res);
+}
+
+basic_set basic_set::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_set::remove_divs() const
+{
+  auto res = isl_basic_set_remove_divs(copy());
+  return manage(res);
+}
+
+basic_set basic_set::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+basic_set basic_set::remove_redundancies() const
+{
+  auto res = isl_basic_set_remove_redundancies(copy());
+  return manage(res);
+}
+
+basic_set basic_set::remove_unknown_divs() const
+{
+  auto res = isl_basic_set_remove_unknown_divs(copy());
+  return manage(res);
+}
+
+basic_set basic_set::sample() const
+{
+  auto res = isl_basic_set_sample(copy());
+  return manage(res);
+}
+
+point basic_set::sample_point() const
+{
+  auto res = isl_basic_set_sample_point(copy());
+  return manage(res);
+}
+
+basic_set basic_set::set_tuple_id(id id) const
+{
+  auto res = isl_basic_set_set_tuple_id(copy(), id.release());
+  return manage(res);
+}
+
+basic_set basic_set::set_tuple_name(const std::string &s) const
+{
+  auto res = isl_basic_set_set_tuple_name(copy(), s.c_str());
+  return manage(res);
+}
+
+basic_set basic_set::solutions() const
+{
+  auto res = isl_basic_set_solutions(copy());
+  return manage(res);
+}
+
+set basic_set::unite(basic_set bset2) const
+{
+  auto res = isl_basic_set_union(copy(), bset2.release());
+  return manage(res);
+}
+
+basic_set basic_set::universe(space space)
+{
+  auto res = isl_basic_set_universe(space.release());
+  return manage(res);
+}
+
+basic_map basic_set::unwrap() const
+{
+  auto res = isl_basic_set_unwrap(copy());
+  return manage(res);
+}
+
+basic_set basic_set::upper_bound_val(isl::dim type, unsigned int pos, val value) const
+{
+  auto res = isl_basic_set_upper_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
+  return manage(res);
+}
+
+// implementations for isl::basic_set_list
+basic_set_list manage(__isl_take isl_basic_set_list *ptr) {
+  return basic_set_list(ptr);
+}
+basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr) {
+  ptr = isl_basic_set_list_copy(ptr);
+  return basic_set_list(ptr);
+}
+
+basic_set_list::basic_set_list()
+    : ptr(nullptr) {}
+
+basic_set_list::basic_set_list(const basic_set_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+basic_set_list::basic_set_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+basic_set_list::basic_set_list(__isl_take isl_basic_set_list *ptr)
+    : ptr(ptr) {}
+
+
+basic_set_list &basic_set_list::operator=(basic_set_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+basic_set_list::~basic_set_list() {
+  if (ptr)
+    isl_basic_set_list_free(ptr);
+}
+
+__isl_give isl_basic_set_list *basic_set_list::copy() const & {
+  return isl_basic_set_list_copy(ptr);
+}
+
+__isl_keep isl_basic_set_list *basic_set_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_basic_set_list *basic_set_list::release() {
+  isl_basic_set_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool basic_set_list::is_null() const {
+  return ptr == nullptr;
+}
+basic_set_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx basic_set_list::get_ctx() const {
+  return ctx(isl_basic_set_list_get_ctx(ptr));
+}
+
+void basic_set_list::dump() const {
+  isl_basic_set_list_dump(get());
+}
+
+
+basic_set_list basic_set_list::add(basic_set el) const
+{
+  auto res = isl_basic_set_list_add(copy(), el.release());
+  return manage(res);
+}
+
+basic_set_list basic_set_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_basic_set_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+basic_set_list basic_set_list::coefficients() const
+{
+  auto res = isl_basic_set_list_coefficients(copy());
+  return manage(res);
+}
+
+basic_set_list basic_set_list::concat(basic_set_list list2) const
+{
+  auto res = isl_basic_set_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+basic_set_list basic_set_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_basic_set_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat basic_set_list::foreach(const std::function<stat(basic_set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(basic_set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_basic_set_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+basic_set_list basic_set_list::from_basic_set(basic_set el)
+{
+  auto res = isl_basic_set_list_from_basic_set(el.release());
+  return manage(res);
+}
+
+basic_set basic_set_list::get_at(int index) const
+{
+  auto res = isl_basic_set_list_get_at(get(), index);
+  return manage(res);
+}
+
+basic_set basic_set_list::get_basic_set(int index) const
+{
+  auto res = isl_basic_set_list_get_basic_set(get(), index);
+  return manage(res);
+}
+
+basic_set_list basic_set_list::insert(unsigned int pos, basic_set el) const
+{
+  auto res = isl_basic_set_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int basic_set_list::n_basic_set() const
+{
+  auto res = isl_basic_set_list_n_basic_set(get());
+  return res;
+}
+
+basic_set_list basic_set_list::reverse() const
+{
+  auto res = isl_basic_set_list_reverse(copy());
+  return manage(res);
+}
+
+basic_set_list basic_set_list::set_basic_set(int index, basic_set el) const
+{
+  auto res = isl_basic_set_list_set_basic_set(copy(), index, el.release());
+  return manage(res);
+}
+
+int basic_set_list::size() const
+{
+  auto res = isl_basic_set_list_size(get());
+  return res;
+}
+
+basic_set_list basic_set_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_basic_set_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::constraint
+constraint manage(__isl_take isl_constraint *ptr) {
+  return constraint(ptr);
+}
+constraint manage_copy(__isl_keep isl_constraint *ptr) {
+  ptr = isl_constraint_copy(ptr);
+  return constraint(ptr);
+}
+
+constraint::constraint()
+    : ptr(nullptr) {}
+
+constraint::constraint(const constraint &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+constraint::constraint(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+constraint::constraint(__isl_take isl_constraint *ptr)
+    : ptr(ptr) {}
+
+
+constraint &constraint::operator=(constraint obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+constraint::~constraint() {
+  if (ptr)
+    isl_constraint_free(ptr);
+}
+
+__isl_give isl_constraint *constraint::copy() const & {
+  return isl_constraint_copy(ptr);
+}
+
+__isl_keep isl_constraint *constraint::get() const {
+  return ptr;
+}
+
+__isl_give isl_constraint *constraint::release() {
+  isl_constraint *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool constraint::is_null() const {
+  return ptr == nullptr;
+}
+constraint::operator bool() const {
+  return !is_null();
+}
+
+
+ctx constraint::get_ctx() const {
+  return ctx(isl_constraint_get_ctx(ptr));
+}
+
+void constraint::dump() const {
+  isl_constraint_dump(get());
+}
+
+
+constraint constraint::alloc_equality(local_space ls)
+{
+  auto res = isl_constraint_alloc_equality(ls.release());
+  return manage(res);
+}
+
+constraint constraint::alloc_inequality(local_space ls)
+{
+  auto res = isl_constraint_alloc_inequality(ls.release());
+  return manage(res);
+}
+
+int constraint::cmp_last_non_zero(const constraint &c2) const
+{
+  auto res = isl_constraint_cmp_last_non_zero(get(), c2.get());
+  return res;
+}
+
+aff constraint::get_aff() const
+{
+  auto res = isl_constraint_get_aff(get());
+  return manage(res);
+}
+
+aff constraint::get_bound(isl::dim type, int pos) const
+{
+  auto res = isl_constraint_get_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+val constraint::get_coefficient_val(isl::dim type, int pos) const
+{
+  auto res = isl_constraint_get_coefficient_val(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+val constraint::get_constant_val() const
+{
+  auto res = isl_constraint_get_constant_val(get());
+  return manage(res);
+}
+
+std::string constraint::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_constraint_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+aff constraint::get_div(int pos) const
+{
+  auto res = isl_constraint_get_div(get(), pos);
+  return manage(res);
+}
+
+local_space constraint::get_local_space() const
+{
+  auto res = isl_constraint_get_local_space(get());
+  return manage(res);
+}
+
+space constraint::get_space() const
+{
+  auto res = isl_constraint_get_space(get());
+  return manage(res);
+}
+
+boolean constraint::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_constraint_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+int constraint::is_div_constraint() const
+{
+  auto res = isl_constraint_is_div_constraint(get());
+  return res;
+}
+
+boolean constraint::is_lower_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_constraint_is_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean constraint::is_upper_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_constraint_is_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+int constraint::plain_cmp(const constraint &c2) const
+{
+  auto res = isl_constraint_plain_cmp(get(), c2.get());
+  return res;
+}
+
+constraint constraint::set_coefficient_si(isl::dim type, int pos, int v) const
+{
+  auto res = isl_constraint_set_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
+  return manage(res);
+}
+
+constraint constraint::set_coefficient_val(isl::dim type, int pos, val v) const
+{
+  auto res = isl_constraint_set_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+constraint constraint::set_constant_si(int v) const
+{
+  auto res = isl_constraint_set_constant_si(copy(), v);
+  return manage(res);
+}
+
+constraint constraint::set_constant_val(val v) const
+{
+  auto res = isl_constraint_set_constant_val(copy(), v.release());
+  return manage(res);
+}
+
+// implementations for isl::constraint_list
+constraint_list manage(__isl_take isl_constraint_list *ptr) {
+  return constraint_list(ptr);
+}
+constraint_list manage_copy(__isl_keep isl_constraint_list *ptr) {
+  ptr = isl_constraint_list_copy(ptr);
+  return constraint_list(ptr);
+}
+
+constraint_list::constraint_list()
+    : ptr(nullptr) {}
+
+constraint_list::constraint_list(const constraint_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+constraint_list::constraint_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+constraint_list::constraint_list(__isl_take isl_constraint_list *ptr)
+    : ptr(ptr) {}
+
+
+constraint_list &constraint_list::operator=(constraint_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+constraint_list::~constraint_list() {
+  if (ptr)
+    isl_constraint_list_free(ptr);
+}
+
+__isl_give isl_constraint_list *constraint_list::copy() const & {
+  return isl_constraint_list_copy(ptr);
+}
+
+__isl_keep isl_constraint_list *constraint_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_constraint_list *constraint_list::release() {
+  isl_constraint_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool constraint_list::is_null() const {
+  return ptr == nullptr;
+}
+constraint_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx constraint_list::get_ctx() const {
+  return ctx(isl_constraint_list_get_ctx(ptr));
+}
+
+void constraint_list::dump() const {
+  isl_constraint_list_dump(get());
+}
+
+
+constraint_list constraint_list::add(constraint el) const
+{
+  auto res = isl_constraint_list_add(copy(), el.release());
+  return manage(res);
+}
+
+constraint_list constraint_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_constraint_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+constraint_list constraint_list::concat(constraint_list list2) const
+{
+  auto res = isl_constraint_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+constraint_list constraint_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_constraint_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat constraint_list::foreach(const std::function<stat(constraint)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(constraint)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_constraint_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+constraint_list constraint_list::from_constraint(constraint el)
+{
+  auto res = isl_constraint_list_from_constraint(el.release());
+  return manage(res);
+}
+
+constraint constraint_list::get_at(int index) const
+{
+  auto res = isl_constraint_list_get_at(get(), index);
+  return manage(res);
+}
+
+constraint constraint_list::get_constraint(int index) const
+{
+  auto res = isl_constraint_list_get_constraint(get(), index);
+  return manage(res);
+}
+
+constraint_list constraint_list::insert(unsigned int pos, constraint el) const
+{
+  auto res = isl_constraint_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int constraint_list::n_constraint() const
+{
+  auto res = isl_constraint_list_n_constraint(get());
+  return res;
+}
+
+constraint_list constraint_list::reverse() const
+{
+  auto res = isl_constraint_list_reverse(copy());
+  return manage(res);
+}
+
+constraint_list constraint_list::set_constraint(int index, constraint el) const
+{
+  auto res = isl_constraint_list_set_constraint(copy(), index, el.release());
+  return manage(res);
+}
+
+int constraint_list::size() const
+{
+  auto res = isl_constraint_list_size(get());
+  return res;
+}
+
+constraint_list constraint_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_constraint_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::fixed_box
+fixed_box manage(__isl_take isl_fixed_box *ptr) {
+  return fixed_box(ptr);
+}
+fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
+  ptr = isl_fixed_box_copy(ptr);
+  return fixed_box(ptr);
+}
+
+fixed_box::fixed_box()
+    : ptr(nullptr) {}
+
+fixed_box::fixed_box(const fixed_box &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+fixed_box::fixed_box(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
+    : ptr(ptr) {}
+
+
+fixed_box &fixed_box::operator=(fixed_box obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+fixed_box::~fixed_box() {
+  if (ptr)
+    isl_fixed_box_free(ptr);
+}
+
+__isl_give isl_fixed_box *fixed_box::copy() const & {
+  return isl_fixed_box_copy(ptr);
+}
+
+__isl_keep isl_fixed_box *fixed_box::get() const {
+  return ptr;
+}
+
+__isl_give isl_fixed_box *fixed_box::release() {
+  isl_fixed_box *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool fixed_box::is_null() const {
+  return ptr == nullptr;
+}
+fixed_box::operator bool() const {
+  return !is_null();
+}
+
+
+ctx fixed_box::get_ctx() const {
+  return ctx(isl_fixed_box_get_ctx(ptr));
+}
+
+
+multi_aff fixed_box::get_offset() const
+{
+  auto res = isl_fixed_box_get_offset(get());
+  return manage(res);
+}
+
+multi_val fixed_box::get_size() const
+{
+  auto res = isl_fixed_box_get_size(get());
+  return manage(res);
+}
+
+space fixed_box::get_space() const
+{
+  auto res = isl_fixed_box_get_space(get());
+  return manage(res);
+}
+
+boolean fixed_box::is_valid() const
+{
+  auto res = isl_fixed_box_is_valid(get());
+  return manage(res);
+}
+
+// implementations for isl::id
+id manage(__isl_take isl_id *ptr) {
+  return id(ptr);
+}
+id manage_copy(__isl_keep isl_id *ptr) {
+  ptr = isl_id_copy(ptr);
+  return id(ptr);
+}
+
+id::id()
+    : ptr(nullptr) {}
+
+id::id(const id &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+id::id(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+id::id(__isl_take isl_id *ptr)
+    : ptr(ptr) {}
+
+
+id &id::operator=(id obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id::~id() {
+  if (ptr)
+    isl_id_free(ptr);
+}
+
+__isl_give isl_id *id::copy() const & {
+  return isl_id_copy(ptr);
+}
+
+__isl_keep isl_id *id::get() const {
+  return ptr;
+}
+
+__isl_give isl_id *id::release() {
+  isl_id *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id::is_null() const {
+  return ptr == nullptr;
+}
+id::operator bool() const {
+  return !is_null();
+}
+
+
+ctx id::get_ctx() const {
+  return ctx(isl_id_get_ctx(ptr));
+}
+std::string id::to_str() const {
+  char *Tmp = isl_id_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void id::dump() const {
+  isl_id_dump(get());
+}
+
+
+id id::alloc(ctx ctx, const std::string &name, void * user)
+{
+  auto res = isl_id_alloc(ctx.release(), name.c_str(), user);
+  return manage(res);
+}
+
+uint32_t id::get_hash() const
+{
+  auto res = isl_id_get_hash(get());
+  return res;
+}
+
+std::string id::get_name() const
+{
+  auto res = isl_id_get_name(get());
+  std::string tmp(res);
+  return tmp;
+}
+
+void * id::get_user() const
+{
+  auto res = isl_id_get_user(get());
+  return res;
+}
+
+// implementations for isl::id_list
+id_list manage(__isl_take isl_id_list *ptr) {
+  return id_list(ptr);
+}
+id_list manage_copy(__isl_keep isl_id_list *ptr) {
+  ptr = isl_id_list_copy(ptr);
+  return id_list(ptr);
+}
+
+id_list::id_list()
+    : ptr(nullptr) {}
+
+id_list::id_list(const id_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+id_list::id_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+id_list::id_list(__isl_take isl_id_list *ptr)
+    : ptr(ptr) {}
+
+
+id_list &id_list::operator=(id_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id_list::~id_list() {
+  if (ptr)
+    isl_id_list_free(ptr);
+}
+
+__isl_give isl_id_list *id_list::copy() const & {
+  return isl_id_list_copy(ptr);
+}
+
+__isl_keep isl_id_list *id_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_id_list *id_list::release() {
+  isl_id_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id_list::is_null() const {
+  return ptr == nullptr;
+}
+id_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx id_list::get_ctx() const {
+  return ctx(isl_id_list_get_ctx(ptr));
+}
+
+void id_list::dump() const {
+  isl_id_list_dump(get());
+}
+
+
+id_list id_list::add(id el) const
+{
+  auto res = isl_id_list_add(copy(), el.release());
+  return manage(res);
+}
+
+id_list id_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_id_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+id_list id_list::concat(id_list list2) const
+{
+  auto res = isl_id_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+id_list id_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_id_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat id_list::foreach(const std::function<stat(id)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(id)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+id_list id_list::from_id(id el)
+{
+  auto res = isl_id_list_from_id(el.release());
+  return manage(res);
+}
+
+id id_list::get_at(int index) const
+{
+  auto res = isl_id_list_get_at(get(), index);
+  return manage(res);
+}
+
+id id_list::get_id(int index) const
+{
+  auto res = isl_id_list_get_id(get(), index);
+  return manage(res);
+}
+
+id_list id_list::insert(unsigned int pos, id el) const
+{
+  auto res = isl_id_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int id_list::n_id() const
+{
+  auto res = isl_id_list_n_id(get());
+  return res;
+}
+
+id_list id_list::reverse() const
+{
+  auto res = isl_id_list_reverse(copy());
+  return manage(res);
+}
+
+id_list id_list::set_id(int index, id el) const
+{
+  auto res = isl_id_list_set_id(copy(), index, el.release());
+  return manage(res);
+}
+
+int id_list::size() const
+{
+  auto res = isl_id_list_size(get());
+  return res;
+}
+
+id_list id_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_id_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::id_to_ast_expr
+id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr) {
+  return id_to_ast_expr(ptr);
+}
+id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr) {
+  ptr = isl_id_to_ast_expr_copy(ptr);
+  return id_to_ast_expr(ptr);
+}
+
+id_to_ast_expr::id_to_ast_expr()
+    : ptr(nullptr) {}
+
+id_to_ast_expr::id_to_ast_expr(const id_to_ast_expr &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+id_to_ast_expr::id_to_ast_expr(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+id_to_ast_expr::id_to_ast_expr(__isl_take isl_id_to_ast_expr *ptr)
+    : ptr(ptr) {}
+
+
+id_to_ast_expr &id_to_ast_expr::operator=(id_to_ast_expr obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+id_to_ast_expr::~id_to_ast_expr() {
+  if (ptr)
+    isl_id_to_ast_expr_free(ptr);
+}
+
+__isl_give isl_id_to_ast_expr *id_to_ast_expr::copy() const & {
+  return isl_id_to_ast_expr_copy(ptr);
+}
+
+__isl_keep isl_id_to_ast_expr *id_to_ast_expr::get() const {
+  return ptr;
+}
+
+__isl_give isl_id_to_ast_expr *id_to_ast_expr::release() {
+  isl_id_to_ast_expr *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool id_to_ast_expr::is_null() const {
+  return ptr == nullptr;
+}
+id_to_ast_expr::operator bool() const {
+  return !is_null();
+}
+
+
+ctx id_to_ast_expr::get_ctx() const {
+  return ctx(isl_id_to_ast_expr_get_ctx(ptr));
+}
+
+void id_to_ast_expr::dump() const {
+  isl_id_to_ast_expr_dump(get());
+}
+
+
+id_to_ast_expr id_to_ast_expr::alloc(ctx ctx, int min_size)
+{
+  auto res = isl_id_to_ast_expr_alloc(ctx.release(), min_size);
+  return manage(res);
+}
+
+id_to_ast_expr id_to_ast_expr::drop(id key) const
+{
+  auto res = isl_id_to_ast_expr_drop(copy(), key.release());
+  return manage(res);
+}
+
+stat id_to_ast_expr::foreach(const std::function<stat(id, ast_expr)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(id, ast_expr)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_id *arg_0, isl_ast_expr *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_id_to_ast_expr_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+ast_expr id_to_ast_expr::get(id key) const
+{
+  auto res = isl_id_to_ast_expr_get(get(), key.release());
+  return manage(res);
+}
+
+boolean id_to_ast_expr::has(const id &key) const
+{
+  auto res = isl_id_to_ast_expr_has(get(), key.get());
+  return manage(res);
+}
+
+id_to_ast_expr id_to_ast_expr::set(id key, ast_expr val) const
+{
+  auto res = isl_id_to_ast_expr_set(copy(), key.release(), val.release());
+  return manage(res);
+}
+
+// implementations for isl::local_space
+local_space manage(__isl_take isl_local_space *ptr) {
+  return local_space(ptr);
+}
+local_space manage_copy(__isl_keep isl_local_space *ptr) {
+  ptr = isl_local_space_copy(ptr);
+  return local_space(ptr);
+}
+
+local_space::local_space()
+    : ptr(nullptr) {}
+
+local_space::local_space(const local_space &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+local_space::local_space(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+local_space::local_space(__isl_take isl_local_space *ptr)
+    : ptr(ptr) {}
+
+local_space::local_space(space dim)
+{
+  auto res = isl_local_space_from_space(dim.release());
+  ptr = res;
+}
+
+local_space &local_space::operator=(local_space obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+local_space::~local_space() {
+  if (ptr)
+    isl_local_space_free(ptr);
+}
+
+__isl_give isl_local_space *local_space::copy() const & {
+  return isl_local_space_copy(ptr);
+}
+
+__isl_keep isl_local_space *local_space::get() const {
+  return ptr;
+}
+
+__isl_give isl_local_space *local_space::release() {
+  isl_local_space *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool local_space::is_null() const {
+  return ptr == nullptr;
+}
+local_space::operator bool() const {
+  return !is_null();
+}
+
+
+ctx local_space::get_ctx() const {
+  return ctx(isl_local_space_get_ctx(ptr));
+}
+
+void local_space::dump() const {
+  isl_local_space_dump(get());
+}
+
+
+local_space local_space::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_local_space_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+int local_space::dim(isl::dim type) const
+{
+  auto res = isl_local_space_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+local_space local_space::domain() const
+{
+  auto res = isl_local_space_domain(copy());
+  return manage(res);
+}
+
+local_space local_space::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_local_space_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+int local_space::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_local_space_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+local_space local_space::flatten_domain() const
+{
+  auto res = isl_local_space_flatten_domain(copy());
+  return manage(res);
+}
+
+local_space local_space::flatten_range() const
+{
+  auto res = isl_local_space_flatten_range(copy());
+  return manage(res);
+}
+
+local_space local_space::from_domain() const
+{
+  auto res = isl_local_space_from_domain(copy());
+  return manage(res);
+}
+
+id local_space::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_local_space_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string local_space::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_local_space_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+aff local_space::get_div(int pos) const
+{
+  auto res = isl_local_space_get_div(get(), pos);
+  return manage(res);
+}
+
+space local_space::get_space() const
+{
+  auto res = isl_local_space_get_space(get());
+  return manage(res);
+}
+
+boolean local_space::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_local_space_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean local_space::has_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_local_space_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+local_space local_space::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_local_space_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+local_space local_space::intersect(local_space ls2) const
+{
+  auto res = isl_local_space_intersect(copy(), ls2.release());
+  return manage(res);
+}
+
+boolean local_space::is_equal(const local_space &ls2) const
+{
+  auto res = isl_local_space_is_equal(get(), ls2.get());
+  return manage(res);
+}
+
+boolean local_space::is_params() const
+{
+  auto res = isl_local_space_is_params(get());
+  return manage(res);
+}
+
+boolean local_space::is_set() const
+{
+  auto res = isl_local_space_is_set(get());
+  return manage(res);
+}
+
+local_space local_space::range() const
+{
+  auto res = isl_local_space_range(copy());
+  return manage(res);
+}
+
+local_space local_space::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_local_space_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+local_space local_space::set_from_params() const
+{
+  auto res = isl_local_space_set_from_params(copy());
+  return manage(res);
+}
+
+local_space local_space::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_local_space_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+local_space local_space::wrap() const
+{
+  auto res = isl_local_space_wrap(copy());
+  return manage(res);
+}
+
+// implementations for isl::map
+map manage(__isl_take isl_map *ptr) {
+  return map(ptr);
+}
+map manage_copy(__isl_keep isl_map *ptr) {
+  ptr = isl_map_copy(ptr);
+  return map(ptr);
+}
+
+map::map()
+    : ptr(nullptr) {}
+
+map::map(const map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+map::map(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+map::map(__isl_take isl_map *ptr)
+    : ptr(ptr) {}
+
+map::map(ctx ctx, const std::string &str)
+{
+  auto res = isl_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+map::map(basic_map bmap)
+{
+  auto res = isl_map_from_basic_map(bmap.release());
+  ptr = res;
+}
+
+map &map::operator=(map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+map::~map() {
+  if (ptr)
+    isl_map_free(ptr);
+}
+
+__isl_give isl_map *map::copy() const & {
+  return isl_map_copy(ptr);
+}
+
+__isl_keep isl_map *map::get() const {
+  return ptr;
+}
+
+__isl_give isl_map *map::release() {
+  isl_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool map::is_null() const {
+  return ptr == nullptr;
+}
+map::operator bool() const {
+  return !is_null();
+}
+
+
+ctx map::get_ctx() const {
+  return ctx(isl_map_get_ctx(ptr));
+}
+std::string map::to_str() const {
+  char *Tmp = isl_map_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void map::dump() const {
+  isl_map_dump(get());
+}
+
+
+map map::add_constraint(constraint constraint) const
+{
+  auto res = isl_map_add_constraint(copy(), constraint.release());
+  return manage(res);
+}
+
+map map::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_map_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+basic_map map::affine_hull() const
+{
+  auto res = isl_map_affine_hull(copy());
+  return manage(res);
+}
+
+map map::align_params(space model) const
+{
+  auto res = isl_map_align_params(copy(), model.release());
+  return manage(res);
+}
+
+map map::apply_domain(map map2) const
+{
+  auto res = isl_map_apply_domain(copy(), map2.release());
+  return manage(res);
+}
+
+map map::apply_range(map map2) const
+{
+  auto res = isl_map_apply_range(copy(), map2.release());
+  return manage(res);
+}
+
+boolean map::can_curry() const
+{
+  auto res = isl_map_can_curry(get());
+  return manage(res);
+}
+
+boolean map::can_range_curry() const
+{
+  auto res = isl_map_can_range_curry(get());
+  return manage(res);
+}
+
+boolean map::can_uncurry() const
+{
+  auto res = isl_map_can_uncurry(get());
+  return manage(res);
+}
+
+boolean map::can_zip() const
+{
+  auto res = isl_map_can_zip(get());
+  return manage(res);
+}
+
+map map::coalesce() const
+{
+  auto res = isl_map_coalesce(copy());
+  return manage(res);
+}
+
+map map::complement() const
+{
+  auto res = isl_map_complement(copy());
+  return manage(res);
+}
+
+basic_map map::convex_hull() const
+{
+  auto res = isl_map_convex_hull(copy());
+  return manage(res);
+}
+
+map map::curry() const
+{
+  auto res = isl_map_curry(copy());
+  return manage(res);
+}
+
+set map::deltas() const
+{
+  auto res = isl_map_deltas(copy());
+  return manage(res);
+}
+
+map map::deltas_map() const
+{
+  auto res = isl_map_deltas_map(copy());
+  return manage(res);
+}
+
+map map::detect_equalities() const
+{
+  auto res = isl_map_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int map::dim(isl::dim type) const
+{
+  auto res = isl_map_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+pw_aff map::dim_max(int pos) const
+{
+  auto res = isl_map_dim_max(copy(), pos);
+  return manage(res);
+}
+
+pw_aff map::dim_min(int pos) const
+{
+  auto res = isl_map_dim_min(copy(), pos);
+  return manage(res);
+}
+
+set map::domain() const
+{
+  auto res = isl_map_domain(copy());
+  return manage(res);
+}
+
+map map::domain_factor_domain() const
+{
+  auto res = isl_map_domain_factor_domain(copy());
+  return manage(res);
+}
+
+map map::domain_factor_range() const
+{
+  auto res = isl_map_domain_factor_range(copy());
+  return manage(res);
+}
+
+boolean map::domain_is_wrapping() const
+{
+  auto res = isl_map_domain_is_wrapping(get());
+  return manage(res);
+}
+
+map map::domain_map() const
+{
+  auto res = isl_map_domain_map(copy());
+  return manage(res);
+}
+
+map map::domain_product(map map2) const
+{
+  auto res = isl_map_domain_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map map::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map map::drop_unused_params() const
+{
+  auto res = isl_map_drop_unused_params(copy());
+  return manage(res);
+}
+
+map map::eliminate(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map map::empty(space space)
+{
+  auto res = isl_map_empty(space.release());
+  return manage(res);
+}
+
+map map::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+map map::factor_domain() const
+{
+  auto res = isl_map_factor_domain(copy());
+  return manage(res);
+}
+
+map map::factor_range() const
+{
+  auto res = isl_map_factor_range(copy());
+  return manage(res);
+}
+
+int map::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_map_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int map::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+map map::fix_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_map_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+map map::fix_val(isl::dim type, unsigned int pos, val v) const
+{
+  auto res = isl_map_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+map map::fixed_power_val(val exp) const
+{
+  auto res = isl_map_fixed_power_val(copy(), exp.release());
+  return manage(res);
+}
+
+map map::flat_domain_product(map map2) const
+{
+  auto res = isl_map_flat_domain_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::flat_product(map map2) const
+{
+  auto res = isl_map_flat_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::flat_range_product(map map2) const
+{
+  auto res = isl_map_flat_range_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::flatten() const
+{
+  auto res = isl_map_flatten(copy());
+  return manage(res);
+}
+
+map map::flatten_domain() const
+{
+  auto res = isl_map_flatten_domain(copy());
+  return manage(res);
+}
+
+map map::flatten_range() const
+{
+  auto res = isl_map_flatten_range(copy());
+  return manage(res);
+}
+
+map map::floordiv_val(val d) const
+{
+  auto res = isl_map_floordiv_val(copy(), d.release());
+  return manage(res);
+}
+
+stat map::foreach_basic_map(const std::function<stat(basic_map)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(basic_map)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+map map::from_aff(aff aff)
+{
+  auto res = isl_map_from_aff(aff.release());
+  return manage(res);
+}
+
+map map::from_domain(set set)
+{
+  auto res = isl_map_from_domain(set.release());
+  return manage(res);
+}
+
+map map::from_domain_and_range(set domain, set range)
+{
+  auto res = isl_map_from_domain_and_range(domain.release(), range.release());
+  return manage(res);
+}
+
+map map::from_multi_aff(multi_aff maff)
+{
+  auto res = isl_map_from_multi_aff(maff.release());
+  return manage(res);
+}
+
+map map::from_multi_pw_aff(multi_pw_aff mpa)
+{
+  auto res = isl_map_from_multi_pw_aff(mpa.release());
+  return manage(res);
+}
+
+map map::from_pw_aff(pw_aff pwaff)
+{
+  auto res = isl_map_from_pw_aff(pwaff.release());
+  return manage(res);
+}
+
+map map::from_pw_multi_aff(pw_multi_aff pma)
+{
+  auto res = isl_map_from_pw_multi_aff(pma.release());
+  return manage(res);
+}
+
+map map::from_range(set set)
+{
+  auto res = isl_map_from_range(set.release());
+  return manage(res);
+}
+
+map map::from_union_map(union_map umap)
+{
+  auto res = isl_map_from_union_map(umap.release());
+  return manage(res);
+}
+
+basic_map_list map::get_basic_map_list() const
+{
+  auto res = isl_map_get_basic_map_list(get());
+  return manage(res);
+}
+
+id map::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_map_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string map::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_map_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+uint32_t map::get_hash() const
+{
+  auto res = isl_map_get_hash(get());
+  return res;
+}
+
+fixed_box map::get_range_simple_fixed_box_hull() const
+{
+  auto res = isl_map_get_range_simple_fixed_box_hull(get());
+  return manage(res);
+}
+
+space map::get_space() const
+{
+  auto res = isl_map_get_space(get());
+  return manage(res);
+}
+
+id map::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_map_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string map::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_map_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+map map::gist(map context) const
+{
+  auto res = isl_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+map map::gist_basic_map(basic_map context) const
+{
+  auto res = isl_map_gist_basic_map(copy(), context.release());
+  return manage(res);
+}
+
+map map::gist_domain(set context) const
+{
+  auto res = isl_map_gist_domain(copy(), context.release());
+  return manage(res);
+}
+
+map map::gist_params(set context) const
+{
+  auto res = isl_map_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+map map::gist_range(set context) const
+{
+  auto res = isl_map_gist_range(copy(), context.release());
+  return manage(res);
+}
+
+boolean map::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_map_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean map::has_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_map_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean map::has_equal_space(const map &map2) const
+{
+  auto res = isl_map_has_equal_space(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_map_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+boolean map::has_tuple_name(isl::dim type) const
+{
+  auto res = isl_map_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+map map::identity(space dim)
+{
+  auto res = isl_map_identity(dim.release());
+  return manage(res);
+}
+
+map map::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
+{
+  auto res = isl_map_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
+  return manage(res);
+}
+
+map map::intersect(map map2) const
+{
+  auto res = isl_map_intersect(copy(), map2.release());
+  return manage(res);
+}
+
+map map::intersect_domain(set set) const
+{
+  auto res = isl_map_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+map map::intersect_domain_factor_range(map factor) const
+{
+  auto res = isl_map_intersect_domain_factor_range(copy(), factor.release());
+  return manage(res);
+}
+
+map map::intersect_params(set params) const
+{
+  auto res = isl_map_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+map map::intersect_range(set set) const
+{
+  auto res = isl_map_intersect_range(copy(), set.release());
+  return manage(res);
+}
+
+map map::intersect_range_factor_range(map factor) const
+{
+  auto res = isl_map_intersect_range_factor_range(copy(), factor.release());
+  return manage(res);
+}
+
+boolean map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean map::is_bijective() const
+{
+  auto res = isl_map_is_bijective(get());
+  return manage(res);
+}
+
+boolean map::is_disjoint(const map &map2) const
+{
+  auto res = isl_map_is_disjoint(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_empty() const
+{
+  auto res = isl_map_is_empty(get());
+  return manage(res);
+}
+
+boolean map::is_equal(const map &map2) const
+{
+  auto res = isl_map_is_equal(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_identity() const
+{
+  auto res = isl_map_is_identity(get());
+  return manage(res);
+}
+
+boolean map::is_injective() const
+{
+  auto res = isl_map_is_injective(get());
+  return manage(res);
+}
+
+boolean map::is_product() const
+{
+  auto res = isl_map_is_product(get());
+  return manage(res);
+}
+
+boolean map::is_single_valued() const
+{
+  auto res = isl_map_is_single_valued(get());
+  return manage(res);
+}
+
+boolean map::is_strict_subset(const map &map2) const
+{
+  auto res = isl_map_is_strict_subset(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::is_subset(const map &map2) const
+{
+  auto res = isl_map_is_subset(get(), map2.get());
+  return manage(res);
+}
+
+int map::is_translation() const
+{
+  auto res = isl_map_is_translation(get());
+  return res;
+}
+
+map map::lex_ge(space set_dim)
+{
+  auto res = isl_map_lex_ge(set_dim.release());
+  return manage(res);
+}
+
+map map::lex_ge_first(space dim, unsigned int n)
+{
+  auto res = isl_map_lex_ge_first(dim.release(), n);
+  return manage(res);
+}
+
+map map::lex_ge_map(map map2) const
+{
+  auto res = isl_map_lex_ge_map(copy(), map2.release());
+  return manage(res);
+}
+
+map map::lex_gt(space set_dim)
+{
+  auto res = isl_map_lex_gt(set_dim.release());
+  return manage(res);
+}
+
+map map::lex_gt_first(space dim, unsigned int n)
+{
+  auto res = isl_map_lex_gt_first(dim.release(), n);
+  return manage(res);
+}
+
+map map::lex_gt_map(map map2) const
+{
+  auto res = isl_map_lex_gt_map(copy(), map2.release());
+  return manage(res);
+}
+
+map map::lex_le(space set_dim)
+{
+  auto res = isl_map_lex_le(set_dim.release());
+  return manage(res);
+}
+
+map map::lex_le_first(space dim, unsigned int n)
+{
+  auto res = isl_map_lex_le_first(dim.release(), n);
+  return manage(res);
+}
+
+map map::lex_le_map(map map2) const
+{
+  auto res = isl_map_lex_le_map(copy(), map2.release());
+  return manage(res);
+}
+
+map map::lex_lt(space set_dim)
+{
+  auto res = isl_map_lex_lt(set_dim.release());
+  return manage(res);
+}
+
+map map::lex_lt_first(space dim, unsigned int n)
+{
+  auto res = isl_map_lex_lt_first(dim.release(), n);
+  return manage(res);
+}
+
+map map::lex_lt_map(map map2) const
+{
+  auto res = isl_map_lex_lt_map(copy(), map2.release());
+  return manage(res);
+}
+
+map map::lexmax() const
+{
+  auto res = isl_map_lexmax(copy());
+  return manage(res);
+}
+
+pw_multi_aff map::lexmax_pw_multi_aff() const
+{
+  auto res = isl_map_lexmax_pw_multi_aff(copy());
+  return manage(res);
+}
+
+map map::lexmin() const
+{
+  auto res = isl_map_lexmin(copy());
+  return manage(res);
+}
+
+pw_multi_aff map::lexmin_pw_multi_aff() const
+{
+  auto res = isl_map_lexmin_pw_multi_aff(copy());
+  return manage(res);
+}
+
+map map::lower_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_map_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+map map::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_map_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+int map::n_basic_map() const
+{
+  auto res = isl_map_n_basic_map(get());
+  return res;
+}
+
+map map::nat_universe(space dim)
+{
+  auto res = isl_map_nat_universe(dim.release());
+  return manage(res);
+}
+
+map map::neg() const
+{
+  auto res = isl_map_neg(copy());
+  return manage(res);
+}
+
+map map::oppose(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_oppose(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+map map::order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_order_ge(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+map map::order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_order_gt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+map map::order_le(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_order_le(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+map map::order_lt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_map_order_lt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+set map::params() const
+{
+  auto res = isl_map_params(copy());
+  return manage(res);
+}
+
+val map::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_map_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean map::plain_is_empty() const
+{
+  auto res = isl_map_plain_is_empty(get());
+  return manage(res);
+}
+
+boolean map::plain_is_equal(const map &map2) const
+{
+  auto res = isl_map_plain_is_equal(get(), map2.get());
+  return manage(res);
+}
+
+boolean map::plain_is_injective() const
+{
+  auto res = isl_map_plain_is_injective(get());
+  return manage(res);
+}
+
+boolean map::plain_is_single_valued() const
+{
+  auto res = isl_map_plain_is_single_valued(get());
+  return manage(res);
+}
+
+boolean map::plain_is_universe() const
+{
+  auto res = isl_map_plain_is_universe(get());
+  return manage(res);
+}
+
+basic_map map::plain_unshifted_simple_hull() const
+{
+  auto res = isl_map_plain_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+basic_map map::polyhedral_hull() const
+{
+  auto res = isl_map_polyhedral_hull(copy());
+  return manage(res);
+}
+
+map map::preimage_domain_multi_aff(multi_aff ma) const
+{
+  auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+map map::preimage_domain_multi_pw_aff(multi_pw_aff mpa) const
+{
+  auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+map map::preimage_domain_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+map map::preimage_range_multi_aff(multi_aff ma) const
+{
+  auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+map map::preimage_range_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+map map::product(map map2) const
+{
+  auto res = isl_map_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set map::range() const
+{
+  auto res = isl_map_range(copy());
+  return manage(res);
+}
+
+map map::range_curry() const
+{
+  auto res = isl_map_range_curry(copy());
+  return manage(res);
+}
+
+map map::range_factor_domain() const
+{
+  auto res = isl_map_range_factor_domain(copy());
+  return manage(res);
+}
+
+map map::range_factor_range() const
+{
+  auto res = isl_map_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean map::range_is_wrapping() const
+{
+  auto res = isl_map_range_is_wrapping(get());
+  return manage(res);
+}
+
+map map::range_map() const
+{
+  auto res = isl_map_range_map(copy());
+  return manage(res);
+}
+
+map map::range_product(map map2) const
+{
+  auto res = isl_map_range_product(copy(), map2.release());
+  return manage(res);
+}
+
+map map::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map map::remove_divs() const
+{
+  auto res = isl_map_remove_divs(copy());
+  return manage(res);
+}
+
+map map::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map map::remove_redundancies() const
+{
+  auto res = isl_map_remove_redundancies(copy());
+  return manage(res);
+}
+
+map map::remove_unknown_divs() const
+{
+  auto res = isl_map_remove_unknown_divs(copy());
+  return manage(res);
+}
+
+map map::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_map_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+map map::reset_user() const
+{
+  auto res = isl_map_reset_user(copy());
+  return manage(res);
+}
+
+map map::reverse() const
+{
+  auto res = isl_map_reverse(copy());
+  return manage(res);
+}
+
+basic_map map::sample() const
+{
+  auto res = isl_map_sample(copy());
+  return manage(res);
+}
+
+map map::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_map_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+map map::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_map_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+map map::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_map_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+basic_map map::simple_hull() const
+{
+  auto res = isl_map_simple_hull(copy());
+  return manage(res);
+}
+
+map map::subtract(map map2) const
+{
+  auto res = isl_map_subtract(copy(), map2.release());
+  return manage(res);
+}
+
+map map::subtract_domain(set dom) const
+{
+  auto res = isl_map_subtract_domain(copy(), dom.release());
+  return manage(res);
+}
+
+map map::subtract_range(set dom) const
+{
+  auto res = isl_map_subtract_range(copy(), dom.release());
+  return manage(res);
+}
+
+map map::sum(map map2) const
+{
+  auto res = isl_map_sum(copy(), map2.release());
+  return manage(res);
+}
+
+map map::uncurry() const
+{
+  auto res = isl_map_uncurry(copy());
+  return manage(res);
+}
+
+map map::unite(map map2) const
+{
+  auto res = isl_map_union(copy(), map2.release());
+  return manage(res);
+}
+
+map map::universe(space space)
+{
+  auto res = isl_map_universe(space.release());
+  return manage(res);
+}
+
+basic_map map::unshifted_simple_hull() const
+{
+  auto res = isl_map_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+basic_map map::unshifted_simple_hull_from_map_list(map_list list) const
+{
+  auto res = isl_map_unshifted_simple_hull_from_map_list(copy(), list.release());
+  return manage(res);
+}
+
+map map::upper_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_map_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+set map::wrap() const
+{
+  auto res = isl_map_wrap(copy());
+  return manage(res);
+}
+
+map map::zip() const
+{
+  auto res = isl_map_zip(copy());
+  return manage(res);
+}
+
+// implementations for isl::map_list
+map_list manage(__isl_take isl_map_list *ptr) {
+  return map_list(ptr);
+}
+map_list manage_copy(__isl_keep isl_map_list *ptr) {
+  ptr = isl_map_list_copy(ptr);
+  return map_list(ptr);
+}
+
+map_list::map_list()
+    : ptr(nullptr) {}
+
+map_list::map_list(const map_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+map_list::map_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+map_list::map_list(__isl_take isl_map_list *ptr)
+    : ptr(ptr) {}
+
+
+map_list &map_list::operator=(map_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+map_list::~map_list() {
+  if (ptr)
+    isl_map_list_free(ptr);
+}
+
+__isl_give isl_map_list *map_list::copy() const & {
+  return isl_map_list_copy(ptr);
+}
+
+__isl_keep isl_map_list *map_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_map_list *map_list::release() {
+  isl_map_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool map_list::is_null() const {
+  return ptr == nullptr;
+}
+map_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx map_list::get_ctx() const {
+  return ctx(isl_map_list_get_ctx(ptr));
+}
+
+void map_list::dump() const {
+  isl_map_list_dump(get());
+}
+
+
+map_list map_list::add(map el) const
+{
+  auto res = isl_map_list_add(copy(), el.release());
+  return manage(res);
+}
+
+map_list map_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_map_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+map_list map_list::concat(map_list list2) const
+{
+  auto res = isl_map_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+map_list map_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_map_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat map_list::foreach(const std::function<stat(map)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(map)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_map_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+map_list map_list::from_map(map el)
+{
+  auto res = isl_map_list_from_map(el.release());
+  return manage(res);
+}
+
+map map_list::get_at(int index) const
+{
+  auto res = isl_map_list_get_at(get(), index);
+  return manage(res);
+}
+
+map map_list::get_map(int index) const
+{
+  auto res = isl_map_list_get_map(get(), index);
+  return manage(res);
+}
+
+map_list map_list::insert(unsigned int pos, map el) const
+{
+  auto res = isl_map_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int map_list::n_map() const
+{
+  auto res = isl_map_list_n_map(get());
+  return res;
+}
+
+map_list map_list::reverse() const
+{
+  auto res = isl_map_list_reverse(copy());
+  return manage(res);
+}
+
+map_list map_list::set_map(int index, map el) const
+{
+  auto res = isl_map_list_set_map(copy(), index, el.release());
+  return manage(res);
+}
+
+int map_list::size() const
+{
+  auto res = isl_map_list_size(get());
+  return res;
+}
+
+map_list map_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_map_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::mat
+mat manage(__isl_take isl_mat *ptr) {
+  return mat(ptr);
+}
+mat manage_copy(__isl_keep isl_mat *ptr) {
+  ptr = isl_mat_copy(ptr);
+  return mat(ptr);
+}
+
+mat::mat()
+    : ptr(nullptr) {}
+
+mat::mat(const mat &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+mat::mat(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+mat::mat(__isl_take isl_mat *ptr)
+    : ptr(ptr) {}
+
+
+mat &mat::operator=(mat obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+mat::~mat() {
+  if (ptr)
+    isl_mat_free(ptr);
+}
+
+__isl_give isl_mat *mat::copy() const & {
+  return isl_mat_copy(ptr);
+}
+
+__isl_keep isl_mat *mat::get() const {
+  return ptr;
+}
+
+__isl_give isl_mat *mat::release() {
+  isl_mat *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool mat::is_null() const {
+  return ptr == nullptr;
+}
+mat::operator bool() const {
+  return !is_null();
+}
+
+
+ctx mat::get_ctx() const {
+  return ctx(isl_mat_get_ctx(ptr));
+}
+
+void mat::dump() const {
+  isl_mat_dump(get());
+}
+
+
+mat mat::add_rows(unsigned int n) const
+{
+  auto res = isl_mat_add_rows(copy(), n);
+  return manage(res);
+}
+
+mat mat::add_zero_cols(unsigned int n) const
+{
+  auto res = isl_mat_add_zero_cols(copy(), n);
+  return manage(res);
+}
+
+mat mat::add_zero_rows(unsigned int n) const
+{
+  auto res = isl_mat_add_zero_rows(copy(), n);
+  return manage(res);
+}
+
+mat mat::aff_direct_sum(mat right) const
+{
+  auto res = isl_mat_aff_direct_sum(copy(), right.release());
+  return manage(res);
+}
+
+mat mat::alloc(ctx ctx, unsigned int n_row, unsigned int n_col)
+{
+  auto res = isl_mat_alloc(ctx.release(), n_row, n_col);
+  return manage(res);
+}
+
+int mat::cols() const
+{
+  auto res = isl_mat_cols(get());
+  return res;
+}
+
+mat mat::concat(mat bot) const
+{
+  auto res = isl_mat_concat(copy(), bot.release());
+  return manage(res);
+}
+
+mat mat::diagonal(mat mat2) const
+{
+  auto res = isl_mat_diagonal(copy(), mat2.release());
+  return manage(res);
+}
+
+mat mat::drop_cols(unsigned int col, unsigned int n) const
+{
+  auto res = isl_mat_drop_cols(copy(), col, n);
+  return manage(res);
+}
+
+mat mat::drop_rows(unsigned int row, unsigned int n) const
+{
+  auto res = isl_mat_drop_rows(copy(), row, n);
+  return manage(res);
+}
+
+mat mat::from_row_vec(vec vec)
+{
+  auto res = isl_mat_from_row_vec(vec.release());
+  return manage(res);
+}
+
+val mat::get_element_val(int row, int col) const
+{
+  auto res = isl_mat_get_element_val(get(), row, col);
+  return manage(res);
+}
+
+boolean mat::has_linearly_independent_rows(const mat &mat2) const
+{
+  auto res = isl_mat_has_linearly_independent_rows(get(), mat2.get());
+  return manage(res);
+}
+
+int mat::initial_non_zero_cols() const
+{
+  auto res = isl_mat_initial_non_zero_cols(get());
+  return res;
+}
+
+mat mat::insert_cols(unsigned int col, unsigned int n) const
+{
+  auto res = isl_mat_insert_cols(copy(), col, n);
+  return manage(res);
+}
+
+mat mat::insert_rows(unsigned int row, unsigned int n) const
+{
+  auto res = isl_mat_insert_rows(copy(), row, n);
+  return manage(res);
+}
+
+mat mat::insert_zero_cols(unsigned int first, unsigned int n) const
+{
+  auto res = isl_mat_insert_zero_cols(copy(), first, n);
+  return manage(res);
+}
+
+mat mat::insert_zero_rows(unsigned int row, unsigned int n) const
+{
+  auto res = isl_mat_insert_zero_rows(copy(), row, n);
+  return manage(res);
+}
+
+mat mat::inverse_product(mat right) const
+{
+  auto res = isl_mat_inverse_product(copy(), right.release());
+  return manage(res);
+}
+
+boolean mat::is_equal(const mat &mat2) const
+{
+  auto res = isl_mat_is_equal(get(), mat2.get());
+  return manage(res);
+}
+
+mat mat::lin_to_aff() const
+{
+  auto res = isl_mat_lin_to_aff(copy());
+  return manage(res);
+}
+
+mat mat::move_cols(unsigned int dst_col, unsigned int src_col, unsigned int n) const
+{
+  auto res = isl_mat_move_cols(copy(), dst_col, src_col, n);
+  return manage(res);
+}
+
+mat mat::normalize() const
+{
+  auto res = isl_mat_normalize(copy());
+  return manage(res);
+}
+
+mat mat::normalize_row(int row) const
+{
+  auto res = isl_mat_normalize_row(copy(), row);
+  return manage(res);
+}
+
+mat mat::product(mat right) const
+{
+  auto res = isl_mat_product(copy(), right.release());
+  return manage(res);
+}
+
+int mat::rank() const
+{
+  auto res = isl_mat_rank(get());
+  return res;
+}
+
+mat mat::right_inverse() const
+{
+  auto res = isl_mat_right_inverse(copy());
+  return manage(res);
+}
+
+mat mat::right_kernel() const
+{
+  auto res = isl_mat_right_kernel(copy());
+  return manage(res);
+}
+
+mat mat::row_basis() const
+{
+  auto res = isl_mat_row_basis(copy());
+  return manage(res);
+}
+
+mat mat::row_basis_extension(mat mat2) const
+{
+  auto res = isl_mat_row_basis_extension(copy(), mat2.release());
+  return manage(res);
+}
+
+int mat::rows() const
+{
+  auto res = isl_mat_rows(get());
+  return res;
+}
+
+mat mat::set_element_si(int row, int col, int v) const
+{
+  auto res = isl_mat_set_element_si(copy(), row, col, v);
+  return manage(res);
+}
+
+mat mat::set_element_val(int row, int col, val v) const
+{
+  auto res = isl_mat_set_element_val(copy(), row, col, v.release());
+  return manage(res);
+}
+
+mat mat::swap_cols(unsigned int i, unsigned int j) const
+{
+  auto res = isl_mat_swap_cols(copy(), i, j);
+  return manage(res);
+}
+
+mat mat::swap_rows(unsigned int i, unsigned int j) const
+{
+  auto res = isl_mat_swap_rows(copy(), i, j);
+  return manage(res);
+}
+
+mat mat::transpose() const
+{
+  auto res = isl_mat_transpose(copy());
+  return manage(res);
+}
+
+mat mat::unimodular_complete(int row) const
+{
+  auto res = isl_mat_unimodular_complete(copy(), row);
+  return manage(res);
+}
+
+mat mat::vec_concat(vec bot) const
+{
+  auto res = isl_mat_vec_concat(copy(), bot.release());
+  return manage(res);
+}
+
+vec mat::vec_inverse_product(vec vec) const
+{
+  auto res = isl_mat_vec_inverse_product(copy(), vec.release());
+  return manage(res);
+}
+
+vec mat::vec_product(vec vec) const
+{
+  auto res = isl_mat_vec_product(copy(), vec.release());
+  return manage(res);
+}
+
+// implementations for isl::multi_aff
+multi_aff manage(__isl_take isl_multi_aff *ptr) {
+  return multi_aff(ptr);
+}
+multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
+  ptr = isl_multi_aff_copy(ptr);
+  return multi_aff(ptr);
+}
+
+multi_aff::multi_aff()
+    : ptr(nullptr) {}
+
+multi_aff::multi_aff(const multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+multi_aff::multi_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
+    : ptr(ptr) {}
+
+multi_aff::multi_aff(aff aff)
+{
+  auto res = isl_multi_aff_from_aff(aff.release());
+  ptr = res;
+}
+multi_aff::multi_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_aff &multi_aff::operator=(multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_aff::~multi_aff() {
+  if (ptr)
+    isl_multi_aff_free(ptr);
+}
+
+__isl_give isl_multi_aff *multi_aff::copy() const & {
+  return isl_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_aff *multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_aff *multi_aff::release() {
+  isl_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+multi_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx multi_aff::get_ctx() const {
+  return ctx(isl_multi_aff_get_ctx(ptr));
+}
+std::string multi_aff::to_str() const {
+  char *Tmp = isl_multi_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void multi_aff::dump() const {
+  isl_multi_aff_dump(get());
+}
+
+
+multi_aff multi_aff::add(multi_aff multi2) const
+{
+  auto res = isl_multi_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_multi_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+multi_aff multi_aff::align_params(space model) const
+{
+  auto res = isl_multi_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+unsigned int multi_aff::dim(isl::dim type) const
+{
+  auto res = isl_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+multi_aff multi_aff::domain_map(space space)
+{
+  auto res = isl_multi_aff_domain_map(space.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+multi_aff multi_aff::factor_range() const
+{
+  auto res = isl_multi_aff_factor_range(copy());
+  return manage(res);
+}
+
+int multi_aff::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_multi_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+multi_aff multi_aff::flat_range_product(multi_aff multi2) const
+{
+  auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::flatten_domain() const
+{
+  auto res = isl_multi_aff_flatten_domain(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::flatten_range() const
+{
+  auto res = isl_multi_aff_flatten_range(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::floor() const
+{
+  auto res = isl_multi_aff_floor(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::from_aff_list(space space, aff_list list)
+{
+  auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::from_range() const
+{
+  auto res = isl_multi_aff_from_range(copy());
+  return manage(res);
+}
+
+aff multi_aff::get_aff(int pos) const
+{
+  auto res = isl_multi_aff_get_aff(get(), pos);
+  return manage(res);
+}
+
+id multi_aff::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_multi_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+space multi_aff::get_domain_space() const
+{
+  auto res = isl_multi_aff_get_domain_space(get());
+  return manage(res);
+}
+
+space multi_aff::get_space() const
+{
+  auto res = isl_multi_aff_get_space(get());
+  return manage(res);
+}
+
+id multi_aff::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string multi_aff::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_multi_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+multi_aff multi_aff::gist(set context) const
+{
+  auto res = isl_multi_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::gist_params(set context) const
+{
+  auto res = isl_multi_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+boolean multi_aff::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_aff multi_aff::identity(space space)
+{
+  auto res = isl_multi_aff_identity(space.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean multi_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean multi_aff::involves_nan() const
+{
+  auto res = isl_multi_aff_involves_nan(get());
+  return manage(res);
+}
+
+set multi_aff::lex_ge_set(multi_aff ma2) const
+{
+  auto res = isl_multi_aff_lex_ge_set(copy(), ma2.release());
+  return manage(res);
+}
+
+set multi_aff::lex_gt_set(multi_aff ma2) const
+{
+  auto res = isl_multi_aff_lex_gt_set(copy(), ma2.release());
+  return manage(res);
+}
+
+set multi_aff::lex_le_set(multi_aff ma2) const
+{
+  auto res = isl_multi_aff_lex_le_set(copy(), ma2.release());
+  return manage(res);
+}
+
+set multi_aff::lex_lt_set(multi_aff ma2) const
+{
+  auto res = isl_multi_aff_lex_lt_set(copy(), ma2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::mod_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_aff_mod_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_multi_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+multi_aff multi_aff::multi_val_on_space(space space, multi_val mv)
+{
+  auto res = isl_multi_aff_multi_val_on_space(space.release(), mv.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::neg() const
+{
+  auto res = isl_multi_aff_neg(copy());
+  return manage(res);
+}
+
+int multi_aff::plain_cmp(const multi_aff &multi2) const
+{
+  auto res = isl_multi_aff_plain_cmp(get(), multi2.get());
+  return res;
+}
+
+boolean multi_aff::plain_is_equal(const multi_aff &multi2) const
+{
+  auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+multi_aff multi_aff::product(multi_aff multi2) const
+{
+  auto res = isl_multi_aff_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::project_domain_on_params() const
+{
+  auto res = isl_multi_aff_project_domain_on_params(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::project_out_map(space space, isl::dim type, unsigned int first, unsigned int n)
+{
+  auto res = isl_multi_aff_project_out_map(space.release(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+multi_aff multi_aff::pullback(multi_aff ma2) const
+{
+  auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::range_factor_domain() const
+{
+  auto res = isl_multi_aff_range_factor_domain(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::range_factor_range() const
+{
+  auto res = isl_multi_aff_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean multi_aff::range_is_wrapping() const
+{
+  auto res = isl_multi_aff_range_is_wrapping(get());
+  return manage(res);
+}
+
+multi_aff multi_aff::range_map(space space)
+{
+  auto res = isl_multi_aff_range_map(space.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::range_product(multi_aff multi2) const
+{
+  auto res = isl_multi_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::range_splice(unsigned int pos, multi_aff multi2) const
+{
+  auto res = isl_multi_aff_range_splice(copy(), pos, multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_aff multi_aff::reset_user() const
+{
+  auto res = isl_multi_aff_reset_user(copy());
+  return manage(res);
+}
+
+multi_aff multi_aff::scale_down_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::scale_down_val(val v) const
+{
+  auto res = isl_multi_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::scale_val(val v) const
+{
+  auto res = isl_multi_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::set_aff(int pos, aff el) const
+{
+  auto res = isl_multi_aff_set_aff(copy(), pos, el.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_multi_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_multi_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_multi_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+multi_aff multi_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const
+{
+  auto res = isl_multi_aff_splice(copy(), in_pos, out_pos, multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::sub(multi_aff multi2) const
+{
+  auto res = isl_multi_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_aff multi_aff::zero(space space)
+{
+  auto res = isl_multi_aff_zero(space.release());
+  return manage(res);
+}
+
+// implementations for isl::multi_pw_aff
+multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
+  return multi_pw_aff(ptr);
+}
+multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
+  ptr = isl_multi_pw_aff_copy(ptr);
+  return multi_pw_aff(ptr);
+}
+
+multi_pw_aff::multi_pw_aff()
+    : ptr(nullptr) {}
+
+multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+multi_pw_aff::multi_pw_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_pw_aff::multi_pw_aff(multi_aff ma)
+{
+  auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
+  ptr = res;
+}
+multi_pw_aff::multi_pw_aff(pw_aff pa)
+{
+  auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+multi_pw_aff::multi_pw_aff(pw_multi_aff pma)
+{
+  auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
+  ptr = res;
+}
+multi_pw_aff::multi_pw_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_pw_aff::~multi_pw_aff() {
+  if (ptr)
+    isl_multi_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
+  return isl_multi_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_pw_aff *multi_pw_aff::release() {
+  isl_multi_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+multi_pw_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx multi_pw_aff::get_ctx() const {
+  return ctx(isl_multi_pw_aff_get_ctx(ptr));
+}
+std::string multi_pw_aff::to_str() const {
+  char *Tmp = isl_multi_pw_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void multi_pw_aff::dump() const {
+  isl_multi_pw_aff_dump(get());
+}
+
+
+multi_pw_aff multi_pw_aff::add(multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_multi_pw_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::align_params(space model) const
+{
+  auto res = isl_multi_pw_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::coalesce() const
+{
+  auto res = isl_multi_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int multi_pw_aff::dim(isl::dim type) const
+{
+  auto res = isl_multi_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+set multi_pw_aff::domain() const
+{
+  auto res = isl_multi_pw_aff_domain(copy());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+map multi_pw_aff::eq_map(multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_eq_map(copy(), mpa2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::factor_range() const
+{
+  auto res = isl_multi_pw_aff_factor_range(copy());
+  return manage(res);
+}
+
+int multi_pw_aff::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_multi_pw_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int multi_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_multi_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+multi_pw_aff multi_pw_aff::flat_range_product(multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::flatten_range() const
+{
+  auto res = isl_multi_pw_aff_flatten_range(copy());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::from_pw_aff_list(space space, pw_aff_list list)
+{
+  auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::from_range() const
+{
+  auto res = isl_multi_pw_aff_from_range(copy());
+  return manage(res);
+}
+
+id multi_pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_multi_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+space multi_pw_aff::get_domain_space() const
+{
+  auto res = isl_multi_pw_aff_get_domain_space(get());
+  return manage(res);
+}
+
+uint32_t multi_pw_aff::get_hash() const
+{
+  auto res = isl_multi_pw_aff_get_hash(get());
+  return res;
+}
+
+pw_aff multi_pw_aff::get_pw_aff(int pos) const
+{
+  auto res = isl_multi_pw_aff_get_pw_aff(get(), pos);
+  return manage(res);
+}
+
+space multi_pw_aff::get_space() const
+{
+  auto res = isl_multi_pw_aff_get_space(get());
+  return manage(res);
+}
+
+id multi_pw_aff::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string multi_pw_aff::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_multi_pw_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+multi_pw_aff multi_pw_aff::gist(set set) const
+{
+  auto res = isl_multi_pw_aff_gist(copy(), set.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::gist_params(set set) const
+{
+  auto res = isl_multi_pw_aff_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean multi_pw_aff::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::identity(space space)
+{
+  auto res = isl_multi_pw_aff_identity(space.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_pw_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::intersect_domain(set domain) const
+{
+  auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::intersect_params(set set) const
+{
+  auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean multi_pw_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_pw_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean multi_pw_aff::involves_nan() const
+{
+  auto res = isl_multi_pw_aff_involves_nan(get());
+  return manage(res);
+}
+
+boolean multi_pw_aff::is_cst() const
+{
+  auto res = isl_multi_pw_aff_is_cst(get());
+  return manage(res);
+}
+
+boolean multi_pw_aff::is_equal(const multi_pw_aff &mpa2) const
+{
+  auto res = isl_multi_pw_aff_is_equal(get(), mpa2.get());
+  return manage(res);
+}
+
+map multi_pw_aff::lex_gt_map(multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_lex_gt_map(copy(), mpa2.release());
+  return manage(res);
+}
+
+map multi_pw_aff::lex_lt_map(multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_lex_lt_map(copy(), mpa2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::mod_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_mod_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_multi_pw_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::neg() const
+{
+  auto res = isl_multi_pw_aff_neg(copy());
+  return manage(res);
+}
+
+boolean multi_pw_aff::plain_is_equal(const multi_pw_aff &multi2) const
+{
+  auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::product(multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::project_domain_on_params() const
+{
+  auto res = isl_multi_pw_aff_project_domain_on_params(copy());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::pullback(multi_aff ma) const
+{
+  auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::pullback(pw_multi_aff pma) const
+{
+  auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::pullback(multi_pw_aff mpa2) const
+{
+  auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::range_factor_domain() const
+{
+  auto res = isl_multi_pw_aff_range_factor_domain(copy());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::range_factor_range() const
+{
+  auto res = isl_multi_pw_aff_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean multi_pw_aff::range_is_wrapping() const
+{
+  auto res = isl_multi_pw_aff_range_is_wrapping(get());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::range_product(multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::range_splice(unsigned int pos, multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_range_splice(copy(), pos, multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::reset_user() const
+{
+  auto res = isl_multi_pw_aff_reset_user(copy());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::scale_down_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::scale_down_val(val v) const
+{
+  auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::scale_val(val v) const
+{
+  auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_multi_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::set_pw_aff(int pos, pw_aff el) const
+{
+  auto res = isl_multi_pw_aff_set_pw_aff(copy(), pos, el.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_multi_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_multi_pw_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_splice(copy(), in_pos, out_pos, multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::sub(multi_pw_aff multi2) const
+{
+  auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_pw_aff multi_pw_aff::zero(space space)
+{
+  auto res = isl_multi_pw_aff_zero(space.release());
+  return manage(res);
+}
+
+// implementations for isl::multi_union_pw_aff
+multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
+  return multi_union_pw_aff(ptr);
+}
+multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
+  ptr = isl_multi_union_pw_aff_copy(ptr);
+  return multi_union_pw_aff(ptr);
+}
+
+multi_union_pw_aff::multi_union_pw_aff()
+    : ptr(nullptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+multi_union_pw_aff::multi_union_pw_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+multi_union_pw_aff::multi_union_pw_aff(union_pw_aff upa)
+{
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
+  ptr = res;
+}
+multi_union_pw_aff::multi_union_pw_aff(multi_pw_aff mpa)
+{
+  auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
+  ptr = res;
+}
+multi_union_pw_aff::multi_union_pw_aff(union_pw_multi_aff upma)
+{
+  auto res = isl_multi_union_pw_aff_from_union_pw_multi_aff(upma.release());
+  ptr = res;
+}
+multi_union_pw_aff::multi_union_pw_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_union_pw_aff::~multi_union_pw_aff() {
+  if (ptr)
+    isl_multi_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
+  return isl_multi_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
+  isl_multi_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+multi_union_pw_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx multi_union_pw_aff::get_ctx() const {
+  return ctx(isl_multi_union_pw_aff_get_ctx(ptr));
+}
+std::string multi_union_pw_aff::to_str() const {
+  char *Tmp = isl_multi_union_pw_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void multi_union_pw_aff::dump() const {
+  isl_multi_union_pw_aff_dump(get());
+}
+
+
+multi_union_pw_aff multi_union_pw_aff::add(multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::align_params(space model) const
+{
+  auto res = isl_multi_union_pw_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_pw_aff multi_union_pw_aff::apply_aff(aff aff) const
+{
+  auto res = isl_multi_union_pw_aff_apply_aff(copy(), aff.release());
+  return manage(res);
+}
+
+union_pw_aff multi_union_pw_aff::apply_pw_aff(pw_aff pa) const
+{
+  auto res = isl_multi_union_pw_aff_apply_pw_aff(copy(), pa.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::apply_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_multi_union_pw_aff_apply_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::coalesce() const
+{
+  auto res = isl_multi_union_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int multi_union_pw_aff::dim(isl::dim type) const
+{
+  auto res = isl_multi_union_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set multi_union_pw_aff::domain() const
+{
+  auto res = isl_multi_union_pw_aff_domain(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_union_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+multi_pw_aff multi_union_pw_aff::extract_multi_pw_aff(space space) const
+{
+  auto res = isl_multi_union_pw_aff_extract_multi_pw_aff(get(), space.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::factor_range() const
+{
+  auto res = isl_multi_union_pw_aff_factor_range(copy());
+  return manage(res);
+}
+
+int multi_union_pw_aff::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_multi_union_pw_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int multi_union_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_multi_union_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+multi_union_pw_aff multi_union_pw_aff::flat_range_product(multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::flatten_range() const
+{
+  auto res = isl_multi_union_pw_aff_flatten_range(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::floor() const
+{
+  auto res = isl_multi_union_pw_aff_floor(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::from_multi_aff(multi_aff ma)
+{
+  auto res = isl_multi_union_pw_aff_from_multi_aff(ma.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::from_range() const
+{
+  auto res = isl_multi_union_pw_aff_from_range(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::from_union_map(union_map umap)
+{
+  auto res = isl_multi_union_pw_aff_from_union_map(umap.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::from_union_pw_aff_list(space space, union_pw_aff_list list)
+{
+  auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
+  return manage(res);
+}
+
+id multi_union_pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_multi_union_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+space multi_union_pw_aff::get_domain_space() const
+{
+  auto res = isl_multi_union_pw_aff_get_domain_space(get());
+  return manage(res);
+}
+
+space multi_union_pw_aff::get_space() const
+{
+  auto res = isl_multi_union_pw_aff_get_space(get());
+  return manage(res);
+}
+
+id multi_union_pw_aff::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_union_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string multi_union_pw_aff::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_multi_union_pw_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+union_pw_aff multi_union_pw_aff::get_union_pw_aff(int pos) const
+{
+  auto res = isl_multi_union_pw_aff_get_union_pw_aff(get(), pos);
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::gist(union_set context) const
+{
+  auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::gist_params(set context) const
+{
+  auto res = isl_multi_union_pw_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+boolean multi_union_pw_aff::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_union_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::intersect_domain(union_set uset) const
+{
+  auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::intersect_params(set params) const
+{
+  auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::intersect_range(set set) const
+{
+  auto res = isl_multi_union_pw_aff_intersect_range(copy(), set.release());
+  return manage(res);
+}
+
+boolean multi_union_pw_aff::involves_nan() const
+{
+  auto res = isl_multi_union_pw_aff_involves_nan(get());
+  return manage(res);
+}
+
+multi_val multi_union_pw_aff::max_multi_val() const
+{
+  auto res = isl_multi_union_pw_aff_max_multi_val(copy());
+  return manage(res);
+}
+
+multi_val multi_union_pw_aff::min_multi_val() const
+{
+  auto res = isl_multi_union_pw_aff_min_multi_val(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::mod_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_union_pw_aff_mod_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::multi_aff_on_domain(union_set domain, multi_aff ma)
+{
+  auto res = isl_multi_union_pw_aff_multi_aff_on_domain(domain.release(), ma.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::multi_val_on_domain(union_set domain, multi_val mv)
+{
+  auto res = isl_multi_union_pw_aff_multi_val_on_domain(domain.release(), mv.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::neg() const
+{
+  auto res = isl_multi_union_pw_aff_neg(copy());
+  return manage(res);
+}
+
+boolean multi_union_pw_aff::plain_is_equal(const multi_union_pw_aff &multi2) const
+{
+  auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::pullback(union_pw_multi_aff upma) const
+{
+  auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::pw_multi_aff_on_domain(union_set domain, pw_multi_aff pma)
+{
+  auto res = isl_multi_union_pw_aff_pw_multi_aff_on_domain(domain.release(), pma.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::range_factor_domain() const
+{
+  auto res = isl_multi_union_pw_aff_range_factor_domain(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::range_factor_range() const
+{
+  auto res = isl_multi_union_pw_aff_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean multi_union_pw_aff::range_is_wrapping() const
+{
+  auto res = isl_multi_union_pw_aff_range_is_wrapping(get());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::range_product(multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::range_splice(unsigned int pos, multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_range_splice(copy(), pos, multi2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_union_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::reset_user() const
+{
+  auto res = isl_multi_union_pw_aff_reset_user(copy());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::scale_down_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::scale_down_val(val v) const
+{
+  auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::scale_val(val v) const
+{
+  auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_multi_union_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_multi_union_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_multi_union_pw_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::set_union_pw_aff(int pos, union_pw_aff el) const
+{
+  auto res = isl_multi_union_pw_aff_set_union_pw_aff(copy(), pos, el.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::sub(multi_union_pw_aff multi2) const
+{
+  auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::union_add(multi_union_pw_aff mupa2) const
+{
+  auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
+  return manage(res);
+}
+
+multi_union_pw_aff multi_union_pw_aff::zero(space space)
+{
+  auto res = isl_multi_union_pw_aff_zero(space.release());
+  return manage(res);
+}
+
+union_set multi_union_pw_aff::zero_union_set() const
+{
+  auto res = isl_multi_union_pw_aff_zero_union_set(copy());
+  return manage(res);
+}
+
+// implementations for isl::multi_val
+multi_val manage(__isl_take isl_multi_val *ptr) {
+  return multi_val(ptr);
+}
+multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
+  ptr = isl_multi_val_copy(ptr);
+  return multi_val(ptr);
+}
+
+multi_val::multi_val()
+    : ptr(nullptr) {}
+
+multi_val::multi_val(const multi_val &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+multi_val::multi_val(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+multi_val::multi_val(__isl_take isl_multi_val *ptr)
+    : ptr(ptr) {}
+
+
+multi_val &multi_val::operator=(multi_val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+multi_val::~multi_val() {
+  if (ptr)
+    isl_multi_val_free(ptr);
+}
+
+__isl_give isl_multi_val *multi_val::copy() const & {
+  return isl_multi_val_copy(ptr);
+}
+
+__isl_keep isl_multi_val *multi_val::get() const {
+  return ptr;
+}
+
+__isl_give isl_multi_val *multi_val::release() {
+  isl_multi_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool multi_val::is_null() const {
+  return ptr == nullptr;
+}
+multi_val::operator bool() const {
+  return !is_null();
+}
+
+
+ctx multi_val::get_ctx() const {
+  return ctx(isl_multi_val_get_ctx(ptr));
+}
+std::string multi_val::to_str() const {
+  char *Tmp = isl_multi_val_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void multi_val::dump() const {
+  isl_multi_val_dump(get());
+}
+
+
+multi_val multi_val::add(multi_val multi2) const
+{
+  auto res = isl_multi_val_add(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_multi_val_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+multi_val multi_val::add_val(val v) const
+{
+  auto res = isl_multi_val_add_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_val multi_val::align_params(space model) const
+{
+  auto res = isl_multi_val_align_params(copy(), model.release());
+  return manage(res);
+}
+
+unsigned int multi_val::dim(isl::dim type) const
+{
+  auto res = isl_multi_val_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+multi_val multi_val::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_val_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+multi_val multi_val::factor_range() const
+{
+  auto res = isl_multi_val_factor_range(copy());
+  return manage(res);
+}
+
+int multi_val::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_multi_val_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int multi_val::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_multi_val_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+multi_val multi_val::flat_range_product(multi_val multi2) const
+{
+  auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::flatten_range() const
+{
+  auto res = isl_multi_val_flatten_range(copy());
+  return manage(res);
+}
+
+multi_val multi_val::from_range() const
+{
+  auto res = isl_multi_val_from_range(copy());
+  return manage(res);
+}
+
+multi_val multi_val::from_val_list(space space, val_list list)
+{
+  auto res = isl_multi_val_from_val_list(space.release(), list.release());
+  return manage(res);
+}
+
+id multi_val::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_multi_val_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+space multi_val::get_domain_space() const
+{
+  auto res = isl_multi_val_get_domain_space(get());
+  return manage(res);
+}
+
+space multi_val::get_space() const
+{
+  auto res = isl_multi_val_get_space(get());
+  return manage(res);
+}
+
+id multi_val::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_val_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string multi_val::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_multi_val_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+val multi_val::get_val(int pos) const
+{
+  auto res = isl_multi_val_get_val(get(), pos);
+  return manage(res);
+}
+
+boolean multi_val::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_val_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_val multi_val::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_val_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean multi_val::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_multi_val_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean multi_val::involves_nan() const
+{
+  auto res = isl_multi_val_involves_nan(get());
+  return manage(res);
+}
+
+multi_val multi_val::mod_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_val_mod_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_val multi_val::mod_val(val v) const
+{
+  auto res = isl_multi_val_mod_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_val multi_val::neg() const
+{
+  auto res = isl_multi_val_neg(copy());
+  return manage(res);
+}
+
+boolean multi_val::plain_is_equal(const multi_val &multi2) const
+{
+  auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
+  return manage(res);
+}
+
+multi_val multi_val::product(multi_val multi2) const
+{
+  auto res = isl_multi_val_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::project_domain_on_params() const
+{
+  auto res = isl_multi_val_project_domain_on_params(copy());
+  return manage(res);
+}
+
+multi_val multi_val::range_factor_domain() const
+{
+  auto res = isl_multi_val_range_factor_domain(copy());
+  return manage(res);
+}
+
+multi_val multi_val::range_factor_range() const
+{
+  auto res = isl_multi_val_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean multi_val::range_is_wrapping() const
+{
+  auto res = isl_multi_val_range_is_wrapping(get());
+  return manage(res);
+}
+
+multi_val multi_val::range_product(multi_val multi2) const
+{
+  auto res = isl_multi_val_range_product(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::range_splice(unsigned int pos, multi_val multi2) const
+{
+  auto res = isl_multi_val_range_splice(copy(), pos, multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::read_from_str(ctx ctx, const std::string &str)
+{
+  auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
+  return manage(res);
+}
+
+multi_val multi_val::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_multi_val_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+multi_val multi_val::reset_user() const
+{
+  auto res = isl_multi_val_reset_user(copy());
+  return manage(res);
+}
+
+multi_val multi_val::scale_down_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_val multi_val::scale_down_val(val v) const
+{
+  auto res = isl_multi_val_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_val multi_val::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+multi_val multi_val::scale_val(val v) const
+{
+  auto res = isl_multi_val_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+multi_val multi_val::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_multi_val_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+multi_val multi_val::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_multi_val_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+multi_val multi_val::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_multi_val_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+multi_val multi_val::set_val(int pos, val el) const
+{
+  auto res = isl_multi_val_set_val(copy(), pos, el.release());
+  return manage(res);
+}
+
+multi_val multi_val::splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const
+{
+  auto res = isl_multi_val_splice(copy(), in_pos, out_pos, multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::sub(multi_val multi2) const
+{
+  auto res = isl_multi_val_sub(copy(), multi2.release());
+  return manage(res);
+}
+
+multi_val multi_val::zero(space space)
+{
+  auto res = isl_multi_val_zero(space.release());
+  return manage(res);
+}
+
+// implementations for isl::point
+point manage(__isl_take isl_point *ptr) {
+  return point(ptr);
+}
+point manage_copy(__isl_keep isl_point *ptr) {
+  ptr = isl_point_copy(ptr);
+  return point(ptr);
+}
+
+point::point()
+    : ptr(nullptr) {}
+
+point::point(const point &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+point::point(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+point::point(__isl_take isl_point *ptr)
+    : ptr(ptr) {}
+
+point::point(space dim)
+{
+  auto res = isl_point_zero(dim.release());
+  ptr = res;
+}
+
+point &point::operator=(point obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+point::~point() {
+  if (ptr)
+    isl_point_free(ptr);
+}
+
+__isl_give isl_point *point::copy() const & {
+  return isl_point_copy(ptr);
+}
+
+__isl_keep isl_point *point::get() const {
+  return ptr;
+}
+
+__isl_give isl_point *point::release() {
+  isl_point *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool point::is_null() const {
+  return ptr == nullptr;
+}
+point::operator bool() const {
+  return !is_null();
+}
+
+
+ctx point::get_ctx() const {
+  return ctx(isl_point_get_ctx(ptr));
+}
+std::string point::to_str() const {
+  char *Tmp = isl_point_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void point::dump() const {
+  isl_point_dump(get());
+}
+
+
+point point::add_ui(isl::dim type, int pos, unsigned int val) const
+{
+  auto res = isl_point_add_ui(copy(), static_cast<enum isl_dim_type>(type), pos, val);
+  return manage(res);
+}
+
+val point::get_coordinate_val(isl::dim type, int pos) const
+{
+  auto res = isl_point_get_coordinate_val(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+space point::get_space() const
+{
+  auto res = isl_point_get_space(get());
+  return manage(res);
+}
+
+point point::set_coordinate_val(isl::dim type, int pos, val v) const
+{
+  auto res = isl_point_set_coordinate_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+point point::sub_ui(isl::dim type, int pos, unsigned int val) const
+{
+  auto res = isl_point_sub_ui(copy(), static_cast<enum isl_dim_type>(type), pos, val);
+  return manage(res);
+}
+
+// implementations for isl::pw_aff
+pw_aff manage(__isl_take isl_pw_aff *ptr) {
+  return pw_aff(ptr);
+}
+pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
+  ptr = isl_pw_aff_copy(ptr);
+  return pw_aff(ptr);
+}
+
+pw_aff::pw_aff()
+    : ptr(nullptr) {}
+
+pw_aff::pw_aff(const pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_aff::pw_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
+    : ptr(ptr) {}
+
+pw_aff::pw_aff(aff aff)
+{
+  auto res = isl_pw_aff_from_aff(aff.release());
+  ptr = res;
+}
+pw_aff::pw_aff(local_space ls)
+{
+  auto res = isl_pw_aff_zero_on_domain(ls.release());
+  ptr = res;
+}
+pw_aff::pw_aff(set domain, val v)
+{
+  auto res = isl_pw_aff_val_on_domain(domain.release(), v.release());
+  ptr = res;
+}
+pw_aff::pw_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+pw_aff &pw_aff::operator=(pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff::~pw_aff() {
+  if (ptr)
+    isl_pw_aff_free(ptr);
+}
+
+__isl_give isl_pw_aff *pw_aff::copy() const & {
+  return isl_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_aff *pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff *pw_aff::release() {
+  isl_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+pw_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_aff::get_ctx() const {
+  return ctx(isl_pw_aff_get_ctx(ptr));
+}
+std::string pw_aff::to_str() const {
+  char *Tmp = isl_pw_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void pw_aff::dump() const {
+  isl_pw_aff_dump(get());
+}
+
+
+pw_aff pw_aff::add(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_add(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_pw_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+pw_aff pw_aff::align_params(space model) const
+{
+  auto res = isl_pw_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::alloc(set set, aff aff)
+{
+  auto res = isl_pw_aff_alloc(set.release(), aff.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::ceil() const
+{
+  auto res = isl_pw_aff_ceil(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::coalesce() const
+{
+  auto res = isl_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::cond(pw_aff pwaff_true, pw_aff pwaff_false) const
+{
+  auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
+  return manage(res);
+}
+
+unsigned int pw_aff::dim(isl::dim type) const
+{
+  auto res = isl_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+pw_aff pw_aff::div(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_div(copy(), pa2.release());
+  return manage(res);
+}
+
+set pw_aff::domain() const
+{
+  auto res = isl_pw_aff_domain(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_aff pw_aff::drop_unused_params() const
+{
+  auto res = isl_pw_aff_drop_unused_params(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::empty(space dim)
+{
+  auto res = isl_pw_aff_empty(dim.release());
+  return manage(res);
+}
+
+map pw_aff::eq_map(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_eq_map(copy(), pa2.release());
+  return manage(res);
+}
+
+set pw_aff::eq_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+val pw_aff::eval(point pnt) const
+{
+  auto res = isl_pw_aff_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+int pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+pw_aff pw_aff::floor() const
+{
+  auto res = isl_pw_aff_floor(copy());
+  return manage(res);
+}
+
+stat pw_aff::foreach_piece(const std::function<stat(set, aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(set, aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_set *arg_0, isl_aff *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_pw_aff_foreach_piece(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_aff pw_aff::from_range() const
+{
+  auto res = isl_pw_aff_from_range(copy());
+  return manage(res);
+}
+
+set pw_aff::ge_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+id pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string pw_aff::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_pw_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+space pw_aff::get_domain_space() const
+{
+  auto res = isl_pw_aff_get_domain_space(get());
+  return manage(res);
+}
+
+uint32_t pw_aff::get_hash() const
+{
+  auto res = isl_pw_aff_get_hash(get());
+  return res;
+}
+
+space pw_aff::get_space() const
+{
+  auto res = isl_pw_aff_get_space(get());
+  return manage(res);
+}
+
+id pw_aff::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+pw_aff pw_aff::gist(set context) const
+{
+  auto res = isl_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::gist_params(set context) const
+{
+  auto res = isl_pw_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+map pw_aff::gt_map(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_gt_map(copy(), pa2.release());
+  return manage(res);
+}
+
+set pw_aff::gt_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+boolean pw_aff::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_pw_aff_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean pw_aff::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+pw_aff pw_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_aff pw_aff::intersect_domain(set set) const
+{
+  auto res = isl_pw_aff_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::intersect_params(set set) const
+{
+  auto res = isl_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean pw_aff::involves_nan() const
+{
+  auto res = isl_pw_aff_involves_nan(get());
+  return manage(res);
+}
+
+boolean pw_aff::is_cst() const
+{
+  auto res = isl_pw_aff_is_cst(get());
+  return manage(res);
+}
+
+boolean pw_aff::is_empty() const
+{
+  auto res = isl_pw_aff_is_empty(get());
+  return manage(res);
+}
+
+boolean pw_aff::is_equal(const pw_aff &pa2) const
+{
+  auto res = isl_pw_aff_is_equal(get(), pa2.get());
+  return manage(res);
+}
+
+set pw_aff::le_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+map pw_aff::lt_map(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_lt_map(copy(), pa2.release());
+  return manage(res);
+}
+
+set pw_aff::lt_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::max(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_max(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::min(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_min(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::mod(val mod) const
+{
+  auto res = isl_pw_aff_mod_val(copy(), mod.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_pw_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+pw_aff pw_aff::mul(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_mul(copy(), pwaff2.release());
+  return manage(res);
+}
+
+int pw_aff::n_piece() const
+{
+  auto res = isl_pw_aff_n_piece(get());
+  return res;
+}
+
+pw_aff pw_aff::nan_on_domain(local_space ls)
+{
+  auto res = isl_pw_aff_nan_on_domain(ls.release());
+  return manage(res);
+}
+
+set pw_aff::ne_set(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::neg() const
+{
+  auto res = isl_pw_aff_neg(copy());
+  return manage(res);
+}
+
+set pw_aff::non_zero_set() const
+{
+  auto res = isl_pw_aff_non_zero_set(copy());
+  return manage(res);
+}
+
+set pw_aff::nonneg_set() const
+{
+  auto res = isl_pw_aff_nonneg_set(copy());
+  return manage(res);
+}
+
+set pw_aff::params() const
+{
+  auto res = isl_pw_aff_params(copy());
+  return manage(res);
+}
+
+int pw_aff::plain_cmp(const pw_aff &pa2) const
+{
+  auto res = isl_pw_aff_plain_cmp(get(), pa2.get());
+  return res;
+}
+
+boolean pw_aff::plain_is_equal(const pw_aff &pwaff2) const
+{
+  auto res = isl_pw_aff_plain_is_equal(get(), pwaff2.get());
+  return manage(res);
+}
+
+set pw_aff::pos_set() const
+{
+  auto res = isl_pw_aff_pos_set(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::project_domain_on_params() const
+{
+  auto res = isl_pw_aff_project_domain_on_params(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::pullback(multi_aff ma) const
+{
+  auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::pullback(pw_multi_aff pma) const
+{
+  auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::pullback(multi_pw_aff mpa) const
+{
+  auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+pw_aff pw_aff::reset_user() const
+{
+  auto res = isl_pw_aff_reset_user(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff::scale(val v) const
+{
+  auto res = isl_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::scale_down(val f) const
+{
+  auto res = isl_pw_aff_scale_down_val(copy(), f.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::sub(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_sub(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::subtract_domain(set set) const
+{
+  auto res = isl_pw_aff_subtract_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::tdiv_q(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::tdiv_r(pw_aff pa2) const
+{
+  auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::union_add(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::union_max(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_union_max(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::union_min(pw_aff pwaff2) const
+{
+  auto res = isl_pw_aff_union_min(copy(), pwaff2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff::var_on_domain(local_space ls, isl::dim type, unsigned int pos)
+{
+  auto res = isl_pw_aff_var_on_domain(ls.release(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+set pw_aff::zero_set() const
+{
+  auto res = isl_pw_aff_zero_set(copy());
+  return manage(res);
+}
+
+// implementations for isl::pw_aff_list
+pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
+  return pw_aff_list(ptr);
+}
+pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
+  ptr = isl_pw_aff_list_copy(ptr);
+  return pw_aff_list(ptr);
+}
+
+pw_aff_list::pw_aff_list()
+    : ptr(nullptr) {}
+
+pw_aff_list::pw_aff_list(const pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_aff_list::pw_aff_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+
+pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_aff_list::~pw_aff_list() {
+  if (ptr)
+    isl_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
+  return isl_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_aff_list *pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_aff_list *pw_aff_list::release() {
+  isl_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+pw_aff_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_aff_list::get_ctx() const {
+  return ctx(isl_pw_aff_list_get_ctx(ptr));
+}
+
+void pw_aff_list::dump() const {
+  isl_pw_aff_list_dump(get());
+}
+
+
+pw_aff_list pw_aff_list::add(pw_aff el) const
+{
+  auto res = isl_pw_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_pw_aff_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::concat(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+set pw_aff_list::eq_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_eq_set(copy(), list2.release());
+  return manage(res);
+}
+
+stat pw_aff_list::foreach(const std::function<stat(pw_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::from_pw_aff(pw_aff el)
+{
+  auto res = isl_pw_aff_list_from_pw_aff(el.release());
+  return manage(res);
+}
+
+set pw_aff_list::ge_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_ge_set(copy(), list2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff_list::get_at(int index) const
+{
+  auto res = isl_pw_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+pw_aff pw_aff_list::get_pw_aff(int index) const
+{
+  auto res = isl_pw_aff_list_get_pw_aff(get(), index);
+  return manage(res);
+}
+
+set pw_aff_list::gt_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_gt_set(copy(), list2.release());
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::insert(unsigned int pos, pw_aff el) const
+{
+  auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+set pw_aff_list::le_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_le_set(copy(), list2.release());
+  return manage(res);
+}
+
+set pw_aff_list::lt_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_lt_set(copy(), list2.release());
+  return manage(res);
+}
+
+pw_aff pw_aff_list::max() const
+{
+  auto res = isl_pw_aff_list_max(copy());
+  return manage(res);
+}
+
+pw_aff pw_aff_list::min() const
+{
+  auto res = isl_pw_aff_list_min(copy());
+  return manage(res);
+}
+
+int pw_aff_list::n_pw_aff() const
+{
+  auto res = isl_pw_aff_list_n_pw_aff(get());
+  return res;
+}
+
+set pw_aff_list::ne_set(pw_aff_list list2) const
+{
+  auto res = isl_pw_aff_list_ne_set(copy(), list2.release());
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::reverse() const
+{
+  auto res = isl_pw_aff_list_reverse(copy());
+  return manage(res);
+}
+
+pw_aff_list pw_aff_list::set_pw_aff(int index, pw_aff el) const
+{
+  auto res = isl_pw_aff_list_set_pw_aff(copy(), index, el.release());
+  return manage(res);
+}
+
+int pw_aff_list::size() const
+{
+  auto res = isl_pw_aff_list_size(get());
+  return res;
+}
+
+pw_aff_list pw_aff_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_pw_aff_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::pw_multi_aff
+pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
+  return pw_multi_aff(ptr);
+}
+pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
+  ptr = isl_pw_multi_aff_copy(ptr);
+  return pw_multi_aff(ptr);
+}
+
+pw_multi_aff::pw_multi_aff()
+    : ptr(nullptr) {}
+
+pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_multi_aff::pw_multi_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+pw_multi_aff::pw_multi_aff(multi_aff ma)
+{
+  auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
+  ptr = res;
+}
+pw_multi_aff::pw_multi_aff(pw_aff pa)
+{
+  auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+pw_multi_aff::pw_multi_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff::~pw_multi_aff() {
+  if (ptr)
+    isl_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
+  return isl_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff *pw_multi_aff::release() {
+  isl_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+pw_multi_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_multi_aff::get_ctx() const {
+  return ctx(isl_pw_multi_aff_get_ctx(ptr));
+}
+std::string pw_multi_aff::to_str() const {
+  char *Tmp = isl_pw_multi_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void pw_multi_aff::dump() const {
+  isl_pw_multi_aff_dump(get());
+}
+
+
+pw_multi_aff pw_multi_aff::add(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_add(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::align_params(space model) const
+{
+  auto res = isl_pw_multi_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::alloc(set set, multi_aff maff)
+{
+  auto res = isl_pw_multi_aff_alloc(set.release(), maff.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::coalesce() const
+{
+  auto res = isl_pw_multi_aff_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int pw_multi_aff::dim(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+set pw_multi_aff::domain() const
+{
+  auto res = isl_pw_multi_aff_domain(copy());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::drop_unused_params() const
+{
+  auto res = isl_pw_multi_aff_drop_unused_params(copy());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::empty(space space)
+{
+  auto res = isl_pw_multi_aff_empty(space.release());
+  return manage(res);
+}
+
+int pw_multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_pw_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+pw_multi_aff pw_multi_aff::fix_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_pw_multi_aff_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::flat_range_product(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
+  return manage(res);
+}
+
+stat pw_multi_aff::foreach_piece(const std::function<stat(set, multi_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(set, multi_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::from_domain(set set)
+{
+  auto res = isl_pw_multi_aff_from_domain(set.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::from_map(map map)
+{
+  auto res = isl_pw_multi_aff_from_map(map.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::from_multi_pw_aff(multi_pw_aff mpa)
+{
+  auto res = isl_pw_multi_aff_from_multi_pw_aff(mpa.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::from_set(set set)
+{
+  auto res = isl_pw_multi_aff_from_set(set.release());
+  return manage(res);
+}
+
+id pw_multi_aff::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_pw_multi_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string pw_multi_aff::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_pw_multi_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+space pw_multi_aff::get_domain_space() const
+{
+  auto res = isl_pw_multi_aff_get_domain_space(get());
+  return manage(res);
+}
+
+pw_aff pw_multi_aff::get_pw_aff(int pos) const
+{
+  auto res = isl_pw_multi_aff_get_pw_aff(get(), pos);
+  return manage(res);
+}
+
+space pw_multi_aff::get_space() const
+{
+  auto res = isl_pw_multi_aff_get_space(get());
+  return manage(res);
+}
+
+id pw_multi_aff::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string pw_multi_aff::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+pw_multi_aff pw_multi_aff::gist(set set) const
+{
+  auto res = isl_pw_multi_aff_gist(copy(), set.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::gist_params(set set) const
+{
+  auto res = isl_pw_multi_aff_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_multi_aff::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+boolean pw_multi_aff::has_tuple_name(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::identity(space space)
+{
+  auto res = isl_pw_multi_aff_identity(space.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::intersect_domain(set set) const
+{
+  auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::intersect_params(set set) const
+{
+  auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_multi_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_multi_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean pw_multi_aff::involves_nan() const
+{
+  auto res = isl_pw_multi_aff_involves_nan(get());
+  return manage(res);
+}
+
+boolean pw_multi_aff::is_equal(const pw_multi_aff &pma2) const
+{
+  auto res = isl_pw_multi_aff_is_equal(get(), pma2.get());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::multi_val_on_domain(set domain, multi_val mv)
+{
+  auto res = isl_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release());
+  return manage(res);
+}
+
+int pw_multi_aff::n_piece() const
+{
+  auto res = isl_pw_multi_aff_n_piece(get());
+  return res;
+}
+
+pw_multi_aff pw_multi_aff::neg() const
+{
+  auto res = isl_pw_multi_aff_neg(copy());
+  return manage(res);
+}
+
+boolean pw_multi_aff::plain_is_equal(const pw_multi_aff &pma2) const
+{
+  auto res = isl_pw_multi_aff_plain_is_equal(get(), pma2.get());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::product(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_product(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::project_domain_on_params() const
+{
+  auto res = isl_pw_multi_aff_project_domain_on_params(copy());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::project_out_map(space space, isl::dim type, unsigned int first, unsigned int n)
+{
+  auto res = isl_pw_multi_aff_project_out_map(space.release(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::pullback(multi_aff ma) const
+{
+  auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::pullback(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::range_map(space space)
+{
+  auto res = isl_pw_multi_aff_range_map(space.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::range_product(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_pw_multi_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::reset_user() const
+{
+  auto res = isl_pw_multi_aff_reset_user(copy());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::scale_down_val(val v) const
+{
+  auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_pw_multi_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::scale_val(val v) const
+{
+  auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_pw_multi_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::set_pw_aff(unsigned int pos, pw_aff pa) const
+{
+  auto res = isl_pw_multi_aff_set_pw_aff(copy(), pos, pa.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_pw_multi_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::sub(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::subtract_domain(set set) const
+{
+  auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::union_add(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::union_lexmax(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_union_lexmax(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::union_lexmin(pw_multi_aff pma2) const
+{
+  auto res = isl_pw_multi_aff_union_lexmin(copy(), pma2.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff::zero(space space)
+{
+  auto res = isl_pw_multi_aff_zero(space.release());
+  return manage(res);
+}
+
+// implementations for isl::pw_multi_aff_list
+pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
+  return pw_multi_aff_list(ptr);
+}
+pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
+  ptr = isl_pw_multi_aff_list_copy(ptr);
+  return pw_multi_aff_list(ptr);
+}
+
+pw_multi_aff_list::pw_multi_aff_list()
+    : ptr(nullptr) {}
+
+pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_multi_aff_list::pw_multi_aff_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
+    : ptr(ptr) {}
+
+
+pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_multi_aff_list::~pw_multi_aff_list() {
+  if (ptr)
+    isl_pw_multi_aff_list_free(ptr);
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
+  return isl_pw_multi_aff_list_copy(ptr);
+}
+
+__isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
+  isl_pw_multi_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_multi_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+pw_multi_aff_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_multi_aff_list::get_ctx() const {
+  return ctx(isl_pw_multi_aff_list_get_ctx(ptr));
+}
+
+void pw_multi_aff_list::dump() const {
+  isl_pw_multi_aff_list_dump(get());
+}
+
+
+pw_multi_aff_list pw_multi_aff_list::add(pw_multi_aff el) const
+{
+  auto res = isl_pw_multi_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::concat(pw_multi_aff_list list2) const
+{
+  auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat pw_multi_aff_list::foreach(const std::function<stat(pw_multi_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_multi_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::from_pw_multi_aff(pw_multi_aff el)
+{
+  auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff_list::get_at(int index) const
+{
+  auto res = isl_pw_multi_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+pw_multi_aff pw_multi_aff_list::get_pw_multi_aff(int index) const
+{
+  auto res = isl_pw_multi_aff_list_get_pw_multi_aff(get(), index);
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, pw_multi_aff el) const
+{
+  auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int pw_multi_aff_list::n_pw_multi_aff() const
+{
+  auto res = isl_pw_multi_aff_list_n_pw_multi_aff(get());
+  return res;
+}
+
+pw_multi_aff_list pw_multi_aff_list::reverse() const
+{
+  auto res = isl_pw_multi_aff_list_reverse(copy());
+  return manage(res);
+}
+
+pw_multi_aff_list pw_multi_aff_list::set_pw_multi_aff(int index, pw_multi_aff el) const
+{
+  auto res = isl_pw_multi_aff_list_set_pw_multi_aff(copy(), index, el.release());
+  return manage(res);
+}
+
+int pw_multi_aff_list::size() const
+{
+  auto res = isl_pw_multi_aff_list_size(get());
+  return res;
+}
+
+pw_multi_aff_list pw_multi_aff_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_pw_multi_aff_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::pw_qpolynomial
+pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr) {
+  return pw_qpolynomial(ptr);
+}
+pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr) {
+  ptr = isl_pw_qpolynomial_copy(ptr);
+  return pw_qpolynomial(ptr);
+}
+
+pw_qpolynomial::pw_qpolynomial()
+    : ptr(nullptr) {}
+
+pw_qpolynomial::pw_qpolynomial(const pw_qpolynomial &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_qpolynomial::pw_qpolynomial(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_qpolynomial::pw_qpolynomial(__isl_take isl_pw_qpolynomial *ptr)
+    : ptr(ptr) {}
+
+pw_qpolynomial::pw_qpolynomial(ctx ctx, const std::string &str)
+{
+  auto res = isl_pw_qpolynomial_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+pw_qpolynomial &pw_qpolynomial::operator=(pw_qpolynomial obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_qpolynomial::~pw_qpolynomial() {
+  if (ptr)
+    isl_pw_qpolynomial_free(ptr);
+}
+
+__isl_give isl_pw_qpolynomial *pw_qpolynomial::copy() const & {
+  return isl_pw_qpolynomial_copy(ptr);
+}
+
+__isl_keep isl_pw_qpolynomial *pw_qpolynomial::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_qpolynomial *pw_qpolynomial::release() {
+  isl_pw_qpolynomial *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_qpolynomial::is_null() const {
+  return ptr == nullptr;
+}
+pw_qpolynomial::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_qpolynomial::get_ctx() const {
+  return ctx(isl_pw_qpolynomial_get_ctx(ptr));
+}
+std::string pw_qpolynomial::to_str() const {
+  char *Tmp = isl_pw_qpolynomial_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void pw_qpolynomial::dump() const {
+  isl_pw_qpolynomial_dump(get());
+}
+
+
+pw_qpolynomial pw_qpolynomial::add(pw_qpolynomial pwqp2) const
+{
+  auto res = isl_pw_qpolynomial_add(copy(), pwqp2.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::alloc(set set, qpolynomial qp)
+{
+  auto res = isl_pw_qpolynomial_alloc(set.release(), qp.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::coalesce() const
+{
+  auto res = isl_pw_qpolynomial_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int pw_qpolynomial::dim(isl::dim type) const
+{
+  auto res = isl_pw_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+set pw_qpolynomial::domain() const
+{
+  auto res = isl_pw_qpolynomial_domain(copy());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::drop_unused_params() const
+{
+  auto res = isl_pw_qpolynomial_drop_unused_params(copy());
+  return manage(res);
+}
+
+val pw_qpolynomial::eval(point pnt) const
+{
+  auto res = isl_pw_qpolynomial_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+int pw_qpolynomial::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_pw_qpolynomial_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+pw_qpolynomial pw_qpolynomial::fix_val(isl::dim type, unsigned int n, val v) const
+{
+  auto res = isl_pw_qpolynomial_fix_val(copy(), static_cast<enum isl_dim_type>(type), n, v.release());
+  return manage(res);
+}
+
+stat pw_qpolynomial::foreach_piece(const std::function<stat(set, qpolynomial)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(set, qpolynomial)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_set *arg_0, isl_qpolynomial *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_pw_qpolynomial_foreach_piece(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::from_pw_aff(pw_aff pwaff)
+{
+  auto res = isl_pw_qpolynomial_from_pw_aff(pwaff.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::from_qpolynomial(qpolynomial qp)
+{
+  auto res = isl_pw_qpolynomial_from_qpolynomial(qp.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::from_range() const
+{
+  auto res = isl_pw_qpolynomial_from_range(copy());
+  return manage(res);
+}
+
+space pw_qpolynomial::get_domain_space() const
+{
+  auto res = isl_pw_qpolynomial_get_domain_space(get());
+  return manage(res);
+}
+
+space pw_qpolynomial::get_space() const
+{
+  auto res = isl_pw_qpolynomial_get_space(get());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::gist(set context) const
+{
+  auto res = isl_pw_qpolynomial_gist(copy(), context.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::gist_params(set context) const
+{
+  auto res = isl_pw_qpolynomial_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+boolean pw_qpolynomial::has_equal_space(const pw_qpolynomial &pwqp2) const
+{
+  auto res = isl_pw_qpolynomial_has_equal_space(get(), pwqp2.get());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::intersect_domain(set set) const
+{
+  auto res = isl_pw_qpolynomial_intersect_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::intersect_params(set set) const
+{
+  auto res = isl_pw_qpolynomial_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean pw_qpolynomial::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean pw_qpolynomial::involves_nan() const
+{
+  auto res = isl_pw_qpolynomial_involves_nan(get());
+  return manage(res);
+}
+
+boolean pw_qpolynomial::is_zero() const
+{
+  auto res = isl_pw_qpolynomial_is_zero(get());
+  return manage(res);
+}
+
+val pw_qpolynomial::max() const
+{
+  auto res = isl_pw_qpolynomial_max(copy());
+  return manage(res);
+}
+
+val pw_qpolynomial::min() const
+{
+  auto res = isl_pw_qpolynomial_min(copy());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::mul(pw_qpolynomial pwqp2) const
+{
+  auto res = isl_pw_qpolynomial_mul(copy(), pwqp2.release());
+  return manage(res);
+}
+
+int pw_qpolynomial::n_piece() const
+{
+  auto res = isl_pw_qpolynomial_n_piece(get());
+  return res;
+}
+
+pw_qpolynomial pw_qpolynomial::neg() const
+{
+  auto res = isl_pw_qpolynomial_neg(copy());
+  return manage(res);
+}
+
+boolean pw_qpolynomial::plain_is_equal(const pw_qpolynomial &pwqp2) const
+{
+  auto res = isl_pw_qpolynomial_plain_is_equal(get(), pwqp2.get());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::pow(unsigned int exponent) const
+{
+  auto res = isl_pw_qpolynomial_pow(copy(), exponent);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::project_domain_on_params() const
+{
+  auto res = isl_pw_qpolynomial_project_domain_on_params(copy());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::reset_domain_space(space dim) const
+{
+  auto res = isl_pw_qpolynomial_reset_domain_space(copy(), dim.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::reset_user() const
+{
+  auto res = isl_pw_qpolynomial_reset_user(copy());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::scale_down_val(val v) const
+{
+  auto res = isl_pw_qpolynomial_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::scale_val(val v) const
+{
+  auto res = isl_pw_qpolynomial_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::split_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_split_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::split_periods(int max_periods) const
+{
+  auto res = isl_pw_qpolynomial_split_periods(copy(), max_periods);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::sub(pw_qpolynomial pwqp2) const
+{
+  auto res = isl_pw_qpolynomial_sub(copy(), pwqp2.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::subtract_domain(set set) const
+{
+  auto res = isl_pw_qpolynomial_subtract_domain(copy(), set.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::to_polynomial(int sign) const
+{
+  auto res = isl_pw_qpolynomial_to_polynomial(copy(), sign);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial::zero(space dim)
+{
+  auto res = isl_pw_qpolynomial_zero(dim.release());
+  return manage(res);
+}
+
+// implementations for isl::pw_qpolynomial_fold_list
+pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr) {
+  return pw_qpolynomial_fold_list(ptr);
+}
+pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr) {
+  ptr = isl_pw_qpolynomial_fold_list_copy(ptr);
+  return pw_qpolynomial_fold_list(ptr);
+}
+
+pw_qpolynomial_fold_list::pw_qpolynomial_fold_list()
+    : ptr(nullptr) {}
+
+pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(const pw_qpolynomial_fold_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(__isl_take isl_pw_qpolynomial_fold_list *ptr)
+    : ptr(ptr) {}
+
+
+pw_qpolynomial_fold_list &pw_qpolynomial_fold_list::operator=(pw_qpolynomial_fold_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_qpolynomial_fold_list::~pw_qpolynomial_fold_list() {
+  if (ptr)
+    isl_pw_qpolynomial_fold_list_free(ptr);
+}
+
+__isl_give isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::copy() const & {
+  return isl_pw_qpolynomial_fold_list_copy(ptr);
+}
+
+__isl_keep isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::release() {
+  isl_pw_qpolynomial_fold_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_qpolynomial_fold_list::is_null() const {
+  return ptr == nullptr;
+}
+pw_qpolynomial_fold_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_qpolynomial_fold_list::get_ctx() const {
+  return ctx(isl_pw_qpolynomial_fold_list_get_ctx(ptr));
+}
+
+void pw_qpolynomial_fold_list::dump() const {
+  isl_pw_qpolynomial_fold_list_dump(get());
+}
+
+
+
+// implementations for isl::pw_qpolynomial_list
+pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr) {
+  return pw_qpolynomial_list(ptr);
+}
+pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr) {
+  ptr = isl_pw_qpolynomial_list_copy(ptr);
+  return pw_qpolynomial_list(ptr);
+}
+
+pw_qpolynomial_list::pw_qpolynomial_list()
+    : ptr(nullptr) {}
+
+pw_qpolynomial_list::pw_qpolynomial_list(const pw_qpolynomial_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+pw_qpolynomial_list::pw_qpolynomial_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+pw_qpolynomial_list::pw_qpolynomial_list(__isl_take isl_pw_qpolynomial_list *ptr)
+    : ptr(ptr) {}
+
+
+pw_qpolynomial_list &pw_qpolynomial_list::operator=(pw_qpolynomial_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+pw_qpolynomial_list::~pw_qpolynomial_list() {
+  if (ptr)
+    isl_pw_qpolynomial_list_free(ptr);
+}
+
+__isl_give isl_pw_qpolynomial_list *pw_qpolynomial_list::copy() const & {
+  return isl_pw_qpolynomial_list_copy(ptr);
+}
+
+__isl_keep isl_pw_qpolynomial_list *pw_qpolynomial_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_pw_qpolynomial_list *pw_qpolynomial_list::release() {
+  isl_pw_qpolynomial_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool pw_qpolynomial_list::is_null() const {
+  return ptr == nullptr;
+}
+pw_qpolynomial_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx pw_qpolynomial_list::get_ctx() const {
+  return ctx(isl_pw_qpolynomial_list_get_ctx(ptr));
+}
+
+void pw_qpolynomial_list::dump() const {
+  isl_pw_qpolynomial_list_dump(get());
+}
+
+
+pw_qpolynomial_list pw_qpolynomial_list::add(pw_qpolynomial el) const
+{
+  auto res = isl_pw_qpolynomial_list_add(copy(), el.release());
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_pw_qpolynomial_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::concat(pw_qpolynomial_list list2) const
+{
+  auto res = isl_pw_qpolynomial_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_pw_qpolynomial_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat pw_qpolynomial_list::foreach(const std::function<stat(pw_qpolynomial)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_qpolynomial)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_qpolynomial *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_pw_qpolynomial_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::from_pw_qpolynomial(pw_qpolynomial el)
+{
+  auto res = isl_pw_qpolynomial_list_from_pw_qpolynomial(el.release());
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial_list::get_at(int index) const
+{
+  auto res = isl_pw_qpolynomial_list_get_at(get(), index);
+  return manage(res);
+}
+
+pw_qpolynomial pw_qpolynomial_list::get_pw_qpolynomial(int index) const
+{
+  auto res = isl_pw_qpolynomial_list_get_pw_qpolynomial(get(), index);
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::insert(unsigned int pos, pw_qpolynomial el) const
+{
+  auto res = isl_pw_qpolynomial_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int pw_qpolynomial_list::n_pw_qpolynomial() const
+{
+  auto res = isl_pw_qpolynomial_list_n_pw_qpolynomial(get());
+  return res;
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::reverse() const
+{
+  auto res = isl_pw_qpolynomial_list_reverse(copy());
+  return manage(res);
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::set_pw_qpolynomial(int index, pw_qpolynomial el) const
+{
+  auto res = isl_pw_qpolynomial_list_set_pw_qpolynomial(copy(), index, el.release());
+  return manage(res);
+}
+
+int pw_qpolynomial_list::size() const
+{
+  auto res = isl_pw_qpolynomial_list_size(get());
+  return res;
+}
+
+pw_qpolynomial_list pw_qpolynomial_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_pw_qpolynomial_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::qpolynomial
+qpolynomial manage(__isl_take isl_qpolynomial *ptr) {
+  return qpolynomial(ptr);
+}
+qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr) {
+  ptr = isl_qpolynomial_copy(ptr);
+  return qpolynomial(ptr);
+}
+
+qpolynomial::qpolynomial()
+    : ptr(nullptr) {}
+
+qpolynomial::qpolynomial(const qpolynomial &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+qpolynomial::qpolynomial(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+qpolynomial::qpolynomial(__isl_take isl_qpolynomial *ptr)
+    : ptr(ptr) {}
+
+
+qpolynomial &qpolynomial::operator=(qpolynomial obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+qpolynomial::~qpolynomial() {
+  if (ptr)
+    isl_qpolynomial_free(ptr);
+}
+
+__isl_give isl_qpolynomial *qpolynomial::copy() const & {
+  return isl_qpolynomial_copy(ptr);
+}
+
+__isl_keep isl_qpolynomial *qpolynomial::get() const {
+  return ptr;
+}
+
+__isl_give isl_qpolynomial *qpolynomial::release() {
+  isl_qpolynomial *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool qpolynomial::is_null() const {
+  return ptr == nullptr;
+}
+qpolynomial::operator bool() const {
+  return !is_null();
+}
+
+
+ctx qpolynomial::get_ctx() const {
+  return ctx(isl_qpolynomial_get_ctx(ptr));
+}
+
+void qpolynomial::dump() const {
+  isl_qpolynomial_dump(get());
+}
+
+
+qpolynomial qpolynomial::add(qpolynomial qp2) const
+{
+  auto res = isl_qpolynomial_add(copy(), qp2.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_qpolynomial_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::align_params(space model) const
+{
+  auto res = isl_qpolynomial_align_params(copy(), model.release());
+  return manage(res);
+}
+
+stat qpolynomial::as_polynomial_on_domain(const basic_set &bset, const std::function<stat(basic_set, qpolynomial)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(basic_set, qpolynomial)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_basic_set *arg_0, isl_qpolynomial *arg_1, void *arg_2) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_2);
+    stat ret = (*data->func)(manage(arg_0), manage(arg_1));
+    return ret.release();
+  };
+  auto res = isl_qpolynomial_as_polynomial_on_domain(get(), bset.get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+unsigned int qpolynomial::dim(isl::dim type) const
+{
+  auto res = isl_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+qpolynomial qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+val qpolynomial::eval(point pnt) const
+{
+  auto res = isl_qpolynomial_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+stat qpolynomial::foreach_term(const std::function<stat(term)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(term)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_term *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_qpolynomial_foreach_term(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::from_aff(aff aff)
+{
+  auto res = isl_qpolynomial_from_aff(aff.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::from_constraint(constraint c, isl::dim type, unsigned int pos)
+{
+  auto res = isl_qpolynomial_from_constraint(c.release(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::from_term(term term)
+{
+  auto res = isl_qpolynomial_from_term(term.release());
+  return manage(res);
+}
+
+val qpolynomial::get_constant_val() const
+{
+  auto res = isl_qpolynomial_get_constant_val(get());
+  return manage(res);
+}
+
+space qpolynomial::get_domain_space() const
+{
+  auto res = isl_qpolynomial_get_domain_space(get());
+  return manage(res);
+}
+
+space qpolynomial::get_space() const
+{
+  auto res = isl_qpolynomial_get_space(get());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::gist(set context) const
+{
+  auto res = isl_qpolynomial_gist(copy(), context.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::gist_params(set context) const
+{
+  auto res = isl_qpolynomial_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::homogenize() const
+{
+  auto res = isl_qpolynomial_homogenize(copy());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::infty_on_domain(space dim)
+{
+  auto res = isl_qpolynomial_infty_on_domain(dim.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_qpolynomial_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean qpolynomial::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_qpolynomial_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean qpolynomial::is_infty() const
+{
+  auto res = isl_qpolynomial_is_infty(get());
+  return manage(res);
+}
+
+boolean qpolynomial::is_nan() const
+{
+  auto res = isl_qpolynomial_is_nan(get());
+  return manage(res);
+}
+
+boolean qpolynomial::is_neginfty() const
+{
+  auto res = isl_qpolynomial_is_neginfty(get());
+  return manage(res);
+}
+
+boolean qpolynomial::is_zero() const
+{
+  auto res = isl_qpolynomial_is_zero(get());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_qpolynomial_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::mul(qpolynomial qp2) const
+{
+  auto res = isl_qpolynomial_mul(copy(), qp2.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::nan_on_domain(space dim)
+{
+  auto res = isl_qpolynomial_nan_on_domain(dim.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::neg() const
+{
+  auto res = isl_qpolynomial_neg(copy());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::neginfty_on_domain(space dim)
+{
+  auto res = isl_qpolynomial_neginfty_on_domain(dim.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::one_on_domain(space dim)
+{
+  auto res = isl_qpolynomial_one_on_domain(dim.release());
+  return manage(res);
+}
+
+boolean qpolynomial::plain_is_equal(const qpolynomial &qp2) const
+{
+  auto res = isl_qpolynomial_plain_is_equal(get(), qp2.get());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::pow(unsigned int power) const
+{
+  auto res = isl_qpolynomial_pow(copy(), power);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::project_domain_on_params() const
+{
+  auto res = isl_qpolynomial_project_domain_on_params(copy());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::scale_down_val(val v) const
+{
+  auto res = isl_qpolynomial_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::scale_val(val v) const
+{
+  auto res = isl_qpolynomial_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+int qpolynomial::sgn() const
+{
+  auto res = isl_qpolynomial_sgn(get());
+  return res;
+}
+
+qpolynomial qpolynomial::sub(qpolynomial qp2) const
+{
+  auto res = isl_qpolynomial_sub(copy(), qp2.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::val_on_domain(space space, val val)
+{
+  auto res = isl_qpolynomial_val_on_domain(space.release(), val.release());
+  return manage(res);
+}
+
+qpolynomial qpolynomial::var_on_domain(space dim, isl::dim type, unsigned int pos)
+{
+  auto res = isl_qpolynomial_var_on_domain(dim.release(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+qpolynomial qpolynomial::zero_on_domain(space dim)
+{
+  auto res = isl_qpolynomial_zero_on_domain(dim.release());
+  return manage(res);
+}
+
+// implementations for isl::schedule
+schedule manage(__isl_take isl_schedule *ptr) {
+  return schedule(ptr);
+}
+schedule manage_copy(__isl_keep isl_schedule *ptr) {
+  ptr = isl_schedule_copy(ptr);
+  return schedule(ptr);
+}
+
+schedule::schedule()
+    : ptr(nullptr) {}
+
+schedule::schedule(const schedule &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+schedule::schedule(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+schedule::schedule(__isl_take isl_schedule *ptr)
+    : ptr(ptr) {}
+
+schedule::schedule(ctx ctx, const std::string &str)
+{
+  auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+schedule &schedule::operator=(schedule obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule::~schedule() {
+  if (ptr)
+    isl_schedule_free(ptr);
+}
+
+__isl_give isl_schedule *schedule::copy() const & {
+  return isl_schedule_copy(ptr);
+}
+
+__isl_keep isl_schedule *schedule::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule *schedule::release() {
+  isl_schedule *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule::is_null() const {
+  return ptr == nullptr;
+}
+schedule::operator bool() const {
+  return !is_null();
+}
+
+
+ctx schedule::get_ctx() const {
+  return ctx(isl_schedule_get_ctx(ptr));
+}
+std::string schedule::to_str() const {
+  char *Tmp = isl_schedule_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void schedule::dump() const {
+  isl_schedule_dump(get());
+}
+
+
+schedule schedule::align_params(space space) const
+{
+  auto res = isl_schedule_align_params(copy(), space.release());
+  return manage(res);
+}
+
+schedule schedule::empty(space space)
+{
+  auto res = isl_schedule_empty(space.release());
+  return manage(res);
+}
+
+schedule schedule::from_domain(union_set domain)
+{
+  auto res = isl_schedule_from_domain(domain.release());
+  return manage(res);
+}
+
+union_set schedule::get_domain() const
+{
+  auto res = isl_schedule_get_domain(get());
+  return manage(res);
+}
+
+union_map schedule::get_map() const
+{
+  auto res = isl_schedule_get_map(get());
+  return manage(res);
+}
+
+schedule_node schedule::get_root() const
+{
+  auto res = isl_schedule_get_root(get());
+  return manage(res);
+}
+
+schedule schedule::gist_domain_params(set context) const
+{
+  auto res = isl_schedule_gist_domain_params(copy(), context.release());
+  return manage(res);
+}
+
+schedule schedule::insert_context(set context) const
+{
+  auto res = isl_schedule_insert_context(copy(), context.release());
+  return manage(res);
+}
+
+schedule schedule::insert_guard(set guard) const
+{
+  auto res = isl_schedule_insert_guard(copy(), guard.release());
+  return manage(res);
+}
+
+schedule schedule::insert_partial_schedule(multi_union_pw_aff partial) const
+{
+  auto res = isl_schedule_insert_partial_schedule(copy(), partial.release());
+  return manage(res);
+}
+
+schedule schedule::intersect_domain(union_set domain) const
+{
+  auto res = isl_schedule_intersect_domain(copy(), domain.release());
+  return manage(res);
+}
+
+boolean schedule::plain_is_equal(const schedule &schedule2) const
+{
+  auto res = isl_schedule_plain_is_equal(get(), schedule2.get());
+  return manage(res);
+}
+
+schedule schedule::pullback(union_pw_multi_aff upma) const
+{
+  auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+schedule schedule::reset_user() const
+{
+  auto res = isl_schedule_reset_user(copy());
+  return manage(res);
+}
+
+schedule schedule::sequence(schedule schedule2) const
+{
+  auto res = isl_schedule_sequence(copy(), schedule2.release());
+  return manage(res);
+}
+
+// implementations for isl::schedule_constraints
+schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
+  return schedule_constraints(ptr);
+}
+schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
+  ptr = isl_schedule_constraints_copy(ptr);
+  return schedule_constraints(ptr);
+}
+
+schedule_constraints::schedule_constraints()
+    : ptr(nullptr) {}
+
+schedule_constraints::schedule_constraints(const schedule_constraints &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+schedule_constraints::schedule_constraints(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
+    : ptr(ptr) {}
+
+schedule_constraints::schedule_constraints(ctx ctx, const std::string &str)
+{
+  auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_constraints::~schedule_constraints() {
+  if (ptr)
+    isl_schedule_constraints_free(ptr);
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
+  return isl_schedule_constraints_copy(ptr);
+}
+
+__isl_keep isl_schedule_constraints *schedule_constraints::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_constraints *schedule_constraints::release() {
+  isl_schedule_constraints *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_constraints::is_null() const {
+  return ptr == nullptr;
+}
+schedule_constraints::operator bool() const {
+  return !is_null();
+}
+
+
+ctx schedule_constraints::get_ctx() const {
+  return ctx(isl_schedule_constraints_get_ctx(ptr));
+}
+std::string schedule_constraints::to_str() const {
+  char *Tmp = isl_schedule_constraints_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void schedule_constraints::dump() const {
+  isl_schedule_constraints_dump(get());
+}
+
+
+schedule_constraints schedule_constraints::apply(union_map umap) const
+{
+  auto res = isl_schedule_constraints_apply(copy(), umap.release());
+  return manage(res);
+}
+
+schedule schedule_constraints::compute_schedule() const
+{
+  auto res = isl_schedule_constraints_compute_schedule(copy());
+  return manage(res);
+}
+
+union_map schedule_constraints::get_coincidence() const
+{
+  auto res = isl_schedule_constraints_get_coincidence(get());
+  return manage(res);
+}
+
+union_map schedule_constraints::get_conditional_validity() const
+{
+  auto res = isl_schedule_constraints_get_conditional_validity(get());
+  return manage(res);
+}
+
+union_map schedule_constraints::get_conditional_validity_condition() const
+{
+  auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
+  return manage(res);
+}
+
+set schedule_constraints::get_context() const
+{
+  auto res = isl_schedule_constraints_get_context(get());
+  return manage(res);
+}
+
+union_set schedule_constraints::get_domain() const
+{
+  auto res = isl_schedule_constraints_get_domain(get());
+  return manage(res);
+}
+
+union_map schedule_constraints::get_proximity() const
+{
+  auto res = isl_schedule_constraints_get_proximity(get());
+  return manage(res);
+}
+
+union_map schedule_constraints::get_validity() const
+{
+  auto res = isl_schedule_constraints_get_validity(get());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::on_domain(union_set domain)
+{
+  auto res = isl_schedule_constraints_on_domain(domain.release());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::set_coincidence(union_map coincidence) const
+{
+  auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::set_conditional_validity(union_map condition, union_map validity) const
+{
+  auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::set_context(set context) const
+{
+  auto res = isl_schedule_constraints_set_context(copy(), context.release());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::set_proximity(union_map proximity) const
+{
+  auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
+  return manage(res);
+}
+
+schedule_constraints schedule_constraints::set_validity(union_map validity) const
+{
+  auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
+  return manage(res);
+}
+
+// implementations for isl::schedule_node
+schedule_node manage(__isl_take isl_schedule_node *ptr) {
+  return schedule_node(ptr);
+}
+schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
+  ptr = isl_schedule_node_copy(ptr);
+  return schedule_node(ptr);
+}
+
+schedule_node::schedule_node()
+    : ptr(nullptr) {}
+
+schedule_node::schedule_node(const schedule_node &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+schedule_node::schedule_node(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
+    : ptr(ptr) {}
+
+
+schedule_node &schedule_node::operator=(schedule_node obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+schedule_node::~schedule_node() {
+  if (ptr)
+    isl_schedule_node_free(ptr);
+}
+
+__isl_give isl_schedule_node *schedule_node::copy() const & {
+  return isl_schedule_node_copy(ptr);
+}
+
+__isl_keep isl_schedule_node *schedule_node::get() const {
+  return ptr;
+}
+
+__isl_give isl_schedule_node *schedule_node::release() {
+  isl_schedule_node *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool schedule_node::is_null() const {
+  return ptr == nullptr;
+}
+schedule_node::operator bool() const {
+  return !is_null();
+}
+
+
+ctx schedule_node::get_ctx() const {
+  return ctx(isl_schedule_node_get_ctx(ptr));
+}
+std::string schedule_node::to_str() const {
+  char *Tmp = isl_schedule_node_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void schedule_node::dump() const {
+  isl_schedule_node_dump(get());
+}
+
+
+schedule_node schedule_node::align_params(space space) const
+{
+  auto res = isl_schedule_node_align_params(copy(), space.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::ancestor(int generation) const
+{
+  auto res = isl_schedule_node_ancestor(copy(), generation);
+  return manage(res);
+}
+
+boolean schedule_node::band_member_get_coincident(int pos) const
+{
+  auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
+  return manage(res);
+}
+
+schedule_node schedule_node::band_member_set_coincident(int pos, int coincident) const
+{
+  auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
+  return manage(res);
+}
+
+schedule_node schedule_node::band_set_ast_build_options(union_set options) const
+{
+  auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::child(int pos) const
+{
+  auto res = isl_schedule_node_child(copy(), pos);
+  return manage(res);
+}
+
+set schedule_node::context_get_context() const
+{
+  auto res = isl_schedule_node_context_get_context(get());
+  return manage(res);
+}
+
+schedule_node schedule_node::cut() const
+{
+  auto res = isl_schedule_node_cut(copy());
+  return manage(res);
+}
+
+union_set schedule_node::domain_get_domain() const
+{
+  auto res = isl_schedule_node_domain_get_domain(get());
+  return manage(res);
+}
+
+union_pw_multi_aff schedule_node::expansion_get_contraction() const
+{
+  auto res = isl_schedule_node_expansion_get_contraction(get());
+  return manage(res);
+}
+
+union_map schedule_node::expansion_get_expansion() const
+{
+  auto res = isl_schedule_node_expansion_get_expansion(get());
+  return manage(res);
+}
+
+union_map schedule_node::extension_get_extension() const
+{
+  auto res = isl_schedule_node_extension_get_extension(get());
+  return manage(res);
+}
+
+union_set schedule_node::filter_get_filter() const
+{
+  auto res = isl_schedule_node_filter_get_filter(get());
+  return manage(res);
+}
+
+schedule_node schedule_node::first_child() const
+{
+  auto res = isl_schedule_node_first_child(copy());
+  return manage(res);
+}
+
+stat schedule_node::foreach_ancestor_top_down(const std::function<stat(schedule_node)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(schedule_node)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage_copy(arg_0));
+    return ret.release();
+  };
+  auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+schedule_node schedule_node::from_domain(union_set domain)
+{
+  auto res = isl_schedule_node_from_domain(domain.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::from_extension(union_map extension)
+{
+  auto res = isl_schedule_node_from_extension(extension.release());
+  return manage(res);
+}
+
+int schedule_node::get_ancestor_child_position(const schedule_node &ancestor) const
+{
+  auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
+  return res;
+}
+
+schedule_node schedule_node::get_child(int pos) const
+{
+  auto res = isl_schedule_node_get_child(get(), pos);
+  return manage(res);
+}
+
+int schedule_node::get_child_position() const
+{
+  auto res = isl_schedule_node_get_child_position(get());
+  return res;
+}
+
+union_set schedule_node::get_domain() const
+{
+  auto res = isl_schedule_node_get_domain(get());
+  return manage(res);
+}
+
+multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
+  return manage(res);
+}
+
+union_map schedule_node::get_prefix_schedule_relation() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_relation(get());
+  return manage(res);
+}
+
+union_map schedule_node::get_prefix_schedule_union_map() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
+  return manage(res);
+}
+
+union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
+{
+  auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
+  return manage(res);
+}
+
+schedule schedule_node::get_schedule() const
+{
+  auto res = isl_schedule_node_get_schedule(get());
+  return manage(res);
+}
+
+int schedule_node::get_schedule_depth() const
+{
+  auto res = isl_schedule_node_get_schedule_depth(get());
+  return res;
+}
+
+schedule_node schedule_node::get_shared_ancestor(const schedule_node &node2) const
+{
+  auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
+  return manage(res);
+}
+
+union_pw_multi_aff schedule_node::get_subtree_contraction() const
+{
+  auto res = isl_schedule_node_get_subtree_contraction(get());
+  return manage(res);
+}
+
+union_map schedule_node::get_subtree_expansion() const
+{
+  auto res = isl_schedule_node_get_subtree_expansion(get());
+  return manage(res);
+}
+
+union_map schedule_node::get_subtree_schedule_union_map() const
+{
+  auto res = isl_schedule_node_get_subtree_schedule_union_map(get());
+  return manage(res);
+}
+
+int schedule_node::get_tree_depth() const
+{
+  auto res = isl_schedule_node_get_tree_depth(get());
+  return res;
+}
+
+union_set schedule_node::get_universe_domain() const
+{
+  auto res = isl_schedule_node_get_universe_domain(get());
+  return manage(res);
+}
+
+schedule_node schedule_node::graft_after(schedule_node graft) const
+{
+  auto res = isl_schedule_node_graft_after(copy(), graft.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::graft_before(schedule_node graft) const
+{
+  auto res = isl_schedule_node_graft_before(copy(), graft.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::group(id group_id) const
+{
+  auto res = isl_schedule_node_group(copy(), group_id.release());
+  return manage(res);
+}
+
+set schedule_node::guard_get_guard() const
+{
+  auto res = isl_schedule_node_guard_get_guard(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_children() const
+{
+  auto res = isl_schedule_node_has_children(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_next_sibling() const
+{
+  auto res = isl_schedule_node_has_next_sibling(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_parent() const
+{
+  auto res = isl_schedule_node_has_parent(get());
+  return manage(res);
+}
+
+boolean schedule_node::has_previous_sibling() const
+{
+  auto res = isl_schedule_node_has_previous_sibling(get());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_context(set context) const
+{
+  auto res = isl_schedule_node_insert_context(copy(), context.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_filter(union_set filter) const
+{
+  auto res = isl_schedule_node_insert_filter(copy(), filter.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_guard(set context) const
+{
+  auto res = isl_schedule_node_insert_guard(copy(), context.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_mark(id mark) const
+{
+  auto res = isl_schedule_node_insert_mark(copy(), mark.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_partial_schedule(multi_union_pw_aff schedule) const
+{
+  auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_sequence(union_set_list filters) const
+{
+  auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::insert_set(union_set_list filters) const
+{
+  auto res = isl_schedule_node_insert_set(copy(), filters.release());
+  return manage(res);
+}
+
+boolean schedule_node::is_equal(const schedule_node &node2) const
+{
+  auto res = isl_schedule_node_is_equal(get(), node2.get());
+  return manage(res);
+}
+
+boolean schedule_node::is_subtree_anchored() const
+{
+  auto res = isl_schedule_node_is_subtree_anchored(get());
+  return manage(res);
+}
+
+id schedule_node::mark_get_id() const
+{
+  auto res = isl_schedule_node_mark_get_id(get());
+  return manage(res);
+}
+
+int schedule_node::n_children() const
+{
+  auto res = isl_schedule_node_n_children(get());
+  return res;
+}
+
+schedule_node schedule_node::next_sibling() const
+{
+  auto res = isl_schedule_node_next_sibling(copy());
+  return manage(res);
+}
+
+schedule_node schedule_node::order_after(union_set filter) const
+{
+  auto res = isl_schedule_node_order_after(copy(), filter.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::order_before(union_set filter) const
+{
+  auto res = isl_schedule_node_order_before(copy(), filter.release());
+  return manage(res);
+}
+
+schedule_node schedule_node::parent() const
+{
+  auto res = isl_schedule_node_parent(copy());
+  return manage(res);
+}
+
+schedule_node schedule_node::previous_sibling() const
+{
+  auto res = isl_schedule_node_previous_sibling(copy());
+  return manage(res);
+}
+
+schedule_node schedule_node::reset_user() const
+{
+  auto res = isl_schedule_node_reset_user(copy());
+  return manage(res);
+}
+
+schedule_node schedule_node::root() const
+{
+  auto res = isl_schedule_node_root(copy());
+  return manage(res);
+}
+
+schedule_node schedule_node::sequence_splice_child(int pos) const
+{
+  auto res = isl_schedule_node_sequence_splice_child(copy(), pos);
+  return manage(res);
+}
+
+// implementations for isl::set
+set manage(__isl_take isl_set *ptr) {
+  return set(ptr);
+}
+set manage_copy(__isl_keep isl_set *ptr) {
+  ptr = isl_set_copy(ptr);
+  return set(ptr);
+}
+
+set::set()
+    : ptr(nullptr) {}
+
+set::set(const set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+set::set(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+set::set(__isl_take isl_set *ptr)
+    : ptr(ptr) {}
+
+set::set(ctx ctx, const std::string &str)
+{
+  auto res = isl_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+set::set(basic_set bset)
+{
+  auto res = isl_set_from_basic_set(bset.release());
+  ptr = res;
+}
+set::set(point pnt)
+{
+  auto res = isl_set_from_point(pnt.release());
+  ptr = res;
+}
+set::set(union_set uset)
+{
+  auto res = isl_set_from_union_set(uset.release());
+  ptr = res;
+}
+
+set &set::operator=(set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+set::~set() {
+  if (ptr)
+    isl_set_free(ptr);
+}
+
+__isl_give isl_set *set::copy() const & {
+  return isl_set_copy(ptr);
+}
+
+__isl_keep isl_set *set::get() const {
+  return ptr;
+}
+
+__isl_give isl_set *set::release() {
+  isl_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool set::is_null() const {
+  return ptr == nullptr;
+}
+set::operator bool() const {
+  return !is_null();
+}
+
+
+ctx set::get_ctx() const {
+  return ctx(isl_set_get_ctx(ptr));
+}
+std::string set::to_str() const {
+  char *Tmp = isl_set_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void set::dump() const {
+  isl_set_dump(get());
+}
+
+
+set set::add_constraint(constraint constraint) const
+{
+  auto res = isl_set_add_constraint(copy(), constraint.release());
+  return manage(res);
+}
+
+set set::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_set_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+basic_set set::affine_hull() const
+{
+  auto res = isl_set_affine_hull(copy());
+  return manage(res);
+}
+
+set set::align_params(space model) const
+{
+  auto res = isl_set_align_params(copy(), model.release());
+  return manage(res);
+}
+
+set set::apply(map map) const
+{
+  auto res = isl_set_apply(copy(), map.release());
+  return manage(res);
+}
+
+basic_set set::bounded_simple_hull() const
+{
+  auto res = isl_set_bounded_simple_hull(copy());
+  return manage(res);
+}
+
+set set::box_from_points(point pnt1, point pnt2)
+{
+  auto res = isl_set_box_from_points(pnt1.release(), pnt2.release());
+  return manage(res);
+}
+
+set set::coalesce() const
+{
+  auto res = isl_set_coalesce(copy());
+  return manage(res);
+}
+
+basic_set set::coefficients() const
+{
+  auto res = isl_set_coefficients(copy());
+  return manage(res);
+}
+
+set set::complement() const
+{
+  auto res = isl_set_complement(copy());
+  return manage(res);
+}
+
+basic_set set::convex_hull() const
+{
+  auto res = isl_set_convex_hull(copy());
+  return manage(res);
+}
+
+val set::count_val() const
+{
+  auto res = isl_set_count_val(get());
+  return manage(res);
+}
+
+set set::detect_equalities() const
+{
+  auto res = isl_set_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int set::dim(isl::dim type) const
+{
+  auto res = isl_set_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+boolean set::dim_has_any_lower_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_dim_has_any_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::dim_has_any_upper_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_dim_has_any_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::dim_has_lower_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_dim_has_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::dim_has_upper_bound(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_dim_has_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::dim_is_bounded(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_dim_is_bounded(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+pw_aff set::dim_max(int pos) const
+{
+  auto res = isl_set_dim_max(copy(), pos);
+  return manage(res);
+}
+
+pw_aff set::dim_min(int pos) const
+{
+  auto res = isl_set_dim_min(copy(), pos);
+  return manage(res);
+}
+
+set set::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::drop_unused_params() const
+{
+  auto res = isl_set_drop_unused_params(copy());
+  return manage(res);
+}
+
+set set::eliminate(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::empty(space space)
+{
+  auto res = isl_set_empty(space.release());
+  return manage(res);
+}
+
+set set::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
+{
+  auto res = isl_set_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
+  return manage(res);
+}
+
+int set::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_set_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int set::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_set_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+set set::fix_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_set_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+set set::fix_val(isl::dim type, unsigned int pos, val v) const
+{
+  auto res = isl_set_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
+  return manage(res);
+}
+
+set set::flat_product(set set2) const
+{
+  auto res = isl_set_flat_product(copy(), set2.release());
+  return manage(res);
+}
+
+set set::flatten() const
+{
+  auto res = isl_set_flatten(copy());
+  return manage(res);
+}
+
+map set::flatten_map() const
+{
+  auto res = isl_set_flatten_map(copy());
+  return manage(res);
+}
+
+int set::follows_at(const set &set2, int pos) const
+{
+  auto res = isl_set_follows_at(get(), set2.get(), pos);
+  return res;
+}
+
+stat set::foreach_basic_set(const std::function<stat(basic_set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(basic_set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat set::foreach_point(const std::function<stat(point)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(point)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+set set::from_multi_aff(multi_aff ma)
+{
+  auto res = isl_set_from_multi_aff(ma.release());
+  return manage(res);
+}
+
+set set::from_multi_pw_aff(multi_pw_aff mpa)
+{
+  auto res = isl_set_from_multi_pw_aff(mpa.release());
+  return manage(res);
+}
+
+set set::from_params() const
+{
+  auto res = isl_set_from_params(copy());
+  return manage(res);
+}
+
+set set::from_pw_aff(pw_aff pwaff)
+{
+  auto res = isl_set_from_pw_aff(pwaff.release());
+  return manage(res);
+}
+
+set set::from_pw_multi_aff(pw_multi_aff pma)
+{
+  auto res = isl_set_from_pw_multi_aff(pma.release());
+  return manage(res);
+}
+
+basic_set_list set::get_basic_set_list() const
+{
+  auto res = isl_set_get_basic_set_list(get());
+  return manage(res);
+}
+
+id set::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string set::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+space set::get_space() const
+{
+  auto res = isl_set_get_space(get());
+  return manage(res);
+}
+
+val set::get_stride(int pos) const
+{
+  auto res = isl_set_get_stride(get(), pos);
+  return manage(res);
+}
+
+id set::get_tuple_id() const
+{
+  auto res = isl_set_get_tuple_id(get());
+  return manage(res);
+}
+
+std::string set::get_tuple_name() const
+{
+  auto res = isl_set_get_tuple_name(get());
+  std::string tmp(res);
+  return tmp;
+}
+
+set set::gist(set context) const
+{
+  auto res = isl_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+set set::gist_basic_set(basic_set context) const
+{
+  auto res = isl_set_gist_basic_set(copy(), context.release());
+  return manage(res);
+}
+
+set set::gist_params(set context) const
+{
+  auto res = isl_set_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+boolean set::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::has_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::has_equal_space(const set &set2) const
+{
+  auto res = isl_set_has_equal_space(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::has_tuple_id() const
+{
+  auto res = isl_set_has_tuple_id(get());
+  return manage(res);
+}
+
+boolean set::has_tuple_name() const
+{
+  auto res = isl_set_has_tuple_name(get());
+  return manage(res);
+}
+
+map set::identity() const
+{
+  auto res = isl_set_identity(copy());
+  return manage(res);
+}
+
+pw_aff set::indicator_function() const
+{
+  auto res = isl_set_indicator_function(copy());
+  return manage(res);
+}
+
+set set::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
+{
+  auto res = isl_set_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
+  return manage(res);
+}
+
+set set::intersect(set set2) const
+{
+  auto res = isl_set_intersect(copy(), set2.release());
+  return manage(res);
+}
+
+set set::intersect_params(set params) const
+{
+  auto res = isl_set_intersect_params(copy(), params.release());
+  return manage(res);
+}
+
+boolean set::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean set::is_bounded() const
+{
+  auto res = isl_set_is_bounded(get());
+  return manage(res);
+}
+
+boolean set::is_box() const
+{
+  auto res = isl_set_is_box(get());
+  return manage(res);
+}
+
+boolean set::is_disjoint(const set &set2) const
+{
+  auto res = isl_set_is_disjoint(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_empty() const
+{
+  auto res = isl_set_is_empty(get());
+  return manage(res);
+}
+
+boolean set::is_equal(const set &set2) const
+{
+  auto res = isl_set_is_equal(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_params() const
+{
+  auto res = isl_set_is_params(get());
+  return manage(res);
+}
+
+boolean set::is_singleton() const
+{
+  auto res = isl_set_is_singleton(get());
+  return manage(res);
+}
+
+boolean set::is_strict_subset(const set &set2) const
+{
+  auto res = isl_set_is_strict_subset(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_subset(const set &set2) const
+{
+  auto res = isl_set_is_subset(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::is_wrapping() const
+{
+  auto res = isl_set_is_wrapping(get());
+  return manage(res);
+}
+
+map set::lex_ge_set(set set2) const
+{
+  auto res = isl_set_lex_ge_set(copy(), set2.release());
+  return manage(res);
+}
+
+map set::lex_gt_set(set set2) const
+{
+  auto res = isl_set_lex_gt_set(copy(), set2.release());
+  return manage(res);
+}
+
+map set::lex_le_set(set set2) const
+{
+  auto res = isl_set_lex_le_set(copy(), set2.release());
+  return manage(res);
+}
+
+map set::lex_lt_set(set set2) const
+{
+  auto res = isl_set_lex_lt_set(copy(), set2.release());
+  return manage(res);
+}
+
+set set::lexmax() const
+{
+  auto res = isl_set_lexmax(copy());
+  return manage(res);
+}
+
+pw_multi_aff set::lexmax_pw_multi_aff() const
+{
+  auto res = isl_set_lexmax_pw_multi_aff(copy());
+  return manage(res);
+}
+
+set set::lexmin() const
+{
+  auto res = isl_set_lexmin(copy());
+  return manage(res);
+}
+
+pw_multi_aff set::lexmin_pw_multi_aff() const
+{
+  auto res = isl_set_lexmin_pw_multi_aff(copy());
+  return manage(res);
+}
+
+set set::lower_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_set_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+set set::lower_bound_val(isl::dim type, unsigned int pos, val value) const
+{
+  auto res = isl_set_lower_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
+  return manage(res);
+}
+
+val set::max_val(const aff &obj) const
+{
+  auto res = isl_set_max_val(get(), obj.get());
+  return manage(res);
+}
+
+val set::min_val(const aff &obj) const
+{
+  auto res = isl_set_min_val(get(), obj.get());
+  return manage(res);
+}
+
+set set::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_set_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+int set::n_basic_set() const
+{
+  auto res = isl_set_n_basic_set(get());
+  return res;
+}
+
+unsigned int set::n_dim() const
+{
+  auto res = isl_set_n_dim(get());
+  return res;
+}
+
+set set::nat_universe(space dim)
+{
+  auto res = isl_set_nat_universe(dim.release());
+  return manage(res);
+}
+
+set set::neg() const
+{
+  auto res = isl_set_neg(copy());
+  return manage(res);
+}
+
+set set::params() const
+{
+  auto res = isl_set_params(copy());
+  return manage(res);
+}
+
+int set::plain_cmp(const set &set2) const
+{
+  auto res = isl_set_plain_cmp(get(), set2.get());
+  return res;
+}
+
+val set::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_set_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean set::plain_is_disjoint(const set &set2) const
+{
+  auto res = isl_set_plain_is_disjoint(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::plain_is_empty() const
+{
+  auto res = isl_set_plain_is_empty(get());
+  return manage(res);
+}
+
+boolean set::plain_is_equal(const set &set2) const
+{
+  auto res = isl_set_plain_is_equal(get(), set2.get());
+  return manage(res);
+}
+
+boolean set::plain_is_universe() const
+{
+  auto res = isl_set_plain_is_universe(get());
+  return manage(res);
+}
+
+basic_set set::plain_unshifted_simple_hull() const
+{
+  auto res = isl_set_plain_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+basic_set set::polyhedral_hull() const
+{
+  auto res = isl_set_polyhedral_hull(copy());
+  return manage(res);
+}
+
+set set::preimage_multi_aff(multi_aff ma) const
+{
+  auto res = isl_set_preimage_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+set set::preimage_multi_pw_aff(multi_pw_aff mpa) const
+{
+  auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+set set::preimage_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+set set::product(set set2) const
+{
+  auto res = isl_set_product(copy(), set2.release());
+  return manage(res);
+}
+
+map set::project_onto_map(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_project_onto_map(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::remove_divs() const
+{
+  auto res = isl_set_remove_divs(copy());
+  return manage(res);
+}
+
+set set::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::remove_redundancies() const
+{
+  auto res = isl_set_remove_redundancies(copy());
+  return manage(res);
+}
+
+set set::remove_unknown_divs() const
+{
+  auto res = isl_set_remove_unknown_divs(copy());
+  return manage(res);
+}
+
+set set::reset_space(space dim) const
+{
+  auto res = isl_set_reset_space(copy(), dim.release());
+  return manage(res);
+}
+
+set set::reset_tuple_id() const
+{
+  auto res = isl_set_reset_tuple_id(copy());
+  return manage(res);
+}
+
+set set::reset_user() const
+{
+  auto res = isl_set_reset_user(copy());
+  return manage(res);
+}
+
+basic_set set::sample() const
+{
+  auto res = isl_set_sample(copy());
+  return manage(res);
+}
+
+point set::sample_point() const
+{
+  auto res = isl_set_sample_point(copy());
+  return manage(res);
+}
+
+set set::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_set_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+set set::set_tuple_id(id id) const
+{
+  auto res = isl_set_set_tuple_id(copy(), id.release());
+  return manage(res);
+}
+
+set set::set_tuple_name(const std::string &s) const
+{
+  auto res = isl_set_set_tuple_name(copy(), s.c_str());
+  return manage(res);
+}
+
+basic_set set::simple_hull() const
+{
+  auto res = isl_set_simple_hull(copy());
+  return manage(res);
+}
+
+int set::size() const
+{
+  auto res = isl_set_size(get());
+  return res;
+}
+
+basic_set set::solutions() const
+{
+  auto res = isl_set_solutions(copy());
+  return manage(res);
+}
+
+set set::split_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_split_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+set set::subtract(set set2) const
+{
+  auto res = isl_set_subtract(copy(), set2.release());
+  return manage(res);
+}
+
+set set::sum(set set2) const
+{
+  auto res = isl_set_sum(copy(), set2.release());
+  return manage(res);
+}
+
+set set::unite(set set2) const
+{
+  auto res = isl_set_union(copy(), set2.release());
+  return manage(res);
+}
+
+set set::universe(space space)
+{
+  auto res = isl_set_universe(space.release());
+  return manage(res);
+}
+
+basic_set set::unshifted_simple_hull() const
+{
+  auto res = isl_set_unshifted_simple_hull(copy());
+  return manage(res);
+}
+
+basic_set set::unshifted_simple_hull_from_set_list(set_list list) const
+{
+  auto res = isl_set_unshifted_simple_hull_from_set_list(copy(), list.release());
+  return manage(res);
+}
+
+map set::unwrap() const
+{
+  auto res = isl_set_unwrap(copy());
+  return manage(res);
+}
+
+set set::upper_bound_si(isl::dim type, unsigned int pos, int value) const
+{
+  auto res = isl_set_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
+  return manage(res);
+}
+
+set set::upper_bound_val(isl::dim type, unsigned int pos, val value) const
+{
+  auto res = isl_set_upper_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
+  return manage(res);
+}
+
+map set::wrapped_domain_map() const
+{
+  auto res = isl_set_wrapped_domain_map(copy());
+  return manage(res);
+}
+
+// implementations for isl::set_list
+set_list manage(__isl_take isl_set_list *ptr) {
+  return set_list(ptr);
+}
+set_list manage_copy(__isl_keep isl_set_list *ptr) {
+  ptr = isl_set_list_copy(ptr);
+  return set_list(ptr);
+}
+
+set_list::set_list()
+    : ptr(nullptr) {}
+
+set_list::set_list(const set_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+set_list::set_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+set_list::set_list(__isl_take isl_set_list *ptr)
+    : ptr(ptr) {}
+
+
+set_list &set_list::operator=(set_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+set_list::~set_list() {
+  if (ptr)
+    isl_set_list_free(ptr);
+}
+
+__isl_give isl_set_list *set_list::copy() const & {
+  return isl_set_list_copy(ptr);
+}
+
+__isl_keep isl_set_list *set_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_set_list *set_list::release() {
+  isl_set_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool set_list::is_null() const {
+  return ptr == nullptr;
+}
+set_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx set_list::get_ctx() const {
+  return ctx(isl_set_list_get_ctx(ptr));
+}
+
+void set_list::dump() const {
+  isl_set_list_dump(get());
+}
+
+
+set_list set_list::add(set el) const
+{
+  auto res = isl_set_list_add(copy(), el.release());
+  return manage(res);
+}
+
+set_list set_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_set_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+set_list set_list::concat(set_list list2) const
+{
+  auto res = isl_set_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+set_list set_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_set_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat set_list::foreach(const std::function<stat(set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_set_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+set_list set_list::from_set(set el)
+{
+  auto res = isl_set_list_from_set(el.release());
+  return manage(res);
+}
+
+set set_list::get_at(int index) const
+{
+  auto res = isl_set_list_get_at(get(), index);
+  return manage(res);
+}
+
+set set_list::get_set(int index) const
+{
+  auto res = isl_set_list_get_set(get(), index);
+  return manage(res);
+}
+
+set_list set_list::insert(unsigned int pos, set el) const
+{
+  auto res = isl_set_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int set_list::n_set() const
+{
+  auto res = isl_set_list_n_set(get());
+  return res;
+}
+
+set_list set_list::reverse() const
+{
+  auto res = isl_set_list_reverse(copy());
+  return manage(res);
+}
+
+set_list set_list::set_set(int index, set el) const
+{
+  auto res = isl_set_list_set_set(copy(), index, el.release());
+  return manage(res);
+}
+
+int set_list::size() const
+{
+  auto res = isl_set_list_size(get());
+  return res;
+}
+
+set_list set_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_set_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+set set_list::unite() const
+{
+  auto res = isl_set_list_union(copy());
+  return manage(res);
+}
+
+// implementations for isl::space
+space manage(__isl_take isl_space *ptr) {
+  return space(ptr);
+}
+space manage_copy(__isl_keep isl_space *ptr) {
+  ptr = isl_space_copy(ptr);
+  return space(ptr);
+}
+
+space::space()
+    : ptr(nullptr) {}
+
+space::space(const space &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+space::space(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+space::space(__isl_take isl_space *ptr)
+    : ptr(ptr) {}
+
+space::space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out)
+{
+  auto res = isl_space_alloc(ctx.release(), nparam, n_in, n_out);
+  ptr = res;
+}
+space::space(ctx ctx, unsigned int nparam, unsigned int dim)
+{
+  auto res = isl_space_set_alloc(ctx.release(), nparam, dim);
+  ptr = res;
+}
+
+space &space::operator=(space obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+space::~space() {
+  if (ptr)
+    isl_space_free(ptr);
+}
+
+__isl_give isl_space *space::copy() const & {
+  return isl_space_copy(ptr);
+}
+
+__isl_keep isl_space *space::get() const {
+  return ptr;
+}
+
+__isl_give isl_space *space::release() {
+  isl_space *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool space::is_null() const {
+  return ptr == nullptr;
+}
+space::operator bool() const {
+  return !is_null();
+}
+
+
+ctx space::get_ctx() const {
+  return ctx(isl_space_get_ctx(ptr));
+}
+std::string space::to_str() const {
+  char *Tmp = isl_space_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void space::dump() const {
+  isl_space_dump(get());
+}
+
+
+space space::add_dims(isl::dim type, unsigned int n) const
+{
+  auto res = isl_space_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
+  return manage(res);
+}
+
+space space::add_param_id(id id) const
+{
+  auto res = isl_space_add_param_id(copy(), id.release());
+  return manage(res);
+}
+
+space space::align_params(space dim2) const
+{
+  auto res = isl_space_align_params(copy(), dim2.release());
+  return manage(res);
+}
+
+boolean space::can_curry() const
+{
+  auto res = isl_space_can_curry(get());
+  return manage(res);
+}
+
+boolean space::can_range_curry() const
+{
+  auto res = isl_space_can_range_curry(get());
+  return manage(res);
+}
+
+boolean space::can_uncurry() const
+{
+  auto res = isl_space_can_uncurry(get());
+  return manage(res);
+}
+
+boolean space::can_zip() const
+{
+  auto res = isl_space_can_zip(get());
+  return manage(res);
+}
+
+space space::curry() const
+{
+  auto res = isl_space_curry(copy());
+  return manage(res);
+}
+
+unsigned int space::dim(isl::dim type) const
+{
+  auto res = isl_space_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+space space::domain() const
+{
+  auto res = isl_space_domain(copy());
+  return manage(res);
+}
+
+space space::domain_factor_domain() const
+{
+  auto res = isl_space_domain_factor_domain(copy());
+  return manage(res);
+}
+
+space space::domain_factor_range() const
+{
+  auto res = isl_space_domain_factor_range(copy());
+  return manage(res);
+}
+
+boolean space::domain_is_wrapping() const
+{
+  auto res = isl_space_domain_is_wrapping(get());
+  return manage(res);
+}
+
+space space::domain_map() const
+{
+  auto res = isl_space_domain_map(copy());
+  return manage(res);
+}
+
+space space::domain_product(space right) const
+{
+  auto res = isl_space_domain_product(copy(), right.release());
+  return manage(res);
+}
+
+space space::drop_dims(isl::dim type, unsigned int first, unsigned int num) const
+{
+  auto res = isl_space_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, num);
+  return manage(res);
+}
+
+space space::factor_domain() const
+{
+  auto res = isl_space_factor_domain(copy());
+  return manage(res);
+}
+
+space space::factor_range() const
+{
+  auto res = isl_space_factor_range(copy());
+  return manage(res);
+}
+
+int space::find_dim_by_id(isl::dim type, const id &id) const
+{
+  auto res = isl_space_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
+  return res;
+}
+
+int space::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_space_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+space space::flatten_domain() const
+{
+  auto res = isl_space_flatten_domain(copy());
+  return manage(res);
+}
+
+space space::flatten_range() const
+{
+  auto res = isl_space_flatten_range(copy());
+  return manage(res);
+}
+
+space space::from_domain() const
+{
+  auto res = isl_space_from_domain(copy());
+  return manage(res);
+}
+
+space space::from_range() const
+{
+  auto res = isl_space_from_range(copy());
+  return manage(res);
+}
+
+id space::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_space_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+std::string space::get_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_space_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  std::string tmp(res);
+  return tmp;
+}
+
+id space::get_tuple_id(isl::dim type) const
+{
+  auto res = isl_space_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+std::string space::get_tuple_name(isl::dim type) const
+{
+  auto res = isl_space_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  std::string tmp(res);
+  return tmp;
+}
+
+boolean space::has_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_space_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean space::has_dim_name(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_space_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+boolean space::has_equal_params(const space &space2) const
+{
+  auto res = isl_space_has_equal_params(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::has_equal_tuples(const space &space2) const
+{
+  auto res = isl_space_has_equal_tuples(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::has_tuple_id(isl::dim type) const
+{
+  auto res = isl_space_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+boolean space::has_tuple_name(isl::dim type) const
+{
+  auto res = isl_space_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+space space::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
+{
+  auto res = isl_space_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
+  return manage(res);
+}
+
+boolean space::is_domain(const space &space2) const
+{
+  auto res = isl_space_is_domain(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::is_equal(const space &space2) const
+{
+  auto res = isl_space_is_equal(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::is_map() const
+{
+  auto res = isl_space_is_map(get());
+  return manage(res);
+}
+
+boolean space::is_params() const
+{
+  auto res = isl_space_is_params(get());
+  return manage(res);
+}
+
+boolean space::is_product() const
+{
+  auto res = isl_space_is_product(get());
+  return manage(res);
+}
+
+boolean space::is_range(const space &space2) const
+{
+  auto res = isl_space_is_range(get(), space2.get());
+  return manage(res);
+}
+
+boolean space::is_set() const
+{
+  auto res = isl_space_is_set(get());
+  return manage(res);
+}
+
+boolean space::is_wrapping() const
+{
+  auto res = isl_space_is_wrapping(get());
+  return manage(res);
+}
+
+space space::join(space right) const
+{
+  auto res = isl_space_join(copy(), right.release());
+  return manage(res);
+}
+
+space space::map_from_domain_and_range(space range) const
+{
+  auto res = isl_space_map_from_domain_and_range(copy(), range.release());
+  return manage(res);
+}
+
+space space::map_from_set() const
+{
+  auto res = isl_space_map_from_set(copy());
+  return manage(res);
+}
+
+space space::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
+{
+  auto res = isl_space_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
+  return manage(res);
+}
+
+space space::params() const
+{
+  auto res = isl_space_params(copy());
+  return manage(res);
+}
+
+space space::params_alloc(ctx ctx, unsigned int nparam)
+{
+  auto res = isl_space_params_alloc(ctx.release(), nparam);
+  return manage(res);
+}
+
+space space::product(space right) const
+{
+  auto res = isl_space_product(copy(), right.release());
+  return manage(res);
+}
+
+space space::range() const
+{
+  auto res = isl_space_range(copy());
+  return manage(res);
+}
+
+space space::range_curry() const
+{
+  auto res = isl_space_range_curry(copy());
+  return manage(res);
+}
+
+space space::range_factor_domain() const
+{
+  auto res = isl_space_range_factor_domain(copy());
+  return manage(res);
+}
+
+space space::range_factor_range() const
+{
+  auto res = isl_space_range_factor_range(copy());
+  return manage(res);
+}
+
+boolean space::range_is_wrapping() const
+{
+  auto res = isl_space_range_is_wrapping(get());
+  return manage(res);
+}
+
+space space::range_map() const
+{
+  auto res = isl_space_range_map(copy());
+  return manage(res);
+}
+
+space space::range_product(space right) const
+{
+  auto res = isl_space_range_product(copy(), right.release());
+  return manage(res);
+}
+
+space space::reset_tuple_id(isl::dim type) const
+{
+  auto res = isl_space_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
+  return manage(res);
+}
+
+space space::reset_user() const
+{
+  auto res = isl_space_reset_user(copy());
+  return manage(res);
+}
+
+space space::reverse() const
+{
+  auto res = isl_space_reverse(copy());
+  return manage(res);
+}
+
+space space::set_dim_id(isl::dim type, unsigned int pos, id id) const
+{
+  auto res = isl_space_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
+  return manage(res);
+}
+
+space space::set_from_params() const
+{
+  auto res = isl_space_set_from_params(copy());
+  return manage(res);
+}
+
+space space::set_tuple_id(isl::dim type, id id) const
+{
+  auto res = isl_space_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
+  return manage(res);
+}
+
+space space::set_tuple_name(isl::dim type, const std::string &s) const
+{
+  auto res = isl_space_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
+  return manage(res);
+}
+
+boolean space::tuple_is_equal(isl::dim type1, const space &space2, isl::dim type2) const
+{
+  auto res = isl_space_tuple_is_equal(get(), static_cast<enum isl_dim_type>(type1), space2.get(), static_cast<enum isl_dim_type>(type2));
+  return manage(res);
+}
+
+space space::uncurry() const
+{
+  auto res = isl_space_uncurry(copy());
+  return manage(res);
+}
+
+space space::unwrap() const
+{
+  auto res = isl_space_unwrap(copy());
+  return manage(res);
+}
+
+space space::wrap() const
+{
+  auto res = isl_space_wrap(copy());
+  return manage(res);
+}
+
+space space::zip() const
+{
+  auto res = isl_space_zip(copy());
+  return manage(res);
+}
+
+// implementations for isl::term
+term manage(__isl_take isl_term *ptr) {
+  return term(ptr);
+}
+term manage_copy(__isl_keep isl_term *ptr) {
+  ptr = isl_term_copy(ptr);
+  return term(ptr);
+}
+
+term::term()
+    : ptr(nullptr) {}
+
+term::term(const term &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+term::term(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+term::term(__isl_take isl_term *ptr)
+    : ptr(ptr) {}
+
+
+term &term::operator=(term obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+term::~term() {
+  if (ptr)
+    isl_term_free(ptr);
+}
+
+__isl_give isl_term *term::copy() const & {
+  return isl_term_copy(ptr);
+}
+
+__isl_keep isl_term *term::get() const {
+  return ptr;
+}
+
+__isl_give isl_term *term::release() {
+  isl_term *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool term::is_null() const {
+  return ptr == nullptr;
+}
+term::operator bool() const {
+  return !is_null();
+}
+
+
+ctx term::get_ctx() const {
+  return ctx(isl_term_get_ctx(ptr));
+}
+
+
+unsigned int term::dim(isl::dim type) const
+{
+  auto res = isl_term_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+val term::get_coefficient_val() const
+{
+  auto res = isl_term_get_coefficient_val(get());
+  return manage(res);
+}
+
+aff term::get_div(unsigned int pos) const
+{
+  auto res = isl_term_get_div(get(), pos);
+  return manage(res);
+}
+
+int term::get_exp(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_term_get_exp(get(), static_cast<enum isl_dim_type>(type), pos);
+  return res;
+}
+
+// implementations for isl::union_access_info
+union_access_info manage(__isl_take isl_union_access_info *ptr) {
+  return union_access_info(ptr);
+}
+union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
+  ptr = isl_union_access_info_copy(ptr);
+  return union_access_info(ptr);
+}
+
+union_access_info::union_access_info()
+    : ptr(nullptr) {}
+
+union_access_info::union_access_info(const union_access_info &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_access_info::union_access_info(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
+    : ptr(ptr) {}
+
+union_access_info::union_access_info(union_map sink)
+{
+  auto res = isl_union_access_info_from_sink(sink.release());
+  ptr = res;
+}
+
+union_access_info &union_access_info::operator=(union_access_info obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_access_info::~union_access_info() {
+  if (ptr)
+    isl_union_access_info_free(ptr);
+}
+
+__isl_give isl_union_access_info *union_access_info::copy() const & {
+  return isl_union_access_info_copy(ptr);
+}
+
+__isl_keep isl_union_access_info *union_access_info::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_access_info *union_access_info::release() {
+  isl_union_access_info *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_access_info::is_null() const {
+  return ptr == nullptr;
+}
+union_access_info::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_access_info::get_ctx() const {
+  return ctx(isl_union_access_info_get_ctx(ptr));
+}
+std::string union_access_info::to_str() const {
+  char *Tmp = isl_union_access_info_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+
+union_flow union_access_info::compute_flow() const
+{
+  auto res = isl_union_access_info_compute_flow(copy());
+  return manage(res);
+}
+
+union_access_info union_access_info::set_kill(union_map kill) const
+{
+  auto res = isl_union_access_info_set_kill(copy(), kill.release());
+  return manage(res);
+}
+
+union_access_info union_access_info::set_may_source(union_map may_source) const
+{
+  auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
+  return manage(res);
+}
+
+union_access_info union_access_info::set_must_source(union_map must_source) const
+{
+  auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
+  return manage(res);
+}
+
+union_access_info union_access_info::set_schedule(schedule schedule) const
+{
+  auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
+  return manage(res);
+}
+
+union_access_info union_access_info::set_schedule_map(union_map schedule_map) const
+{
+  auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
+  return manage(res);
+}
+
+// implementations for isl::union_flow
+union_flow manage(__isl_take isl_union_flow *ptr) {
+  return union_flow(ptr);
+}
+union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
+  ptr = isl_union_flow_copy(ptr);
+  return union_flow(ptr);
+}
+
+union_flow::union_flow()
+    : ptr(nullptr) {}
+
+union_flow::union_flow(const union_flow &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_flow::union_flow(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_flow::union_flow(__isl_take isl_union_flow *ptr)
+    : ptr(ptr) {}
+
+
+union_flow &union_flow::operator=(union_flow obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_flow::~union_flow() {
+  if (ptr)
+    isl_union_flow_free(ptr);
+}
+
+__isl_give isl_union_flow *union_flow::copy() const & {
+  return isl_union_flow_copy(ptr);
+}
+
+__isl_keep isl_union_flow *union_flow::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_flow *union_flow::release() {
+  isl_union_flow *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_flow::is_null() const {
+  return ptr == nullptr;
+}
+union_flow::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_flow::get_ctx() const {
+  return ctx(isl_union_flow_get_ctx(ptr));
+}
+std::string union_flow::to_str() const {
+  char *Tmp = isl_union_flow_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+
+union_map union_flow::get_full_may_dependence() const
+{
+  auto res = isl_union_flow_get_full_may_dependence(get());
+  return manage(res);
+}
+
+union_map union_flow::get_full_must_dependence() const
+{
+  auto res = isl_union_flow_get_full_must_dependence(get());
+  return manage(res);
+}
+
+union_map union_flow::get_may_dependence() const
+{
+  auto res = isl_union_flow_get_may_dependence(get());
+  return manage(res);
+}
+
+union_map union_flow::get_may_no_source() const
+{
+  auto res = isl_union_flow_get_may_no_source(get());
+  return manage(res);
+}
+
+union_map union_flow::get_must_dependence() const
+{
+  auto res = isl_union_flow_get_must_dependence(get());
+  return manage(res);
+}
+
+union_map union_flow::get_must_no_source() const
+{
+  auto res = isl_union_flow_get_must_no_source(get());
+  return manage(res);
+}
+
+// implementations for isl::union_map
+union_map manage(__isl_take isl_union_map *ptr) {
+  return union_map(ptr);
+}
+union_map manage_copy(__isl_keep isl_union_map *ptr) {
+  ptr = isl_union_map_copy(ptr);
+  return union_map(ptr);
+}
+
+union_map::union_map()
+    : ptr(nullptr) {}
+
+union_map::union_map(const union_map &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_map::union_map(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_map::union_map(__isl_take isl_union_map *ptr)
+    : ptr(ptr) {}
+
+union_map::union_map(union_pw_multi_aff upma)
+{
+  auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
+  ptr = res;
+}
+union_map::union_map(basic_map bmap)
+{
+  auto res = isl_union_map_from_basic_map(bmap.release());
+  ptr = res;
+}
+union_map::union_map(map map)
+{
+  auto res = isl_union_map_from_map(map.release());
+  ptr = res;
+}
+union_map::union_map(ctx ctx, const std::string &str)
+{
+  auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_map &union_map::operator=(union_map obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_map::~union_map() {
+  if (ptr)
+    isl_union_map_free(ptr);
+}
+
+__isl_give isl_union_map *union_map::copy() const & {
+  return isl_union_map_copy(ptr);
+}
+
+__isl_keep isl_union_map *union_map::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_map *union_map::release() {
+  isl_union_map *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_map::is_null() const {
+  return ptr == nullptr;
+}
+union_map::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_map::get_ctx() const {
+  return ctx(isl_union_map_get_ctx(ptr));
+}
+std::string union_map::to_str() const {
+  char *Tmp = isl_union_map_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void union_map::dump() const {
+  isl_union_map_dump(get());
+}
+
+
+union_map union_map::add_map(map map) const
+{
+  auto res = isl_union_map_add_map(copy(), map.release());
+  return manage(res);
+}
+
+union_map union_map::affine_hull() const
+{
+  auto res = isl_union_map_affine_hull(copy());
+  return manage(res);
+}
+
+union_map union_map::align_params(space model) const
+{
+  auto res = isl_union_map_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_map union_map::apply_domain(union_map umap2) const
+{
+  auto res = isl_union_map_apply_domain(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::apply_range(union_map umap2) const
+{
+  auto res = isl_union_map_apply_range(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::coalesce() const
+{
+  auto res = isl_union_map_coalesce(copy());
+  return manage(res);
+}
+
+boolean union_map::contains(const space &space) const
+{
+  auto res = isl_union_map_contains(get(), space.get());
+  return manage(res);
+}
+
+union_map union_map::curry() const
+{
+  auto res = isl_union_map_curry(copy());
+  return manage(res);
+}
+
+union_set union_map::deltas() const
+{
+  auto res = isl_union_map_deltas(copy());
+  return manage(res);
+}
+
+union_map union_map::deltas_map() const
+{
+  auto res = isl_union_map_deltas_map(copy());
+  return manage(res);
+}
+
+union_map union_map::detect_equalities() const
+{
+  auto res = isl_union_map_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int union_map::dim(isl::dim type) const
+{
+  auto res = isl_union_map_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set union_map::domain() const
+{
+  auto res = isl_union_map_domain(copy());
+  return manage(res);
+}
+
+union_map union_map::domain_factor_domain() const
+{
+  auto res = isl_union_map_domain_factor_domain(copy());
+  return manage(res);
+}
+
+union_map union_map::domain_factor_range() const
+{
+  auto res = isl_union_map_domain_factor_range(copy());
+  return manage(res);
+}
+
+union_map union_map::domain_map() const
+{
+  auto res = isl_union_map_domain_map(copy());
+  return manage(res);
+}
+
+union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
+{
+  auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
+  return manage(res);
+}
+
+union_map union_map::domain_product(union_map umap2) const
+{
+  auto res = isl_union_map_domain_product(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::empty(space space)
+{
+  auto res = isl_union_map_empty(space.release());
+  return manage(res);
+}
+
+union_map union_map::eq_at(multi_union_pw_aff mupa) const
+{
+  auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
+  return manage(res);
+}
+
+map union_map::extract_map(space dim) const
+{
+  auto res = isl_union_map_extract_map(get(), dim.release());
+  return manage(res);
+}
+
+union_map union_map::factor_domain() const
+{
+  auto res = isl_union_map_factor_domain(copy());
+  return manage(res);
+}
+
+union_map union_map::factor_range() const
+{
+  auto res = isl_union_map_factor_range(copy());
+  return manage(res);
+}
+
+int union_map::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_union_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+union_map union_map::fixed_power(val exp) const
+{
+  auto res = isl_union_map_fixed_power_val(copy(), exp.release());
+  return manage(res);
+}
+
+union_map union_map::flat_domain_product(union_map umap2) const
+{
+  auto res = isl_union_map_flat_domain_product(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::flat_range_product(union_map umap2) const
+{
+  auto res = isl_union_map_flat_range_product(copy(), umap2.release());
+  return manage(res);
+}
+
+stat union_map::foreach_map(const std::function<stat(map)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(map)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_map union_map::from(multi_union_pw_aff mupa)
+{
+  auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
+  return manage(res);
+}
+
+union_map union_map::from_domain(union_set uset)
+{
+  auto res = isl_union_map_from_domain(uset.release());
+  return manage(res);
+}
+
+union_map union_map::from_domain_and_range(union_set domain, union_set range)
+{
+  auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
+  return manage(res);
+}
+
+union_map union_map::from_range(union_set uset)
+{
+  auto res = isl_union_map_from_range(uset.release());
+  return manage(res);
+}
+
+union_map union_map::from_union_pw_aff(union_pw_aff upa)
+{
+  auto res = isl_union_map_from_union_pw_aff(upa.release());
+  return manage(res);
+}
+
+id union_map::get_dim_id(isl::dim type, unsigned int pos) const
+{
+  auto res = isl_union_map_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
+  return manage(res);
+}
+
+uint32_t union_map::get_hash() const
+{
+  auto res = isl_union_map_get_hash(get());
+  return res;
+}
+
+map_list union_map::get_map_list() const
+{
+  auto res = isl_union_map_get_map_list(get());
+  return manage(res);
+}
+
+space union_map::get_space() const
+{
+  auto res = isl_union_map_get_space(get());
+  return manage(res);
+}
+
+union_map union_map::gist(union_map context) const
+{
+  auto res = isl_union_map_gist(copy(), context.release());
+  return manage(res);
+}
+
+union_map union_map::gist_domain(union_set uset) const
+{
+  auto res = isl_union_map_gist_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_map union_map::gist_params(set set) const
+{
+  auto res = isl_union_map_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+union_map union_map::gist_range(union_set uset) const
+{
+  auto res = isl_union_map_gist_range(copy(), uset.release());
+  return manage(res);
+}
+
+union_map union_map::intersect(union_map umap2) const
+{
+  auto res = isl_union_map_intersect(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::intersect_domain(union_set uset) const
+{
+  auto res = isl_union_map_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_map union_map::intersect_params(set set) const
+{
+  auto res = isl_union_map_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+union_map union_map::intersect_range(union_set uset) const
+{
+  auto res = isl_union_map_intersect_range(copy(), uset.release());
+  return manage(res);
+}
+
+union_map union_map::intersect_range_factor_range(union_map factor) const
+{
+  auto res = isl_union_map_intersect_range_factor_range(copy(), factor.release());
+  return manage(res);
+}
+
+boolean union_map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+boolean union_map::is_bijective() const
+{
+  auto res = isl_union_map_is_bijective(get());
+  return manage(res);
+}
+
+boolean union_map::is_disjoint(const union_map &umap2) const
+{
+  auto res = isl_union_map_is_disjoint(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_empty() const
+{
+  auto res = isl_union_map_is_empty(get());
+  return manage(res);
+}
+
+boolean union_map::is_equal(const union_map &umap2) const
+{
+  auto res = isl_union_map_is_equal(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_identity() const
+{
+  auto res = isl_union_map_is_identity(get());
+  return manage(res);
+}
+
+boolean union_map::is_injective() const
+{
+  auto res = isl_union_map_is_injective(get());
+  return manage(res);
+}
+
+boolean union_map::is_single_valued() const
+{
+  auto res = isl_union_map_is_single_valued(get());
+  return manage(res);
+}
+
+boolean union_map::is_strict_subset(const union_map &umap2) const
+{
+  auto res = isl_union_map_is_strict_subset(get(), umap2.get());
+  return manage(res);
+}
+
+boolean union_map::is_subset(const union_map &umap2) const
+{
+  auto res = isl_union_map_is_subset(get(), umap2.get());
+  return manage(res);
+}
+
+union_map union_map::lex_ge_union_map(union_map umap2) const
+{
+  auto res = isl_union_map_lex_ge_union_map(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::lex_gt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const
+{
+  auto res = isl_union_map_lex_gt_at_multi_union_pw_aff(copy(), mupa.release());
+  return manage(res);
+}
+
+union_map union_map::lex_gt_union_map(union_map umap2) const
+{
+  auto res = isl_union_map_lex_gt_union_map(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::lex_le_union_map(union_map umap2) const
+{
+  auto res = isl_union_map_lex_le_union_map(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::lex_lt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const
+{
+  auto res = isl_union_map_lex_lt_at_multi_union_pw_aff(copy(), mupa.release());
+  return manage(res);
+}
+
+union_map union_map::lex_lt_union_map(union_map umap2) const
+{
+  auto res = isl_union_map_lex_lt_union_map(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::lexmax() const
+{
+  auto res = isl_union_map_lexmax(copy());
+  return manage(res);
+}
+
+union_map union_map::lexmin() const
+{
+  auto res = isl_union_map_lexmin(copy());
+  return manage(res);
+}
+
+int union_map::n_map() const
+{
+  auto res = isl_union_map_n_map(get());
+  return res;
+}
+
+set union_map::params() const
+{
+  auto res = isl_union_map_params(copy());
+  return manage(res);
+}
+
+boolean union_map::plain_is_empty() const
+{
+  auto res = isl_union_map_plain_is_empty(get());
+  return manage(res);
+}
+
+boolean union_map::plain_is_injective() const
+{
+  auto res = isl_union_map_plain_is_injective(get());
+  return manage(res);
+}
+
+union_map union_map::polyhedral_hull() const
+{
+  auto res = isl_union_map_polyhedral_hull(copy());
+  return manage(res);
+}
+
+union_map union_map::preimage_domain_multi_aff(multi_aff ma) const
+{
+  auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_domain_multi_pw_aff(multi_pw_aff mpa) const
+{
+  auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_domain_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_domain_union_pw_multi_aff(union_pw_multi_aff upma) const
+{
+  auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_range_multi_aff(multi_aff ma) const
+{
+  auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_range_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+union_map union_map::preimage_range_union_pw_multi_aff(union_pw_multi_aff upma) const
+{
+  auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+union_map union_map::product(union_map umap2) const
+{
+  auto res = isl_union_map_product(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+union_map union_map::project_out_all_params() const
+{
+  auto res = isl_union_map_project_out_all_params(copy());
+  return manage(res);
+}
+
+union_set union_map::range() const
+{
+  auto res = isl_union_map_range(copy());
+  return manage(res);
+}
+
+union_map union_map::range_curry() const
+{
+  auto res = isl_union_map_range_curry(copy());
+  return manage(res);
+}
+
+union_map union_map::range_factor_domain() const
+{
+  auto res = isl_union_map_range_factor_domain(copy());
+  return manage(res);
+}
+
+union_map union_map::range_factor_range() const
+{
+  auto res = isl_union_map_range_factor_range(copy());
+  return manage(res);
+}
+
+union_map union_map::range_map() const
+{
+  auto res = isl_union_map_range_map(copy());
+  return manage(res);
+}
+
+union_map union_map::range_product(union_map umap2) const
+{
+  auto res = isl_union_map_range_product(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::remove_divs() const
+{
+  auto res = isl_union_map_remove_divs(copy());
+  return manage(res);
+}
+
+union_map union_map::remove_redundancies() const
+{
+  auto res = isl_union_map_remove_redundancies(copy());
+  return manage(res);
+}
+
+union_map union_map::reset_user() const
+{
+  auto res = isl_union_map_reset_user(copy());
+  return manage(res);
+}
+
+union_map union_map::reverse() const
+{
+  auto res = isl_union_map_reverse(copy());
+  return manage(res);
+}
+
+basic_map union_map::sample() const
+{
+  auto res = isl_union_map_sample(copy());
+  return manage(res);
+}
+
+union_map union_map::simple_hull() const
+{
+  auto res = isl_union_map_simple_hull(copy());
+  return manage(res);
+}
+
+union_map union_map::subtract(union_map umap2) const
+{
+  auto res = isl_union_map_subtract(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::subtract_domain(union_set dom) const
+{
+  auto res = isl_union_map_subtract_domain(copy(), dom.release());
+  return manage(res);
+}
+
+union_map union_map::subtract_range(union_set dom) const
+{
+  auto res = isl_union_map_subtract_range(copy(), dom.release());
+  return manage(res);
+}
+
+union_map union_map::uncurry() const
+{
+  auto res = isl_union_map_uncurry(copy());
+  return manage(res);
+}
+
+union_map union_map::unite(union_map umap2) const
+{
+  auto res = isl_union_map_union(copy(), umap2.release());
+  return manage(res);
+}
+
+union_map union_map::universe() const
+{
+  auto res = isl_union_map_universe(copy());
+  return manage(res);
+}
+
+union_set union_map::wrap() const
+{
+  auto res = isl_union_map_wrap(copy());
+  return manage(res);
+}
+
+union_map union_map::zip() const
+{
+  auto res = isl_union_map_zip(copy());
+  return manage(res);
+}
+
+// implementations for isl::union_map_list
+union_map_list manage(__isl_take isl_union_map_list *ptr) {
+  return union_map_list(ptr);
+}
+union_map_list manage_copy(__isl_keep isl_union_map_list *ptr) {
+  ptr = isl_union_map_list_copy(ptr);
+  return union_map_list(ptr);
+}
+
+union_map_list::union_map_list()
+    : ptr(nullptr) {}
+
+union_map_list::union_map_list(const union_map_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_map_list::union_map_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_map_list::union_map_list(__isl_take isl_union_map_list *ptr)
+    : ptr(ptr) {}
+
+
+union_map_list &union_map_list::operator=(union_map_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_map_list::~union_map_list() {
+  if (ptr)
+    isl_union_map_list_free(ptr);
+}
+
+__isl_give isl_union_map_list *union_map_list::copy() const & {
+  return isl_union_map_list_copy(ptr);
+}
+
+__isl_keep isl_union_map_list *union_map_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_map_list *union_map_list::release() {
+  isl_union_map_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_map_list::is_null() const {
+  return ptr == nullptr;
+}
+union_map_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_map_list::get_ctx() const {
+  return ctx(isl_union_map_list_get_ctx(ptr));
+}
+
+void union_map_list::dump() const {
+  isl_union_map_list_dump(get());
+}
+
+
+union_map_list union_map_list::add(union_map el) const
+{
+  auto res = isl_union_map_list_add(copy(), el.release());
+  return manage(res);
+}
+
+union_map_list union_map_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_union_map_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+union_map_list union_map_list::concat(union_map_list list2) const
+{
+  auto res = isl_union_map_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+union_map_list union_map_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_map_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_map_list::foreach(const std::function<stat(union_map)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(union_map)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_union_map *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_map_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_map_list union_map_list::from_union_map(union_map el)
+{
+  auto res = isl_union_map_list_from_union_map(el.release());
+  return manage(res);
+}
+
+union_map union_map_list::get_at(int index) const
+{
+  auto res = isl_union_map_list_get_at(get(), index);
+  return manage(res);
+}
+
+union_map union_map_list::get_union_map(int index) const
+{
+  auto res = isl_union_map_list_get_union_map(get(), index);
+  return manage(res);
+}
+
+union_map_list union_map_list::insert(unsigned int pos, union_map el) const
+{
+  auto res = isl_union_map_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int union_map_list::n_union_map() const
+{
+  auto res = isl_union_map_list_n_union_map(get());
+  return res;
+}
+
+union_map_list union_map_list::reverse() const
+{
+  auto res = isl_union_map_list_reverse(copy());
+  return manage(res);
+}
+
+union_map_list union_map_list::set_union_map(int index, union_map el) const
+{
+  auto res = isl_union_map_list_set_union_map(copy(), index, el.release());
+  return manage(res);
+}
+
+int union_map_list::size() const
+{
+  auto res = isl_union_map_list_size(get());
+  return res;
+}
+
+union_map_list union_map_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_union_map_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::union_pw_aff
+union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
+  return union_pw_aff(ptr);
+}
+union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
+  ptr = isl_union_pw_aff_copy(ptr);
+  return union_pw_aff(ptr);
+}
+
+union_pw_aff::union_pw_aff()
+    : ptr(nullptr) {}
+
+union_pw_aff::union_pw_aff(const union_pw_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_pw_aff::union_pw_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_aff::union_pw_aff(pw_aff pa)
+{
+  auto res = isl_union_pw_aff_from_pw_aff(pa.release());
+  ptr = res;
+}
+union_pw_aff::union_pw_aff(union_set domain, val v)
+{
+  auto res = isl_union_pw_aff_val_on_domain(domain.release(), v.release());
+  ptr = res;
+}
+union_pw_aff::union_pw_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff::~union_pw_aff() {
+  if (ptr)
+    isl_union_pw_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
+  return isl_union_pw_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff *union_pw_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff *union_pw_aff::release() {
+  isl_union_pw_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff::is_null() const {
+  return ptr == nullptr;
+}
+union_pw_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_pw_aff::get_ctx() const {
+  return ctx(isl_union_pw_aff_get_ctx(ptr));
+}
+std::string union_pw_aff::to_str() const {
+  char *Tmp = isl_union_pw_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void union_pw_aff::dump() const {
+  isl_union_pw_aff_dump(get());
+}
+
+
+union_pw_aff union_pw_aff::add(union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_add(copy(), upa2.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::add_pw_aff(pw_aff pa) const
+{
+  auto res = isl_union_pw_aff_add_pw_aff(copy(), pa.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::aff_on_domain(union_set domain, aff aff)
+{
+  auto res = isl_union_pw_aff_aff_on_domain(domain.release(), aff.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::align_params(space model) const
+{
+  auto res = isl_union_pw_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::coalesce() const
+{
+  auto res = isl_union_pw_aff_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int union_pw_aff::dim(isl::dim type) const
+{
+  auto res = isl_union_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set union_pw_aff::domain() const
+{
+  auto res = isl_union_pw_aff_domain(copy());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::empty(space space)
+{
+  auto res = isl_union_pw_aff_empty(space.release());
+  return manage(res);
+}
+
+pw_aff union_pw_aff::extract_pw_aff(space space) const
+{
+  auto res = isl_union_pw_aff_extract_pw_aff(get(), space.release());
+  return manage(res);
+}
+
+int union_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_union_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+union_pw_aff union_pw_aff::floor() const
+{
+  auto res = isl_union_pw_aff_floor(copy());
+  return manage(res);
+}
+
+stat union_pw_aff::foreach_pw_aff(const std::function<stat(pw_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_aff_foreach_pw_aff(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+pw_aff_list union_pw_aff::get_pw_aff_list() const
+{
+  auto res = isl_union_pw_aff_get_pw_aff_list(get());
+  return manage(res);
+}
+
+space union_pw_aff::get_space() const
+{
+  auto res = isl_union_pw_aff_get_space(get());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::gist(union_set context) const
+{
+  auto res = isl_union_pw_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::gist_params(set context) const
+{
+  auto res = isl_union_pw_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::intersect_domain(union_set uset) const
+{
+  auto res = isl_union_pw_aff_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::intersect_params(set set) const
+{
+  auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_pw_aff::involves_nan() const
+{
+  auto res = isl_union_pw_aff_involves_nan(get());
+  return manage(res);
+}
+
+val union_pw_aff::max_val() const
+{
+  auto res = isl_union_pw_aff_max_val(copy());
+  return manage(res);
+}
+
+val union_pw_aff::min_val() const
+{
+  auto res = isl_union_pw_aff_min_val(copy());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::mod_val(val f) const
+{
+  auto res = isl_union_pw_aff_mod_val(copy(), f.release());
+  return manage(res);
+}
+
+int union_pw_aff::n_pw_aff() const
+{
+  auto res = isl_union_pw_aff_n_pw_aff(get());
+  return res;
+}
+
+union_pw_aff union_pw_aff::neg() const
+{
+  auto res = isl_union_pw_aff_neg(copy());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::param_on_domain_id(union_set domain, id id)
+{
+  auto res = isl_union_pw_aff_param_on_domain_id(domain.release(), id.release());
+  return manage(res);
+}
+
+boolean union_pw_aff::plain_is_equal(const union_pw_aff &upa2) const
+{
+  auto res = isl_union_pw_aff_plain_is_equal(get(), upa2.get());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::pullback(union_pw_multi_aff upma) const
+{
+  auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::pw_aff_on_domain(union_set domain, pw_aff pa)
+{
+  auto res = isl_union_pw_aff_pw_aff_on_domain(domain.release(), pa.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::reset_user() const
+{
+  auto res = isl_union_pw_aff_reset_user(copy());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::scale_down_val(val v) const
+{
+  auto res = isl_union_pw_aff_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::scale_val(val v) const
+{
+  auto res = isl_union_pw_aff_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::sub(union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_sub(copy(), upa2.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::subtract_domain(union_set uset) const
+{
+  auto res = isl_union_pw_aff_subtract_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff::union_add(union_pw_aff upa2) const
+{
+  auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
+  return manage(res);
+}
+
+union_set union_pw_aff::zero_union_set() const
+{
+  auto res = isl_union_pw_aff_zero_union_set(copy());
+  return manage(res);
+}
+
+// implementations for isl::union_pw_aff_list
+union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
+  return union_pw_aff_list(ptr);
+}
+union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
+  ptr = isl_union_pw_aff_list_copy(ptr);
+  return union_pw_aff_list(ptr);
+}
+
+union_pw_aff_list::union_pw_aff_list()
+    : ptr(nullptr) {}
+
+union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_pw_aff_list::union_pw_aff_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
+    : ptr(ptr) {}
+
+
+union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_aff_list::~union_pw_aff_list() {
+  if (ptr)
+    isl_union_pw_aff_list_free(ptr);
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
+  return isl_union_pw_aff_list_copy(ptr);
+}
+
+__isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
+  isl_union_pw_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+union_pw_aff_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_pw_aff_list::get_ctx() const {
+  return ctx(isl_union_pw_aff_list_get_ctx(ptr));
+}
+
+void union_pw_aff_list::dump() const {
+  isl_union_pw_aff_list_dump(get());
+}
+
+
+union_pw_aff_list union_pw_aff_list::add(union_pw_aff el) const
+{
+  auto res = isl_union_pw_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::concat(union_pw_aff_list list2) const
+{
+  auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_pw_aff_list::foreach(const std::function<stat(union_pw_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(union_pw_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::from_union_pw_aff(union_pw_aff el)
+{
+  auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff_list::get_at(int index) const
+{
+  auto res = isl_union_pw_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+union_pw_aff union_pw_aff_list::get_union_pw_aff(int index) const
+{
+  auto res = isl_union_pw_aff_list_get_union_pw_aff(get(), index);
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, union_pw_aff el) const
+{
+  auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int union_pw_aff_list::n_union_pw_aff() const
+{
+  auto res = isl_union_pw_aff_list_n_union_pw_aff(get());
+  return res;
+}
+
+union_pw_aff_list union_pw_aff_list::reverse() const
+{
+  auto res = isl_union_pw_aff_list_reverse(copy());
+  return manage(res);
+}
+
+union_pw_aff_list union_pw_aff_list::set_union_pw_aff(int index, union_pw_aff el) const
+{
+  auto res = isl_union_pw_aff_list_set_union_pw_aff(copy(), index, el.release());
+  return manage(res);
+}
+
+int union_pw_aff_list::size() const
+{
+  auto res = isl_union_pw_aff_list_size(get());
+  return res;
+}
+
+union_pw_aff_list union_pw_aff_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_union_pw_aff_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::union_pw_multi_aff
+union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
+  return union_pw_multi_aff(ptr);
+}
+union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
+  ptr = isl_union_pw_multi_aff_copy(ptr);
+  return union_pw_multi_aff(ptr);
+}
+
+union_pw_multi_aff::union_pw_multi_aff()
+    : ptr(nullptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_pw_multi_aff::union_pw_multi_aff(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
+    : ptr(ptr) {}
+
+union_pw_multi_aff::union_pw_multi_aff(aff aff)
+{
+  auto res = isl_union_pw_multi_aff_from_aff(aff.release());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(pw_multi_aff pma)
+{
+  auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(union_set uset)
+{
+  auto res = isl_union_pw_multi_aff_from_domain(uset.release());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(union_map umap)
+{
+  auto res = isl_union_pw_multi_aff_from_union_map(umap.release());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(ctx ctx, const std::string &str)
+{
+  auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(union_pw_aff upa)
+{
+  auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
+  ptr = res;
+}
+union_pw_multi_aff::union_pw_multi_aff(multi_union_pw_aff mupa)
+{
+  auto res = isl_union_pw_multi_aff_from_multi_union_pw_aff(mupa.release());
+  ptr = res;
+}
+
+union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_multi_aff::~union_pw_multi_aff() {
+  if (ptr)
+    isl_union_pw_multi_aff_free(ptr);
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
+  return isl_union_pw_multi_aff_copy(ptr);
+}
+
+__isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
+  isl_union_pw_multi_aff *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_multi_aff::is_null() const {
+  return ptr == nullptr;
+}
+union_pw_multi_aff::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_pw_multi_aff::get_ctx() const {
+  return ctx(isl_union_pw_multi_aff_get_ctx(ptr));
+}
+std::string union_pw_multi_aff::to_str() const {
+  char *Tmp = isl_union_pw_multi_aff_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void union_pw_multi_aff::dump() const {
+  isl_union_pw_multi_aff_dump(get());
+}
+
+
+union_pw_multi_aff union_pw_multi_aff::add(union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::add_pw_multi_aff(pw_multi_aff pma) const
+{
+  auto res = isl_union_pw_multi_aff_add_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::align_params(space model) const
+{
+  auto res = isl_union_pw_multi_aff_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::coalesce() const
+{
+  auto res = isl_union_pw_multi_aff_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int union_pw_multi_aff::dim(isl::dim type) const
+{
+  auto res = isl_union_pw_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set union_pw_multi_aff::domain() const
+{
+  auto res = isl_union_pw_multi_aff_domain(copy());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::empty(space space)
+{
+  auto res = isl_union_pw_multi_aff_empty(space.release());
+  return manage(res);
+}
+
+pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(space space) const
+{
+  auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
+  return manage(res);
+}
+
+int union_pw_multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_union_pw_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+union_pw_multi_aff union_pw_multi_aff::flat_range_product(union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
+  return manage(res);
+}
+
+stat union_pw_multi_aff::foreach_pw_multi_aff(const std::function<stat(pw_multi_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_multi_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_multi_aff_foreach_pw_multi_aff(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::from_union_set(union_set uset)
+{
+  auto res = isl_union_pw_multi_aff_from_union_set(uset.release());
+  return manage(res);
+}
+
+pw_multi_aff_list union_pw_multi_aff::get_pw_multi_aff_list() const
+{
+  auto res = isl_union_pw_multi_aff_get_pw_multi_aff_list(get());
+  return manage(res);
+}
+
+space union_pw_multi_aff::get_space() const
+{
+  auto res = isl_union_pw_multi_aff_get_space(get());
+  return manage(res);
+}
+
+union_pw_aff union_pw_multi_aff::get_union_pw_aff(int pos) const
+{
+  auto res = isl_union_pw_multi_aff_get_union_pw_aff(get(), pos);
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::gist(union_set context) const
+{
+  auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::gist_params(set context) const
+{
+  auto res = isl_union_pw_multi_aff_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::intersect_domain(union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::intersect_params(set set) const
+{
+  auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_pw_multi_aff::involves_nan() const
+{
+  auto res = isl_union_pw_multi_aff_involves_nan(get());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::multi_val_on_domain(union_set domain, multi_val mv)
+{
+  auto res = isl_union_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release());
+  return manage(res);
+}
+
+int union_pw_multi_aff::n_pw_multi_aff() const
+{
+  auto res = isl_union_pw_multi_aff_n_pw_multi_aff(get());
+  return res;
+}
+
+union_pw_multi_aff union_pw_multi_aff::neg() const
+{
+  auto res = isl_union_pw_multi_aff_neg(copy());
+  return manage(res);
+}
+
+boolean union_pw_multi_aff::plain_is_equal(const union_pw_multi_aff &upma2) const
+{
+  auto res = isl_union_pw_multi_aff_plain_is_equal(get(), upma2.get());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::pullback(union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::reset_user() const
+{
+  auto res = isl_union_pw_multi_aff_reset_user(copy());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::scale_down_val(val val) const
+{
+  auto res = isl_union_pw_multi_aff_scale_down_val(copy(), val.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::scale_multi_val(multi_val mv) const
+{
+  auto res = isl_union_pw_multi_aff_scale_multi_val(copy(), mv.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::scale_val(val val) const
+{
+  auto res = isl_union_pw_multi_aff_scale_val(copy(), val.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::sub(union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::subtract_domain(union_set uset) const
+{
+  auto res = isl_union_pw_multi_aff_subtract_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff::union_add(union_pw_multi_aff upma2) const
+{
+  auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
+  return manage(res);
+}
+
+// implementations for isl::union_pw_multi_aff_list
+union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr) {
+  return union_pw_multi_aff_list(ptr);
+}
+union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr) {
+  ptr = isl_union_pw_multi_aff_list_copy(ptr);
+  return union_pw_multi_aff_list(ptr);
+}
+
+union_pw_multi_aff_list::union_pw_multi_aff_list()
+    : ptr(nullptr) {}
+
+union_pw_multi_aff_list::union_pw_multi_aff_list(const union_pw_multi_aff_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_pw_multi_aff_list::union_pw_multi_aff_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_pw_multi_aff_list::union_pw_multi_aff_list(__isl_take isl_union_pw_multi_aff_list *ptr)
+    : ptr(ptr) {}
+
+
+union_pw_multi_aff_list &union_pw_multi_aff_list::operator=(union_pw_multi_aff_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_multi_aff_list::~union_pw_multi_aff_list() {
+  if (ptr)
+    isl_union_pw_multi_aff_list_free(ptr);
+}
+
+__isl_give isl_union_pw_multi_aff_list *union_pw_multi_aff_list::copy() const & {
+  return isl_union_pw_multi_aff_list_copy(ptr);
+}
+
+__isl_keep isl_union_pw_multi_aff_list *union_pw_multi_aff_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_multi_aff_list *union_pw_multi_aff_list::release() {
+  isl_union_pw_multi_aff_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_multi_aff_list::is_null() const {
+  return ptr == nullptr;
+}
+union_pw_multi_aff_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_pw_multi_aff_list::get_ctx() const {
+  return ctx(isl_union_pw_multi_aff_list_get_ctx(ptr));
+}
+
+void union_pw_multi_aff_list::dump() const {
+  isl_union_pw_multi_aff_list_dump(get());
+}
+
+
+union_pw_multi_aff_list union_pw_multi_aff_list::add(union_pw_multi_aff el) const
+{
+  auto res = isl_union_pw_multi_aff_list_add(copy(), el.release());
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_union_pw_multi_aff_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::concat(union_pw_multi_aff_list list2) const
+{
+  auto res = isl_union_pw_multi_aff_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_multi_aff_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_pw_multi_aff_list::foreach(const std::function<stat(union_pw_multi_aff)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(union_pw_multi_aff)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_union_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::from_union_pw_multi_aff(union_pw_multi_aff el)
+{
+  auto res = isl_union_pw_multi_aff_list_from_union_pw_multi_aff(el.release());
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff_list::get_at(int index) const
+{
+  auto res = isl_union_pw_multi_aff_list_get_at(get(), index);
+  return manage(res);
+}
+
+union_pw_multi_aff union_pw_multi_aff_list::get_union_pw_multi_aff(int index) const
+{
+  auto res = isl_union_pw_multi_aff_list_get_union_pw_multi_aff(get(), index);
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::insert(unsigned int pos, union_pw_multi_aff el) const
+{
+  auto res = isl_union_pw_multi_aff_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int union_pw_multi_aff_list::n_union_pw_multi_aff() const
+{
+  auto res = isl_union_pw_multi_aff_list_n_union_pw_multi_aff(get());
+  return res;
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::reverse() const
+{
+  auto res = isl_union_pw_multi_aff_list_reverse(copy());
+  return manage(res);
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::set_union_pw_multi_aff(int index, union_pw_multi_aff el) const
+{
+  auto res = isl_union_pw_multi_aff_list_set_union_pw_multi_aff(copy(), index, el.release());
+  return manage(res);
+}
+
+int union_pw_multi_aff_list::size() const
+{
+  auto res = isl_union_pw_multi_aff_list_size(get());
+  return res;
+}
+
+union_pw_multi_aff_list union_pw_multi_aff_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_union_pw_multi_aff_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::union_pw_qpolynomial
+union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr) {
+  return union_pw_qpolynomial(ptr);
+}
+union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr) {
+  ptr = isl_union_pw_qpolynomial_copy(ptr);
+  return union_pw_qpolynomial(ptr);
+}
+
+union_pw_qpolynomial::union_pw_qpolynomial()
+    : ptr(nullptr) {}
+
+union_pw_qpolynomial::union_pw_qpolynomial(const union_pw_qpolynomial &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_pw_qpolynomial::union_pw_qpolynomial(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_pw_qpolynomial::union_pw_qpolynomial(__isl_take isl_union_pw_qpolynomial *ptr)
+    : ptr(ptr) {}
+
+union_pw_qpolynomial::union_pw_qpolynomial(ctx ctx, const std::string &str)
+{
+  auto res = isl_union_pw_qpolynomial_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_pw_qpolynomial &union_pw_qpolynomial::operator=(union_pw_qpolynomial obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_pw_qpolynomial::~union_pw_qpolynomial() {
+  if (ptr)
+    isl_union_pw_qpolynomial_free(ptr);
+}
+
+__isl_give isl_union_pw_qpolynomial *union_pw_qpolynomial::copy() const & {
+  return isl_union_pw_qpolynomial_copy(ptr);
+}
+
+__isl_keep isl_union_pw_qpolynomial *union_pw_qpolynomial::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_pw_qpolynomial *union_pw_qpolynomial::release() {
+  isl_union_pw_qpolynomial *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_pw_qpolynomial::is_null() const {
+  return ptr == nullptr;
+}
+union_pw_qpolynomial::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_pw_qpolynomial::get_ctx() const {
+  return ctx(isl_union_pw_qpolynomial_get_ctx(ptr));
+}
+std::string union_pw_qpolynomial::to_str() const {
+  char *Tmp = isl_union_pw_qpolynomial_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+
+union_pw_qpolynomial union_pw_qpolynomial::add(union_pw_qpolynomial upwqp2) const
+{
+  auto res = isl_union_pw_qpolynomial_add(copy(), upwqp2.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::add_pw_qpolynomial(pw_qpolynomial pwqp) const
+{
+  auto res = isl_union_pw_qpolynomial_add_pw_qpolynomial(copy(), pwqp.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::align_params(space model) const
+{
+  auto res = isl_union_pw_qpolynomial_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::coalesce() const
+{
+  auto res = isl_union_pw_qpolynomial_coalesce(copy());
+  return manage(res);
+}
+
+unsigned int union_pw_qpolynomial::dim(isl::dim type) const
+{
+  auto res = isl_union_pw_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set union_pw_qpolynomial::domain() const
+{
+  auto res = isl_union_pw_qpolynomial_domain(copy());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_pw_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+val union_pw_qpolynomial::eval(point pnt) const
+{
+  auto res = isl_union_pw_qpolynomial_eval(copy(), pnt.release());
+  return manage(res);
+}
+
+pw_qpolynomial union_pw_qpolynomial::extract_pw_qpolynomial(space dim) const
+{
+  auto res = isl_union_pw_qpolynomial_extract_pw_qpolynomial(get(), dim.release());
+  return manage(res);
+}
+
+int union_pw_qpolynomial::find_dim_by_name(isl::dim type, const std::string &name) const
+{
+  auto res = isl_union_pw_qpolynomial_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
+  return res;
+}
+
+stat union_pw_qpolynomial::foreach_pw_qpolynomial(const std::function<stat(pw_qpolynomial)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(pw_qpolynomial)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_pw_qpolynomial *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_pw_qpolynomial_foreach_pw_qpolynomial(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::from_pw_qpolynomial(pw_qpolynomial pwqp)
+{
+  auto res = isl_union_pw_qpolynomial_from_pw_qpolynomial(pwqp.release());
+  return manage(res);
+}
+
+pw_qpolynomial_list union_pw_qpolynomial::get_pw_qpolynomial_list() const
+{
+  auto res = isl_union_pw_qpolynomial_get_pw_qpolynomial_list(get());
+  return manage(res);
+}
+
+space union_pw_qpolynomial::get_space() const
+{
+  auto res = isl_union_pw_qpolynomial_get_space(get());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::gist(union_set context) const
+{
+  auto res = isl_union_pw_qpolynomial_gist(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::gist_params(set context) const
+{
+  auto res = isl_union_pw_qpolynomial_gist_params(copy(), context.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::intersect_domain(union_set uset) const
+{
+  auto res = isl_union_pw_qpolynomial_intersect_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::intersect_params(set set) const
+{
+  auto res = isl_union_pw_qpolynomial_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_pw_qpolynomial::involves_nan() const
+{
+  auto res = isl_union_pw_qpolynomial_involves_nan(get());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::mul(union_pw_qpolynomial upwqp2) const
+{
+  auto res = isl_union_pw_qpolynomial_mul(copy(), upwqp2.release());
+  return manage(res);
+}
+
+int union_pw_qpolynomial::n_pw_qpolynomial() const
+{
+  auto res = isl_union_pw_qpolynomial_n_pw_qpolynomial(get());
+  return res;
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::neg() const
+{
+  auto res = isl_union_pw_qpolynomial_neg(copy());
+  return manage(res);
+}
+
+boolean union_pw_qpolynomial::plain_is_equal(const union_pw_qpolynomial &upwqp2) const
+{
+  auto res = isl_union_pw_qpolynomial_plain_is_equal(get(), upwqp2.get());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::reset_user() const
+{
+  auto res = isl_union_pw_qpolynomial_reset_user(copy());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::scale_down_val(val v) const
+{
+  auto res = isl_union_pw_qpolynomial_scale_down_val(copy(), v.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::scale_val(val v) const
+{
+  auto res = isl_union_pw_qpolynomial_scale_val(copy(), v.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::sub(union_pw_qpolynomial upwqp2) const
+{
+  auto res = isl_union_pw_qpolynomial_sub(copy(), upwqp2.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::subtract_domain(union_set uset) const
+{
+  auto res = isl_union_pw_qpolynomial_subtract_domain(copy(), uset.release());
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::to_polynomial(int sign) const
+{
+  auto res = isl_union_pw_qpolynomial_to_polynomial(copy(), sign);
+  return manage(res);
+}
+
+union_pw_qpolynomial union_pw_qpolynomial::zero(space dim)
+{
+  auto res = isl_union_pw_qpolynomial_zero(dim.release());
+  return manage(res);
+}
+
+// implementations for isl::union_set
+union_set manage(__isl_take isl_union_set *ptr) {
+  return union_set(ptr);
+}
+union_set manage_copy(__isl_keep isl_union_set *ptr) {
+  ptr = isl_union_set_copy(ptr);
+  return union_set(ptr);
+}
+
+union_set::union_set()
+    : ptr(nullptr) {}
+
+union_set::union_set(const union_set &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_set::union_set(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_set::union_set(__isl_take isl_union_set *ptr)
+    : ptr(ptr) {}
+
+union_set::union_set(basic_set bset)
+{
+  auto res = isl_union_set_from_basic_set(bset.release());
+  ptr = res;
+}
+union_set::union_set(set set)
+{
+  auto res = isl_union_set_from_set(set.release());
+  ptr = res;
+}
+union_set::union_set(point pnt)
+{
+  auto res = isl_union_set_from_point(pnt.release());
+  ptr = res;
+}
+union_set::union_set(ctx ctx, const std::string &str)
+{
+  auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+
+union_set &union_set::operator=(union_set obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set::~union_set() {
+  if (ptr)
+    isl_union_set_free(ptr);
+}
+
+__isl_give isl_union_set *union_set::copy() const & {
+  return isl_union_set_copy(ptr);
+}
+
+__isl_keep isl_union_set *union_set::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set *union_set::release() {
+  isl_union_set *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set::is_null() const {
+  return ptr == nullptr;
+}
+union_set::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_set::get_ctx() const {
+  return ctx(isl_union_set_get_ctx(ptr));
+}
+std::string union_set::to_str() const {
+  char *Tmp = isl_union_set_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void union_set::dump() const {
+  isl_union_set_dump(get());
+}
+
+
+union_set union_set::add_set(set set) const
+{
+  auto res = isl_union_set_add_set(copy(), set.release());
+  return manage(res);
+}
+
+union_set union_set::affine_hull() const
+{
+  auto res = isl_union_set_affine_hull(copy());
+  return manage(res);
+}
+
+union_set union_set::align_params(space model) const
+{
+  auto res = isl_union_set_align_params(copy(), model.release());
+  return manage(res);
+}
+
+union_set union_set::apply(union_map umap) const
+{
+  auto res = isl_union_set_apply(copy(), umap.release());
+  return manage(res);
+}
+
+union_set union_set::coalesce() const
+{
+  auto res = isl_union_set_coalesce(copy());
+  return manage(res);
+}
+
+union_set union_set::coefficients() const
+{
+  auto res = isl_union_set_coefficients(copy());
+  return manage(res);
+}
+
+schedule union_set::compute_schedule(union_map validity, union_map proximity) const
+{
+  auto res = isl_union_set_compute_schedule(copy(), validity.release(), proximity.release());
+  return manage(res);
+}
+
+boolean union_set::contains(const space &space) const
+{
+  auto res = isl_union_set_contains(get(), space.get());
+  return manage(res);
+}
+
+union_set union_set::detect_equalities() const
+{
+  auto res = isl_union_set_detect_equalities(copy());
+  return manage(res);
+}
+
+unsigned int union_set::dim(isl::dim type) const
+{
+  auto res = isl_union_set_dim(get(), static_cast<enum isl_dim_type>(type));
+  return res;
+}
+
+union_set union_set::empty(space space)
+{
+  auto res = isl_union_set_empty(space.release());
+  return manage(res);
+}
+
+set union_set::extract_set(space dim) const
+{
+  auto res = isl_union_set_extract_set(get(), dim.release());
+  return manage(res);
+}
+
+stat union_set::foreach_point(const std::function<stat(point)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(point)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+stat union_set::foreach_set(const std::function<stat(set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+basic_set_list union_set::get_basic_set_list() const
+{
+  auto res = isl_union_set_get_basic_set_list(get());
+  return manage(res);
+}
+
+uint32_t union_set::get_hash() const
+{
+  auto res = isl_union_set_get_hash(get());
+  return res;
+}
+
+set_list union_set::get_set_list() const
+{
+  auto res = isl_union_set_get_set_list(get());
+  return manage(res);
+}
+
+space union_set::get_space() const
+{
+  auto res = isl_union_set_get_space(get());
+  return manage(res);
+}
+
+union_set union_set::gist(union_set context) const
+{
+  auto res = isl_union_set_gist(copy(), context.release());
+  return manage(res);
+}
+
+union_set union_set::gist_params(set set) const
+{
+  auto res = isl_union_set_gist_params(copy(), set.release());
+  return manage(res);
+}
+
+union_map union_set::identity() const
+{
+  auto res = isl_union_set_identity(copy());
+  return manage(res);
+}
+
+union_pw_multi_aff union_set::identity_union_pw_multi_aff() const
+{
+  auto res = isl_union_set_identity_union_pw_multi_aff(copy());
+  return manage(res);
+}
+
+union_set union_set::intersect(union_set uset2) const
+{
+  auto res = isl_union_set_intersect(copy(), uset2.release());
+  return manage(res);
+}
+
+union_set union_set::intersect_params(set set) const
+{
+  auto res = isl_union_set_intersect_params(copy(), set.release());
+  return manage(res);
+}
+
+boolean union_set::is_disjoint(const union_set &uset2) const
+{
+  auto res = isl_union_set_is_disjoint(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_empty() const
+{
+  auto res = isl_union_set_is_empty(get());
+  return manage(res);
+}
+
+boolean union_set::is_equal(const union_set &uset2) const
+{
+  auto res = isl_union_set_is_equal(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_params() const
+{
+  auto res = isl_union_set_is_params(get());
+  return manage(res);
+}
+
+boolean union_set::is_strict_subset(const union_set &uset2) const
+{
+  auto res = isl_union_set_is_strict_subset(get(), uset2.get());
+  return manage(res);
+}
+
+boolean union_set::is_subset(const union_set &uset2) const
+{
+  auto res = isl_union_set_is_subset(get(), uset2.get());
+  return manage(res);
+}
+
+union_map union_set::lex_ge_union_set(union_set uset2) const
+{
+  auto res = isl_union_set_lex_ge_union_set(copy(), uset2.release());
+  return manage(res);
+}
+
+union_map union_set::lex_gt_union_set(union_set uset2) const
+{
+  auto res = isl_union_set_lex_gt_union_set(copy(), uset2.release());
+  return manage(res);
+}
+
+union_map union_set::lex_le_union_set(union_set uset2) const
+{
+  auto res = isl_union_set_lex_le_union_set(copy(), uset2.release());
+  return manage(res);
+}
+
+union_map union_set::lex_lt_union_set(union_set uset2) const
+{
+  auto res = isl_union_set_lex_lt_union_set(copy(), uset2.release());
+  return manage(res);
+}
+
+union_set union_set::lexmax() const
+{
+  auto res = isl_union_set_lexmax(copy());
+  return manage(res);
+}
+
+union_set union_set::lexmin() const
+{
+  auto res = isl_union_set_lexmin(copy());
+  return manage(res);
+}
+
+multi_val union_set::min_multi_union_pw_aff(const multi_union_pw_aff &obj) const
+{
+  auto res = isl_union_set_min_multi_union_pw_aff(get(), obj.get());
+  return manage(res);
+}
+
+int union_set::n_set() const
+{
+  auto res = isl_union_set_n_set(get());
+  return res;
+}
+
+set union_set::params() const
+{
+  auto res = isl_union_set_params(copy());
+  return manage(res);
+}
+
+union_set union_set::polyhedral_hull() const
+{
+  auto res = isl_union_set_polyhedral_hull(copy());
+  return manage(res);
+}
+
+union_set union_set::preimage(multi_aff ma) const
+{
+  auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
+  return manage(res);
+}
+
+union_set union_set::preimage(pw_multi_aff pma) const
+{
+  auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
+  return manage(res);
+}
+
+union_set union_set::preimage(union_pw_multi_aff upma) const
+{
+  auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
+  return manage(res);
+}
+
+union_set union_set::product(union_set uset2) const
+{
+  auto res = isl_union_set_product(copy(), uset2.release());
+  return manage(res);
+}
+
+union_set union_set::project_out(isl::dim type, unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
+  return manage(res);
+}
+
+union_set union_set::remove_divs() const
+{
+  auto res = isl_union_set_remove_divs(copy());
+  return manage(res);
+}
+
+union_set union_set::remove_redundancies() const
+{
+  auto res = isl_union_set_remove_redundancies(copy());
+  return manage(res);
+}
+
+union_set union_set::reset_user() const
+{
+  auto res = isl_union_set_reset_user(copy());
+  return manage(res);
+}
+
+basic_set union_set::sample() const
+{
+  auto res = isl_union_set_sample(copy());
+  return manage(res);
+}
+
+point union_set::sample_point() const
+{
+  auto res = isl_union_set_sample_point(copy());
+  return manage(res);
+}
+
+union_set union_set::simple_hull() const
+{
+  auto res = isl_union_set_simple_hull(copy());
+  return manage(res);
+}
+
+union_set union_set::solutions() const
+{
+  auto res = isl_union_set_solutions(copy());
+  return manage(res);
+}
+
+union_set union_set::subtract(union_set uset2) const
+{
+  auto res = isl_union_set_subtract(copy(), uset2.release());
+  return manage(res);
+}
+
+union_set union_set::unite(union_set uset2) const
+{
+  auto res = isl_union_set_union(copy(), uset2.release());
+  return manage(res);
+}
+
+union_set union_set::universe() const
+{
+  auto res = isl_union_set_universe(copy());
+  return manage(res);
+}
+
+union_map union_set::unwrap() const
+{
+  auto res = isl_union_set_unwrap(copy());
+  return manage(res);
+}
+
+union_map union_set::wrapped_domain_map() const
+{
+  auto res = isl_union_set_wrapped_domain_map(copy());
+  return manage(res);
+}
+
+// implementations for isl::union_set_list
+union_set_list manage(__isl_take isl_union_set_list *ptr) {
+  return union_set_list(ptr);
+}
+union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
+  ptr = isl_union_set_list_copy(ptr);
+  return union_set_list(ptr);
+}
+
+union_set_list::union_set_list()
+    : ptr(nullptr) {}
+
+union_set_list::union_set_list(const union_set_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+union_set_list::union_set_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
+    : ptr(ptr) {}
+
+
+union_set_list &union_set_list::operator=(union_set_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+union_set_list::~union_set_list() {
+  if (ptr)
+    isl_union_set_list_free(ptr);
+}
+
+__isl_give isl_union_set_list *union_set_list::copy() const & {
+  return isl_union_set_list_copy(ptr);
+}
+
+__isl_keep isl_union_set_list *union_set_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_union_set_list *union_set_list::release() {
+  isl_union_set_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool union_set_list::is_null() const {
+  return ptr == nullptr;
+}
+union_set_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx union_set_list::get_ctx() const {
+  return ctx(isl_union_set_list_get_ctx(ptr));
+}
+
+void union_set_list::dump() const {
+  isl_union_set_list_dump(get());
+}
+
+
+union_set_list union_set_list::add(union_set el) const
+{
+  auto res = isl_union_set_list_add(copy(), el.release());
+  return manage(res);
+}
+
+union_set_list union_set_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_union_set_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+union_set_list union_set_list::concat(union_set_list list2) const
+{
+  auto res = isl_union_set_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_union_set_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat union_set_list::foreach(const std::function<stat(union_set)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(union_set)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+union_set_list union_set_list::from_union_set(union_set el)
+{
+  auto res = isl_union_set_list_from_union_set(el.release());
+  return manage(res);
+}
+
+union_set union_set_list::get_at(int index) const
+{
+  auto res = isl_union_set_list_get_at(get(), index);
+  return manage(res);
+}
+
+union_set union_set_list::get_union_set(int index) const
+{
+  auto res = isl_union_set_list_get_union_set(get(), index);
+  return manage(res);
+}
+
+union_set_list union_set_list::insert(unsigned int pos, union_set el) const
+{
+  auto res = isl_union_set_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int union_set_list::n_union_set() const
+{
+  auto res = isl_union_set_list_n_union_set(get());
+  return res;
+}
+
+union_set_list union_set_list::reverse() const
+{
+  auto res = isl_union_set_list_reverse(copy());
+  return manage(res);
+}
+
+union_set_list union_set_list::set_union_set(int index, union_set el) const
+{
+  auto res = isl_union_set_list_set_union_set(copy(), index, el.release());
+  return manage(res);
+}
+
+int union_set_list::size() const
+{
+  auto res = isl_union_set_list_size(get());
+  return res;
+}
+
+union_set_list union_set_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_union_set_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+union_set union_set_list::unite() const
+{
+  auto res = isl_union_set_list_union(copy());
+  return manage(res);
+}
+
+// implementations for isl::val
+val manage(__isl_take isl_val *ptr) {
+  return val(ptr);
+}
+val manage_copy(__isl_keep isl_val *ptr) {
+  ptr = isl_val_copy(ptr);
+  return val(ptr);
+}
+
+val::val()
+    : ptr(nullptr) {}
+
+val::val(const val &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+val::val(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+val::val(__isl_take isl_val *ptr)
+    : ptr(ptr) {}
+
+val::val(ctx ctx, const std::string &str)
+{
+  auto res = isl_val_read_from_str(ctx.release(), str.c_str());
+  ptr = res;
+}
+val::val(ctx ctx, long i)
+{
+  auto res = isl_val_int_from_si(ctx.release(), i);
+  ptr = res;
+}
+
+val &val::operator=(val obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val::~val() {
+  if (ptr)
+    isl_val_free(ptr);
+}
+
+__isl_give isl_val *val::copy() const & {
+  return isl_val_copy(ptr);
+}
+
+__isl_keep isl_val *val::get() const {
+  return ptr;
+}
+
+__isl_give isl_val *val::release() {
+  isl_val *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val::is_null() const {
+  return ptr == nullptr;
+}
+val::operator bool() const {
+  return !is_null();
+}
+
+
+ctx val::get_ctx() const {
+  return ctx(isl_val_get_ctx(ptr));
+}
+std::string val::to_str() const {
+  char *Tmp = isl_val_to_str(get());
+  if (!Tmp)
+    return "";
+  std::string S(Tmp);
+  free(Tmp);
+  return S;
+}
+
+
+void val::dump() const {
+  isl_val_dump(get());
+}
+
+
+val val::abs() const
+{
+  auto res = isl_val_abs(copy());
+  return manage(res);
+}
+
+boolean val::abs_eq(const val &v2) const
+{
+  auto res = isl_val_abs_eq(get(), v2.get());
+  return manage(res);
+}
+
+val val::add(val v2) const
+{
+  auto res = isl_val_add(copy(), v2.release());
+  return manage(res);
+}
+
+val val::add_ui(unsigned long v2) const
+{
+  auto res = isl_val_add_ui(copy(), v2);
+  return manage(res);
+}
+
+val val::ceil() const
+{
+  auto res = isl_val_ceil(copy());
+  return manage(res);
+}
+
+int val::cmp_si(long i) const
+{
+  auto res = isl_val_cmp_si(get(), i);
+  return res;
+}
+
+val val::div(val v2) const
+{
+  auto res = isl_val_div(copy(), v2.release());
+  return manage(res);
+}
+
+val val::div_ui(unsigned long v2) const
+{
+  auto res = isl_val_div_ui(copy(), v2);
+  return manage(res);
+}
+
+boolean val::eq(const val &v2) const
+{
+  auto res = isl_val_eq(get(), v2.get());
+  return manage(res);
+}
+
+val val::floor() const
+{
+  auto res = isl_val_floor(copy());
+  return manage(res);
+}
+
+val val::gcd(val v2) const
+{
+  auto res = isl_val_gcd(copy(), v2.release());
+  return manage(res);
+}
+
+boolean val::ge(const val &v2) const
+{
+  auto res = isl_val_ge(get(), v2.get());
+  return manage(res);
+}
+
+uint32_t val::get_hash() const
+{
+  auto res = isl_val_get_hash(get());
+  return res;
+}
+
+long val::get_num_si() const
+{
+  auto res = isl_val_get_num_si(get());
+  return res;
+}
+
+boolean val::gt(const val &v2) const
+{
+  auto res = isl_val_gt(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::gt_si(long i) const
+{
+  auto res = isl_val_gt_si(get(), i);
+  return manage(res);
+}
+
+val val::infty(ctx ctx)
+{
+  auto res = isl_val_infty(ctx.release());
+  return manage(res);
+}
+
+val val::int_from_ui(ctx ctx, unsigned long u)
+{
+  auto res = isl_val_int_from_ui(ctx.release(), u);
+  return manage(res);
+}
+
+val val::inv() const
+{
+  auto res = isl_val_inv(copy());
+  return manage(res);
+}
+
+boolean val::is_divisible_by(const val &v2) const
+{
+  auto res = isl_val_is_divisible_by(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::is_infty() const
+{
+  auto res = isl_val_is_infty(get());
+  return manage(res);
+}
+
+boolean val::is_int() const
+{
+  auto res = isl_val_is_int(get());
+  return manage(res);
+}
+
+boolean val::is_nan() const
+{
+  auto res = isl_val_is_nan(get());
+  return manage(res);
+}
+
+boolean val::is_neg() const
+{
+  auto res = isl_val_is_neg(get());
+  return manage(res);
+}
+
+boolean val::is_neginfty() const
+{
+  auto res = isl_val_is_neginfty(get());
+  return manage(res);
+}
+
+boolean val::is_negone() const
+{
+  auto res = isl_val_is_negone(get());
+  return manage(res);
+}
+
+boolean val::is_nonneg() const
+{
+  auto res = isl_val_is_nonneg(get());
+  return manage(res);
+}
+
+boolean val::is_nonpos() const
+{
+  auto res = isl_val_is_nonpos(get());
+  return manage(res);
+}
+
+boolean val::is_one() const
+{
+  auto res = isl_val_is_one(get());
+  return manage(res);
+}
+
+boolean val::is_pos() const
+{
+  auto res = isl_val_is_pos(get());
+  return manage(res);
+}
+
+boolean val::is_rat() const
+{
+  auto res = isl_val_is_rat(get());
+  return manage(res);
+}
+
+boolean val::is_zero() const
+{
+  auto res = isl_val_is_zero(get());
+  return manage(res);
+}
+
+boolean val::le(const val &v2) const
+{
+  auto res = isl_val_le(get(), v2.get());
+  return manage(res);
+}
+
+boolean val::lt(const val &v2) const
+{
+  auto res = isl_val_lt(get(), v2.get());
+  return manage(res);
+}
+
+val val::max(val v2) const
+{
+  auto res = isl_val_max(copy(), v2.release());
+  return manage(res);
+}
+
+val val::min(val v2) const
+{
+  auto res = isl_val_min(copy(), v2.release());
+  return manage(res);
+}
+
+val val::mod(val v2) const
+{
+  auto res = isl_val_mod(copy(), v2.release());
+  return manage(res);
+}
+
+val val::mul(val v2) const
+{
+  auto res = isl_val_mul(copy(), v2.release());
+  return manage(res);
+}
+
+val val::mul_ui(unsigned long v2) const
+{
+  auto res = isl_val_mul_ui(copy(), v2);
+  return manage(res);
+}
+
+size_t val::n_abs_num_chunks(size_t size) const
+{
+  auto res = isl_val_n_abs_num_chunks(get(), size);
+  return res;
+}
+
+val val::nan(ctx ctx)
+{
+  auto res = isl_val_nan(ctx.release());
+  return manage(res);
+}
+
+boolean val::ne(const val &v2) const
+{
+  auto res = isl_val_ne(get(), v2.get());
+  return manage(res);
+}
+
+val val::neg() const
+{
+  auto res = isl_val_neg(copy());
+  return manage(res);
+}
+
+val val::neginfty(ctx ctx)
+{
+  auto res = isl_val_neginfty(ctx.release());
+  return manage(res);
+}
+
+val val::negone(ctx ctx)
+{
+  auto res = isl_val_negone(ctx.release());
+  return manage(res);
+}
+
+val val::one(ctx ctx)
+{
+  auto res = isl_val_one(ctx.release());
+  return manage(res);
+}
+
+val val::pow2() const
+{
+  auto res = isl_val_pow2(copy());
+  return manage(res);
+}
+
+val val::set_si(long i) const
+{
+  auto res = isl_val_set_si(copy(), i);
+  return manage(res);
+}
+
+int val::sgn() const
+{
+  auto res = isl_val_sgn(get());
+  return res;
+}
+
+val val::sub(val v2) const
+{
+  auto res = isl_val_sub(copy(), v2.release());
+  return manage(res);
+}
+
+val val::sub_ui(unsigned long v2) const
+{
+  auto res = isl_val_sub_ui(copy(), v2);
+  return manage(res);
+}
+
+val val::trunc() const
+{
+  auto res = isl_val_trunc(copy());
+  return manage(res);
+}
+
+val val::zero(ctx ctx)
+{
+  auto res = isl_val_zero(ctx.release());
+  return manage(res);
+}
+
+// implementations for isl::val_list
+val_list manage(__isl_take isl_val_list *ptr) {
+  return val_list(ptr);
+}
+val_list manage_copy(__isl_keep isl_val_list *ptr) {
+  ptr = isl_val_list_copy(ptr);
+  return val_list(ptr);
+}
+
+val_list::val_list()
+    : ptr(nullptr) {}
+
+val_list::val_list(const val_list &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+val_list::val_list(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+val_list::val_list(__isl_take isl_val_list *ptr)
+    : ptr(ptr) {}
+
+
+val_list &val_list::operator=(val_list obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+val_list::~val_list() {
+  if (ptr)
+    isl_val_list_free(ptr);
+}
+
+__isl_give isl_val_list *val_list::copy() const & {
+  return isl_val_list_copy(ptr);
+}
+
+__isl_keep isl_val_list *val_list::get() const {
+  return ptr;
+}
+
+__isl_give isl_val_list *val_list::release() {
+  isl_val_list *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool val_list::is_null() const {
+  return ptr == nullptr;
+}
+val_list::operator bool() const {
+  return !is_null();
+}
+
+
+ctx val_list::get_ctx() const {
+  return ctx(isl_val_list_get_ctx(ptr));
+}
+
+void val_list::dump() const {
+  isl_val_list_dump(get());
+}
+
+
+val_list val_list::add(val el) const
+{
+  auto res = isl_val_list_add(copy(), el.release());
+  return manage(res);
+}
+
+val_list val_list::alloc(ctx ctx, int n)
+{
+  auto res = isl_val_list_alloc(ctx.release(), n);
+  return manage(res);
+}
+
+val_list val_list::concat(val_list list2) const
+{
+  auto res = isl_val_list_concat(copy(), list2.release());
+  return manage(res);
+}
+
+val_list val_list::drop(unsigned int first, unsigned int n) const
+{
+  auto res = isl_val_list_drop(copy(), first, n);
+  return manage(res);
+}
+
+stat val_list::foreach(const std::function<stat(val)> &fn) const
+{
+  struct fn_data {
+    const std::function<stat(val)> *func;
+  } fn_data = { &fn };
+  auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
+    auto *data = static_cast<struct fn_data *>(arg_1);
+    stat ret = (*data->func)(manage(arg_0));
+    return ret.release();
+  };
+  auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
+  return manage(res);
+}
+
+val_list val_list::from_val(val el)
+{
+  auto res = isl_val_list_from_val(el.release());
+  return manage(res);
+}
+
+val val_list::get_at(int index) const
+{
+  auto res = isl_val_list_get_at(get(), index);
+  return manage(res);
+}
+
+val val_list::get_val(int index) const
+{
+  auto res = isl_val_list_get_val(get(), index);
+  return manage(res);
+}
+
+val_list val_list::insert(unsigned int pos, val el) const
+{
+  auto res = isl_val_list_insert(copy(), pos, el.release());
+  return manage(res);
+}
+
+int val_list::n_val() const
+{
+  auto res = isl_val_list_n_val(get());
+  return res;
+}
+
+val_list val_list::reverse() const
+{
+  auto res = isl_val_list_reverse(copy());
+  return manage(res);
+}
+
+val_list val_list::set_val(int index, val el) const
+{
+  auto res = isl_val_list_set_val(copy(), index, el.release());
+  return manage(res);
+}
+
+int val_list::size() const
+{
+  auto res = isl_val_list_size(get());
+  return res;
+}
+
+val_list val_list::swap(unsigned int pos1, unsigned int pos2) const
+{
+  auto res = isl_val_list_swap(copy(), pos1, pos2);
+  return manage(res);
+}
+
+// implementations for isl::vec
+vec manage(__isl_take isl_vec *ptr) {
+  return vec(ptr);
+}
+vec manage_copy(__isl_keep isl_vec *ptr) {
+  ptr = isl_vec_copy(ptr);
+  return vec(ptr);
+}
+
+vec::vec()
+    : ptr(nullptr) {}
+
+vec::vec(const vec &obj)
+    : ptr(nullptr)
+{
+  ptr = obj.copy();
+}
+vec::vec(std::nullptr_t)
+    : ptr(nullptr) {}
+
+
+vec::vec(__isl_take isl_vec *ptr)
+    : ptr(ptr) {}
+
+
+vec &vec::operator=(vec obj) {
+  std::swap(this->ptr, obj.ptr);
+  return *this;
+}
+
+vec::~vec() {
+  if (ptr)
+    isl_vec_free(ptr);
+}
+
+__isl_give isl_vec *vec::copy() const & {
+  return isl_vec_copy(ptr);
+}
+
+__isl_keep isl_vec *vec::get() const {
+  return ptr;
+}
+
+__isl_give isl_vec *vec::release() {
+  isl_vec *tmp = ptr;
+  ptr = nullptr;
+  return tmp;
+}
+
+bool vec::is_null() const {
+  return ptr == nullptr;
+}
+vec::operator bool() const {
+  return !is_null();
+}
+
+
+ctx vec::get_ctx() const {
+  return ctx(isl_vec_get_ctx(ptr));
+}
+
+void vec::dump() const {
+  isl_vec_dump(get());
+}
+
+
+vec vec::add(vec vec2) const
+{
+  auto res = isl_vec_add(copy(), vec2.release());
+  return manage(res);
+}
+
+vec vec::add_els(unsigned int n) const
+{
+  auto res = isl_vec_add_els(copy(), n);
+  return manage(res);
+}
+
+vec vec::alloc(ctx ctx, unsigned int size)
+{
+  auto res = isl_vec_alloc(ctx.release(), size);
+  return manage(res);
+}
+
+vec vec::ceil() const
+{
+  auto res = isl_vec_ceil(copy());
+  return manage(res);
+}
+
+vec vec::clr() const
+{
+  auto res = isl_vec_clr(copy());
+  return manage(res);
+}
+
+int vec::cmp_element(const vec &vec2, int pos) const
+{
+  auto res = isl_vec_cmp_element(get(), vec2.get(), pos);
+  return res;
+}
+
+vec vec::concat(vec vec2) const
+{
+  auto res = isl_vec_concat(copy(), vec2.release());
+  return manage(res);
+}
+
+vec vec::drop_els(unsigned int pos, unsigned int n) const
+{
+  auto res = isl_vec_drop_els(copy(), pos, n);
+  return manage(res);
+}
+
+vec vec::extend(unsigned int size) const
+{
+  auto res = isl_vec_extend(copy(), size);
+  return manage(res);
+}
+
+val vec::get_element_val(int pos) const
+{
+  auto res = isl_vec_get_element_val(get(), pos);
+  return manage(res);
+}
+
+vec vec::insert_els(unsigned int pos, unsigned int n) const
+{
+  auto res = isl_vec_insert_els(copy(), pos, n);
+  return manage(res);
+}
+
+vec vec::insert_zero_els(unsigned int pos, unsigned int n) const
+{
+  auto res = isl_vec_insert_zero_els(copy(), pos, n);
+  return manage(res);
+}
+
+boolean vec::is_equal(const vec &vec2) const
+{
+  auto res = isl_vec_is_equal(get(), vec2.get());
+  return manage(res);
+}
+
+vec vec::mat_product(mat mat) const
+{
+  auto res = isl_vec_mat_product(copy(), mat.release());
+  return manage(res);
+}
+
+vec vec::move_els(unsigned int dst_col, unsigned int src_col, unsigned int n) const
+{
+  auto res = isl_vec_move_els(copy(), dst_col, src_col, n);
+  return manage(res);
+}
+
+vec vec::neg() const
+{
+  auto res = isl_vec_neg(copy());
+  return manage(res);
+}
+
+vec vec::set_element_si(int pos, int v) const
+{
+  auto res = isl_vec_set_element_si(copy(), pos, v);
+  return manage(res);
+}
+
+vec vec::set_element_val(int pos, val v) const
+{
+  auto res = isl_vec_set_element_val(copy(), pos, v.release());
+  return manage(res);
+}
+
+vec vec::set_si(int v) const
+{
+  auto res = isl_vec_set_si(copy(), v);
+  return manage(res);
+}
+
+vec vec::set_val(val v) const
+{
+  auto res = isl_vec_set_val(copy(), v.release());
+  return manage(res);
+}
+
+int vec::size() const
+{
+  auto res = isl_vec_size(get());
+  return res;
+}
+
+vec vec::sort() const
+{
+  auto res = isl_vec_sort(copy());
+  return manage(res);
+}
+
+vec vec::zero(ctx ctx, unsigned int size)
+{
+  auto res = isl_vec_zero(ctx.release(), size);
+  return manage(res);
+}
+
+vec vec::zero_extend(unsigned int size) const
+{
+  auto res = isl_vec_zero_extend(copy(), size);
+  return manage(res);
+}
+} // namespace noexceptions 
+} // namespace isl
+
+#endif /* ISL_CPP_CHECKED */
diff --git a/linux-x64/clang/include/polly/isl/list.h b/linux-x64/clang/include/polly/isl/list.h
new file mode 100644
index 0000000..47fcef7
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/list.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_LIST_H
+#define ISL_LIST_H
+
+#include <isl/ctx.h>
+#include <isl/printer_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define ISL_DECLARE_LIST_TYPE2(EL,EXPORT)				\
+struct isl_##EL;							\
+struct EXPORT isl_##EL##_list;						\
+typedef struct isl_##EL##_list isl_##EL##_list;
+#define ISL_DECLARE_LIST_TYPE(EL)					\
+	ISL_DECLARE_LIST_TYPE2(EL,)
+#define ISL_DECLARE_EXPORTED_LIST_TYPE(EL)				\
+	ISL_DECLARE_LIST_TYPE2(EL,__isl_export)
+#define ISL_DECLARE_LIST_FN3(EL,CONSTRUCTOR,EXPORT)			\
+isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list);	\
+CONSTRUCTOR								\
+__isl_give isl_##EL##_list *isl_##EL##_list_from_##EL(			\
+	__isl_take isl_##EL *el);					\
+CONSTRUCTOR								\
+__isl_give isl_##EL##_list *isl_##EL##_list_alloc(isl_ctx *ctx, int n);	\
+__isl_give isl_##EL##_list *isl_##EL##_list_copy(			\
+	__isl_keep isl_##EL##_list *list);				\
+__isl_null isl_##EL##_list *isl_##EL##_list_free(			\
+	__isl_take isl_##EL##_list *list);				\
+EXPORT									\
+__isl_give isl_##EL##_list *isl_##EL##_list_add(			\
+	__isl_take isl_##EL##_list *list,				\
+	__isl_take isl_##EL *el);					\
+EXPORT									\
+__isl_give isl_##EL##_list *isl_##EL##_list_insert(			\
+	__isl_take isl_##EL##_list *list, unsigned pos,			\
+	__isl_take isl_##EL *el);					\
+EXPORT									\
+__isl_give isl_##EL##_list *isl_##EL##_list_drop(			\
+	__isl_take isl_##EL##_list *list, unsigned first, unsigned n);	\
+EXPORT									\
+__isl_give isl_##EL##_list *isl_##EL##_list_clear(			\
+	__isl_take isl_##EL##_list *list);				\
+__isl_give isl_##EL##_list *isl_##EL##_list_swap(			\
+	__isl_take isl_##EL##_list *list, unsigned pos1,		\
+	unsigned pos2);							\
+__isl_give isl_##EL##_list *isl_##EL##_list_reverse(			\
+	__isl_take isl_##EL##_list *list);				\
+EXPORT									\
+__isl_give isl_##EL##_list *isl_##EL##_list_concat(			\
+	__isl_take isl_##EL##_list *list1,				\
+	__isl_take isl_##EL##_list *list2);				\
+EXPORT									\
+isl_size isl_##EL##_list_size(__isl_keep isl_##EL##_list *list);	\
+isl_size isl_##EL##_list_n_##EL(__isl_keep isl_##EL##_list *list);	\
+EXPORT									\
+__isl_give isl_##EL *isl_##EL##_list_get_at(				\
+	__isl_keep isl_##EL##_list *list, int index);			\
+__isl_give struct isl_##EL *isl_##EL##_list_get_##EL(			\
+	__isl_keep isl_##EL##_list *list, int index);			\
+__isl_give struct isl_##EL##_list *isl_##EL##_list_set_##EL(		\
+	__isl_take struct isl_##EL##_list *list, int index,		\
+	__isl_take struct isl_##EL *el);				\
+EXPORT									\
+isl_stat isl_##EL##_list_foreach(__isl_keep isl_##EL##_list *list,	\
+	isl_stat (*fn)(__isl_take isl_##EL *el, void *user),		\
+	void *user);							\
+isl_bool isl_##EL##_list_every(__isl_keep isl_##EL##_list *list,	\
+	isl_bool (*test)(__isl_keep isl_##EL *el, void *user),		\
+	void *user);							\
+__isl_give isl_##EL##_list *isl_##EL##_list_map(			\
+	__isl_take isl_##EL##_list *list,				\
+	__isl_give isl_##EL * (*fn)(__isl_take isl_##EL *el,		\
+		void *user),						\
+	void *user);							\
+__isl_give isl_##EL##_list *isl_##EL##_list_sort(			\
+	__isl_take isl_##EL##_list *list,				\
+	int (*cmp)(__isl_keep struct isl_##EL *a,			\
+		__isl_keep struct isl_##EL *b,				\
+		void *user), void *user);				\
+isl_stat isl_##EL##_list_foreach_scc(__isl_keep isl_##EL##_list *list,	\
+	isl_bool (*follows)(__isl_keep struct isl_##EL *a,		\
+			__isl_keep struct isl_##EL *b, void *user),	\
+	void *follows_user,						\
+	isl_stat (*fn)(__isl_take isl_##EL##_list *scc, void *user),	\
+	void *fn_user);							\
+__isl_give char *isl_##EL##_list_to_str(				\
+	__isl_keep isl_##EL##_list *list);				\
+__isl_give isl_printer *isl_printer_print_##EL##_list(			\
+	__isl_take isl_printer *p, __isl_keep isl_##EL##_list *list);	\
+void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list);
+#define ISL_DECLARE_LIST_FN(EL)						\
+	ISL_DECLARE_LIST_FN3(EL,,)
+#define ISL_DECLARE_EXPORTED_LIST_FN(EL)				\
+	ISL_DECLARE_LIST_FN3(EL,__isl_constructor,__isl_export)
+
+#define ISL_DECLARE_LIST(EL)						\
+	ISL_DECLARE_LIST_TYPE(EL)					\
+	ISL_DECLARE_LIST_FN(EL)
+#define ISL_DECLARE_EXPORTED_LIST(EL)					\
+	ISL_DECLARE_EXPORTED_LIST_TYPE(EL)				\
+	ISL_DECLARE_EXPORTED_LIST_FN(EL)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/local_space.h b/linux-x64/clang/include/polly/isl/local_space.h
new file mode 100644
index 0000000..51305d2
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/local_space.h
@@ -0,0 +1,98 @@
+#ifndef ISL_LOCAL_SPACE_H
+#define ISL_LOCAL_SPACE_H
+
+#include <isl/aff_type.h>
+#include <isl/space_type.h>
+#include <isl/printer.h>
+#include <isl/map_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_local_space;
+typedef struct isl_local_space isl_local_space;
+
+isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls);
+
+__isl_give isl_local_space *isl_local_space_from_space(
+	__isl_take isl_space *space);
+
+__isl_give isl_local_space *isl_local_space_copy(
+	__isl_keep isl_local_space *ls);
+__isl_null isl_local_space *isl_local_space_free(
+	__isl_take isl_local_space *ls);
+
+isl_bool isl_local_space_is_params(__isl_keep isl_local_space *ls);
+isl_bool isl_local_space_is_set(__isl_keep isl_local_space *ls);
+
+__isl_give isl_local_space *isl_local_space_set_tuple_id(
+	__isl_take isl_local_space *ls,
+	enum isl_dim_type type, __isl_take isl_id *id);
+
+isl_size isl_local_space_dim(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type);
+isl_bool isl_local_space_has_dim_name(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_local_space *isl_local_space_set_dim_name(
+	__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos, const char *s);
+isl_bool isl_local_space_has_dim_id(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_local_space_get_dim_id(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_local_space *isl_local_space_set_dim_id(
+	__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+__isl_give isl_space *isl_local_space_get_space(__isl_keep isl_local_space *ls);
+__isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls,
+	int pos);
+
+int isl_local_space_find_dim_by_name(__isl_keep isl_local_space *ls,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_local_space *isl_local_space_domain(
+	__isl_take isl_local_space *ls);
+__isl_give isl_local_space *isl_local_space_range(
+	__isl_take isl_local_space *ls);
+__isl_give isl_local_space *isl_local_space_from_domain(
+	__isl_take isl_local_space *ls);
+__isl_give isl_local_space *isl_local_space_add_dims(
+	__isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n);
+__isl_give isl_local_space *isl_local_space_drop_dims(
+	__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_local_space *isl_local_space_insert_dims(
+	__isl_take isl_local_space *ls,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_local_space *isl_local_space_set_from_params(
+	__isl_take isl_local_space *ls);
+
+__isl_give isl_local_space *isl_local_space_intersect(
+	__isl_take isl_local_space *ls1, __isl_take isl_local_space *ls2);
+
+__isl_give isl_local_space *isl_local_space_wrap(
+	__isl_take isl_local_space *ls);
+
+isl_bool isl_local_space_is_equal(__isl_keep isl_local_space *ls1,
+	__isl_keep isl_local_space *ls2);
+
+__isl_give isl_basic_map *isl_local_space_lifting(
+	__isl_take isl_local_space *ls);
+
+__isl_give isl_local_space *isl_local_space_flatten_domain(
+	__isl_take isl_local_space *ls);
+__isl_give isl_local_space *isl_local_space_flatten_range(
+	__isl_take isl_local_space *ls);
+
+__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p,
+	__isl_keep isl_local_space *ls);
+void isl_local_space_dump(__isl_keep isl_local_space *ls);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/lp.h b/linux-x64/clang/include/polly/isl/lp.h
new file mode 100644
index 0000000..4ca39a9
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/lp.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_LP_H
+#define ISL_LP_H
+
+#include <isl/aff.h>
+#include <isl/val_type.h>
+#include <isl/set_type.h>
+
+enum isl_lp_result {
+	isl_lp_error = -1,
+	isl_lp_ok = 0,
+	isl_lp_unbounded,
+	isl_lp_empty
+};
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_give isl_val *isl_basic_set_min_lp_val(__isl_keep isl_basic_set *bset,
+	__isl_keep isl_aff *obj);
+__isl_give isl_val *isl_basic_set_max_lp_val(__isl_keep isl_basic_set *bset,
+	__isl_keep isl_aff *obj);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/map.h b/linux-x64/clang/include/polly/isl/map.h
new file mode 100644
index 0000000..2fcffff
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/map.h
@@ -0,0 +1,755 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_MAP_H
+#define ISL_MAP_H
+
+#include <stdio.h>
+
+#include <isl/ctx.h>
+#include <isl/space_type.h>
+#include <isl/vec.h>
+#include <isl/mat.h>
+#include <isl/printer.h>
+#include <isl/local_space.h>
+#include <isl/aff_type.h>
+#include <isl/list.h>
+#include <isl/map_type.h>
+#include <isl/val_type.h>
+#include <isl/stdint.h>
+#include <isl/stride_info.h>
+#include <isl/fixed_box.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_size isl_basic_map_total_dim(__isl_keep const isl_basic_map *bmap);
+isl_size isl_basic_map_dim(__isl_keep isl_basic_map *bmap,
+				enum isl_dim_type type);
+
+isl_size isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type);
+
+isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap);
+isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map);
+__isl_give isl_space *isl_basic_map_get_space(__isl_keep isl_basic_map *bmap);
+__isl_export
+__isl_give isl_space *isl_map_get_space(__isl_keep isl_map *map);
+
+__isl_give isl_aff *isl_basic_map_get_div(__isl_keep isl_basic_map *bmap,
+	int pos);
+
+__isl_give isl_local_space *isl_basic_map_get_local_space(
+	__isl_keep isl_basic_map *bmap);
+
+__isl_give isl_basic_map *isl_basic_map_set_tuple_name(
+	__isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s);
+const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type);
+isl_bool isl_map_has_tuple_name(__isl_keep isl_map *map,
+	enum isl_dim_type type);
+const char *isl_map_get_tuple_name(__isl_keep isl_map *map,
+	enum isl_dim_type type);
+__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map,
+	enum isl_dim_type type, const char *s);
+const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_map_has_dim_name(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned pos);
+const char *isl_map_get_dim_name(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_basic_map *isl_basic_map_set_dim_name(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos, const char *s);
+__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+__isl_give isl_basic_map *isl_basic_map_set_tuple_id(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_map *isl_map_set_dim_id(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+isl_bool isl_basic_map_has_dim_id(__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_map_has_dim_id(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_map_get_dim_id(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_map *isl_map_set_tuple_id(__isl_take isl_map *map,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_map *isl_map_reset_tuple_id(__isl_take isl_map *map,
+	enum isl_dim_type type);
+isl_bool isl_map_has_tuple_id(__isl_keep isl_map *map, enum isl_dim_type type);
+__isl_give isl_id *isl_map_get_tuple_id(__isl_keep isl_map *map,
+	enum isl_dim_type type);
+__isl_give isl_map *isl_map_reset_user(__isl_take isl_map *map);
+
+int isl_basic_map_find_dim_by_name(__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type, const char *name);
+int isl_map_find_dim_by_id(__isl_keep isl_map *map, enum isl_dim_type type,
+	__isl_keep isl_id *id);
+int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type,
+	const char *name);
+
+isl_bool isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap);
+
+__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_space *space);
+__isl_null isl_basic_map *isl_basic_map_free(__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_copy(__isl_keep isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_equal(
+	__isl_take isl_space *space, unsigned n_equal);
+__isl_give isl_basic_map *isl_basic_map_less_at(__isl_take isl_space *space,
+	unsigned pos);
+__isl_give isl_basic_map *isl_basic_map_more_at(__isl_take isl_space *space,
+	unsigned pos);
+__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *space);
+__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *space);
+__isl_give isl_basic_map *isl_basic_map_nat_universe(
+	__isl_take isl_space *space);
+__isl_give isl_basic_map *isl_basic_map_remove_redundancies(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_map_simple_hull(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_basic_map *isl_map_unshifted_simple_hull(
+	__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_map_plain_unshifted_simple_hull(
+	__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_map_unshifted_simple_hull_from_map_list(
+	__isl_take isl_map *map, __isl_take isl_map_list *list);
+
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_intersect_domain(
+		__isl_take isl_basic_map *bmap,
+		__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_intersect_range(
+		__isl_take isl_basic_map *bmap,
+		__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_intersect(
+		__isl_take isl_basic_map *bmap1,
+		__isl_take isl_basic_map *bmap2);
+__isl_give isl_basic_map *isl_basic_map_list_intersect(
+	__isl_take isl_basic_map_list *list);
+__isl_export
+__isl_give isl_map *isl_basic_map_union(
+		__isl_take isl_basic_map *bmap1,
+		__isl_take isl_basic_map *bmap2);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_apply_domain(
+		__isl_take isl_basic_map *bmap1,
+		__isl_take isl_basic_map *bmap2);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_apply_range(
+		__isl_take isl_basic_map *bmap1,
+		__isl_take isl_basic_map *bmap2);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_affine_hull(
+		__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_preimage_domain_multi_aff(
+	__isl_take isl_basic_map *bmap, __isl_take isl_multi_aff *ma);
+__isl_give isl_basic_map *isl_basic_map_preimage_range_multi_aff(
+	__isl_take isl_basic_map *bmap, __isl_take isl_multi_aff *ma);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_reverse(__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_set *isl_basic_map_domain(__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_set *isl_basic_map_range(__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_domain_map(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_range_map(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_remove_dims(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_eliminate(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_detect_equalities(
+						__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx,
+	FILE *input);
+__isl_constructor
+__isl_give isl_basic_map *isl_basic_map_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give isl_map *isl_map_read_from_file(isl_ctx *ctx, FILE *input);
+__isl_constructor
+__isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, const char *str);
+void isl_basic_map_dump(__isl_keep isl_basic_map *bmap);
+void isl_map_dump(__isl_keep isl_map *map);
+__isl_give char *isl_basic_map_to_str(__isl_keep isl_basic_map *bmap);
+__isl_give isl_printer *isl_printer_print_basic_map(
+	__isl_take isl_printer *printer, __isl_keep isl_basic_map *bmap);
+__isl_give char *isl_map_to_str(__isl_keep isl_map *map);
+__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *printer,
+	__isl_keep isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_map *isl_basic_map_fix_val(__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *v);
+__isl_give isl_basic_map *isl_basic_map_lower_bound_si(
+		__isl_take isl_basic_map *bmap,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_map *isl_basic_map_upper_bound_si(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos, int value);
+__isl_overload
+__isl_give isl_map *isl_map_lower_bound_multi_val(__isl_take isl_map *map,
+	__isl_take isl_multi_val *lower);
+__isl_overload
+__isl_give isl_map *isl_map_upper_bound_multi_val(__isl_take isl_map *map,
+	__isl_take isl_multi_val *upper);
+__isl_overload
+__isl_give isl_map *isl_map_lower_bound_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *lower);
+__isl_overload
+__isl_give isl_map *isl_map_upper_bound_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *upper);
+
+__isl_give isl_basic_map *isl_basic_map_sum(__isl_take isl_basic_map *bmap1,
+	__isl_take isl_basic_map *bmap2);
+__isl_give isl_basic_map *isl_basic_map_neg(__isl_take isl_basic_map *bmap);
+
+__isl_give isl_map *isl_map_sum(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_neg(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_floordiv_val(__isl_take isl_map *map,
+	__isl_take isl_val *d);
+
+__isl_export
+isl_bool isl_basic_map_is_equal(__isl_keep isl_basic_map *bmap1,
+	__isl_keep isl_basic_map *bmap2);
+isl_bool isl_basic_map_is_disjoint(__isl_keep isl_basic_map *bmap1,
+	__isl_keep isl_basic_map *bmap2);
+
+__isl_give isl_map *isl_basic_map_partial_lexmax(
+		__isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_map *isl_basic_map_partial_lexmin(
+		__isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_map *isl_map_partial_lexmax(
+		__isl_take isl_map *map, __isl_take isl_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_map *isl_map_partial_lexmin(
+		__isl_take isl_map *map, __isl_take isl_set *dom,
+		__isl_give isl_set **empty);
+__isl_export
+__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map);
+__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmin_pw_multi_aff(
+	__isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom,
+	__isl_give isl_set **empty);
+__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmax_pw_multi_aff(
+	__isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom,
+	__isl_give isl_set **empty);
+__isl_give isl_pw_multi_aff *isl_basic_map_lexmin_pw_multi_aff(
+	__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_map_lexmin_pw_multi_aff(
+	__isl_take isl_map *map);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff(
+	__isl_take isl_map *map);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_map_min_multi_pw_aff(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_map_max_multi_pw_aff(__isl_take isl_map *map);
+
+void isl_basic_map_print_internal(__isl_keep isl_basic_map *bmap,
+	FILE *out, int indent);
+
+__isl_give isl_val *isl_basic_map_plain_get_val_if_fixed(
+	__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned pos);
+
+isl_bool isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap);
+isl_bool isl_basic_map_plain_is_universe(__isl_keep isl_basic_map *bmap);
+isl_bool isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap);
+isl_bool isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap);
+__isl_export
+isl_bool isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap);
+__isl_export
+isl_bool isl_basic_map_is_subset(__isl_keep isl_basic_map *bmap1,
+		__isl_keep isl_basic_map *bmap2);
+isl_bool isl_basic_map_is_strict_subset(__isl_keep isl_basic_map *bmap1,
+		__isl_keep isl_basic_map *bmap2);
+
+__isl_export
+__isl_give isl_map *isl_map_universe(__isl_take isl_space *space);
+__isl_give isl_map *isl_map_nat_universe(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_map *isl_map_empty(__isl_take isl_space *space);
+__isl_give isl_map *isl_map_identity(__isl_take isl_space *space);
+__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_space *space,
+	unsigned n);
+__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_space *space,
+	unsigned n);
+__isl_give isl_map *isl_map_lex_lt(__isl_take isl_space *set_space);
+__isl_give isl_map *isl_map_lex_le(__isl_take isl_space *set_space);
+__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_space *space,
+	unsigned n);
+__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_space *space,
+	unsigned n);
+__isl_give isl_map *isl_map_lex_gt(__isl_take isl_space *set_space);
+__isl_give isl_map *isl_map_lex_ge(__isl_take isl_space *set_space);
+__isl_null isl_map *isl_map_free(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_copy(__isl_keep isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_reverse(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_range_reverse(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_union(
+		__isl_take isl_map *map1,
+		__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_union_disjoint(
+		__isl_take isl_map *map1, __isl_take isl_map *map2);
+__isl_export
+__isl_give isl_map *isl_map_intersect_domain(
+		__isl_take isl_map *map,
+		__isl_take isl_set *set);
+__isl_export
+__isl_give isl_map *isl_map_intersect_range(
+		__isl_take isl_map *map,
+		__isl_take isl_set *set);
+__isl_give isl_map *isl_map_intersect_domain_factor_range(
+	__isl_take isl_map *map, __isl_take isl_map *factor);
+__isl_give isl_map *isl_map_intersect_range_factor_domain(
+	__isl_take isl_map *map, __isl_take isl_map *factor);
+__isl_give isl_map *isl_map_intersect_range_factor_range(
+	__isl_take isl_map *map, __isl_take isl_map *factor);
+__isl_export
+__isl_give isl_map *isl_map_apply_domain(
+		__isl_take isl_map *map1,
+		__isl_take isl_map *map2);
+__isl_export
+__isl_give isl_map *isl_map_apply_range(
+		__isl_take isl_map *map1,
+		__isl_take isl_map *map2);
+__isl_overload
+__isl_give isl_map *isl_map_preimage_domain_multi_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_map *isl_map_preimage_range_multi_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_map *isl_map_preimage_domain_pw_multi_aff(
+	__isl_take isl_map *map, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_map *isl_map_preimage_range_pw_multi_aff(
+	__isl_take isl_map *map, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_map *isl_map_preimage_domain_multi_pw_aff(
+	__isl_take isl_map *map, __isl_take isl_multi_pw_aff *mpa);
+__isl_give isl_basic_map *isl_basic_map_product(
+	__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2);
+__isl_give isl_map *isl_map_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_basic_map *isl_basic_map_domain_product(
+	__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2);
+__isl_give isl_basic_map *isl_basic_map_range_product(
+	__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2);
+__isl_export
+__isl_give isl_map *isl_map_domain_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_export
+__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_basic_map *isl_basic_map_flat_product(
+	__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2);
+__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_basic_map *isl_basic_map_flat_range_product(
+	__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2);
+__isl_give isl_map *isl_map_flat_domain_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+isl_bool isl_map_domain_is_wrapping(__isl_keep isl_map *map);
+isl_bool isl_map_range_is_wrapping(__isl_keep isl_map *map);
+isl_bool isl_map_is_product(__isl_keep isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_factor_domain(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_factor_range(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_domain_factor_domain(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_domain_factor_range(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_range_factor_domain(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_range_factor_range(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1,
+				      __isl_take isl_map *map2);
+__isl_export
+__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map,
+		__isl_take isl_set *params);
+__isl_export
+__isl_give isl_map *isl_map_subtract(
+		__isl_take isl_map *map1,
+		__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_subtract_domain(__isl_take isl_map *map,
+	__isl_take isl_set *dom);
+__isl_give isl_map *isl_map_subtract_range(__isl_take isl_map *map,
+	__isl_take isl_set *dom);
+__isl_export
+__isl_give isl_map *isl_map_complement(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_fix_input_si(__isl_take isl_map *map,
+		unsigned input, int value);
+__isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_map *isl_map_fix_val(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *v);
+__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_map *isl_map_lower_bound_val(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *value);
+__isl_give isl_map *isl_map_upper_bound_si(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_map *isl_map_upper_bound_val(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *value);
+__isl_export
+__isl_give isl_basic_set *isl_basic_map_deltas(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_set *isl_map_deltas(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_deltas_map(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_map_convex_hull(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_add_dims(__isl_take isl_basic_map *bmap,
+		enum isl_dim_type type, unsigned n);
+__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map,
+		enum isl_dim_type type, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_insert_dims(
+	__isl_take isl_basic_map *bmap, enum isl_dim_type type,
+	unsigned pos, unsigned n);
+__isl_give isl_map *isl_map_insert_dims(__isl_take isl_map *map,
+		enum isl_dim_type type, unsigned pos, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_move_dims(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_project_out(
+		__isl_take isl_basic_map *bmap,
+		enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map,
+		enum isl_dim_type type, unsigned first, unsigned n);
+__isl_export
+__isl_give isl_map *isl_map_project_out_all_params(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_remove_divs(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_remove_unknown_divs(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_remove_dims(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_remove_divs_involving_dims(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_remove_divs_involving_dims(__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_remove_inputs(__isl_take isl_map *map,
+	unsigned first, unsigned n);
+
+__isl_give isl_basic_map *isl_basic_map_equate(__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_basic_map *isl_basic_map_order_ge(__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_order_ge(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_order_le(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_equate(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_oppose(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_basic_map *isl_basic_map_order_gt(__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+__isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+
+__isl_export
+__isl_give isl_map *isl_set_identity(__isl_take isl_set *set);
+
+__isl_export
+isl_bool isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset);
+__isl_export
+isl_bool isl_set_is_wrapping(__isl_keep isl_set *set);
+__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map);
+__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_flatten_domain(
+	__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_flatten_range(
+	__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_map_flatten_domain(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set);
+__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set);
+__isl_give isl_set *isl_map_params(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_set *isl_map_domain(__isl_take isl_map *bmap);
+__isl_export
+__isl_give isl_set *isl_map_range(__isl_take isl_map *map);
+__isl_export
+__isl_give isl_map *isl_set_insert_domain(__isl_take isl_set *set,
+	__isl_take isl_space *domain);
+__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map);
+__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map);
+__isl_give isl_map *isl_set_wrapped_domain_map(__isl_take isl_set *set);
+__isl_constructor
+__isl_give isl_map *isl_map_from_basic_map(__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set);
+__isl_give isl_basic_map *isl_basic_map_from_domain(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_basic_map *isl_basic_map_from_range(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_map *isl_map_from_range(__isl_take isl_set *set);
+__isl_give isl_basic_map *isl_basic_map_from_domain_and_range(
+	__isl_take isl_basic_set *domain, __isl_take isl_basic_set *range);
+__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain,
+	__isl_take isl_set *range);
+__isl_export
+__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map);
+
+__isl_export
+__isl_give isl_set *isl_map_bind_domain(__isl_take isl_map *map,
+	__isl_take isl_multi_id *tuple);
+__isl_export
+__isl_give isl_set *isl_map_bind_range(__isl_take isl_map *map,
+	__isl_take isl_multi_id *tuple);
+
+isl_bool isl_map_plain_is_empty(__isl_keep isl_map *map);
+isl_bool isl_map_plain_is_universe(__isl_keep isl_map *map);
+__isl_export
+isl_bool isl_map_is_empty(__isl_keep isl_map *map);
+__isl_export
+isl_bool isl_map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2);
+__isl_export
+isl_bool isl_map_is_strict_subset(__isl_keep isl_map *map1,
+	__isl_keep isl_map *map2);
+__isl_export
+isl_bool isl_map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2);
+__isl_export
+isl_bool isl_map_is_disjoint(__isl_keep isl_map *map1,
+	__isl_keep isl_map *map2);
+isl_bool isl_basic_map_is_single_valued(__isl_keep isl_basic_map *bmap);
+isl_bool isl_map_plain_is_single_valued(__isl_keep isl_map *map);
+__isl_export
+isl_bool isl_map_is_single_valued(__isl_keep isl_map *map);
+isl_bool isl_map_plain_is_injective(__isl_keep isl_map *map);
+__isl_export
+isl_bool isl_map_is_injective(__isl_keep isl_map *map);
+__isl_export
+isl_bool isl_map_is_bijective(__isl_keep isl_map *map);
+isl_bool isl_map_is_identity(__isl_keep isl_map *map);
+int isl_map_is_translation(__isl_keep isl_map *map);
+isl_bool isl_map_has_equal_space(__isl_keep isl_map *map1,
+	__isl_keep isl_map *map2);
+
+isl_bool isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap);
+isl_bool isl_map_can_zip(__isl_keep isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_zip(__isl_take isl_map *map);
+
+isl_bool isl_basic_map_can_curry(__isl_keep isl_basic_map *bmap);
+isl_bool isl_map_can_curry(__isl_keep isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_curry(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_map_curry(__isl_take isl_map *map);
+
+isl_bool isl_map_can_range_curry(__isl_keep isl_map *map);
+__isl_give isl_map *isl_map_range_curry(__isl_take isl_map *map);
+
+isl_bool isl_basic_map_can_uncurry(__isl_keep isl_basic_map *bmap);
+isl_bool isl_map_can_uncurry(__isl_keep isl_map *map);
+__isl_give isl_basic_map *isl_basic_map_uncurry(__isl_take isl_basic_map *bmap);
+__isl_export
+__isl_give isl_map *isl_map_uncurry(__isl_take isl_map *map);
+
+__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map);
+__isl_give isl_map *isl_basic_map_compute_divs(__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_compute_divs(__isl_take isl_map *map);
+ISL_DEPRECATED
+__isl_give isl_map *isl_map_align_divs(__isl_take isl_map *map);
+
+__isl_give isl_basic_map *isl_basic_map_drop_constraints_involving_dims(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_map *isl_basic_map_drop_constraints_not_involving_dims(
+	__isl_take isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_drop_constraints_involving_dims(
+	__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_map *isl_map_drop_constraints_not_involving_dims(
+	__isl_take isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+isl_bool isl_basic_map_involves_dims(__isl_keep isl_basic_map *bmap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+isl_bool isl_map_involves_dims(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+void isl_map_print_internal(__isl_keep isl_map *map, FILE *out, int indent);
+
+__isl_give isl_val *isl_map_plain_get_val_if_fixed(__isl_keep isl_map *map,
+	enum isl_dim_type type, unsigned pos);
+
+__isl_give isl_basic_map *isl_basic_map_gist_domain(
+	__isl_take isl_basic_map *bmap, __isl_take isl_basic_set *context);
+__isl_export
+__isl_give isl_basic_map *isl_basic_map_gist(__isl_take isl_basic_map *bmap,
+	__isl_take isl_basic_map *context);
+__isl_export
+__isl_give isl_map *isl_map_gist(__isl_take isl_map *map,
+	__isl_take isl_map *context);
+__isl_export
+__isl_give isl_map *isl_map_gist_domain(__isl_take isl_map *map,
+	__isl_take isl_set *context);
+__isl_give isl_map *isl_map_gist_range(__isl_take isl_map *map,
+	__isl_take isl_set *context);
+__isl_give isl_map *isl_map_gist_params(__isl_take isl_map *map,
+	__isl_take isl_set *context);
+__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map,
+	__isl_take isl_basic_map *context);
+
+__isl_give isl_stride_info *isl_map_get_range_stride_info(
+	__isl_keep isl_map *map, int pos);
+__isl_export
+__isl_give isl_fixed_box *isl_map_get_range_simple_fixed_box_hull(
+	__isl_keep isl_map *map);
+
+__isl_export
+__isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map);
+
+isl_bool isl_map_plain_is_equal(__isl_keep isl_map *map1,
+	__isl_keep isl_map *map2);
+
+uint32_t isl_map_get_hash(__isl_keep isl_map *map);
+
+isl_size isl_map_n_basic_map(__isl_keep isl_map *map);
+__isl_export
+isl_stat isl_map_foreach_basic_map(__isl_keep isl_map *map,
+	isl_stat (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user);
+__isl_give isl_basic_map_list *isl_map_get_basic_map_list(
+	__isl_keep isl_map *map);
+
+__isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map,
+	__isl_take isl_val *exp);
+__isl_give isl_map *isl_map_power(__isl_take isl_map *map, isl_bool *exact);
+__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map,
+	isl_bool *exact);
+__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map,
+	isl_bool *exact);
+
+__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1,
+	__isl_take isl_map *map2);
+
+__isl_overload
+__isl_give isl_map *isl_map_eq_at_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_map *isl_map_lex_lt_at_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_map *isl_map_lex_le_at_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_map *isl_map_lex_gt_at_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_map *isl_map_lex_ge_at_multi_pw_aff(__isl_take isl_map *map,
+	__isl_take isl_multi_pw_aff *mpa);
+
+__isl_give isl_basic_map *isl_basic_map_align_params(
+	__isl_take isl_basic_map *bmap, __isl_take isl_space *model);
+__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map,
+	__isl_take isl_space *model);
+__isl_give isl_basic_map *isl_basic_map_drop_unused_params(
+	__isl_take isl_basic_map *bmap);
+__isl_give isl_map *isl_map_drop_unused_params(__isl_take isl_map *map);
+
+__isl_give isl_mat *isl_basic_map_equalities_matrix(
+		__isl_keep isl_basic_map *bmap, enum isl_dim_type c1,
+		enum isl_dim_type c2, enum isl_dim_type c3,
+		enum isl_dim_type c4, enum isl_dim_type c5);
+__isl_give isl_mat *isl_basic_map_inequalities_matrix(
+		__isl_keep isl_basic_map *bmap, enum isl_dim_type c1,
+		enum isl_dim_type c2, enum isl_dim_type c3,
+		enum isl_dim_type c4, enum isl_dim_type c5);
+__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices(
+	__isl_take isl_space *space,
+	__isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1,
+	enum isl_dim_type c2, enum isl_dim_type c3,
+	enum isl_dim_type c4, enum isl_dim_type c5);
+
+__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff);
+__isl_give isl_basic_map *isl_basic_map_from_multi_aff(
+	__isl_take isl_multi_aff *maff);
+__isl_give isl_basic_map *isl_basic_map_from_aff_list(
+	__isl_take isl_space *domain_space, __isl_take isl_aff_list *list);
+
+__isl_give isl_map *isl_map_from_aff(__isl_take isl_aff *aff);
+__isl_give isl_map *isl_map_from_multi_aff(__isl_take isl_multi_aff *maff);
+
+__isl_give isl_pw_aff *isl_map_dim_min(__isl_take isl_map *map, int pos);
+__isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos);
+
+ISL_DECLARE_LIST_FN(basic_map)
+ISL_DECLARE_LIST_FN(map)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/map_to_basic_set.h b/linux-x64/clang/include/polly/isl/map_to_basic_set.h
new file mode 100644
index 0000000..80e9ab5
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/map_to_basic_set.h
@@ -0,0 +1,18 @@
+#ifndef ISL_MAP_TO_BASIC_SET_H
+#define ISL_MAP_TO_BASIC_SET_H
+
+#include <isl/set_type.h>
+#include <isl/map_type.h>
+#include <isl/maybe_basic_set.h>
+
+#define ISL_KEY		isl_map
+#define ISL_VAL		isl_basic_set
+#define ISL_HMAP_SUFFIX	map_to_basic_set
+#define ISL_HMAP	isl_map_to_basic_set
+#include <isl/hmap.h>
+#undef ISL_KEY
+#undef ISL_VAL
+#undef ISL_HMAP_SUFFIX
+#undef ISL_HMAP
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/map_type.h b/linux-x64/clang/include/polly/isl/map_type.h
new file mode 100644
index 0000000..7c30056
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/map_type.h
@@ -0,0 +1,37 @@
+#ifndef ISL_MAP_TYPE_H
+#define ISL_MAP_TYPE_H
+
+#include <isl/ctx.h>
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_subclass(isl_map) isl_basic_map;
+typedef struct isl_basic_map isl_basic_map;
+ISL_DECLARE_LIST_TYPE(basic_map)
+struct __isl_subclass(isl_union_map) isl_map;
+typedef struct isl_map isl_map;
+ISL_DECLARE_LIST_TYPE(map)
+
+#ifndef isl_basic_set
+struct __isl_subclass(isl_set) isl_basic_set;
+typedef struct isl_basic_set isl_basic_set;
+ISL_DECLARE_LIST_TYPE(basic_set)
+#endif
+
+#ifndef isl_set
+struct __isl_subclass(isl_union_set) isl_set;
+typedef struct isl_set isl_set;
+ISL_DECLARE_LIST_TYPE(set)
+#endif
+
+ISL_DECLARE_LIST_FN(basic_set)
+ISL_DECLARE_LIST_FN(set)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/mat.h b/linux-x64/clang/include/polly/isl/mat.h
new file mode 100644
index 0000000..0ec6b93
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/mat.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_MAT_H
+#define ISL_MAT_H
+
+#include <stdio.h>
+
+#include <isl/ctx.h>
+#include <isl/vec.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_mat;
+typedef struct isl_mat	isl_mat;
+
+isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat);
+
+__isl_give isl_mat *isl_mat_alloc(isl_ctx *ctx,
+	unsigned n_row, unsigned n_col);
+__isl_give isl_mat *isl_mat_extend(__isl_take isl_mat *mat,
+	unsigned n_row, unsigned n_col);
+__isl_give isl_mat *isl_mat_identity(isl_ctx *ctx, unsigned n_row);
+__isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat);
+__isl_null isl_mat *isl_mat_free(__isl_take isl_mat *mat);
+
+isl_size isl_mat_rows(__isl_keep isl_mat *mat);
+isl_size isl_mat_cols(__isl_keep isl_mat *mat);
+__isl_give isl_val *isl_mat_get_element_val(__isl_keep isl_mat *mat,
+	int row, int col);
+__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat,
+	int row, int col, int v);
+__isl_give isl_mat *isl_mat_set_element_val(__isl_take isl_mat *mat,
+	int row, int col, __isl_take isl_val *v);
+
+__isl_give isl_mat *isl_mat_swap_cols(__isl_take isl_mat *mat,
+	unsigned i, unsigned j);
+__isl_give isl_mat *isl_mat_swap_rows(__isl_take isl_mat *mat,
+	unsigned i, unsigned j);
+
+__isl_give isl_vec *isl_mat_vec_product(__isl_take isl_mat *mat,
+	__isl_take isl_vec *vec);
+__isl_give isl_vec *isl_vec_mat_product(__isl_take isl_vec *vec,
+	__isl_take isl_mat *mat);
+__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat,
+						__isl_take isl_vec *vec);
+__isl_give isl_mat *isl_mat_aff_direct_sum(__isl_take isl_mat *left,
+	__isl_take isl_mat *right);
+__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1,
+	__isl_take isl_mat *mat2);
+__isl_give isl_mat *isl_mat_left_hermite(__isl_take isl_mat *M, int neg,
+	__isl_give isl_mat **U, __isl_give isl_mat **Q);
+__isl_give isl_mat *isl_mat_lin_to_aff(__isl_take isl_mat *mat);
+__isl_give isl_mat *isl_mat_inverse_product(__isl_take isl_mat *left,
+	__isl_take isl_mat *right);
+__isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left,
+	__isl_take isl_mat *right);
+__isl_give isl_mat *isl_mat_transpose(__isl_take isl_mat *mat);
+__isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat);
+__isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat);
+
+__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat);
+__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row);
+
+__isl_give isl_mat *isl_mat_drop_cols(__isl_take isl_mat *mat,
+	unsigned col, unsigned n);
+__isl_give isl_mat *isl_mat_drop_rows(__isl_take isl_mat *mat,
+				unsigned row, unsigned n);
+__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat,
+				unsigned col, unsigned n);
+__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat,
+				unsigned row, unsigned n);
+__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat,
+	unsigned dst_col, unsigned src_col, unsigned n);
+__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n);
+__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat,
+	unsigned first, unsigned n);
+__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n);
+__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat,
+	unsigned row, unsigned n);
+__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n);
+
+void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col);
+
+__isl_give isl_mat *isl_mat_unimodular_complete(__isl_take isl_mat *M, int row);
+__isl_give isl_mat *isl_mat_row_basis(__isl_take isl_mat *mat);
+__isl_give isl_mat *isl_mat_row_basis_extension(
+	__isl_take isl_mat *mat1, __isl_take isl_mat *mat2);
+
+__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec);
+__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top,
+	__isl_take isl_mat *bot);
+__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top,
+	__isl_take isl_vec *bot);
+
+isl_bool isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2);
+isl_bool isl_mat_has_linearly_independent_rows(__isl_keep isl_mat *mat1,
+	__isl_keep isl_mat *mat2);
+
+isl_size isl_mat_rank(__isl_keep isl_mat *mat);
+int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat);
+
+void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent);
+void isl_mat_dump(__isl_keep isl_mat *mat);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe.h b/linux-x64/clang/include/polly/isl/maybe.h
new file mode 100644
index 0000000..1fb3573
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe.h
@@ -0,0 +1,7 @@
+#ifndef ISL_MAYBE_H
+#define ISL_MAYBE_H
+
+#define ISL_xMAYBE(TYPE)	isl_maybe_ ## TYPE
+#define ISL_MAYBE(TYPE)		ISL_xMAYBE(TYPE)
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe_ast_expr.h b/linux-x64/clang/include/polly/isl/maybe_ast_expr.h
new file mode 100644
index 0000000..260fa34
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe_ast_expr.h
@@ -0,0 +1,8 @@
+#ifndef ISL_MAYBE_AST_EXPR_H
+#define ISL_MAYBE_AST_EXPR_H
+
+#define ISL_TYPE	isl_ast_expr
+#include <isl/maybe_templ.h>
+#undef ISL_TYPE
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe_basic_set.h b/linux-x64/clang/include/polly/isl/maybe_basic_set.h
new file mode 100644
index 0000000..1dc0881
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe_basic_set.h
@@ -0,0 +1,8 @@
+#ifndef ISL_MAYBE_BASIC_SET_H
+#define ISL_MAYBE_BASIC_SET_H
+
+#define ISL_TYPE	isl_basic_set
+#include <isl/maybe_templ.h>
+#undef ISL_TYPE
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe_id.h b/linux-x64/clang/include/polly/isl/maybe_id.h
new file mode 100644
index 0000000..24ea308
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe_id.h
@@ -0,0 +1,8 @@
+#ifndef ISL_MAYBE_ID_H
+#define ISL_MAYBE_ID_H
+
+#define ISL_TYPE	isl_id
+#include <isl/maybe_templ.h>
+#undef ISL_TYPE
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe_pw_aff.h b/linux-x64/clang/include/polly/isl/maybe_pw_aff.h
new file mode 100644
index 0000000..bc0dd9c
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe_pw_aff.h
@@ -0,0 +1,8 @@
+#ifndef ISL_MAYBE_PW_AFF_H
+#define ISL_MAYBE_PW_AFF_H
+
+#define ISL_TYPE	isl_pw_aff
+#include <isl/maybe_templ.h>
+#undef ISL_TYPE
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/maybe_templ.h b/linux-x64/clang/include/polly/isl/maybe_templ.h
new file mode 100644
index 0000000..4dac253
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/maybe_templ.h
@@ -0,0 +1,12 @@
+#include <isl/ctx.h>
+#include <isl/maybe.h>
+
+/* A structure that possibly contains a pointer to an object of type ISL_TYPE.
+ * The pointer in "value" is only valid if "valid" is isl_bool_true.
+ * Otherwise, "value" is set to NULL.
+ */
+struct ISL_MAYBE(ISL_TYPE) {
+	isl_bool	valid;
+	ISL_TYPE	*value;
+};
+typedef struct ISL_MAYBE(ISL_TYPE) ISL_MAYBE(ISL_TYPE);
diff --git a/linux-x64/clang/include/polly/isl/multi.h b/linux-x64/clang/include/polly/isl/multi.h
new file mode 100644
index 0000000..b9e13da
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/multi.h
@@ -0,0 +1,255 @@
+#ifndef ISL_MULTI_H
+#define ISL_MULTI_H
+
+#include <isl/val_type.h>
+#include <isl/space_type.h>
+#include <isl/list.h>
+#include <isl/set_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define ISL_DECLARE_MULTI(BASE)						\
+isl_ctx *isl_multi_##BASE##_get_ctx(					\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_export								\
+__isl_give isl_space *isl_multi_##BASE##_get_space(			\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_give isl_space *isl_multi_##BASE##_get_domain_space(		\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_export								\
+__isl_give isl_##BASE##_list *isl_multi_##BASE##_get_list(		\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_constructor							\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_from_##BASE##_list(	\
+	__isl_take isl_space *space, __isl_take isl_##BASE##_list *list); \
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_copy(			\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_null isl_multi_##BASE *isl_multi_##BASE##_free(			\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_export								\
+isl_bool isl_multi_##BASE##_plain_is_equal(				\
+	__isl_keep isl_multi_##BASE *multi1,				\
+	__isl_keep isl_multi_##BASE *multi2);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_reset_user(		\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_export								\
+isl_size isl_multi_##BASE##_size(__isl_keep isl_multi_##BASE *multi);	\
+__isl_export								\
+__isl_give isl_##BASE *isl_multi_##BASE##_get_at(			\
+	__isl_keep isl_multi_##BASE *multi, int pos);			\
+__isl_give isl_##BASE *isl_multi_##BASE##_get_##BASE(			\
+	__isl_keep isl_multi_##BASE *multi, int pos);			\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_at(			\
+	__isl_take isl_multi_##BASE *multi, int pos,			\
+	__isl_take isl_##BASE *el);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_##BASE(		\
+	__isl_take isl_multi_##BASE *multi, int pos,			\
+	__isl_take isl_##BASE *el);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_splice(		\
+	__isl_take isl_multi_##BASE *multi1, unsigned pos,		\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_flatten_range(		\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_flat_range_product(	\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_product(		\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_factor_range(		\
+	__isl_take isl_multi_##BASE *multi);				\
+isl_bool isl_multi_##BASE##_range_is_wrapping(				\
+	__isl_keep isl_multi_##BASE *multi);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_factor_domain(	\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_range_factor_range(	\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_align_params(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_space *model);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_from_range(		\
+	__isl_take isl_multi_##BASE *multi);
+
+#define ISL_DECLARE_MULTI_IDENTITY(BASE)				\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_identity_multi_##BASE(	\
+	__isl_take isl_multi_##BASE *multi);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_identity(		\
+	__isl_take isl_space *space);					\
+__isl_overload								\
+__isl_give isl_multi_##BASE *						\
+isl_multi_##BASE##_identity_on_domain_space(				\
+	__isl_take isl_space *space);
+
+#define ISL_DECLARE_MULTI_CMP(BASE)					\
+int isl_multi_##BASE##_plain_cmp(__isl_keep isl_multi_##BASE *multi1,	\
+	__isl_keep isl_multi_##BASE *multi2);
+
+#define ISL_DECLARE_MULTI_ARITH(BASE)					\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_val(		\
+	__isl_take isl_multi_##BASE *multi, __isl_take isl_val *v);	\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_down_val(		\
+	__isl_take isl_multi_##BASE *multi, __isl_take isl_val *v);	\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_multi_val(	\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_val *mv);					\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_scale_down_multi_val(	\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_val *mv);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_mod_multi_val(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_val *mv);					\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_add(			\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_sub(			\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_neg(		 	\
+	__isl_take isl_multi_##BASE *multi);
+
+#define ISL_DECLARE_MULTI_MIN_MAX(BASE)					\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_min(			\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_max(			\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);
+
+#define ISL_DECLARE_MULTI_ADD_CONSTANT(BASE)				\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_add_constant_val(	\
+	__isl_take isl_multi_##BASE *mpa, __isl_take isl_val *v);	\
+__isl_overload								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_add_constant_multi_val(	\
+	__isl_take isl_multi_##BASE *mpa, __isl_take isl_multi_val *mv);
+
+#define ISL_DECLARE_MULTI_ZERO(BASE)					\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_zero(			\
+	__isl_take isl_space *space);
+
+#define ISL_DECLARE_MULTI_NAN(BASE)					\
+isl_bool isl_multi_##BASE##_involves_nan(				\
+	__isl_keep isl_multi_##BASE *multi);
+
+#define ISL_DECLARE_MULTI_DROP_DIMS(BASE)				\
+isl_size isl_multi_##BASE##_dim(__isl_keep isl_multi_##BASE *multi,	\
+	enum isl_dim_type type);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_drop_dims(		\
+	__isl_take isl_multi_##BASE *multi, enum isl_dim_type type,	\
+	unsigned first, unsigned n);
+#define ISL_DECLARE_MULTI_DIMS(BASE)					\
+ISL_DECLARE_MULTI_DROP_DIMS(BASE)					\
+isl_bool isl_multi_##BASE##_involves_dims(				\
+	__isl_keep isl_multi_##BASE *multi, enum isl_dim_type type,	\
+	unsigned first, unsigned n);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_insert_dims(		\
+	__isl_take isl_multi_##BASE *multi, enum isl_dim_type type,	\
+	unsigned first, unsigned n);					\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_add_dims(		\
+	__isl_take isl_multi_##BASE *multi, enum isl_dim_type type,	\
+	unsigned n);							\
+__isl_give isl_multi_##BASE *						\
+isl_multi_##BASE##_project_domain_on_params(				\
+	__isl_take isl_multi_##BASE *multi);
+
+#define ISL_DECLARE_MULTI_INSERT_DOMAIN(BASE)				\
+__isl_export								\
+__isl_give isl_multi_##BASE *						\
+isl_multi_##BASE##_insert_domain(__isl_take isl_multi_##BASE *multi,	\
+	__isl_take isl_space *domain);
+
+#define ISL_DECLARE_MULTI_LOCALS(BASE)					\
+__isl_export								\
+isl_bool isl_multi_##BASE##_involves_locals(				\
+	__isl_keep isl_multi_##BASE *multi);
+
+#define ISL_DECLARE_MULTI_DIM_ID(BASE)					\
+int isl_multi_##BASE##_find_dim_by_name(				\
+	__isl_keep isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, const char *name);			\
+int isl_multi_##BASE##_find_dim_by_id(					\
+	__isl_keep isl_multi_##BASE *multi, enum isl_dim_type type,	\
+	__isl_keep isl_id *id);						\
+__isl_give isl_id *isl_multi_##BASE##_get_dim_id(			\
+	__isl_keep isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, unsigned pos);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_dim_name(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, unsigned pos, const char *s);		\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_dim_id(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+
+#define ISL_DECLARE_MULTI_TUPLE_ID(BASE)				\
+const char *isl_multi_##BASE##_get_tuple_name(				\
+	__isl_keep isl_multi_##BASE *multi, enum isl_dim_type type);	\
+isl_bool isl_multi_##BASE##_has_tuple_id(				\
+	__isl_keep isl_multi_##BASE *multi, enum isl_dim_type type);	\
+__isl_give isl_id *isl_multi_##BASE##_get_tuple_id(			\
+	__isl_keep isl_multi_##BASE *multi, enum isl_dim_type type);	\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_tuple_name(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, const char *s);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_set_tuple_id(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	enum isl_dim_type type, __isl_take isl_id *id);			\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_reset_tuple_id(		\
+	__isl_take isl_multi_##BASE *multi, enum isl_dim_type type);
+
+#define ISL_DECLARE_MULTI_WITH_DOMAIN(BASE)				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_product(		\
+	__isl_take isl_multi_##BASE *multi1,				\
+	__isl_take isl_multi_##BASE *multi2);				\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_splice(			\
+	__isl_take isl_multi_##BASE *multi1, unsigned in_pos,		\
+	unsigned out_pos, __isl_take isl_multi_##BASE *multi2);
+
+#define ISL_DECLARE_MULTI_BIND_DOMAIN(BASE)				\
+__isl_export								\
+__isl_give isl_multi_##BASE *isl_multi_##BASE##_bind_domain(		\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_id *tuple);				\
+__isl_export								\
+__isl_give isl_multi_##BASE *						\
+isl_multi_##BASE##_bind_domain_wrapped_domain(				\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_id *tuple);
+
+#define ISL_DECLARE_MULTI_UNBIND_PARAMS(BASE)				\
+__isl_export								\
+__isl_give isl_multi_##BASE *						\
+isl_multi_##BASE##_unbind_params_insert_domain(				\
+	__isl_take isl_multi_##BASE *multi,				\
+	__isl_take isl_multi_id *domain);
+
+#define ISL_DECLARE_MULTI_PARAM(BASE)					\
+__isl_overload								\
+isl_bool isl_multi_##BASE##_involves_param_id(				\
+	__isl_keep isl_multi_##BASE *multi, __isl_keep isl_id *id);	\
+__isl_overload								\
+isl_bool isl_multi_##BASE##_involves_param_id_list(			\
+	__isl_keep isl_multi_##BASE *multi,				\
+	__isl_keep isl_id_list *list);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/obj.h b/linux-x64/clang/include/polly/isl/obj.h
new file mode 100644
index 0000000..07c6bf3
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/obj.h
@@ -0,0 +1,57 @@
+#ifndef ISL_OBJ_H
+#define ISL_OBJ_H
+
+#include <isl/set_type.h>
+#include <isl/map_type.h>
+#include <isl/union_set_type.h>
+#include <isl/union_map_type.h>
+#include <isl/polynomial_type.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_obj_vtable {
+	void *(*copy)(void *v1);
+	void *(*add)(void *v1, void *v2);
+	__isl_give isl_printer *(*print)(__isl_take isl_printer *p, void *v);
+	void (*free)(void *v);
+};
+typedef struct isl_obj_vtable *isl_obj_type;
+extern struct isl_obj_vtable isl_obj_none_vtable;
+#define isl_obj_none		(&isl_obj_none_vtable)
+extern struct isl_obj_vtable isl_obj_int_vtable;
+#define isl_obj_int		(&isl_obj_int_vtable)
+extern struct isl_obj_vtable isl_obj_val_vtable;
+#define isl_obj_val		(&isl_obj_val_vtable)
+extern struct isl_obj_vtable isl_obj_set_vtable;
+#define isl_obj_set		(&isl_obj_set_vtable)
+extern struct isl_obj_vtable isl_obj_union_set_vtable;
+#define isl_obj_union_set	(&isl_obj_union_set_vtable)
+extern struct isl_obj_vtable isl_obj_map_vtable;
+#define isl_obj_map		(&isl_obj_map_vtable)
+extern struct isl_obj_vtable isl_obj_union_map_vtable;
+#define isl_obj_union_map	(&isl_obj_union_map_vtable)
+extern struct isl_obj_vtable isl_obj_pw_multi_aff_vtable;
+#define isl_obj_pw_multi_aff	(&isl_obj_pw_multi_aff_vtable)
+extern struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable;
+#define isl_obj_pw_qpolynomial	(&isl_obj_pw_qpolynomial_vtable)
+extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable;
+#define isl_obj_union_pw_qpolynomial	(&isl_obj_union_pw_qpolynomial_vtable)
+extern struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable;
+#define isl_obj_pw_qpolynomial_fold	(&isl_obj_pw_qpolynomial_fold_vtable)
+extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable;
+#define isl_obj_union_pw_qpolynomial_fold	(&isl_obj_union_pw_qpolynomial_fold_vtable)
+extern struct isl_obj_vtable isl_obj_schedule_vtable;
+#define isl_obj_schedule	(&isl_obj_schedule_vtable)
+struct isl_obj {
+	isl_obj_type	type;
+	void		*v;
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/options.h b/linux-x64/clang/include/polly/isl/options.h
new file mode 100644
index 0000000..1738155
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/options.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_OPTIONS_H
+#define ISL_OPTIONS_H
+
+#include <isl/arg.h>
+#include <isl/ctx.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_options;
+
+ISL_ARG_DECL(isl_options, struct isl_options, isl_options_args)
+
+#define			ISL_BOUND_BERNSTEIN	0
+#define			ISL_BOUND_RANGE		1
+isl_stat isl_options_set_bound(isl_ctx *ctx, int val);
+int isl_options_get_bound(isl_ctx *ctx);
+
+#define			ISL_ON_ERROR_WARN	0
+#define			ISL_ON_ERROR_CONTINUE	1
+#define			ISL_ON_ERROR_ABORT	2
+isl_stat isl_options_set_on_error(isl_ctx *ctx, int val);
+int isl_options_get_on_error(isl_ctx *ctx);
+
+isl_stat isl_options_set_gbr_only_first(isl_ctx *ctx, int val);
+int isl_options_get_gbr_only_first(isl_ctx *ctx);
+
+#define		ISL_SCHEDULE_ALGORITHM_ISL		0
+#define		ISL_SCHEDULE_ALGORITHM_FEAUTRIER	1
+isl_stat isl_options_set_schedule_algorithm(isl_ctx *ctx, int val);
+int isl_options_get_schedule_algorithm(isl_ctx *ctx);
+
+isl_stat isl_options_set_pip_symmetry(isl_ctx *ctx, int val);
+int isl_options_get_pip_symmetry(isl_ctx *ctx);
+
+isl_stat isl_options_set_coalesce_bounded_wrapping(isl_ctx *ctx, int val);
+int isl_options_get_coalesce_bounded_wrapping(isl_ctx *ctx);
+
+isl_stat isl_options_set_coalesce_preserve_locals(isl_ctx *ctx, int val);
+int isl_options_get_coalesce_preserve_locals(isl_ctx *ctx);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/point.h b/linux-x64/clang/include/polly/isl/point.h
new file mode 100644
index 0000000..0f907ed
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/point.h
@@ -0,0 +1,46 @@
+#ifndef ISL_POINT_H
+#define ISL_POINT_H
+
+#include <stdio.h>
+#include <isl/space_type.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_subclass(isl_basic_set) isl_point;
+typedef struct isl_point isl_point;
+
+isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt);
+__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt);
+
+__isl_give isl_point *isl_point_zero(__isl_take isl_space *space);
+__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt);
+__isl_null isl_point *isl_point_free(__isl_take isl_point *pnt);
+
+__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt,
+	enum isl_dim_type type, int pos);
+__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt,
+	enum isl_dim_type type, int pos, __isl_take isl_val *v);
+__isl_export
+__isl_give isl_multi_val *isl_point_get_multi_val(__isl_keep isl_point *pnt);
+
+__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt,
+	enum isl_dim_type type, int pos, unsigned val);
+__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt,
+	enum isl_dim_type type, int pos, unsigned val);
+
+__isl_give isl_point *isl_point_void(__isl_take isl_space *space);
+isl_bool isl_point_is_void(__isl_keep isl_point *pnt);
+
+__isl_give isl_printer *isl_printer_print_point(
+	__isl_take isl_printer *printer, __isl_keep isl_point *pnt);
+__isl_give char *isl_point_to_str(__isl_keep isl_point *pnt);
+void isl_point_dump(__isl_keep isl_point *pnt);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/polynomial.h b/linux-x64/clang/include/polly/isl/polynomial.h
new file mode 100644
index 0000000..ee76d5b
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/polynomial.h
@@ -0,0 +1,824 @@
+#ifndef ISL_POLYNOMIAL_H
+#define ISL_POLYNOMIAL_H
+
+#include <isl/ctx.h>
+#include <isl/constraint.h>
+#include <isl/space_type.h>
+#include <isl/set_type.h>
+#include <isl/point.h>
+#include <isl/printer.h>
+#include <isl/union_set_type.h>
+#include <isl/aff_type.h>
+#include <isl/polynomial_type.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp);
+__isl_give isl_space *isl_qpolynomial_get_domain_space(
+	__isl_keep isl_qpolynomial *qp);
+__isl_give isl_space *isl_qpolynomial_get_space(__isl_keep isl_qpolynomial *qp);
+isl_size isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp,
+	enum isl_dim_type type);
+isl_bool isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_give isl_val *isl_qpolynomial_get_constant_val(
+	__isl_keep isl_qpolynomial *qp);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name(
+	__isl_take isl_qpolynomial *qp,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_zero_on_domain(
+	__isl_take isl_space *domain);
+__isl_give isl_qpolynomial *isl_qpolynomial_one_on_domain(
+	__isl_take isl_space *domain);
+__isl_give isl_qpolynomial *isl_qpolynomial_infty_on_domain(
+	__isl_take isl_space *domain);
+__isl_give isl_qpolynomial *isl_qpolynomial_neginfty_on_domain(
+	__isl_take isl_space *domain);
+__isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain(
+	__isl_take isl_space *domain);
+__isl_give isl_qpolynomial *isl_qpolynomial_val_on_domain(
+	__isl_take isl_space *space, __isl_take isl_val *val);
+__isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain(
+	__isl_take isl_space *domain,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp);
+__isl_null isl_qpolynomial *isl_qpolynomial_free(
+	__isl_take isl_qpolynomial *qp);
+
+isl_bool isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1,
+	__isl_keep isl_qpolynomial *qp2);
+isl_bool isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp);
+isl_bool isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp);
+isl_bool isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp);
+isl_bool isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp);
+int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp);
+__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1,
+	__isl_take isl_qpolynomial *qp2);
+__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1,
+	__isl_take isl_qpolynomial *qp2);
+__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1,
+	__isl_take isl_qpolynomial *qp2);
+__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp,
+	unsigned power);
+__isl_give isl_qpolynomial *isl_qpolynomial_scale_val(
+	__isl_take isl_qpolynomial *qp, __isl_take isl_val *v);
+__isl_give isl_qpolynomial *isl_qpolynomial_scale_down_val(
+	__isl_take isl_qpolynomial *qp, __isl_take isl_val *v);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims(
+	__isl_take isl_qpolynomial *qp, enum isl_dim_type type,
+	unsigned first, unsigned n);
+__isl_give isl_qpolynomial *isl_qpolynomial_add_dims(
+	__isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n);
+__isl_give isl_qpolynomial *isl_qpolynomial_move_dims(
+	__isl_take isl_qpolynomial *qp,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params(
+	__isl_take isl_qpolynomial *qp);
+__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims(
+	__isl_take isl_qpolynomial *qp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_substitute(
+	__isl_take isl_qpolynomial *qp,
+	enum isl_dim_type type, unsigned first, unsigned n,
+	__isl_keep isl_qpolynomial **subs);
+
+isl_stat isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp,
+	__isl_keep isl_basic_set *bset,
+	isl_stat (*fn)(__isl_take isl_basic_set *bset,
+		  __isl_take isl_qpolynomial *poly, void *user), void *user);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_homogenize(
+	__isl_take isl_qpolynomial *poly);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_align_params(
+	__isl_take isl_qpolynomial *qp, __isl_take isl_space *model);
+
+isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term);
+
+__isl_give isl_term *isl_term_copy(__isl_keep isl_term *term);
+__isl_null isl_term *isl_term_free(__isl_take isl_term *term);
+
+isl_size isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type);
+__isl_give isl_val *isl_term_get_coefficient_val(__isl_keep isl_term *term);
+isl_size isl_term_get_exp(__isl_keep isl_term *term,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos);
+
+isl_stat isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp,
+	isl_stat (*fn)(__isl_take isl_term *term, void *user), void *user);
+
+__isl_give isl_val *isl_qpolynomial_eval(__isl_take isl_qpolynomial *qp,
+	__isl_take isl_point *pnt);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_gist_params(
+	__isl_take isl_qpolynomial *qp, __isl_take isl_set *context);
+__isl_give isl_qpolynomial *isl_qpolynomial_gist(
+	__isl_take isl_qpolynomial *qp, __isl_take isl_set *context);
+
+__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint(
+	__isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos);
+__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term);
+__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff);
+__isl_give isl_basic_map *isl_basic_map_from_qpolynomial(
+	__isl_take 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);
+void isl_qpolynomial_dump(__isl_keep isl_qpolynomial *qp);
+
+isl_ctx *isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial *pwqp);
+
+isl_bool isl_pw_qpolynomial_involves_nan(__isl_keep isl_pw_qpolynomial *pwqp);
+isl_bool isl_pw_qpolynomial_plain_is_equal(__isl_keep isl_pw_qpolynomial *pwqp1,
+	__isl_keep isl_pw_qpolynomial *pwqp2);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero(
+	__isl_take isl_space *space);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(__isl_take isl_set *set,
+	__isl_take isl_qpolynomial *qp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial(
+	__isl_take isl_qpolynomial *qp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy(
+	__isl_keep isl_pw_qpolynomial *pwqp);
+__isl_null isl_pw_qpolynomial *isl_pw_qpolynomial_free(
+	__isl_take isl_pw_qpolynomial *pwqp);
+
+isl_bool isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial *pwqp);
+
+__isl_give isl_space *isl_pw_qpolynomial_get_domain_space(
+	__isl_keep isl_pw_qpolynomial *pwqp);
+__isl_give isl_space *isl_pw_qpolynomial_get_space(
+	__isl_keep isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_domain_space(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_space *space);
+isl_size isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type);
+isl_bool isl_pw_qpolynomial_involves_param_id(
+	__isl_keep isl_pw_qpolynomial *pwqp, __isl_keep isl_id *id);
+isl_bool isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+isl_bool isl_pw_qpolynomial_has_equal_space(
+	__isl_keep isl_pw_qpolynomial *pwqp1,
+	__isl_keep isl_pw_qpolynomial *pwqp2);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_set_dim_name(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+int isl_pw_qpolynomial_find_dim_by_name(__isl_keep isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_user(
+	__isl_take isl_pw_qpolynomial *pwqp);
+
+__isl_export
+__isl_give isl_set *isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain(
+	__isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial *
+isl_pw_qpolynomial_intersect_domain_wrapped_domain(
+	__isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial *
+isl_pw_qpolynomial_intersect_domain_wrapped_range(
+	__isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_params(
+	__isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_subtract_domain(
+	__isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params(
+	__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_range(
+	__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_dims(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_dims(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_unused_params(
+	__isl_take isl_pw_qpolynomial *pwqp);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add(
+	__isl_take isl_pw_qpolynomial *pwqp1,
+	__isl_take isl_pw_qpolynomial *pwqp2);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub(
+	__isl_take isl_pw_qpolynomial *pwqp1,
+	__isl_take isl_pw_qpolynomial *pwqp2);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint(
+	__isl_take isl_pw_qpolynomial *pwqp1,
+	__isl_take isl_pw_qpolynomial *pwqp2);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg(
+	__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul(
+	__isl_take isl_pw_qpolynomial *pwqp1,
+	__isl_take isl_pw_qpolynomial *pwqp2);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_scale_val(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_val *v);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_scale_down_val(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_val *v);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow(
+	__isl_take isl_pw_qpolynomial *pwqp, unsigned exponent);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_insert_dims(
+	__isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type type,
+	unsigned first, unsigned n);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned n);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_move_dims(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_val(
+	__isl_take isl_pw_qpolynomial *pwqp,
+	enum isl_dim_type type, unsigned n, __isl_take isl_val *v);
+
+__isl_export
+__isl_give isl_val *isl_pw_qpolynomial_eval(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_point *pnt);
+
+__isl_give isl_val *isl_pw_qpolynomial_max(__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_val *isl_pw_qpolynomial_min(__isl_take isl_pw_qpolynomial *pwqp);
+
+isl_size isl_pw_qpolynomial_n_piece(__isl_keep isl_pw_qpolynomial *pwqp);
+isl_stat isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial *pwqp,
+	isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp,
+		    void *user), void *user);
+isl_bool isl_pw_qpolynomial_every_piece(__isl_keep isl_pw_qpolynomial *pwqp,
+	isl_bool (*test)(__isl_keep isl_set *set,
+		__isl_keep isl_qpolynomial *qp, void *user), void *user);
+isl_stat isl_pw_qpolynomial_foreach_lifted_piece(
+	__isl_keep isl_pw_qpolynomial *pwqp,
+	isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp,
+		    void *user), void *user);
+isl_bool isl_pw_qpolynomial_isa_qpolynomial(
+	__isl_keep isl_pw_qpolynomial *pwqp);
+__isl_give isl_qpolynomial *isl_pw_qpolynomial_as_qpolynomial(
+	__isl_take isl_pw_qpolynomial *pwqp);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_pw_aff(
+	__isl_take isl_pw_aff *pwaff);
+
+__isl_constructor
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx,
+		const char *str);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx,
+		FILE *input);
+__isl_give char *isl_pw_qpolynomial_to_str(__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);
+void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out,
+	unsigned output_format);
+void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial *pwqp);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_coalesce(
+	__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context);
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist_params(
+	__isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods(
+	__isl_take isl_pw_qpolynomial *pwqp, int max_periods);
+
+__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call(
+	__isl_take isl_basic_set *bset,
+	__isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset));
+
+isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold);
+enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type,
+	__isl_take isl_space *space);
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc(
+	enum isl_fold type, __isl_take isl_qpolynomial *qp);
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy(
+	__isl_keep isl_qpolynomial_fold *fold);
+__isl_null isl_qpolynomial_fold *isl_qpolynomial_fold_free(
+	__isl_take isl_qpolynomial_fold *fold);
+
+isl_bool isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold);
+isl_bool isl_qpolynomial_fold_is_nan(__isl_keep isl_qpolynomial_fold *fold);
+int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1,
+	__isl_keep isl_qpolynomial_fold *fold2);
+
+__isl_give isl_space *isl_qpolynomial_fold_get_domain_space(
+	__isl_keep isl_qpolynomial_fold *fold);
+__isl_give isl_space *isl_qpolynomial_fold_get_space(
+	__isl_keep isl_qpolynomial_fold *fold);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold(
+	__isl_take isl_qpolynomial_fold *fold1,
+	__isl_take isl_qpolynomial_fold *fold2);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_val(
+	__isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v);
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_down_val(
+	__isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims(
+	__isl_take isl_qpolynomial_fold *fold,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute(
+	__isl_take isl_qpolynomial_fold *fold,
+	enum isl_dim_type type, unsigned first, unsigned n,
+	__isl_keep isl_qpolynomial **subs);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fix_val(
+	__isl_take isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type type, unsigned n, __isl_take isl_val *v);
+
+__isl_give isl_val *isl_qpolynomial_fold_eval(
+	__isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt);
+
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params(
+	__isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context);
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist(
+	__isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context);
+
+isl_stat isl_qpolynomial_fold_foreach_qpolynomial(
+	__isl_keep isl_qpolynomial_fold *fold,
+	isl_stat (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user);
+
+__isl_give isl_printer *isl_printer_print_qpolynomial_fold(
+	__isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold);
+void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out,
+	unsigned output_format);
+void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold);
+
+isl_ctx *isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold *pwf);
+enum isl_fold isl_pw_qpolynomial_fold_get_type(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+
+isl_bool isl_pw_qpolynomial_fold_involves_nan(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+isl_bool isl_pw_qpolynomial_fold_plain_is_equal(
+	__isl_keep isl_pw_qpolynomial_fold *pwf1,
+	__isl_keep isl_pw_qpolynomial_fold *pwf2);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial(
+	enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_alloc(
+	enum isl_fold type,
+	__isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold);
+__isl_give isl_pw_qpolynomial_fold *
+isl_pw_qpolynomial_fold_from_qpolynomial_fold(
+	__isl_take isl_qpolynomial_fold *fold);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+__isl_null isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_free(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+
+isl_bool isl_pw_qpolynomial_fold_is_zero(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_space *isl_pw_qpolynomial_fold_get_domain_space(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_space *isl_pw_qpolynomial_fold_get_space(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_space(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_space *space);
+isl_size isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type type);
+isl_bool isl_pw_qpolynomial_fold_involves_param_id(
+	__isl_keep isl_pw_qpolynomial_fold *pwf, __isl_keep isl_id *id);
+isl_bool isl_pw_qpolynomial_fold_has_equal_space(
+	__isl_keep isl_pw_qpolynomial_fold *pwf1,
+	__isl_keep isl_pw_qpolynomial_fold *pwf2);
+
+size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_zero(
+	__isl_take isl_space *space, enum isl_fold type);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_set_dim_name(
+	__isl_take isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+int isl_pw_qpolynomial_fold_find_dim_by_name(
+	__isl_keep isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_user(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_set *isl_pw_qpolynomial_fold_domain(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_domain(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial_fold *
+isl_pw_qpolynomial_fold_intersect_domain_wrapped_domain(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial_fold *
+isl_pw_qpolynomial_fold_intersect_domain_wrapped_range(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_params(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_subtract_domain(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add(
+	__isl_take isl_pw_qpolynomial_fold *pwf1,
+	__isl_take isl_pw_qpolynomial_fold *pwf2);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold(
+	__isl_take isl_pw_qpolynomial_fold *pwf1,
+	__isl_take isl_pw_qpolynomial_fold *pwf2);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint(
+	__isl_take isl_pw_qpolynomial_fold *pwf1,
+	__isl_take isl_pw_qpolynomial_fold *pwf2);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_val(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_down_val(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_range(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims(
+	__isl_take isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_move_dims(
+	__isl_take isl_pw_qpolynomial_fold *pwf,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_unused_params(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_val *isl_pw_qpolynomial_fold_eval(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_point *pnt);
+
+isl_size isl_pw_qpolynomial_fold_n_piece(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+isl_stat isl_pw_qpolynomial_fold_foreach_piece(
+	__isl_keep isl_pw_qpolynomial_fold *pwf,
+	isl_stat (*fn)(__isl_take isl_set *set,
+		__isl_take isl_qpolynomial_fold *fold, void *user), void *user);
+isl_bool isl_pw_qpolynomial_fold_every_piece(
+	__isl_keep isl_pw_qpolynomial_fold *pwf,
+	isl_bool (*test)(__isl_keep isl_set *set,
+		__isl_keep isl_qpolynomial_fold *fold, void *user), void *user);
+isl_stat isl_pw_qpolynomial_fold_foreach_lifted_piece(
+	__isl_keep isl_pw_qpolynomial_fold *pwf,
+	isl_stat (*fn)(__isl_take isl_set *set,
+		__isl_take isl_qpolynomial_fold *fold, void *user), void *user);
+isl_bool isl_pw_qpolynomial_fold_isa_qpolynomial_fold(
+	__isl_keep isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_qpolynomial_fold *isl_pw_qpolynomial_fold_as_qpolynomial_fold(
+	__isl_take 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);
+void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist_params(
+	__isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context);
+
+__isl_give isl_val *isl_pw_qpolynomial_fold_max(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_val *isl_pw_qpolynomial_fold_min(
+	__isl_take isl_pw_qpolynomial_fold *pwf);
+
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound(
+	__isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type,
+	isl_bool *tight);
+__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound(
+	__isl_take isl_pw_qpolynomial_fold *pwf, isl_bool *tight);
+__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold(
+	__isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf,
+	isl_bool *tight);
+__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold(
+	__isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf,
+	isl_bool *tight);
+
+__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial(
+	__isl_take isl_pw_qpolynomial *pwqp, int sign);
+
+isl_ctx *isl_union_pw_qpolynomial_get_ctx(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+
+isl_size isl_union_pw_qpolynomial_dim(
+	__isl_keep isl_union_pw_qpolynomial *upwqp, enum isl_dim_type type);
+
+isl_bool isl_union_pw_qpolynomial_involves_nan(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+isl_bool isl_union_pw_qpolynomial_plain_is_equal(
+	__isl_keep isl_union_pw_qpolynomial *upwqp1,
+	__isl_keep isl_union_pw_qpolynomial *upwqp2);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero_ctx(
+	isl_ctx *ctx);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero_space(
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero(
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	__isl_take isl_pw_qpolynomial *pwqp);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+__isl_null isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_free(
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+
+__isl_constructor
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_read_from_str(
+	isl_ctx *ctx, const char *str);
+__isl_give char *isl_union_pw_qpolynomial_to_str(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_neg(
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add(
+	__isl_take isl_union_pw_qpolynomial *upwqp1,
+	__isl_take isl_union_pw_qpolynomial *upwqp2);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub(
+	__isl_take isl_union_pw_qpolynomial *upwqp1,
+	__isl_take isl_union_pw_qpolynomial *upwqp2);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul(
+	__isl_take isl_union_pw_qpolynomial *upwqp1,
+	__isl_take isl_union_pw_qpolynomial *upwqp2);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_val(
+	__isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_down_val(
+	__isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v);
+
+__isl_export
+__isl_give isl_union_set *isl_union_pw_qpolynomial_domain(
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_intersect_domain_space(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_intersect_domain_union_set(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_intersect_domain_wrapped_domain(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_intersect_domain_wrapped_range(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_params(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_set *set);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_subtract_domain_union_set(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial *
+isl_union_pw_qpolynomial_subtract_domain_space(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_subtract_domain(
+	__isl_take isl_union_pw_qpolynomial *upwpq,
+	__isl_take isl_union_set *uset);
+
+__isl_give isl_space *isl_union_pw_qpolynomial_get_space(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+__isl_give isl_pw_qpolynomial_list *
+isl_union_pw_qpolynomial_get_pw_qpolynomial_list(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_set_dim_name(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+int isl_union_pw_qpolynomial_find_dim_by_name(
+	__isl_keep isl_union_pw_qpolynomial *upwqp,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_drop_dims(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_reset_user(
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+
+__isl_export
+__isl_give isl_val *isl_union_pw_qpolynomial_eval(
+	__isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_point *pnt);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce(
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	__isl_take isl_union_set *context);
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist_params(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	__isl_take isl_set *context);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_align_params(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	__isl_take isl_space *model);
+
+isl_size isl_union_pw_qpolynomial_n_pw_qpolynomial(
+	__isl_keep isl_union_pw_qpolynomial *upwqp);
+isl_stat isl_union_pw_qpolynomial_foreach_pw_qpolynomial(
+	__isl_keep isl_union_pw_qpolynomial *upwqp,
+	isl_stat (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user),
+	void *user);
+isl_bool isl_union_pw_qpolynomial_every_pw_qpolynomial(
+	__isl_keep isl_union_pw_qpolynomial *upwqp,
+	isl_bool (*test)(__isl_keep isl_pw_qpolynomial *pwqp, void *user),
+	void *user);
+__isl_give isl_pw_qpolynomial *isl_union_pw_qpolynomial_extract_pw_qpolynomial(
+	__isl_keep isl_union_pw_qpolynomial *upwqp,
+	__isl_take isl_space *space);
+
+__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial(
+	__isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp);
+
+isl_ctx *isl_union_pw_qpolynomial_fold_get_ctx(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+
+isl_size isl_union_pw_qpolynomial_fold_dim(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf, enum isl_dim_type type);
+
+isl_bool isl_union_pw_qpolynomial_fold_involves_nan(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+isl_bool isl_union_pw_qpolynomial_fold_plain_is_equal(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf1,
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf2);
+
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold *pwf);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_zero_ctx(isl_ctx *ctx, enum isl_fold type);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_zero_space(__isl_take isl_space *space,
+	enum isl_fold type);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_zero(
+	__isl_take isl_space *space, enum isl_fold type);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(
+	__isl_take isl_union_pw_qpolynomial_fold *upwqp,
+	__isl_take isl_pw_qpolynomial_fold *pwqp);
+__isl_null isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_free(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf1,
+	__isl_take isl_union_pw_qpolynomial_fold *upwf2);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_pw_qpolynomial *upwqp);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_scale_val(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_scale_down_val(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v);
+
+__isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_intersect_domain_space(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_intersect_domain_union_set(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_intersect_domain_wrapped_domain(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_intersect_domain_wrapped_range(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_intersect_params(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_set *set);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_subtract_domain_union_set(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_subtract_domain_space(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_space *space);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_subtract_domain(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *uset);
+
+enum isl_fold isl_union_pw_qpolynomial_fold_get_type(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+__isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+__isl_give isl_pw_qpolynomial_fold_list *
+isl_union_pw_qpolynomial_fold_get_pw_qpolynomial_fold_list(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_set_dim_name(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+int isl_union_pw_qpolynomial_fold_find_dim_by_name(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf,
+	enum isl_dim_type type, const char *name);
+
+__isl_give isl_union_pw_qpolynomial_fold *
+	isl_union_pw_qpolynomial_fold_drop_dims(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_reset_user(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf);
+
+__isl_give isl_val *isl_union_pw_qpolynomial_fold_eval(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_point *pnt);
+
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_union_set *context);
+__isl_give isl_union_pw_qpolynomial_fold *
+isl_union_pw_qpolynomial_fold_gist_params(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_set *context);
+
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_align_params(
+	__isl_take isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_space *model);
+
+isl_size isl_union_pw_qpolynomial_fold_n_pw_qpolynomial_fold(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf);
+isl_stat isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf,
+	isl_stat (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf,
+		    void *user), void *user);
+isl_bool isl_union_pw_qpolynomial_fold_every_pw_qpolynomial_fold(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf,
+	isl_bool (*test)(__isl_keep isl_pw_qpolynomial_fold *pwf,
+		void *user), void *user);
+__isl_give isl_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold(
+	__isl_keep isl_union_pw_qpolynomial_fold *upwf,
+	__isl_take isl_space *space);
+
+__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_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound(
+	__isl_take isl_union_pw_qpolynomial *upwqp,
+	enum isl_fold type, isl_bool *tight);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold(
+	__isl_take isl_union_set *uset,
+	__isl_take isl_union_pw_qpolynomial_fold *upwf, isl_bool *tight);
+__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_union_pw_qpolynomial_fold *upwf, isl_bool *tight);
+
+__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial(
+	__isl_take isl_union_pw_qpolynomial *upwqp, int sign);
+
+ISL_DECLARE_LIST_FN(pw_qpolynomial)
+ISL_DECLARE_LIST_FN(pw_qpolynomial_fold)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/polynomial_type.h b/linux-x64/clang/include/polly/isl/polynomial_type.h
new file mode 100644
index 0000000..f260219
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/polynomial_type.h
@@ -0,0 +1,36 @@
+#ifndef ISL_POLYNOMIAL_TYPE_H
+#define ISL_POLYNOMIAL_TYPE_H
+
+struct isl_qpolynomial;
+typedef struct isl_qpolynomial isl_qpolynomial;
+
+struct isl_term;
+typedef struct isl_term isl_term;
+
+struct __isl_export isl_pw_qpolynomial;
+typedef struct isl_pw_qpolynomial isl_pw_qpolynomial;
+
+ISL_DECLARE_LIST_TYPE(pw_qpolynomial)
+
+enum isl_fold {
+	isl_fold_error = -1,
+	isl_fold_min,
+	isl_fold_max,
+	isl_fold_list
+};
+
+struct isl_qpolynomial_fold;
+typedef struct isl_qpolynomial_fold isl_qpolynomial_fold;
+
+struct isl_pw_qpolynomial_fold;
+typedef struct isl_pw_qpolynomial_fold isl_pw_qpolynomial_fold;
+
+ISL_DECLARE_LIST_TYPE(pw_qpolynomial_fold)
+
+struct __isl_export isl_union_pw_qpolynomial;
+typedef struct isl_union_pw_qpolynomial isl_union_pw_qpolynomial;
+
+struct isl_union_pw_qpolynomial_fold;
+typedef struct isl_union_pw_qpolynomial_fold isl_union_pw_qpolynomial_fold;
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/printer.h b/linux-x64/clang/include/polly/isl/printer.h
new file mode 100644
index 0000000..c315954
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/printer.h
@@ -0,0 +1,84 @@
+#ifndef ISL_PRINTER_H
+#define ISL_PRINTER_H
+
+#include <stdio.h>
+#include <isl/ctx.h>
+#include <isl/printer_type.h>
+#include <isl/id_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file);
+__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx);
+__isl_null isl_printer *isl_printer_free(__isl_take isl_printer *printer);
+
+isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer);
+FILE *isl_printer_get_file(__isl_keep isl_printer *printer);
+
+__isl_give char *isl_printer_get_str(__isl_keep isl_printer *printer);
+
+__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p,
+	int indent);
+__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p,
+	int indent);
+
+#define ISL_FORMAT_ISL			0
+#define ISL_FORMAT_POLYLIB		1
+#define ISL_FORMAT_POLYLIB_CONSTRAINTS	2
+#define ISL_FORMAT_OMEGA		3
+#define ISL_FORMAT_C			4
+#define ISL_FORMAT_LATEX		5
+#define ISL_FORMAT_EXT_POLYLIB		6
+__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p,
+	int output_format);
+int isl_printer_get_output_format(__isl_keep isl_printer *p);
+
+#define ISL_YAML_STYLE_BLOCK		0
+#define ISL_YAML_STYLE_FLOW		1
+__isl_give isl_printer *isl_printer_set_yaml_style(__isl_take isl_printer *p,
+	int yaml_style);
+int isl_printer_get_yaml_style(__isl_keep isl_printer *p);
+
+__isl_give isl_printer *isl_printer_set_indent_prefix(__isl_take isl_printer *p,
+	const char *prefix);
+__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p,
+	const char *prefix);
+__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p,
+	const char *suffix);
+__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p,
+	int width);
+
+isl_bool isl_printer_has_note(__isl_keep isl_printer *p,
+	__isl_keep isl_id *id);
+__isl_give isl_id *isl_printer_get_note(__isl_keep isl_printer *p,
+	__isl_take isl_id *id);
+__isl_give isl_printer *isl_printer_set_note(__isl_take isl_printer *p,
+	__isl_take isl_id *id, __isl_take isl_id *note);
+
+__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_print_double(__isl_take isl_printer *p,
+	double d);
+__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i);
+__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p,
+	const char *s);
+
+__isl_give isl_printer *isl_printer_yaml_start_mapping(
+	__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_yaml_end_mapping(
+	__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_yaml_start_sequence(
+	__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_yaml_end_sequence(
+	__isl_take isl_printer *p);
+__isl_give isl_printer *isl_printer_yaml_next(__isl_take isl_printer *p);
+
+__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/printer_type.h b/linux-x64/clang/include/polly/isl/printer_type.h
new file mode 100644
index 0000000..985f8ca
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/printer_type.h
@@ -0,0 +1,15 @@
+#ifndef ISL_PRINTER_TYPE_H
+#define ISL_PRINTER_TYPE_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_printer;
+typedef struct isl_printer isl_printer;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/schedule.h b/linux-x64/clang/include/polly/isl/schedule.h
new file mode 100644
index 0000000..3792f94
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/schedule.h
@@ -0,0 +1,200 @@
+#ifndef ISL_SCHEDULE_H
+#define ISL_SCHEDULE_H
+
+#include <isl/union_set_type.h>
+#include <isl/union_map_type.h>
+#include <isl/schedule_type.h>
+#include <isl/aff_type.h>
+#include <isl/space_type.h>
+#include <isl/set_type.h>
+#include <isl/list.h>
+#include <isl/printer_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_schedule_constraints;
+typedef struct isl_schedule_constraints isl_schedule_constraints;
+
+isl_stat isl_options_set_schedule_max_coefficient(isl_ctx *ctx, int val);
+int isl_options_get_schedule_max_coefficient(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_max_constant_term(isl_ctx *ctx, int val);
+int isl_options_get_schedule_max_constant_term(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_maximize_band_depth(isl_ctx *ctx, int val);
+int isl_options_get_schedule_maximize_band_depth(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_maximize_coincidence(isl_ctx *ctx, int val);
+int isl_options_get_schedule_maximize_coincidence(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_outer_coincidence(isl_ctx *ctx, int val);
+int isl_options_get_schedule_outer_coincidence(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_split_scaled(isl_ctx *ctx, int val);
+int isl_options_get_schedule_split_scaled(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_treat_coalescing(isl_ctx *ctx, int val);
+int isl_options_get_schedule_treat_coalescing(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_separate_components(isl_ctx *ctx, int val);
+int isl_options_get_schedule_separate_components(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_serialize_sccs(isl_ctx *ctx, int val);
+int isl_options_get_schedule_serialize_sccs(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_whole_component(isl_ctx *ctx, int val);
+int isl_options_get_schedule_whole_component(isl_ctx *ctx);
+
+isl_stat isl_options_set_schedule_carry_self_first(isl_ctx *ctx, int val);
+int isl_options_get_schedule_carry_self_first(isl_ctx *ctx);
+
+__isl_give isl_schedule_constraints *isl_schedule_constraints_copy(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_schedule_constraints *isl_schedule_constraints_on_domain(
+	__isl_take isl_union_set *domain);
+__isl_export
+__isl_give isl_schedule_constraints *isl_schedule_constraints_set_context(
+	__isl_take isl_schedule_constraints *sc, __isl_take isl_set *context);
+__isl_export
+__isl_give isl_schedule_constraints *isl_schedule_constraints_set_validity(
+	__isl_take isl_schedule_constraints *sc,
+	__isl_take isl_union_map *validity);
+__isl_export
+__isl_give isl_schedule_constraints *isl_schedule_constraints_set_coincidence(
+	__isl_take isl_schedule_constraints *sc,
+	__isl_take isl_union_map *coincidence);
+__isl_export
+__isl_give isl_schedule_constraints *isl_schedule_constraints_set_proximity(
+	__isl_take isl_schedule_constraints *sc,
+	__isl_take isl_union_map *proximity);
+__isl_export
+__isl_give isl_schedule_constraints *
+isl_schedule_constraints_set_conditional_validity(
+	__isl_take isl_schedule_constraints *sc,
+	__isl_take isl_union_map *condition,
+	__isl_take isl_union_map *validity);
+__isl_null isl_schedule_constraints *isl_schedule_constraints_free(
+	__isl_take isl_schedule_constraints *sc);
+
+isl_ctx *isl_schedule_constraints_get_ctx(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_set *isl_schedule_constraints_get_domain(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_set *isl_schedule_constraints_get_context(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_map *isl_schedule_constraints_get_validity(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_map *isl_schedule_constraints_get_coincidence(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_map *isl_schedule_constraints_get_proximity(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_map *isl_schedule_constraints_get_conditional_validity(
+	__isl_keep isl_schedule_constraints *sc);
+__isl_export
+__isl_give isl_union_map *
+isl_schedule_constraints_get_conditional_validity_condition(
+	__isl_keep isl_schedule_constraints *sc);
+
+__isl_give isl_schedule_constraints *isl_schedule_constraints_apply(
+	__isl_take isl_schedule_constraints *sc,
+	__isl_take isl_union_map *umap);
+
+__isl_constructor
+__isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_str(
+	isl_ctx *ctx, const char *str);
+__isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_file(
+	isl_ctx *ctx, FILE *input);
+__isl_give isl_printer *isl_printer_print_schedule_constraints(
+	__isl_take isl_printer *p, __isl_keep isl_schedule_constraints *sc);
+void isl_schedule_constraints_dump(__isl_keep isl_schedule_constraints *sc);
+__isl_give char *isl_schedule_constraints_to_str(
+	__isl_keep isl_schedule_constraints *sc);
+
+__isl_export
+__isl_give isl_schedule *isl_schedule_constraints_compute_schedule(
+	__isl_take isl_schedule_constraints *sc);
+
+__isl_give isl_schedule *isl_union_set_compute_schedule(
+	__isl_take isl_union_set *domain,
+	__isl_take isl_union_map *validity,
+	__isl_take isl_union_map *proximity);
+
+__isl_give isl_schedule *isl_schedule_empty(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_schedule *isl_schedule_from_domain(
+	__isl_take isl_union_set *domain);
+__isl_give isl_schedule *isl_schedule_copy(__isl_keep isl_schedule *sched);
+__isl_null isl_schedule *isl_schedule_free(__isl_take isl_schedule *sched);
+__isl_export
+__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched);
+
+isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched);
+isl_bool isl_schedule_plain_is_equal(__isl_keep isl_schedule *schedule1,
+	__isl_keep isl_schedule *schedule2);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_get_root(
+	__isl_keep isl_schedule *schedule);
+__isl_give isl_union_set *isl_schedule_get_domain(
+	__isl_keep isl_schedule *schedule);
+
+isl_stat isl_schedule_foreach_schedule_node_top_down(
+	__isl_keep isl_schedule *sched,
+	isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user),
+	void *user);
+__isl_give isl_schedule *isl_schedule_map_schedule_node_bottom_up(
+	__isl_take isl_schedule *schedule,
+	__isl_give isl_schedule_node *(*fn)(
+		__isl_take isl_schedule_node *node, void *user), void *user);
+
+__isl_give isl_schedule *isl_schedule_insert_context(
+	__isl_take isl_schedule *schedule, __isl_take isl_set *context);
+__isl_give isl_schedule *isl_schedule_insert_partial_schedule(
+	__isl_take isl_schedule *schedule,
+	__isl_take isl_multi_union_pw_aff *partial);
+__isl_give isl_schedule *isl_schedule_insert_guard(
+	__isl_take isl_schedule *schedule, __isl_take isl_set *guard);
+__isl_give isl_schedule *isl_schedule_sequence(
+	__isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
+__isl_give isl_schedule *isl_schedule_set(
+	__isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2);
+__isl_give isl_schedule *isl_schedule_intersect_domain(
+	__isl_take isl_schedule *schedule, __isl_take isl_union_set *domain);
+__isl_give isl_schedule *isl_schedule_gist_domain_params(
+	__isl_take isl_schedule *schedule, __isl_take isl_set *context);
+
+__isl_give isl_schedule *isl_schedule_reset_user(
+	__isl_take isl_schedule *schedule);
+__isl_give isl_schedule *isl_schedule_align_params(
+	__isl_take isl_schedule *schedule, __isl_take isl_space *space);
+__isl_overload
+__isl_give isl_schedule *isl_schedule_pullback_union_pw_multi_aff(
+	__isl_take isl_schedule *schedule,
+	__isl_take isl_union_pw_multi_aff *upma);
+__isl_give isl_schedule *isl_schedule_expand(__isl_take isl_schedule *schedule,
+	__isl_take isl_union_pw_multi_aff *contraction,
+	__isl_take isl_schedule *expansion);
+
+__isl_give isl_schedule *isl_schedule_read_from_file(isl_ctx *ctx, FILE *input);
+__isl_constructor
+__isl_give isl_schedule *isl_schedule_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p,
+	__isl_keep isl_schedule *schedule);
+void isl_schedule_dump(__isl_keep isl_schedule *schedule);
+__isl_give char *isl_schedule_to_str(__isl_keep isl_schedule *schedule);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/schedule_node.h b/linux-x64/clang/include/polly/isl/schedule_node.h
new file mode 100644
index 0000000..b336003
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/schedule_node.h
@@ -0,0 +1,300 @@
+#ifndef ISL_SCHEDULE_NODE_H
+#define ISL_SCHEDULE_NODE_H
+
+#include <isl/schedule_type.h>
+#include <isl/union_set_type.h>
+#include <isl/aff_type.h>
+#include <isl/ast_type.h>
+#include <isl/val_type.h>
+#include <isl/space_type.h>
+#include <isl/id_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_from_domain(
+	__isl_take isl_union_set *domain);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_from_extension(
+	__isl_take isl_union_map *extension);
+__isl_give isl_schedule_node *isl_schedule_node_copy(
+	__isl_keep isl_schedule_node *node);
+__isl_null isl_schedule_node *isl_schedule_node_free(
+	__isl_take isl_schedule_node *node);
+
+__isl_export
+isl_bool isl_schedule_node_is_equal(__isl_keep isl_schedule_node *node1,
+	__isl_keep isl_schedule_node *node2);
+
+isl_ctx *isl_schedule_node_get_ctx(__isl_keep isl_schedule_node *node);
+__isl_subclass(isl_schedule_node)
+enum isl_schedule_node_type isl_schedule_node_get_type(
+	__isl_keep isl_schedule_node *node);
+enum isl_schedule_node_type isl_schedule_node_get_parent_type(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule *isl_schedule_node_get_schedule(
+	__isl_keep isl_schedule_node *node);
+
+__isl_export
+isl_stat isl_schedule_node_foreach_descendant_top_down(
+	__isl_keep isl_schedule_node *node,
+	isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user),
+	void *user);
+__isl_export
+isl_bool isl_schedule_node_every_descendant(__isl_keep isl_schedule_node *node,
+	isl_bool (*test)(__isl_keep isl_schedule_node *node, void *user),
+	void *user);
+__isl_export
+isl_stat isl_schedule_node_foreach_ancestor_top_down(
+	__isl_keep isl_schedule_node *node,
+	isl_stat (*fn)(__isl_keep isl_schedule_node *node, void *user),
+	void *user);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_map_descendant_bottom_up(
+	__isl_take isl_schedule_node *node,
+	__isl_give isl_schedule_node *(*fn)(__isl_take isl_schedule_node *node,
+		void *user), void *user);
+
+__isl_export
+isl_size isl_schedule_node_get_tree_depth(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_bool isl_schedule_node_has_parent(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_bool isl_schedule_node_has_children(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_bool isl_schedule_node_has_previous_sibling(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+isl_bool isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_size isl_schedule_node_n_children(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_size isl_schedule_node_get_child_position(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+isl_size isl_schedule_node_get_ancestor_child_position(
+	__isl_keep isl_schedule_node *node,
+	__isl_keep isl_schedule_node *ancestor);
+__isl_give isl_schedule_node *isl_schedule_node_get_child(
+	__isl_keep isl_schedule_node *node, int pos);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_get_shared_ancestor(
+	__isl_keep isl_schedule_node *node1,
+	__isl_keep isl_schedule_node *node2);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_root(
+	__isl_take isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_parent(
+	__isl_take isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_ancestor(
+	__isl_take isl_schedule_node *node, int generation);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_child(
+	__isl_take isl_schedule_node *node, int pos);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_first_child(
+	__isl_take isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_previous_sibling(
+	__isl_take isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_next_sibling(
+	__isl_take isl_schedule_node *node);
+
+__isl_export
+isl_bool isl_schedule_node_is_subtree_anchored(
+	__isl_keep isl_schedule_node *node);
+
+__isl_give isl_schedule_node *isl_schedule_node_group(
+	__isl_take isl_schedule_node *node, __isl_take isl_id *group_id);
+
+__isl_give isl_schedule_node *isl_schedule_node_sequence_splice_child(
+	__isl_take isl_schedule_node *node, int pos);
+
+__isl_give isl_space *isl_schedule_node_band_get_space(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_multi_union_pw_aff *isl_schedule_node_band_get_partial_schedule(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_map *isl_schedule_node_band_get_partial_schedule_union_map(
+	__isl_keep isl_schedule_node *node);
+enum isl_ast_loop_type isl_schedule_node_band_member_get_ast_loop_type(
+	__isl_keep isl_schedule_node *node, int pos);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_member_set_ast_loop_type(
+	__isl_take isl_schedule_node *node, int pos,
+	enum isl_ast_loop_type type);
+enum isl_ast_loop_type isl_schedule_node_band_member_get_isolate_ast_loop_type(
+	__isl_keep isl_schedule_node *node, int pos);
+__isl_give isl_schedule_node *
+isl_schedule_node_band_member_set_isolate_ast_loop_type(
+	__isl_take isl_schedule_node *node, int pos,
+	enum isl_ast_loop_type type);
+__isl_export
+__isl_give isl_union_set *isl_schedule_node_band_get_ast_build_options(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_set_ast_build_options(
+	__isl_take isl_schedule_node *node, __isl_take isl_union_set *options);
+__isl_export
+__isl_give isl_set *isl_schedule_node_band_get_ast_isolate_option(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+isl_size isl_schedule_node_band_n_member(__isl_keep isl_schedule_node *node);
+__isl_export
+isl_bool isl_schedule_node_band_member_get_coincident(
+	__isl_keep isl_schedule_node *node, int pos);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_member_set_coincident(
+	__isl_take isl_schedule_node *node, int pos, int coincident);
+__isl_export
+isl_bool isl_schedule_node_band_get_permutable(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_set_permutable(
+	__isl_take isl_schedule_node *node, int permutable);
+
+isl_stat isl_options_set_tile_scale_tile_loops(isl_ctx *ctx, int val);
+int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx);
+isl_stat isl_options_set_tile_shift_point_loops(isl_ctx *ctx, int val);
+int isl_options_get_tile_shift_point_loops(isl_ctx *ctx);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_scale(
+	__isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_scale_down(
+	__isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_mod(
+	__isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_shift(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_multi_union_pw_aff *shift);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_tile(
+	__isl_take isl_schedule_node *node, __isl_take isl_multi_val *sizes);
+__isl_give isl_schedule_node *isl_schedule_node_band_sink(
+	__isl_take isl_schedule_node *node);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_band_split(
+	__isl_take isl_schedule_node *node, int pos);
+
+__isl_export
+__isl_give isl_set *isl_schedule_node_context_get_context(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_set *isl_schedule_node_domain_get_domain(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_map *isl_schedule_node_expansion_get_expansion(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_schedule_node_expansion_get_contraction(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_map *isl_schedule_node_extension_get_extension(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_set *isl_schedule_node_filter_get_filter(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_set *isl_schedule_node_guard_get_guard(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_id *isl_schedule_node_mark_get_id(
+	__isl_keep isl_schedule_node *node);
+
+isl_size isl_schedule_node_get_schedule_depth(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_set *isl_schedule_node_get_domain(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_set *isl_schedule_node_get_universe_domain(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_multi_union_pw_aff *
+isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_pw_multi_aff *
+isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(
+	__isl_keep isl_schedule_node *node);
+__isl_export
+__isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_union_map(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_relation(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_map *isl_schedule_node_get_subtree_schedule_union_map(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_map *isl_schedule_node_get_subtree_expansion(
+	__isl_keep isl_schedule_node *node);
+__isl_give isl_union_pw_multi_aff *isl_schedule_node_get_subtree_contraction(
+	__isl_keep isl_schedule_node *node);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_context(
+	__isl_take isl_schedule_node *node, __isl_take isl_set *context);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_partial_schedule(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_multi_union_pw_aff *schedule);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_filter(
+	__isl_take isl_schedule_node *node, __isl_take isl_union_set *filter);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_guard(
+	__isl_take isl_schedule_node *node, __isl_take isl_set *context);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_mark(
+	__isl_take isl_schedule_node *node, __isl_take isl_id *mark);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_sequence(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_union_set_list *filters);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_insert_set(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_union_set_list *filters);
+
+__isl_give isl_schedule_node *isl_schedule_node_cut(
+	__isl_take isl_schedule_node *node);
+__isl_give isl_schedule_node *isl_schedule_node_delete(
+	__isl_take isl_schedule_node *node);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_order_before(
+	__isl_take isl_schedule_node *node, __isl_take isl_union_set *filter);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_order_after(
+	__isl_take isl_schedule_node *node, __isl_take isl_union_set *filter);
+
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_graft_before(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_schedule_node *graft);
+__isl_export
+__isl_give isl_schedule_node *isl_schedule_node_graft_after(
+	__isl_take isl_schedule_node *node,
+	__isl_take isl_schedule_node *graft);
+
+__isl_give isl_schedule_node *isl_schedule_node_reset_user(
+	__isl_take isl_schedule_node *node);
+__isl_give isl_schedule_node *isl_schedule_node_align_params(
+	__isl_take isl_schedule_node *node, __isl_take isl_space *space);
+
+__isl_give isl_printer *isl_printer_print_schedule_node(
+	__isl_take isl_printer *p, __isl_keep isl_schedule_node *node);
+void isl_schedule_node_dump(__isl_keep isl_schedule_node *node);
+__isl_give char *isl_schedule_node_to_str(__isl_keep isl_schedule_node *node);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/schedule_type.h b/linux-x64/clang/include/polly/isl/schedule_type.h
new file mode 100644
index 0000000..f5a6d4c
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/schedule_type.h
@@ -0,0 +1,33 @@
+#ifndef ISL_SCHEDULE_TYPE_H
+#define ISL_SCHEDULE_TYPE_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+enum isl_schedule_node_type {
+	isl_schedule_node_error = -1,
+	isl_schedule_node_band,
+	isl_schedule_node_context,
+	isl_schedule_node_domain,
+	isl_schedule_node_expansion,
+	isl_schedule_node_extension,
+	isl_schedule_node_filter,
+	isl_schedule_node_leaf,
+	isl_schedule_node_guard,
+	isl_schedule_node_mark,
+	isl_schedule_node_sequence,
+	isl_schedule_node_set
+};
+
+struct __isl_export isl_schedule_node;
+typedef struct isl_schedule_node isl_schedule_node;
+
+struct __isl_export isl_schedule;
+typedef struct isl_schedule isl_schedule;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/set.h b/linux-x64/clang/include/polly/isl/set.h
new file mode 100644
index 0000000..2fc8e5f
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/set.h
@@ -0,0 +1,589 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_SET_H
+#define ISL_SET_H
+
+#include <isl/id_type.h>
+#include <isl/map_type.h>
+#include <isl/aff_type.h>
+#include <isl/list.h>
+#include <isl/mat.h>
+#include <isl/point.h>
+#include <isl/local_space.h>
+#include <isl/val_type.h>
+#include <isl/stdint.h>
+#include <isl/stride_info.h>
+#include <isl/fixed_box.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_size isl_basic_set_n_dim(__isl_keep isl_basic_set *bset);
+isl_size isl_basic_set_n_param(__isl_keep isl_basic_set *bset);
+isl_size isl_basic_set_total_dim(__isl_keep const isl_basic_set *bset);
+isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset,
+				enum isl_dim_type type);
+
+isl_size isl_set_n_dim(__isl_keep isl_set *set);
+isl_size isl_set_n_param(__isl_keep isl_set *set);
+isl_size isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type);
+
+isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset);
+isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set);
+__isl_give isl_space *isl_basic_set_get_space(__isl_keep isl_basic_set *bset);
+__isl_export
+__isl_give isl_space *isl_set_get_space(__isl_keep isl_set *set);
+__isl_give isl_set *isl_set_reset_space(__isl_take isl_set *set,
+	__isl_take isl_space *space);
+
+__isl_give isl_aff *isl_basic_set_get_div(__isl_keep isl_basic_set *bset,
+	int pos);
+
+__isl_give isl_local_space *isl_basic_set_get_local_space(
+	__isl_keep isl_basic_set *bset);
+
+const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset);
+isl_bool isl_set_has_tuple_name(__isl_keep isl_set *set);
+const char *isl_set_get_tuple_name(__isl_keep isl_set *set);
+__isl_give isl_basic_set *isl_basic_set_set_tuple_name(
+	__isl_take isl_basic_set *set, const char *s);
+__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set,
+	const char *s);
+const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_basic_set *isl_basic_set_set_dim_name(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos, const char *s);
+isl_bool isl_set_has_dim_name(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+const char *isl_set_get_dim_name(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, const char *s);
+
+__isl_give isl_id *isl_basic_set_get_dim_id(__isl_keep isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_basic_set *isl_basic_set_set_tuple_id(
+	__isl_take isl_basic_set *bset, __isl_take isl_id *id);
+__isl_give isl_set *isl_set_set_dim_id(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+isl_bool isl_set_has_dim_id(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_set_get_dim_id(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_set *isl_set_set_tuple_id(__isl_take isl_set *set,
+	__isl_take isl_id *id);
+__isl_give isl_set *isl_set_reset_tuple_id(__isl_take isl_set *set);
+isl_bool isl_set_has_tuple_id(__isl_keep isl_set *set);
+__isl_give isl_id *isl_set_get_tuple_id(__isl_keep isl_set *set);
+__isl_give isl_set *isl_set_reset_user(__isl_take isl_set *set);
+
+int isl_set_find_dim_by_id(__isl_keep isl_set *set, enum isl_dim_type type,
+	__isl_keep isl_id *id);
+int isl_set_find_dim_by_name(__isl_keep isl_set *set, enum isl_dim_type type,
+	const char *name);
+
+int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset);
+
+__isl_null isl_basic_set *isl_basic_set_free(__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *space);
+__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_space *space);
+__isl_give isl_basic_set *isl_basic_set_nat_universe(
+	__isl_take isl_space *space);
+__isl_give isl_basic_set *isl_basic_set_positive_orthant(
+	__isl_take isl_space *space);
+void isl_basic_set_print_internal(__isl_keep isl_basic_set *bset,
+				FILE *out, int indent);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_intersect(
+		__isl_take isl_basic_set *bset1,
+		__isl_take isl_basic_set *bset2);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_intersect_params(
+	__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_apply(
+		__isl_take isl_basic_set *bset,
+		__isl_take isl_basic_map *bmap);
+__isl_give isl_basic_set *isl_basic_set_preimage_multi_aff(
+	__isl_take isl_basic_set *bset, __isl_take isl_multi_aff *ma);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_affine_hull(
+		__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_remove_dims(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_sample(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_detect_equalities(
+						__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_remove_redundancies(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_basic_set_list_intersect(
+	__isl_take struct isl_basic_set_list *list);
+
+__isl_give isl_set *isl_set_list_union(__isl_take isl_set_list *list);
+
+__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx,
+	FILE *input);
+__isl_constructor
+__isl_give isl_basic_set *isl_basic_set_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, FILE *input);
+__isl_constructor
+__isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, const char *str);
+void isl_basic_set_dump(__isl_keep isl_basic_set *bset);
+void isl_set_dump(__isl_keep isl_set *set);
+__isl_give isl_printer *isl_printer_print_basic_set(
+	__isl_take isl_printer *printer, __isl_keep isl_basic_set *bset);
+__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *printer,
+	__isl_keep isl_set *map);
+__isl_give isl_basic_set *isl_basic_set_fix_si(__isl_take isl_basic_set *bset,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_set *isl_basic_set_fix_val(__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *v);
+__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set,
+		enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_set *isl_basic_set_lower_bound_val(
+	__isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos,
+	__isl_take isl_val *value);
+__isl_give isl_set *isl_set_lower_bound_val(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *value);
+__isl_give isl_set *isl_set_upper_bound_si(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_set *isl_basic_set_upper_bound_val(
+	__isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos,
+	__isl_take isl_val *value);
+__isl_give isl_set *isl_set_upper_bound_val(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *value);
+__isl_overload
+__isl_give isl_set *isl_set_lower_bound_multi_val(__isl_take isl_set *set,
+	__isl_take isl_multi_val *lower);
+__isl_overload
+__isl_give isl_set *isl_set_upper_bound_multi_val(__isl_take isl_set *set,
+	__isl_take isl_multi_val *upper);
+__isl_overload
+__isl_give isl_set *isl_set_lower_bound_multi_pw_aff(__isl_take isl_set *set,
+	__isl_take isl_multi_pw_aff *lower);
+__isl_overload
+__isl_give isl_set *isl_set_upper_bound_multi_pw_aff(__isl_take isl_set *set,
+	__isl_take isl_multi_pw_aff *upper);
+
+__isl_give isl_set *isl_set_equate(__isl_take isl_set *set,
+	enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2);
+
+__isl_export
+isl_bool isl_basic_set_is_equal(__isl_keep isl_basic_set *bset1,
+	__isl_keep isl_basic_set *bset2);
+isl_bool isl_basic_set_is_disjoint(__isl_keep isl_basic_set *bset1,
+	__isl_keep isl_basic_set *bset2);
+
+__isl_give isl_set *isl_basic_set_partial_lexmin(
+		__isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_set *isl_basic_set_partial_lexmax(
+		__isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_set *isl_set_partial_lexmin(
+		__isl_take isl_set *set, __isl_take isl_set *dom,
+		__isl_give isl_set **empty);
+__isl_give isl_set *isl_set_partial_lexmax(
+		__isl_take isl_set *set, __isl_take isl_set *dom,
+		__isl_give isl_set **empty);
+__isl_export
+__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set);
+__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmin_pw_multi_aff(
+	__isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom,
+	__isl_give isl_set **empty);
+__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmax_pw_multi_aff(
+	__isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom,
+	__isl_give isl_set **empty);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_set_lexmin_pw_multi_aff(
+	__isl_take isl_set *set);
+__isl_export
+__isl_give isl_pw_multi_aff *isl_set_lexmax_pw_multi_aff(
+	__isl_take isl_set *set);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_set_min_multi_pw_aff(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_multi_pw_aff *isl_set_max_multi_pw_aff(__isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_set *isl_basic_set_union(
+		__isl_take isl_basic_set *bset1,
+		__isl_take isl_basic_set *bset2);
+
+int isl_basic_set_compare_at(__isl_keep isl_basic_set *bset1,
+	__isl_keep isl_basic_set *bset2, int pos);
+int isl_set_follows_at(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2, int pos);
+
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_params(__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_from_params(
+	__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_set *isl_set_params(__isl_take isl_set *set);
+__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_set *isl_set_bind(__isl_take isl_set *set,
+	__isl_take isl_multi_id *tuple);
+__isl_export
+__isl_give isl_set *isl_set_unbind_params(__isl_take isl_set *set,
+	__isl_take isl_multi_id *tuple);
+__isl_export
+__isl_give isl_map *isl_set_unbind_params_insert_domain(
+	__isl_take isl_set *set, __isl_take isl_multi_id *domain);
+
+isl_stat isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos, unsigned n, int *signs);
+
+isl_bool isl_basic_set_plain_is_universe(__isl_keep isl_basic_set *bset);
+isl_bool isl_basic_set_is_universe(__isl_keep isl_basic_set *bset);
+isl_bool isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset);
+__isl_export
+isl_bool isl_basic_set_is_empty(__isl_keep isl_basic_set *bset);
+isl_bool isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset);
+__isl_export
+isl_bool isl_basic_set_is_subset(__isl_keep isl_basic_set *bset1,
+	__isl_keep isl_basic_set *bset2);
+isl_bool isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1,
+	__isl_keep isl_basic_set *bset2);
+
+__isl_export
+__isl_give isl_set *isl_set_empty(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_set *isl_set_universe(__isl_take isl_space *space);
+__isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *space);
+__isl_give isl_set *isl_set_copy(__isl_keep isl_set *set);
+__isl_null isl_set *isl_set_free(__isl_take isl_set *set);
+__isl_constructor
+__isl_give isl_set *isl_set_from_basic_set(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset);
+__isl_export
+__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_basic_set *isl_set_affine_hull(__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_set_convex_hull(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_set_simple_hull(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_basic_set *isl_set_unshifted_simple_hull(
+	__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_set_plain_unshifted_simple_hull(
+	__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_set_unshifted_simple_hull_from_set_list(
+	__isl_take isl_set *set, __isl_take isl_set_list *list);
+__isl_give isl_basic_set *isl_set_bounded_simple_hull(__isl_take isl_set *set);
+
+__isl_give isl_set *isl_set_union_disjoint(
+	__isl_take isl_set *set1, __isl_take isl_set *set2);
+__isl_export
+__isl_give isl_set *isl_set_union(
+		__isl_take isl_set *set1,
+		__isl_take isl_set *set2);
+__isl_export
+__isl_give isl_set *isl_set_product(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_give isl_basic_set *isl_basic_set_flat_product(
+	__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2);
+__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_export
+__isl_give isl_set *isl_set_intersect(
+		__isl_take isl_set *set1,
+		__isl_take isl_set *set2);
+__isl_export
+__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set,
+		__isl_take isl_set *params);
+__isl_give isl_set *isl_set_intersect_factor_domain(__isl_take isl_set *set,
+	__isl_take isl_set *domain);
+__isl_give isl_set *isl_set_intersect_factor_range(__isl_take isl_set *set,
+	__isl_take isl_set *range);
+__isl_export
+__isl_give isl_set *isl_set_subtract(
+		__isl_take isl_set *set1,
+		__isl_take isl_set *set2);
+__isl_export
+__isl_give isl_set *isl_set_complement(__isl_take isl_set *set);
+__isl_export
+__isl_give isl_set *isl_set_apply(
+		__isl_take isl_set *set,
+		__isl_take isl_map *map);
+__isl_overload
+__isl_give isl_set *isl_set_preimage_multi_aff(__isl_take isl_set *set,
+	__isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_set *isl_set_preimage_pw_multi_aff(__isl_take isl_set *set,
+	__isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_set *isl_set_preimage_multi_pw_aff(__isl_take isl_set *set,
+	__isl_take isl_multi_pw_aff *mpa);
+__isl_give isl_set *isl_set_fix_val(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_val *v);
+__isl_give isl_set *isl_set_fix_dim_si(__isl_take isl_set *set,
+		unsigned dim, int value);
+__isl_give isl_basic_set *isl_basic_set_insert_dims(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned pos, unsigned n);
+__isl_give isl_set *isl_set_insert_dims(__isl_take isl_set *set,
+		enum isl_dim_type type, unsigned pos, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_add_dims(__isl_take isl_basic_set *bset,
+		enum isl_dim_type type, unsigned n);
+__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set,
+		enum isl_dim_type type, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_project_out(
+		__isl_take isl_basic_set *bset,
+		enum isl_dim_type type, unsigned first, unsigned n);
+__isl_overload
+__isl_give isl_set *isl_set_project_out_param_id(__isl_take isl_set *set,
+	__isl_take isl_id *id);
+__isl_overload
+__isl_give isl_set *isl_set_project_out_param_id_list(__isl_take isl_set *set,
+	__isl_take isl_id_list *list);
+__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set,
+		enum isl_dim_type type, unsigned first, unsigned n);
+__isl_export
+__isl_give isl_set *isl_set_project_out_all_params(__isl_take isl_set *set);
+__isl_give isl_map *isl_set_project_onto_map(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_remove_divs(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_basic_set_eliminate(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set,
+		unsigned first, unsigned n);
+__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_remove_divs_involving_dims(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_remove_unknown_divs(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set);
+__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set);
+__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving_dims(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_basic_set *isl_basic_set_drop_constraints_not_involving_dims(
+	__isl_take isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_set *isl_set_drop_constraints_involving_dims(
+	__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_set *isl_set_drop_constraints_not_involving_dims(
+	__isl_take isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+__isl_export
+isl_bool isl_set_involves_locals(__isl_keep isl_set *set);
+
+isl_bool isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+isl_bool isl_set_involves_dims(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned first, unsigned n);
+
+void isl_set_print_internal(__isl_keep isl_set *set, FILE *out, int indent);
+isl_bool isl_set_plain_is_empty(__isl_keep isl_set *set);
+isl_bool isl_set_plain_is_universe(__isl_keep isl_set *set);
+isl_bool isl_set_is_params(__isl_keep isl_set *set);
+__isl_export
+isl_bool isl_set_is_empty(__isl_keep isl_set *set);
+isl_bool isl_set_is_bounded(__isl_keep isl_set *set);
+__isl_export
+isl_bool isl_set_is_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2);
+__isl_export
+isl_bool isl_set_is_strict_subset(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2);
+__isl_export
+isl_bool isl_set_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2);
+__isl_export
+isl_bool isl_set_is_disjoint(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2);
+__isl_export
+isl_bool isl_set_is_singleton(__isl_keep isl_set *set);
+isl_bool isl_set_is_box(__isl_keep isl_set *set);
+isl_bool isl_set_has_equal_space(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2);
+
+__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_neg(__isl_take isl_set *set);
+
+__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set);
+__isl_give isl_set *isl_basic_set_compute_divs(__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_compute_divs(__isl_take isl_set *set);
+ISL_DEPRECATED
+__isl_give isl_set *isl_set_align_divs(__isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_multi_val *isl_set_get_plain_multi_val_if_fixed(
+	__isl_keep isl_set *set);
+__isl_give isl_val *isl_set_plain_get_val_if_fixed(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_set_dim_is_bounded(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_set_dim_has_lower_bound(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_set_dim_has_upper_bound(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_set_dim_has_any_lower_bound(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+isl_bool isl_set_dim_has_any_upper_bound(__isl_keep isl_set *set,
+	enum isl_dim_type type, unsigned pos);
+
+__isl_export
+__isl_give isl_basic_set *isl_basic_set_gist(__isl_take isl_basic_set *bset,
+					    __isl_take isl_basic_set *context);
+__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set,
+	__isl_take isl_basic_set *context);
+__isl_export
+__isl_give isl_set *isl_set_gist(__isl_take isl_set *set,
+	__isl_take isl_set *context);
+__isl_give isl_set *isl_set_gist_params(__isl_take isl_set *set,
+	__isl_take isl_set *context);
+isl_stat isl_set_dim_residue_class_val(__isl_keep isl_set *set,
+	int pos, __isl_give isl_val **modulo, __isl_give isl_val **residue);
+
+__isl_give isl_stride_info *isl_set_get_stride_info(__isl_keep isl_set *set,
+	int pos);
+__isl_export
+__isl_give isl_val *isl_set_get_stride(__isl_keep isl_set *set, int pos);
+__isl_export
+__isl_give isl_fixed_box *isl_set_get_simple_fixed_box_hull(
+	__isl_keep isl_set *set);
+
+__isl_export
+__isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set);
+
+int isl_set_plain_cmp(__isl_keep isl_set *set1, __isl_keep isl_set *set2);
+isl_bool isl_set_plain_is_equal(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2);
+isl_bool isl_set_plain_is_disjoint(__isl_keep isl_set *set1,
+	__isl_keep isl_set *set2);
+
+uint32_t isl_set_get_hash(__isl_keep isl_set *set);
+
+isl_size isl_set_n_basic_set(__isl_keep isl_set *set);
+__isl_export
+isl_stat isl_set_foreach_basic_set(__isl_keep isl_set *set,
+	isl_stat (*fn)(__isl_take isl_basic_set *bset, void *user), void *user);
+__isl_give isl_basic_set_list *isl_set_get_basic_set_list(
+	__isl_keep isl_set *set);
+
+__isl_export
+isl_stat isl_set_foreach_point(__isl_keep isl_set *set,
+	isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user);
+__isl_give isl_val *isl_set_count_val(__isl_keep isl_set *set);
+
+__isl_constructor
+__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt);
+__isl_constructor
+__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt);
+__isl_give isl_basic_set *isl_basic_set_box_from_points(
+	__isl_take isl_point *pnt1, __isl_take isl_point *pnt2);
+__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1,
+	__isl_take isl_point *pnt2);
+
+__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_lift(__isl_take isl_set *set);
+
+__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1,
+	__isl_take isl_set *set2);
+
+int isl_set_size(__isl_keep isl_set *set);
+
+__isl_give isl_basic_set *isl_basic_set_align_params(
+	__isl_take isl_basic_set *bset, __isl_take isl_space *model);
+__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set,
+	__isl_take isl_space *model);
+__isl_give isl_basic_set *isl_basic_set_drop_unused_params(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_set *isl_set_drop_unused_params(__isl_take isl_set *set);
+
+__isl_give isl_mat *isl_basic_set_equalities_matrix(
+	__isl_keep isl_basic_set *bset, enum isl_dim_type c1,
+	enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4);
+__isl_give isl_mat *isl_basic_set_inequalities_matrix(
+	__isl_keep isl_basic_set *bset, enum isl_dim_type c1,
+	enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4);
+__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices(
+	__isl_take isl_space *space,
+	__isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1,
+	enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4);
+
+__isl_give isl_basic_set *isl_basic_set_from_multi_aff(
+	__isl_take isl_multi_aff *ma);
+
+__isl_give isl_set *isl_set_from_multi_aff(__isl_take isl_multi_aff *ma);
+
+__isl_give isl_mat *isl_basic_set_reduced_basis(__isl_keep isl_basic_set *bset);
+
+__isl_give isl_basic_set *isl_basic_set_coefficients(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set_list *isl_basic_set_list_coefficients(
+	__isl_take isl_basic_set_list *list);
+__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set);
+__isl_give isl_basic_set *isl_basic_set_solutions(
+	__isl_take isl_basic_set *bset);
+__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set);
+
+__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos);
+__isl_give isl_pw_aff *isl_set_dim_min(__isl_take isl_set *set, int pos);
+
+__isl_give char *isl_basic_set_to_str(__isl_keep isl_basic_set *bset);
+__isl_give char *isl_set_to_str(__isl_keep isl_set *set);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/set_type.h b/linux-x64/clang/include/polly/isl/set_type.h
new file mode 100644
index 0000000..ce349e1
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/set_type.h
@@ -0,0 +1,6 @@
+#ifndef ISL_SET_TYPE_H
+#define ISL_SET_TYPE_H
+
+#include <isl/map_type.h>
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/space.h b/linux-x64/clang/include/polly/isl/space.h
new file mode 100644
index 0000000..5b71333
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/space.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_SPACE_H
+#define ISL_SPACE_H
+
+#include <isl/ctx.h>
+#include <isl/space_type.h>
+#include <isl/id_type.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_ctx *isl_space_get_ctx(__isl_keep isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_unit(isl_ctx *ctx);
+__isl_give isl_space *isl_space_alloc(isl_ctx *ctx,
+			unsigned nparam, unsigned n_in, unsigned n_out);
+__isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
+			unsigned nparam, unsigned dim);
+__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam);
+__isl_give isl_space *isl_space_copy(__isl_keep isl_space *space);
+__isl_null isl_space *isl_space_free(__isl_take isl_space *space);
+
+isl_bool isl_space_is_params(__isl_keep isl_space *space);
+isl_bool isl_space_is_set(__isl_keep isl_space *space);
+isl_bool isl_space_is_map(__isl_keep isl_space *space);
+
+__isl_give isl_space *isl_space_add_param_id(__isl_take isl_space *space,
+	__isl_take isl_id *id);
+
+__isl_give isl_space *isl_space_set_tuple_name(__isl_take isl_space *space,
+	enum isl_dim_type type, const char *s);
+isl_bool isl_space_has_tuple_name(__isl_keep isl_space *space,
+	enum isl_dim_type type);
+__isl_keep const char *isl_space_get_tuple_name(__isl_keep isl_space *space,
+				 enum isl_dim_type type);
+__isl_give isl_space *isl_space_set_tuple_id(__isl_take isl_space *space,
+	enum isl_dim_type type, __isl_take isl_id *id);
+__isl_give isl_space *isl_space_reset_tuple_id(__isl_take isl_space *space,
+	enum isl_dim_type type);
+isl_bool isl_space_has_tuple_id(__isl_keep isl_space *space,
+	enum isl_dim_type type);
+__isl_give isl_id *isl_space_get_tuple_id(__isl_keep isl_space *space,
+	enum isl_dim_type type);
+__isl_give isl_space *isl_space_reset_user(__isl_take isl_space *space);
+
+__isl_give isl_space *isl_space_set_dim_id(__isl_take isl_space *space,
+	enum isl_dim_type type, unsigned pos, __isl_take isl_id *id);
+isl_bool isl_space_has_dim_id(__isl_keep isl_space *space,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_id *isl_space_get_dim_id(__isl_keep isl_space *space,
+	enum isl_dim_type type, unsigned pos);
+
+int isl_space_find_dim_by_id(__isl_keep isl_space *space,
+	enum isl_dim_type type, __isl_keep isl_id *id);
+int isl_space_find_dim_by_name(__isl_keep isl_space *space,
+	enum isl_dim_type type, const char *name);
+
+isl_bool isl_space_has_dim_name(__isl_keep isl_space *space,
+	enum isl_dim_type type, unsigned pos);
+__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *space,
+				 enum isl_dim_type type, unsigned pos,
+				 __isl_keep const char *name);
+__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *space,
+				 enum isl_dim_type type, unsigned pos);
+
+ISL_DEPRECATED
+__isl_give isl_space *isl_space_extend(__isl_take isl_space *space,
+			unsigned nparam, unsigned n_in, unsigned n_out);
+__isl_give isl_space *isl_space_add_dims(__isl_take isl_space *space,
+	enum isl_dim_type type, unsigned n);
+__isl_give isl_space *isl_space_move_dims(__isl_take isl_space *space,
+	enum isl_dim_type dst_type, unsigned dst_pos,
+	enum isl_dim_type src_type, unsigned src_pos, unsigned n);
+__isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *space,
+	enum isl_dim_type type, unsigned pos, unsigned n);
+__isl_give isl_space *isl_space_join(__isl_take isl_space *left,
+	__isl_take isl_space *right);
+__isl_give isl_space *isl_space_product(__isl_take isl_space *left,
+	__isl_take isl_space *right);
+__isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left,
+	__isl_take isl_space *right);
+__isl_give isl_space *isl_space_range_product(__isl_take isl_space *left,
+	__isl_take isl_space *right);
+__isl_give isl_space *isl_space_factor_domain(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_factor_range(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_domain_factor_domain(
+	__isl_take isl_space *space);
+__isl_give isl_space *isl_space_domain_factor_range(
+	__isl_take isl_space *space);
+__isl_give isl_space *isl_space_range_factor_domain(
+	__isl_take isl_space *space);
+__isl_give isl_space *isl_space_range_factor_range(
+	__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_map_from_set(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_map_from_domain_and_range(
+	__isl_take isl_space *domain, __isl_take isl_space *range);
+__isl_give isl_space *isl_space_reverse(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_range_reverse(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *space,
+	enum isl_dim_type type, unsigned first, unsigned num);
+ISL_DEPRECATED
+__isl_give isl_space *isl_space_drop_inputs(__isl_take isl_space *space,
+		unsigned first, unsigned n);
+ISL_DEPRECATED
+__isl_give isl_space *isl_space_drop_outputs(__isl_take isl_space *space,
+		unsigned first, unsigned n);
+__isl_give isl_space *isl_space_drop_all_params(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_domain(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_from_domain(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_range(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_from_range(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_domain_map(__isl_take isl_space *space);
+__isl_give isl_space *isl_space_range_map(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_params(__isl_take isl_space *space);
+__isl_overload
+__isl_give isl_space *isl_space_add_unnamed_tuple_ui(
+	__isl_take isl_space *space, unsigned dim);
+__isl_overload
+__isl_give isl_space *isl_space_add_named_tuple_id_ui(
+	__isl_take isl_space *space, __isl_take isl_id *tuple_id, unsigned dim);
+__isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space);
+
+__isl_give isl_space *isl_space_align_params(__isl_take isl_space *space1,
+	__isl_take isl_space *space2);
+
+__isl_export
+isl_bool isl_space_is_wrapping(__isl_keep isl_space *space);
+isl_bool isl_space_domain_is_wrapping(__isl_keep isl_space *space);
+isl_bool isl_space_range_is_wrapping(__isl_keep isl_space *space);
+isl_bool isl_space_is_product(__isl_keep isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_wrap(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_unwrap(__isl_take isl_space *space);
+
+isl_bool isl_space_can_zip(__isl_keep isl_space *space);
+__isl_give isl_space *isl_space_zip(__isl_take isl_space *space);
+
+isl_bool isl_space_can_curry(__isl_keep isl_space *space);
+__isl_give isl_space *isl_space_curry(__isl_take isl_space *space);
+
+isl_bool isl_space_can_range_curry(__isl_keep isl_space *space);
+__isl_give isl_space *isl_space_range_curry(__isl_take isl_space *space);
+
+isl_bool isl_space_can_uncurry(__isl_keep isl_space *space);
+__isl_give isl_space *isl_space_uncurry(__isl_take isl_space *space);
+
+isl_bool isl_space_is_domain(__isl_keep isl_space *space1,
+	__isl_keep isl_space *space2);
+isl_bool isl_space_is_range(__isl_keep isl_space *space1,
+	__isl_keep isl_space *space2);
+__isl_export
+isl_bool isl_space_is_equal(__isl_keep isl_space *space1,
+	__isl_keep isl_space *space2);
+isl_bool isl_space_has_equal_params(__isl_keep isl_space *space1,
+	__isl_keep isl_space *space2);
+isl_bool isl_space_has_equal_tuples(__isl_keep isl_space *space1,
+	__isl_keep isl_space *space2);
+isl_bool isl_space_tuple_is_equal(__isl_keep isl_space *space1,
+	enum isl_dim_type type1, __isl_keep isl_space *space2,
+	enum isl_dim_type type2);
+ISL_DEPRECATED
+isl_bool isl_space_match(__isl_keep isl_space *space1, enum isl_dim_type type1,
+	__isl_keep isl_space *space2, enum isl_dim_type type2);
+isl_size isl_space_dim(__isl_keep isl_space *space, enum isl_dim_type type);
+
+__isl_export
+__isl_give isl_space *isl_space_flatten_domain(__isl_take isl_space *space);
+__isl_export
+__isl_give isl_space *isl_space_flatten_range(__isl_take isl_space *space);
+
+__isl_give char *isl_space_to_str(__isl_keep isl_space *space);
+__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
+	__isl_keep isl_space *space);
+void isl_space_dump(__isl_keep isl_space *space);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/space_type.h b/linux-x64/clang/include/polly/isl/space_type.h
new file mode 100644
index 0000000..60c31b0
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/space_type.h
@@ -0,0 +1,27 @@
+#ifndef ISL_SPACE_TYPE_H
+#define ISL_SPACE_TYPE_H
+
+#include <isl/ctx.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_space;
+typedef struct isl_space isl_space;
+
+enum isl_dim_type {
+	isl_dim_cst,
+	isl_dim_param,
+	isl_dim_in,
+	isl_dim_out,
+	isl_dim_set = isl_dim_out,
+	isl_dim_div,
+	isl_dim_all
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/stdint.h b/linux-x64/clang/include/polly/isl/stdint.h
new file mode 100644
index 0000000..9a6118b
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/stdint.h
@@ -0,0 +1 @@
+#include <stdint.h>
diff --git a/linux-x64/clang/include/polly/isl/stream.h b/linux-x64/clang/include/polly/isl/stream.h
new file mode 100644
index 0000000..b77797f
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/stream.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_STREAM_H
+#define ISL_STREAM_H
+
+#include <stdio.h>
+#include <isl/hash.h>
+#include <isl/aff_type.h>
+#include <isl/obj.h>
+#include <isl/val_type.h>
+#include <isl/schedule_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+enum isl_token_type { ISL_TOKEN_ERROR = -1,
+			ISL_TOKEN_UNKNOWN = 256, ISL_TOKEN_VALUE,
+			ISL_TOKEN_IDENT, ISL_TOKEN_GE,
+			ISL_TOKEN_LE, ISL_TOKEN_GT, ISL_TOKEN_LT,
+			ISL_TOKEN_NE, ISL_TOKEN_EQ_EQ,
+			ISL_TOKEN_LEX_GE, ISL_TOKEN_LEX_LE,
+			ISL_TOKEN_LEX_GT, ISL_TOKEN_LEX_LT,
+			ISL_TOKEN_TO, ISL_TOKEN_AND,
+			ISL_TOKEN_OR, ISL_TOKEN_EXISTS, ISL_TOKEN_NOT,
+			ISL_TOKEN_DEF, ISL_TOKEN_INFTY, ISL_TOKEN_NAN,
+			ISL_TOKEN_MIN, ISL_TOKEN_MAX, ISL_TOKEN_RAT,
+			ISL_TOKEN_TRUE, ISL_TOKEN_FALSE,
+			ISL_TOKEN_CEILD, ISL_TOKEN_FLOORD, ISL_TOKEN_MOD,
+			ISL_TOKEN_STRING,
+			ISL_TOKEN_MAP, ISL_TOKEN_AFF,
+			ISL_TOKEN_CEIL, ISL_TOKEN_FLOOR,
+			ISL_TOKEN_IMPLIES,
+			ISL_TOKEN_INT_DIV,
+			ISL_TOKEN_LAST };
+
+struct isl_token;
+
+__isl_give isl_val *isl_token_get_val(isl_ctx *ctx, struct isl_token *tok);
+__isl_give char *isl_token_get_str(isl_ctx *ctx, struct isl_token *tok);
+int isl_token_get_type(struct isl_token *tok);
+void isl_token_free(struct isl_token *tok);
+
+struct isl_stream;
+typedef struct isl_stream isl_stream;
+
+__isl_give isl_stream *isl_stream_new_file(isl_ctx *ctx, FILE *file);
+__isl_give isl_stream *isl_stream_new_str(isl_ctx *ctx, const char *str);
+void isl_stream_free(__isl_take isl_stream *s);
+
+isl_ctx *isl_stream_get_ctx(__isl_keep isl_stream *s);
+
+void isl_stream_error(__isl_keep isl_stream *s, struct isl_token *tok,
+	char *msg);
+
+struct isl_token *isl_stream_next_token(__isl_keep isl_stream *s);
+struct isl_token *isl_stream_next_token_on_same_line(__isl_keep isl_stream *s);
+int isl_stream_next_token_is(__isl_keep isl_stream *s, int type);
+void isl_stream_push_token(__isl_keep isl_stream *s, struct isl_token *tok);
+void isl_stream_flush_tokens(__isl_keep isl_stream *s);
+int isl_stream_eat_if_available(__isl_keep isl_stream *s, int type);
+char *isl_stream_read_ident_if_available(__isl_keep isl_stream *s);
+int isl_stream_eat(__isl_keep isl_stream *s, int type);
+int isl_stream_is_empty(__isl_keep isl_stream *s);
+int isl_stream_skip_line(__isl_keep isl_stream *s);
+
+enum isl_token_type isl_stream_register_keyword(__isl_keep isl_stream *s,
+	const char *name);
+
+struct isl_obj isl_stream_read_obj(__isl_keep isl_stream *s);
+__isl_give isl_val *isl_stream_read_val(__isl_keep isl_stream *s);
+__isl_give isl_multi_aff *isl_stream_read_multi_aff(__isl_keep isl_stream *s);
+__isl_give isl_map *isl_stream_read_map(__isl_keep isl_stream *s);
+__isl_give isl_set *isl_stream_read_set(__isl_keep isl_stream *s);
+__isl_give isl_pw_qpolynomial *isl_stream_read_pw_qpolynomial(
+	__isl_keep isl_stream *s);
+__isl_give isl_union_set *isl_stream_read_union_set(__isl_keep isl_stream *s);
+__isl_give isl_union_map *isl_stream_read_union_map(__isl_keep isl_stream *s);
+__isl_give isl_schedule *isl_stream_read_schedule(isl_stream *s);
+
+int isl_stream_yaml_read_start_mapping(__isl_keep isl_stream *s);
+int isl_stream_yaml_read_end_mapping(__isl_keep isl_stream *s);
+int isl_stream_yaml_read_start_sequence(__isl_keep isl_stream *s);
+int isl_stream_yaml_read_end_sequence(__isl_keep isl_stream *s);
+int isl_stream_yaml_next(__isl_keep isl_stream *s);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/stride_info.h b/linux-x64/clang/include/polly/isl/stride_info.h
new file mode 100644
index 0000000..7a4e0dc
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/stride_info.h
@@ -0,0 +1,30 @@
+/*
+ * Use of this software is governed by the MIT license
+ */
+
+#ifndef ISL_STRIDE_INFO_H
+#define ISL_STRIDE_INFO_H
+
+#include <isl/val.h>
+#include <isl/aff_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_stride_info;
+typedef struct isl_stride_info isl_stride_info;
+
+isl_ctx *isl_stride_info_get_ctx(__isl_keep isl_stride_info *si);
+__isl_give isl_val *isl_stride_info_get_stride(__isl_keep isl_stride_info *si);
+__isl_give isl_aff *isl_stride_info_get_offset(__isl_keep isl_stride_info *si);
+__isl_null isl_stride_info *isl_stride_info_free(
+	__isl_take isl_stride_info *si);
+__isl_give isl_stride_info *isl_stride_info_copy(
+	__isl_keep isl_stride_info *si);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/union_map.h b/linux-x64/clang/include/polly/isl/union_map.h
new file mode 100644
index 0000000..2cf5101
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/union_map.h
@@ -0,0 +1,355 @@
+#ifndef ISL_UNION_MAP_H
+#define ISL_UNION_MAP_H
+
+#include <isl/stdint.h>
+#include <isl/space_type.h>
+#include <isl/aff_type.h>
+#include <isl/map_type.h>
+#include <isl/union_map_type.h>
+#include <isl/printer.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_size isl_union_map_dim(__isl_keep isl_union_map *umap,
+	enum isl_dim_type type);
+isl_bool isl_union_map_involves_dims(__isl_keep isl_union_map *umap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_id *isl_union_map_get_dim_id(__isl_keep isl_union_map *umap,
+	enum isl_dim_type type, unsigned pos);
+
+__isl_constructor
+__isl_give isl_union_map *isl_union_map_from_basic_map(
+	__isl_take isl_basic_map *bmap);
+__isl_constructor
+__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_empty_ctx(isl_ctx *ctx);
+__isl_give isl_union_map *isl_union_map_empty_space(
+	__isl_take isl_space *space);
+__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *space);
+__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap);
+__isl_null isl_union_map *isl_union_map_free(__isl_take isl_union_map *umap);
+
+isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap);
+__isl_export
+__isl_give isl_space *isl_union_map_get_space(__isl_keep isl_union_map *umap);
+
+__isl_give isl_union_map *isl_union_map_reset_user(
+	__isl_take isl_union_map *umap);
+
+int isl_union_map_find_dim_by_name(__isl_keep isl_union_map *umap,
+	enum isl_dim_type type, const char *name);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_universe(
+	__isl_take isl_union_map *umap);
+__isl_give isl_set *isl_union_map_params(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_domain_map(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_pw_multi_aff *isl_union_map_domain_map_union_pw_multi_aff(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_range_map(
+	__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_set_wrapped_domain_map(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_map *isl_union_map_from_domain(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_map *isl_union_map_from_range(
+	__isl_take isl_union_set *uset);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_affine_hull(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_polyhedral_hull(
+	__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_map_remove_redundancies(
+	__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_map_simple_hull(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_coalesce(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_compute_divs(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_lexmin(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_lexmax(__isl_take isl_union_map *umap);
+
+__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap,
+	__isl_take isl_map *map);
+__isl_export
+__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1,
+	__isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_subtract(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_intersect(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_intersect_params(
+	__isl_take isl_union_map *umap, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1,
+	__isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_domain_product(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_give isl_union_map *isl_union_map_flat_domain_product(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_range_product(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_give isl_union_map *isl_union_map_flat_range_product(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_domain_factor_domain(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_domain_factor_range(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_range_factor_domain(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_range_factor_range(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_factor_domain(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_factor_range(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap,
+	__isl_take isl_union_map *context);
+__isl_export
+__isl_give isl_union_map *isl_union_map_gist_params(
+	__isl_take isl_union_map *umap, __isl_take isl_set *set);
+__isl_export
+__isl_give isl_union_map *isl_union_map_gist_domain(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_map *isl_union_map_gist_range(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+
+__isl_overload
+__isl_give isl_union_map *isl_union_map_intersect_domain_union_set(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_intersect_domain_space(
+	__isl_take isl_union_map *umap, __isl_take isl_space *space);
+__isl_give isl_union_map *isl_union_map_intersect_domain(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_intersect_range_union_set(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_intersect_range_space(
+	__isl_take isl_union_map *umap, __isl_take isl_space *space);
+__isl_give isl_union_map *isl_union_map_intersect_range(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *uset);
+__isl_give isl_union_map *isl_union_map_intersect_domain_factor_range(
+	__isl_take isl_union_map *umap, __isl_take isl_union_map *factor);
+__isl_give isl_union_map *isl_union_map_intersect_range_factor_domain(
+	__isl_take isl_union_map *umap, __isl_take isl_union_map *factor);
+__isl_give isl_union_map *isl_union_map_intersect_range_factor_range(
+	__isl_take isl_union_map *umap, __isl_take isl_union_map *factor);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_subtract_domain(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *dom);
+__isl_export
+__isl_give isl_union_map *isl_union_map_subtract_range(
+	__isl_take isl_union_map *umap, __isl_take isl_union_set *dom);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_apply_domain(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_export
+__isl_give isl_union_map *isl_union_map_apply_range(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_domain_multi_aff(
+	__isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_range_multi_aff(
+	__isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_domain_pw_multi_aff(
+	__isl_take isl_union_map *umap, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_range_pw_multi_aff(
+	__isl_take isl_union_map *umap, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_domain_multi_pw_aff(
+	__isl_take isl_union_map *umap, __isl_take isl_multi_pw_aff *mpa);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_domain_union_pw_multi_aff(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_union_pw_multi_aff *upma);
+__isl_overload
+__isl_give isl_union_map *isl_union_map_preimage_range_union_pw_multi_aff(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_union_pw_multi_aff *upma);
+__isl_export
+__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_range_reverse(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_from_domain_and_range(
+	__isl_take isl_union_set *domain, __isl_take isl_union_set *range);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_detect_equalities(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_map_deltas_map(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset);
+
+__isl_give isl_union_map *isl_union_map_project_out(
+	__isl_take isl_union_map *umap,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_export
+__isl_give isl_union_map *isl_union_map_project_out_all_params(
+	__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_map_remove_divs(
+	__isl_take isl_union_map *bmap);
+
+__isl_export
+__isl_give isl_union_set *isl_union_map_bind_range(
+	__isl_take isl_union_map *umap, __isl_take isl_multi_id *tuple);
+
+isl_bool isl_union_map_plain_is_empty(__isl_keep isl_union_map *umap);
+__isl_export
+isl_bool isl_union_map_is_empty(__isl_keep isl_union_map *umap);
+__isl_export
+isl_bool isl_union_map_is_single_valued(__isl_keep isl_union_map *umap);
+isl_bool isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap);
+__isl_export
+isl_bool isl_union_map_is_injective(__isl_keep isl_union_map *umap);
+__isl_export
+isl_bool isl_union_map_is_bijective(__isl_keep isl_union_map *umap);
+isl_bool isl_union_map_is_identity(__isl_keep isl_union_map *umap);
+
+__isl_export
+isl_bool isl_union_map_is_subset(__isl_keep isl_union_map *umap1,
+	__isl_keep isl_union_map *umap2);
+__isl_export
+isl_bool isl_union_map_is_equal(__isl_keep isl_union_map *umap1,
+	__isl_keep isl_union_map *umap2);
+__isl_export
+isl_bool isl_union_map_is_disjoint(__isl_keep isl_union_map *umap1,
+	__isl_keep isl_union_map *umap2);
+__isl_export
+isl_bool isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1,
+	__isl_keep isl_union_map *umap2);
+
+uint32_t isl_union_map_get_hash(__isl_keep isl_union_map *umap);
+
+isl_size isl_union_map_n_map(__isl_keep isl_union_map *umap);
+__isl_export
+isl_stat isl_union_map_foreach_map(__isl_keep isl_union_map *umap,
+	isl_stat (*fn)(__isl_take isl_map *map, void *user), void *user);
+__isl_give isl_map_list *isl_union_map_get_map_list(
+	__isl_keep isl_union_map *umap);
+__isl_export
+isl_bool isl_union_map_every_map(__isl_keep isl_union_map *umap,
+	isl_bool (*test)(__isl_keep isl_map *map, void *user), void *user);
+__isl_give isl_union_map *isl_union_map_remove_map_if(
+	__isl_take isl_union_map *umap,
+	isl_bool (*fn)(__isl_keep isl_map *map, void *user), void *user);
+isl_bool isl_union_map_contains(__isl_keep isl_union_map *umap,
+	__isl_keep isl_space *space);
+__isl_export
+__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap,
+	__isl_take isl_space *space);
+__isl_export
+isl_bool isl_union_map_isa_map(__isl_keep isl_union_map *umap);
+__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap);
+
+__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap);
+
+__isl_overload
+__isl_give isl_union_map *isl_union_map_fixed_power_val(
+	__isl_take isl_union_map *umap, __isl_take isl_val *exp);
+__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap,
+	isl_bool *exact);
+__isl_give isl_union_map *isl_union_map_transitive_closure(
+	__isl_take isl_union_map *umap, isl_bool *exact);
+
+__isl_give isl_union_map *isl_union_map_lex_lt_union_map(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_give isl_union_map *isl_union_map_lex_le_union_map(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_give isl_union_map *isl_union_map_lex_gt_union_map(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+__isl_give isl_union_map *isl_union_map_lex_ge_union_map(
+	__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2);
+
+__isl_overload
+__isl_give isl_union_map *isl_union_map_eq_at_multi_union_pw_aff(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_multi_union_pw_aff *mupa);
+__isl_give isl_union_map *isl_union_map_lex_lt_at_multi_union_pw_aff(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_multi_union_pw_aff *mupa);
+__isl_give isl_union_map *isl_union_map_lex_gt_at_multi_union_pw_aff(
+	__isl_take isl_union_map *umap,
+	__isl_take isl_multi_union_pw_aff *mupa);
+
+__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx,
+	FILE *input);
+__isl_constructor
+__isl_give isl_union_map *isl_union_map_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give char *isl_union_map_to_str(__isl_keep isl_union_map *umap);
+__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p,
+	__isl_keep isl_union_map *umap);
+void isl_union_map_dump(__isl_keep isl_union_map *umap);
+
+__isl_export
+__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset);
+
+__isl_export
+__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_curry(__isl_take isl_union_map *umap);
+__isl_give isl_union_map *isl_union_map_range_curry(
+	__isl_take isl_union_map *umap);
+__isl_export
+__isl_give isl_union_map *isl_union_map_uncurry(__isl_take isl_union_map *umap);
+
+__isl_give isl_union_map *isl_union_map_align_params(
+	__isl_take isl_union_map *umap, __isl_take isl_space *model);
+__isl_give isl_union_set *isl_union_set_align_params(
+	__isl_take isl_union_set *uset, __isl_take isl_space *model);
+
+ISL_DECLARE_LIST_FN(union_map)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/union_map_type.h b/linux-x64/clang/include/polly/isl/union_map_type.h
new file mode 100644
index 0000000..7b6e69f
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/union_map_type.h
@@ -0,0 +1,24 @@
+#ifndef ISL_UNION_MAP_TYPE_H
+#define ISL_UNION_MAP_TYPE_H
+
+#include <isl/ctx.h>
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_union_map;
+typedef struct isl_union_map isl_union_map;
+ISL_DECLARE_LIST_TYPE(union_map)
+#ifndef isl_union_set
+struct __isl_export isl_union_set;
+typedef struct isl_union_set isl_union_set;
+ISL_DECLARE_EXPORTED_LIST_TYPE(union_set)
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/union_set.h b/linux-x64/clang/include/polly/isl/union_set.h
new file mode 100644
index 0000000..8531da8
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/union_set.h
@@ -0,0 +1,193 @@
+#ifndef ISL_UNION_SET_H
+#define ISL_UNION_SET_H
+
+#include <isl/point.h>
+#include <isl/union_map.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+isl_size isl_union_set_dim(__isl_keep isl_union_set *uset,
+	enum isl_dim_type type);
+
+__isl_constructor
+__isl_give isl_union_set *isl_union_set_from_basic_set(
+	__isl_take isl_basic_set *bset);
+__isl_constructor
+__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set);
+__isl_overload
+__isl_give isl_union_set *isl_union_set_empty_ctx(isl_ctx *ctx);
+__isl_give isl_union_set *isl_union_set_empty_space(
+	__isl_take isl_space *space);
+__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_space *space);
+__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset);
+__isl_null isl_union_set *isl_union_set_free(__isl_take isl_union_set *uset);
+
+isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset);
+__isl_export
+__isl_give isl_space *isl_union_set_get_space(__isl_keep isl_union_set *uset);
+
+__isl_give isl_union_set *isl_union_set_reset_user(
+	__isl_take isl_union_set *uset);
+
+__isl_export
+__isl_give isl_union_set *isl_union_set_universe(
+	__isl_take isl_union_set *uset);
+__isl_give isl_set *isl_union_set_params(__isl_take isl_union_set *uset);
+
+__isl_export
+__isl_give isl_union_set *isl_union_set_detect_equalities(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_affine_hull(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_polyhedral_hull(
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_set *isl_union_set_remove_redundancies(
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_set *isl_union_set_simple_hull(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_coalesce(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_compute_divs(
+	__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_lexmin(__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_union_set *isl_union_set_lexmax(__isl_take isl_union_set *uset);
+
+__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset,
+	__isl_take isl_set *set);
+__isl_export
+__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1,
+	__isl_take isl_union_set *uset2);
+__isl_export
+__isl_give isl_union_set *isl_union_set_subtract(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+__isl_export
+__isl_give isl_union_set *isl_union_set_intersect(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+__isl_export
+__isl_give isl_union_set *isl_union_set_intersect_params(
+	__isl_take isl_union_set *uset, __isl_take isl_set *set);
+__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1,
+	__isl_take isl_union_set *uset2);
+__isl_export
+__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset,
+	__isl_take isl_union_set *context);
+__isl_export
+__isl_give isl_union_set *isl_union_set_gist_params(
+	__isl_take isl_union_set *uset, __isl_take isl_set *set);
+
+__isl_export
+__isl_give isl_union_set *isl_union_set_apply(
+	__isl_take isl_union_set *uset, __isl_take isl_union_map *umap);
+__isl_overload
+__isl_give isl_union_set *isl_union_set_preimage_multi_aff(
+	__isl_take isl_union_set *uset, __isl_take isl_multi_aff *ma);
+__isl_overload
+__isl_give isl_union_set *isl_union_set_preimage_pw_multi_aff(
+	__isl_take isl_union_set *uset, __isl_take isl_pw_multi_aff *pma);
+__isl_overload
+__isl_give isl_union_set *isl_union_set_preimage_union_pw_multi_aff(
+	__isl_take isl_union_set *uset,
+	__isl_take isl_union_pw_multi_aff *upma);
+
+__isl_give isl_union_set *isl_union_set_project_out(
+	__isl_take isl_union_set *uset,
+	enum isl_dim_type type, unsigned first, unsigned n);
+__isl_give isl_union_set *isl_union_set_project_out_all_params(
+	__isl_take isl_union_set *uset);
+__isl_give isl_union_set *isl_union_set_remove_divs(
+	__isl_take isl_union_set *bset);
+
+isl_bool isl_union_set_is_params(__isl_keep isl_union_set *uset);
+__isl_export
+isl_bool isl_union_set_is_empty(__isl_keep isl_union_set *uset);
+
+__isl_export
+isl_bool isl_union_set_is_subset(__isl_keep isl_union_set *uset1,
+	__isl_keep isl_union_set *uset2);
+__isl_export
+isl_bool isl_union_set_is_equal(__isl_keep isl_union_set *uset1,
+	__isl_keep isl_union_set *uset2);
+__isl_export
+isl_bool isl_union_set_is_disjoint(__isl_keep isl_union_set *uset1,
+	__isl_keep isl_union_set *uset2);
+__isl_export
+isl_bool isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1,
+	__isl_keep isl_union_set *uset2);
+
+uint32_t isl_union_set_get_hash(__isl_keep isl_union_set *uset);
+
+isl_size isl_union_set_n_set(__isl_keep isl_union_set *uset);
+__isl_export
+isl_stat isl_union_set_foreach_set(__isl_keep isl_union_set *uset,
+	isl_stat (*fn)(__isl_take isl_set *set, void *user), void *user);
+__isl_export
+isl_bool isl_union_set_every_set(__isl_keep isl_union_set *uset,
+	isl_bool (*test)(__isl_keep isl_set *set, void *user), void *user);
+__isl_give isl_basic_set_list *isl_union_set_get_basic_set_list(
+	__isl_keep isl_union_set *uset);
+__isl_give isl_set_list *isl_union_set_get_set_list(
+	__isl_keep isl_union_set *uset);
+isl_bool isl_union_set_contains(__isl_keep isl_union_set *uset,
+	__isl_keep isl_space *space);
+__isl_export
+__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset,
+	__isl_take isl_space *space);
+__isl_export
+isl_bool isl_union_set_isa_set(__isl_keep isl_union_set *uset);
+__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset);
+__isl_export
+isl_stat isl_union_set_foreach_point(__isl_keep isl_union_set *uset,
+	isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user);
+
+__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset);
+__isl_export
+__isl_give isl_point *isl_union_set_sample_point(
+	__isl_take isl_union_set *uset);
+
+__isl_constructor
+__isl_give isl_union_set *isl_union_set_from_point(__isl_take isl_point *pnt);
+
+__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset);
+
+__isl_give isl_union_map *isl_union_set_lex_lt_union_set(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+__isl_give isl_union_map *isl_union_set_lex_le_union_set(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+__isl_give isl_union_map *isl_union_set_lex_gt_union_set(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+__isl_give isl_union_map *isl_union_set_lex_ge_union_set(
+	__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2);
+
+__isl_give isl_union_set *isl_union_set_coefficients(
+	__isl_take isl_union_set *bset);
+__isl_give isl_union_set *isl_union_set_solutions(
+	__isl_take isl_union_set *bset);
+
+__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx,
+	FILE *input);
+__isl_constructor
+__isl_give isl_union_set *isl_union_set_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give char *isl_union_set_to_str(__isl_keep isl_union_set *uset);
+__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p,
+	__isl_keep isl_union_set *uset);
+void isl_union_set_dump(__isl_keep isl_union_set *uset);
+
+ISL_DECLARE_EXPORTED_LIST_FN(union_set)
+
+__isl_give isl_union_set *isl_union_set_list_union(
+	__isl_take isl_union_set_list *list);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/union_set_type.h b/linux-x64/clang/include/polly/isl/union_set_type.h
new file mode 100644
index 0000000..86b2c31
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/union_set_type.h
@@ -0,0 +1,6 @@
+#ifndef ISL_UNION_SET_TYPE_H
+#define ISL_UNION_SET_TYPE_H
+
+#include <isl/union_map_type.h>
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/val.h b/linux-x64/clang/include/polly/isl/val.h
new file mode 100644
index 0000000..f09252c
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/val.h
@@ -0,0 +1,178 @@
+#ifndef ISL_VAL_H
+#define ISL_VAL_H
+
+#include <isl/stdint.h>
+#include <isl/ctx.h>
+#include <isl/list.h>
+#include <isl/multi.h>
+#include <isl/printer.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+ISL_DECLARE_MULTI(val)
+ISL_DECLARE_MULTI_ARITH(val)
+ISL_DECLARE_MULTI_MIN_MAX(val)
+ISL_DECLARE_MULTI_ZERO(val)
+ISL_DECLARE_MULTI_NAN(val)
+ISL_DECLARE_MULTI_DIMS(val)
+ISL_DECLARE_MULTI_DIM_ID(val)
+ISL_DECLARE_MULTI_TUPLE_ID(val)
+ISL_DECLARE_MULTI_WITH_DOMAIN(val)
+
+__isl_export
+__isl_give isl_val *isl_val_zero(isl_ctx *ctx);
+__isl_export
+__isl_give isl_val *isl_val_one(isl_ctx *ctx);
+__isl_export
+__isl_give isl_val *isl_val_negone(isl_ctx *ctx);
+__isl_export
+__isl_give isl_val *isl_val_nan(isl_ctx *ctx);
+__isl_export
+__isl_give isl_val *isl_val_infty(isl_ctx *ctx);
+__isl_export
+__isl_give isl_val *isl_val_neginfty(isl_ctx *ctx);
+__isl_constructor
+__isl_give isl_val *isl_val_int_from_si(isl_ctx *ctx, long i);
+__isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx, unsigned long u);
+__isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx, size_t n,
+	size_t size, const void *chunks);
+
+__isl_give isl_val *isl_val_copy(__isl_keep isl_val *v);
+__isl_null isl_val *isl_val_free(__isl_take isl_val *v);
+
+isl_ctx *isl_val_get_ctx(__isl_keep isl_val *val);
+uint32_t isl_val_get_hash(__isl_keep isl_val *val);
+__isl_export
+long isl_val_get_num_si(__isl_keep isl_val *v);
+__isl_export
+long isl_val_get_den_si(__isl_keep isl_val *v);
+__isl_give isl_val *isl_val_get_den_val(__isl_keep isl_val *v);
+double isl_val_get_d(__isl_keep isl_val *v);
+isl_size isl_val_n_abs_num_chunks(__isl_keep isl_val *v, size_t size);
+isl_stat isl_val_get_abs_num_chunks(__isl_keep isl_val *v, size_t size,
+	void *chunks);
+
+__isl_give isl_val *isl_val_set_si(__isl_take isl_val *v, long i);
+
+__isl_export
+__isl_give isl_val *isl_val_abs(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_neg(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_inv(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_floor(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_ceil(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_trunc(__isl_take isl_val *v);
+__isl_give isl_val *isl_val_2exp(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_pow2(__isl_take isl_val *v);
+__isl_export
+__isl_give isl_val *isl_val_min(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_export
+__isl_give isl_val *isl_val_max(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_export
+__isl_give isl_val *isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_give isl_val *isl_val_add_ui(__isl_take isl_val *v1, unsigned long v2);
+__isl_export
+__isl_give isl_val *isl_val_sub(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_give isl_val *isl_val_sub_ui(__isl_take isl_val *v1, unsigned long v2);
+__isl_export
+__isl_give isl_val *isl_val_mul(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_give isl_val *isl_val_mul_ui(__isl_take isl_val *v1, unsigned long v2);
+__isl_export
+__isl_give isl_val *isl_val_div(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_give isl_val *isl_val_div_ui(__isl_take isl_val *v1, unsigned long v2);
+__isl_export
+__isl_give isl_val *isl_val_mod(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_export
+__isl_give isl_val *isl_val_gcd(__isl_take isl_val *v1, __isl_take isl_val *v2);
+__isl_give isl_val *isl_val_gcdext(__isl_take isl_val *v1,
+	__isl_take isl_val *v2, __isl_give isl_val **x, __isl_give isl_val **y);
+
+__isl_export
+int isl_val_sgn(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_zero(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_one(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_negone(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_nonneg(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_nonpos(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_pos(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_neg(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_int(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_rat(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_nan(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_infty(__isl_keep isl_val *v);
+__isl_export
+isl_bool isl_val_is_neginfty(__isl_keep isl_val *v);
+
+__isl_export
+int isl_val_cmp_si(__isl_keep isl_val *v, long i);
+
+__isl_export
+isl_bool isl_val_lt(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+__isl_export
+isl_bool isl_val_le(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+__isl_export
+isl_bool isl_val_gt(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+isl_bool isl_val_gt_si(__isl_keep isl_val *v, long i);
+__isl_export
+isl_bool isl_val_ge(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+__isl_export
+isl_bool isl_val_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+isl_bool isl_val_eq_si(__isl_keep isl_val *v, long i);
+__isl_export
+isl_bool isl_val_ne(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+__isl_export
+isl_bool isl_val_abs_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2);
+
+__isl_export
+isl_bool isl_val_is_divisible_by(__isl_keep isl_val *v1,
+	__isl_keep isl_val *v2);
+
+__isl_constructor
+__isl_give isl_val *isl_val_read_from_str(isl_ctx *ctx, const char *str);
+__isl_give isl_printer *isl_printer_print_val(__isl_take isl_printer *p,
+	__isl_keep isl_val *v);
+void isl_val_dump(__isl_keep isl_val *v);
+__isl_give char *isl_val_to_str(__isl_keep isl_val *v);
+
+isl_bool isl_multi_val_is_zero(__isl_keep isl_multi_val *mv);
+
+__isl_overload
+__isl_give isl_multi_val *isl_multi_val_add_val(__isl_take isl_multi_val *mv,
+	__isl_take isl_val *v);
+__isl_give isl_multi_val *isl_multi_val_mod_val(__isl_take isl_multi_val *mv,
+	__isl_take isl_val *v);
+
+__isl_constructor
+__isl_give isl_multi_val *isl_multi_val_read_from_str(isl_ctx *ctx,
+	const char *str);
+__isl_give isl_printer *isl_printer_print_multi_val(__isl_take isl_printer *p,
+	__isl_keep isl_multi_val *mv);
+void isl_multi_val_dump(__isl_keep isl_multi_val *mv);
+__isl_give char *isl_multi_val_to_str(__isl_keep isl_multi_val *mv);
+
+ISL_DECLARE_EXPORTED_LIST_FN(val)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/val_gmp.h b/linux-x64/clang/include/polly/isl/val_gmp.h
new file mode 100644
index 0000000..dbc1501
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/val_gmp.h
@@ -0,0 +1,21 @@
+#ifndef ISL_VAL_GMP_H
+#define ISL_VAL_GMP_H
+
+#include <gmp.h>
+#include <isl/val_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+__isl_give isl_val *isl_val_int_from_gmp(isl_ctx *ctx, mpz_t z);
+__isl_give isl_val *isl_val_from_gmp(isl_ctx *ctx,
+	const mpz_t n, const mpz_t d);
+int isl_val_get_num_gmp(__isl_keep isl_val *v, mpz_t z);
+int isl_val_get_den_gmp(__isl_keep isl_val *v, mpz_t z);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/val_type.h b/linux-x64/clang/include/polly/isl/val_type.h
new file mode 100644
index 0000000..ede6401
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/val_type.h
@@ -0,0 +1,22 @@
+#ifndef ISL_VAL_TYPE_H
+#define ISL_VAL_TYPE_H
+
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct __isl_export isl_val;
+typedef struct isl_val isl_val;
+
+ISL_DECLARE_EXPORTED_LIST_TYPE(val)
+
+struct __isl_export isl_multi_val;
+typedef struct isl_multi_val isl_multi_val;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/vec.h b/linux-x64/clang/include/polly/isl/vec.h
new file mode 100644
index 0000000..71f7d64
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/vec.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2008-2009 Katholieke Universiteit Leuven
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege, K.U.Leuven, Departement
+ * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
+ */
+
+#ifndef ISL_VEC_H
+#define ISL_VEC_H
+
+#include <stdio.h>
+
+#include <isl/ctx.h>
+#include <isl/val_type.h>
+#include <isl/printer.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_vec;
+typedef struct isl_vec isl_vec;
+
+__isl_give isl_vec *isl_vec_alloc(isl_ctx *ctx, unsigned size);
+__isl_give isl_vec *isl_vec_zero(isl_ctx *ctx, unsigned size);
+__isl_give isl_vec *isl_vec_copy(__isl_keep isl_vec *vec);
+__isl_null isl_vec *isl_vec_free(__isl_take isl_vec *vec);
+
+isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec);
+
+isl_size isl_vec_size(__isl_keep isl_vec *vec);
+__isl_give isl_val *isl_vec_get_element_val(__isl_keep isl_vec *vec, int pos);
+__isl_give isl_vec *isl_vec_set_element_si(__isl_take isl_vec *vec,
+	int pos, int v);
+__isl_give isl_vec *isl_vec_set_element_val(__isl_take isl_vec *vec,
+	int pos, __isl_take isl_val *v);
+
+isl_bool isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2);
+int isl_vec_cmp_element(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2,
+	int pos);
+
+void isl_vec_dump(__isl_keep isl_vec *vec);
+__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer,
+	__isl_keep isl_vec *vec);
+
+__isl_give isl_vec *isl_vec_ceil(__isl_take isl_vec *vec);
+__isl_give isl_vec *isl_vec_normalize(__isl_take isl_vec *vec);
+__isl_give isl_vec *isl_vec_set_si(__isl_take isl_vec *vec, int v);
+__isl_give isl_vec *isl_vec_set_val(__isl_take isl_vec *vec,
+	__isl_take isl_val *v);
+__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec);
+__isl_give isl_vec *isl_vec_neg(__isl_take isl_vec *vec);
+__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1,
+	__isl_take isl_vec *vec2);
+__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size);
+__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size);
+__isl_give isl_vec *isl_vec_concat(__isl_take isl_vec *vec1,
+	__isl_take isl_vec *vec2);
+
+__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec);
+
+__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input);
+
+__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec,
+	unsigned pos, unsigned n);
+__isl_give isl_vec *isl_vec_add_els(__isl_take isl_vec *vec, unsigned n);
+__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec,
+	unsigned pos, unsigned n);
+__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec,
+	unsigned pos, unsigned n);
+__isl_give isl_vec *isl_vec_move_els(__isl_take isl_vec *vec,
+	unsigned dst_col, unsigned src_col, unsigned n);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/version.h b/linux-x64/clang/include/polly/isl/version.h
new file mode 100644
index 0000000..7f8f23d
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/version.h
@@ -0,0 +1,14 @@
+#ifndef ISL_VERSION_H
+#define ISL_VERSION_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+const char *isl_version(void);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff --git a/linux-x64/clang/include/polly/isl/vertices.h b/linux-x64/clang/include/polly/isl/vertices.h
new file mode 100644
index 0000000..9a7ac50
--- /dev/null
+++ b/linux-x64/clang/include/polly/isl/vertices.h
@@ -0,0 +1,47 @@
+#ifndef ISL_VERTICES_H
+#define ISL_VERTICES_H
+
+#include <isl/aff_type.h>
+#include <isl/set_type.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_external_vertex;
+typedef struct isl_external_vertex	isl_vertex;
+
+struct isl_cell;
+typedef struct isl_cell		isl_cell;
+
+struct isl_vertices;
+typedef struct isl_vertices	isl_vertices;
+
+isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex);
+isl_size isl_vertex_get_id(__isl_keep isl_vertex *vertex);
+__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex);
+__isl_give isl_multi_aff *isl_vertex_get_expr(__isl_keep isl_vertex *vertex);
+__isl_null isl_vertex *isl_vertex_free(__isl_take isl_vertex *vertex);
+
+__isl_give isl_vertices *isl_basic_set_compute_vertices(
+	__isl_keep isl_basic_set *bset);
+isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices);
+isl_size isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices);
+isl_stat isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices,
+	isl_stat (*fn)(__isl_take isl_vertex *vertex, void *user), void *user);
+__isl_null isl_vertices *isl_vertices_free(__isl_take isl_vertices *vertices);
+
+isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell);
+__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell);
+isl_stat isl_cell_foreach_vertex(__isl_keep isl_cell *cell,
+	isl_stat (*fn)(__isl_take isl_vertex *vertex, void *user), void *user);
+__isl_null isl_cell *isl_cell_free(__isl_take isl_cell *cell);
+
+isl_stat isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices,
+	isl_stat (*fn)(__isl_take isl_cell *cell, void *user), void *user);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif