OpenScop  0.9.0
Data Structures | Defines | Typedefs | Functions
irregular.h File Reference
#include <stdio.h>
#include <osl/macros.h>
#include <osl/strings.h>
#include <osl/interface.h>
Include dependency graph for irregular.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  osl_irregular

Defines

#define OSL_URI_IRREGULAR   "irregular"
#define OSL_TAG_IRREGULAR_START   "<"OSL_URI_IRREGULAR">"
#define OSL_TAG_IRREGULAR_STOP   "</"OSL_URI_IRREGULAR">"

Typedefs

typedef struct osl_irregular osl_irregular_t
typedef struct osl_irregularosl_irregular_p

Functions

void osl_irregular_idump (FILE *, osl_irregular_p, int)
void osl_irregular_dump (FILE *, osl_irregular_p)
char * osl_irregular_sprint (osl_irregular_p)
osl_irregular_p osl_irregular_sread (char **)
osl_irregular_p osl_irregular_malloc ()
void osl_irregular_free (osl_irregular_p)
osl_irregular_p osl_irregular_clone (osl_irregular_p)
int osl_irregular_equal (osl_irregular_p, osl_irregular_p)
osl_irregular_p osl_irregular_add_control (osl_irregular_p, char **, int, char *)
osl_irregular_p osl_irregular_add_exit (osl_irregular_p, char **, int, char *)
osl_irregular_p osl_irregular_add_predicates (osl_irregular_p, int *, int)
osl_interface_p osl_irregular_interface ()

Define Documentation

Definition at line 79 of file irregular.h.

Referenced by osl_irregular_sprint().

Definition at line 80 of file irregular.h.

Referenced by osl_irregular_sprint().

#define OSL_URI_IRREGULAR   "irregular"

Definition at line 78 of file irregular.h.

Referenced by osl_irregular_interface().


Typedef Documentation

typedef struct osl_irregular* osl_irregular_p

Definition at line 110 of file irregular.h.

Definition at line 109 of file irregular.h.


Function Documentation

osl_irregular_p osl_irregular_add_control ( osl_irregular_p  ,
char **  ,
int  ,
char *   
)
osl_irregular_p osl_irregular_add_exit ( osl_irregular_p  ,
char **  ,
int  ,
char *   
)

osl_irregular_clone function: This function builds and returns a "hard copy" (not a pointer copy) of an osl_irregular_t data structure.

Parameters:
irregularThe pointer to the irregular structure we want to copy.
Returns:
A pointer to the copy of the irregular structure.

Definition at line 381 of file irregular.c.

References osl_irregular::body, osl_irregular::iterators, osl_interface::malloc, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, osl_irregular_malloc(), OSL_strdup, and osl_irregular::predicates.

Referenced by osl_irregular_interface().

void osl_irregular_dump ( FILE *  file,
osl_irregular_p  irregular 
)

osl_irregular_dump function: this function prints the content of an osl_irregular_t structure (*irregular) into a file (file, possibly stdout).

Parameters:
fileThe file where the information has to be printed.
irregularThe irregular structure whose information has to be printed.

Definition at line 147 of file irregular.c.

References osl_irregular_idump().

osl_irregular_equal function: this function returns true if the two irregular structures are the same (content-wise), false otherwise. This functions considers two irregular

Parameters:
c1The first irregular structure.
c2The second irregular structure.
Returns:
1 if c1 and c2 are the same (content-wise), 0 otherwise.

Definition at line 463 of file irregular.c.

References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, and osl_irregular::nb_statements.

Referenced by osl_irregular_interface().

void osl_irregular_free ( osl_irregular_p  irregular)

osl_irregular_free function: This function frees the allocated memory for an osl_irregular_t structure.

Parameters:
irregularThe pointer to the irregular structure we want to free.

Definition at line 339 of file irregular.c.

References osl_irregular::body, osl_interface::free, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, and osl_irregular::predicates.

Referenced by osl_irregular_interface().

void osl_irregular_idump ( FILE *  file,
osl_irregular_p  irregular,
int  level 
)

osl_irregular_idump function: this function displays an osl_irregular_t structure (*irregular) into a file (file, possibly stdout) in a way that trends to be understandable. It includes an indentation level (level) in order to work with others idump functions.

Parameters:
fileThe file where the information has to be printed.
irregularThe irregular structure whose information has to be printed.
levelNumber of spaces before printing, for each line.

Definition at line 89 of file irregular.c.

References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, and osl_irregular::predicates.

Referenced by osl_irregular_dump(), and osl_irregular_interface().

osl_irregular_interface function: this function creates an interface structure corresponding to the irregular extension and returns it).

Returns:
An interface structure for the irregular extension.

Definition at line 749 of file irregular.c.

References osl_interface_malloc(), osl_irregular_clone(), osl_irregular_equal(), osl_irregular_free(), osl_irregular_idump(), osl_irregular_malloc(), osl_irregular_sprint(), osl_irregular_sread(), OSL_strdup, and OSL_URI_IRREGULAR.

osl_irregular_malloc function: This function allocates the memory space for an osl_irregular_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.

Returns:
A pointer to an empty irregular structure with fields set to default values.

Definition at line 315 of file irregular.c.

References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_malloc, and osl_irregular::predicates.

Referenced by osl_irregular_add_control(), osl_irregular_add_exit(), osl_irregular_add_predicates(), osl_irregular_clone(), osl_irregular_interface(), and osl_irregular_sread().

char* osl_irregular_sprint ( osl_irregular_p  irregular)

osl_irregular_sprint function: this function prints the content of an osl_irregular_t structure (*irregular) into a string (returned) in the OpenScop textual format.

Parameters:
irregularThe irregular structure whose information has to be printed.
Returns:
A string containing the OpenScop dump of the irregular structure.

Definition at line 159 of file irregular.c.

References osl_irregular::body, osl_interface::free, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_malloc, OSL_MAX_STRING, OSL_realloc, OSL_TAG_IRREGULAR_START, OSL_TAG_IRREGULAR_STOP, osl_util_safe_strcat(), and osl_irregular::predicates.

Referenced by osl_irregular_interface().

osl_irregular_p osl_irregular_sread ( char **  extensions_fixme)

osl_irregular_sread function: this function reads a irregular structure from a string complying to the OpenScop textual format and returns a pointer to this irregular structure. The string should contain only one textual format of a irregular structure.

Parameters:
extensionsThe input string where to find a irregular structure.
Returns:
A pointer to the irregular structure that has been read.

Definition at line 230 of file irregular.c.

References osl_irregular::body, osl_irregular::iterators, osl_irregular::nb_control, osl_irregular::nb_exit, osl_irregular::nb_iterators, osl_irregular::nb_predicates, osl_irregular::nb_statements, OSL_debug, OSL_error, osl_irregular_malloc(), OSL_malloc, OSL_MAX_STRING, OSL_strdup, and osl_irregular::predicates.

Referenced by osl_irregular_interface().