TaPAS  0.2
genepi-plugin.h
Go to the documentation of this file.
1 /*
2  * genepi-plugin.h -- The specification of GENEPI plugins
3  *
4  * This file is a part of the GENEric Presburger programming Interface.
5  *
6  * Copyright (C) 2010 CNRS UMR 5800 & Université Bordeaux I (see AUTHORS file).
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 
53 #ifndef __GENEPI_PLUGIN_H__
54 # define __GENEPI_PLUGIN_H__
55 
56 # include <genepi/genepi.h>
58 
59 BEGIN_C_DECLS
60 
61 # ifndef GENEPI_PLUGIN_PREFIX
62 # ifdef __GENEPI_P_H__
63 # define GENEPI_PLUGIN_PREFIX(_f) genepi_plugin_ ## _f
64 # else /* ! __GENEPI_P_H__ */
65 # error "GENEPI_PLUGIN_PREFIX is not defined."
66 # endif /* ! __GENEPI_P_H__ */
67 # endif /* ! GENEPI_PLUGIN_PREFIX */
68 
96 # define GENEPI_PLUGIN_FUNC(_f) GENEPI_PLUGIN_PREFIX (_LTX_ ## _f)
97 
101 typedef struct genepi_plugin_impl_st genepi_plugin_impl;
102 
112 typedef struct genepi_set_impl_st genepi_set_impl;
113 
130 extern genepi_plugin_impl *
131 GENEPI_PLUGIN_FUNC (init) (genepi_plugconf *conf);
132 
145 extern void
146 GENEPI_PLUGIN_FUNC (terminate) (genepi_plugin_impl *plugin);
147 
148 
157 extern int
158 GENEPI_PLUGIN_FUNC (autotest) (genepi_plugin_impl *plugin);
159 
160  /* --------------- */
161 
172 extern genepi_solver_type
173 GENEPI_PLUGIN_FUNC (get_solver_type) (genepi_plugin_impl *plugin);
174 
187 extern genepi_set_impl *
188 GENEPI_PLUGIN_FUNC (add_reference) (genepi_plugin_impl *plugin,
189  genepi_set_impl *X);
190 
203 extern void
204 GENEPI_PLUGIN_FUNC (del_reference) (genepi_plugin_impl *plugin,
205  genepi_set_impl *X);
206 
222 extern genepi_set_impl *
223 GENEPI_PLUGIN_FUNC (top) (genepi_plugin_impl *plugin, int n);
224 
238 extern genepi_set_impl *
239 GENEPI_PLUGIN_FUNC (top_N) (genepi_plugin_impl *plugin, int n);
240 
250 extern genepi_set_impl *
251 GENEPI_PLUGIN_FUNC (top_Z) (genepi_plugin_impl *plugin, int n);
252 
263 extern genepi_set_impl *
264 GENEPI_PLUGIN_FUNC (top_P) (genepi_plugin_impl *plugin, int n);
265 
275 extern genepi_set_impl *
276 GENEPI_PLUGIN_FUNC (top_R) (genepi_plugin_impl *plugin, int n);
277 
290 extern genepi_set_impl *
291 GENEPI_PLUGIN_FUNC (bot) (genepi_plugin_impl *plugin, int n);
292 
313 extern genepi_set_impl *
314 GENEPI_PLUGIN_FUNC (linear_operation) (genepi_plugin_impl *plugin,
315  const int *alpha, int alpha_size,
316  genepi_comparator op, int c);
317 
336 extern genepi_set_impl *
337 GENEPI_PLUGIN_FUNC (set_union) (genepi_plugin_impl *plugin,
339 
358 extern genepi_set_impl *
359 GENEPI_PLUGIN_FUNC (set_intersection) (genepi_plugin_impl *plugin,
360  genepi_set_impl *X1,
361  genepi_set_impl *X2);
362 
378 extern genepi_set_impl *
379 GENEPI_PLUGIN_FUNC (set_complement) (genepi_plugin_impl *plugin,
380  genepi_set_impl *X);
381 
409 extern genepi_set_impl *
411  const int *selection, int size);
412 
438 extern genepi_set_impl *
439 GENEPI_PLUGIN_FUNC (invproject) (genepi_plugin_impl *plugin, genepi_set_impl *X,
440  const int *selection, int size);
441 
466 extern genepi_set_impl *
468  genepi_set_impl *A);
469 
496 extern genepi_set_impl *
497 GENEPI_PLUGIN_FUNC (applyinv) (genepi_plugin_impl *plugin, genepi_set_impl *R,
498  genepi_set_impl *A);
499 
520 extern int
521 GENEPI_PLUGIN_FUNC (compare) (genepi_plugin_impl *plugin, genepi_set_impl *X1,
523 
538 extern int
539 GENEPI_PLUGIN_FUNC (is_empty) (genepi_plugin_impl *plugin, genepi_set_impl *X);
540 
558 extern int
560 
572 extern int
573 GENEPI_PLUGIN_FUNC (is_finite) (genepi_plugin_impl *plugin, genepi_set_impl *X);
574 
596 extern int
597 GENEPI_PLUGIN_FUNC (depend_on) (genepi_plugin_impl *plugin, genepi_set_impl *X,
598  const int *sel, int selsize);
599 
627 extern void
628 GENEPI_PLUGIN_FUNC (get_solutions) (genepi_plugin_impl *plugin,
629  genepi_set_impl *X, int ***psolutions,
630  int *psize, int max);
631 
649 extern void
650 GENEPI_PLUGIN_FUNC (display_all_solutions) (genepi_plugin_impl *plugin,
651  genepi_set_impl *X, FILE *output,
652  const char * const *varnames);
653 
665 extern void
666 GENEPI_PLUGIN_FUNC (display_data_structure) (genepi_plugin_impl *plugin,
667  genepi_set_impl *X, FILE *output);
668 
683 extern int
684 GENEPI_PLUGIN_FUNC (get_width) (genepi_plugin_impl *plugin, genepi_set_impl *X);
685 
704 extern int
705 GENEPI_PLUGIN_FUNC (get_data_structure_size) (genepi_plugin_impl *plugin,
706  genepi_set_impl *X);
707 
728 extern int
729 GENEPI_PLUGIN_FUNC (is_solution) (genepi_plugin_impl *plugin,
730  genepi_set_impl *X, const int *v, int v_size,
731  int vden);
732 
756 extern int
757 GENEPI_PLUGIN_FUNC (get_one_solution) (genepi_plugin_impl *plugin,
758  genepi_set_impl *X, int *x, int x_size);
759 
772 extern unsigned int
773 GENEPI_PLUGIN_FUNC (cache_hash) (genepi_plugin_impl *plugin,
774  genepi_set_impl *X);
775 
790 extern int
791 GENEPI_PLUGIN_FUNC (cache_equal) (genepi_plugin_impl *plugin,
793 
812 extern int
813 GENEPI_PLUGIN_FUNC (write_set) (genepi_plugin_impl *plugin, FILE *output,
814  genepi_set_impl *set);
815 
837 extern int
838 GENEPI_PLUGIN_FUNC (read_set) (genepi_plugin_impl *plugin, FILE *input,
839  genepi_set_impl **pset);
840 
860 extern int
861 GENEPI_PLUGIN_FUNC (preorder) (genepi_plugin_impl *plugin, genepi_set_impl *X1,
862  genepi_set_impl *X2);
863 
864 END_C_DECLS
865 
866 #endif /* ! __GENEPI_PLUGIN_H__ */
Configuration tables for plugin.
struct genepi_plugin_impl_st genepi_plugin_impl
Abstraction of a GENEPI plugin instance.
genepi_solver_type
Indicate the domain of variable used by a solver.
Definition: genepi.h:248
#define GENEPI_PLUGIN_FUNC(_f)
Macro used to prefix function symbols.
Definition: genepi-plugin.h:96
genepi_comparator
Comparison specifier.
Definition: genepi.h:230
struct genepi_set_impl_st genepi_set_impl
Abstraction of a GENEPI set.
GENEPI Solver Interface.