OpenScop  0.9.0
body.h
Go to the documentation of this file.
1 
2  /*+-----------------------------------------------------------------**
3  ** OpenScop Library **
4  **-----------------------------------------------------------------**
5  ** body.h **
6  **-----------------------------------------------------------------**
7  ** First version: 25/06/2011 **
8  **-----------------------------------------------------------------**
9 
10 
11  *****************************************************************************
12  * OpenScop: Structures and formats for polyhedral tools to talk together *
13  *****************************************************************************
14  * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, *
15  * / / / // // // // / / / // // / / // / /|,_, *
16  * / / / // // // // / / / // // / / // / / / /\ *
17  * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ *
18  * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ *
19  * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ *
20  * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ *
21  * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ *
22  * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ *
23  * | I | | | | e | | | | | | | | | | | | | \ \ \ *
24  * | T | | | | | | | | | | | | | | | | | \ \ \ *
25  * | E | | | | | | | | | | | | | | | | | \ \ \ *
26  * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ *
27  * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / *
28  * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' *
29  * *
30  * Copyright (C) 2008 University Paris-Sud 11 and INRIA *
31  * *
32  * (3-clause BSD license) *
33  * Redistribution and use in source and binary forms, with or without *
34  * modification, are permitted provided that the following conditions *
35  * are met: *
36  * *
37  * 1. Redistributions of source code must retain the above copyright notice, *
38  * this list of conditions and the following disclaimer. *
39  * 2. Redistributions in binary form must reproduce the above copyright *
40  * notice, this list of conditions and the following disclaimer in the *
41  * documentation and/or other materials provided with the distribution. *
42  * 3. The name of the author may not be used to endorse or promote products *
43  * derived from this software without specific prior written permission. *
44  * *
45  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR *
46  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *
47  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *
48  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, *
49  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *
50  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *
51  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
52  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
53  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *
54  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
55  * *
56  * OpenScop Library, a library to manipulate OpenScop formats and data *
57  * structures. Written by: *
58  * Cedric Bastoul <Cedric.Bastoul@u-psud.fr> and *
59  * Louis-Noel Pouchet <Louis-Noel.pouchet@inria.fr> *
60  * *
61  *****************************************************************************/
62 
63 
64 #ifndef OSL_BODY_H
65 # define OSL_BODY_H
66 
67 # include <stdio.h>
68 # include <osl/strings.h>
69 # include <osl/interface.h>
70 
71 # if defined(__cplusplus)
72 extern "C"
73  {
74 # endif
75 
76 # define OSL_URI_BODY "body"
77 
85 struct osl_body {
88 };
89 typedef struct osl_body osl_body_t;
90 typedef struct osl_body * osl_body_p;
91 typedef struct osl_body const osl_const_body_t;
92 typedef struct osl_body * const osl_body_const_p;
93 typedef struct osl_body const * osl_const_body_p;
94 typedef struct osl_body const * const osl_const_body_const_p;
95 
96 
97 /*---------------------------------------------------------------------------+
98  | Structure display function |
99  +---------------------------------------------------------------------------*/
100 void osl_body_idump(FILE *, osl_body_p, int);
101 void osl_body_dump(FILE *, osl_body_p);
102 char * osl_body_sprint(osl_body_p);
103 void osl_body_print(FILE *, osl_body_p);
104 
105 // SCoPLib Compatibility
106 void osl_body_print_scoplib(FILE * file, osl_body_p body);
107 
108 /*****************************************************************************
109  * Reading function *
110  *****************************************************************************/
111 osl_body_p osl_body_sread(char **);
112 
113 
114 /*+***************************************************************************
115  * Memory allocation/deallocation function *
116  *****************************************************************************/
117 osl_body_p osl_body_malloc();
118 void osl_body_free(osl_body_p);
119 
120 
121 /*+***************************************************************************
122  * Processing functions *
123  *****************************************************************************/
124 osl_body_p osl_body_clone(osl_body_p);
125 int osl_body_equal(osl_body_p, osl_body_p);
127 
128 # if defined(__cplusplus)
129  }
130 # endif
131 #endif /* define OSL_BODY_H */
osl_body_p osl_body_malloc()
Definition: body.c:297
struct osl_body const *const osl_const_body_const_p
Definition: body.h:94
struct osl_body const * osl_const_body_p
Definition: body.h:93
osl_strings_p expression
Definition: body.h:87
struct osl_body *const osl_body_const_p
Definition: body.h:92
struct osl_body * osl_body_p
Definition: body.h:90
osl_interface_p osl_body_interface()
Definition: body.c:390
void osl_body_idump(FILE *, osl_body_p, int)
Definition: body.c:90
struct osl_body const osl_const_body_t
Definition: body.h:91
osl_strings_p iterators
Definition: body.h:86
osl_body_p osl_body_clone(osl_body_p)
Definition: body.c:337
osl_body_p osl_body_sread(char **)
Definition: body.c:255
void osl_body_print_scoplib(FILE *file, osl_body_p body)
Definition: body.c:170
void osl_body_print(FILE *, osl_body_p)
Definition: body.c:141
void osl_body_dump(FILE *, osl_body_p)
Definition: body.c:129
void osl_body_free(osl_body_p)
Definition: body.c:314
Definition: body.h:85
char * osl_body_sprint(osl_body_p)
Definition: body.c:199
int osl_body_equal(osl_body_p, osl_body_p)
Definition: body.c:359