PIPS
sc_add_variable.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "constants.h"
+ Include dependency graph for sc_add_variable.c:

Go to the source code of this file.

Functions

Variable sc_add_new_variable_name (entity module, Psysteme ps)
 Package MOVEMENTS. More...
 

Function Documentation

◆ sc_add_new_variable_name()

Variable sc_add_new_variable_name ( entity  module,
Psysteme  ps 
)

Package MOVEMENTS.

sc_add_variable.c

Corinne Ancourt - juin 1990 This function adds a new variable to the system of constraints ps.

Parameters
moduleodule
pss

Definition at line 48 of file sc_add_variable.c.

51 {
52  static char name[ 64 ];
53  string name1;
54  int d;
55  entity ent1;
56  string full_name;
57  d = ps->dimension++;
58  name[0] = 'X';
59  (void) sprintf(&name[1],"%d",d);
60  name1 = strdup(name);
61 
64  name1,
65  NULL));
68  free(full_name);
69  }
70  ps->base = vect_add_variable (ps->base,(char *)ent1);
71 
72  return((char *) ent1);
73 
74 }
Pbase vect_add_variable(Pbase b, Variable v)
package vecteur - routines sur les bases
Definition: base.c:61
void free(void *)
#define full_name(dir, name)
Definition: compile.c:414
#define MODULE_SEP_STRING
Definition: naming-local.h:30
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
static char * module
Definition: pips.c:74
const char * module_local_name(entity e)
Returns the module local user name.
Definition: entity.c:582
entity make_scalar_integer_entity(const char *, const char *)
Create an integer variable of name "name" in module of name "module_name".
Definition: variable.c:1068
#define entity_undefined
Definition: ri.h:2761
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
char * strdup()
Pbase base
Definition: sc-local.h:75
int dimension
Definition: sc-local.h:74

References Ssysteme::base, concatenate(), Ssysteme::dimension, entity_domain, entity_undefined, free(), full_name, gen_find_tabulated(), make_scalar_integer_entity(), module, module_local_name(), MODULE_SEP_STRING, strdup(), and vect_add_variable().

Referenced by build_sc_with_several_uniform_ref(), and sc_image_computation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: