PIPS
ubs_private.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _newgen_struct_ubs_check_
 
struct  _newgen_struct_ubs_
 

Macros

#define _gen_ubs_private_start   96
 
#define _newgen_entity_domain_defined_
 
#define ENTITY_NEWGEN_DOMAIN   (entity_domain)
 
#define entity_NEWGEN_DOMAIN   (entity_domain)
 
#define ubs_check_domain   (_gen_ubs_private_start+0)
 newgen_entity_domain_defined More...
 
#define _newgen_ubs_check_domain_defined_
 
#define UBS_CHECK_NEWGEN_DOMAIN   (ubs_check_domain)
 
#define ubs_check_NEWGEN_DOMAIN   (ubs_check_domain)
 
#define ubs_domain   (_gen_ubs_private_start+1)
 newgen_ubs_check_domain_defined More...
 
#define _newgen_ubs_domain_defined_
 
#define UBS_NEWGEN_DOMAIN   (ubs_domain)
 
#define ubs_NEWGEN_DOMAIN   (ubs_domain)
 
#define UBS_CHECK(x)   ((ubs_check)((x).p))
 newgen_ubs_domain_defined More...
 
#define ubs_check_CAST(x)   UBS_CHECK(x)
 
#define UBS_CHECK_CAST(x)   UBS_CHECK(x)
 
#define UBS_CHECK_(x)   ((x).e)
 
#define UBS_CHECK_TYPE   ubs_check
 
#define ubs_check_TYPE   ubs_check
 
#define ubs_check_undefined   ((ubs_check)gen_chunk_undefined)
 
#define ubs_check_undefined_p(x)   ((x)==ubs_check_undefined)
 
#define gen_UBS_CHECK_cons   gen_ubs_check_cons
 
#define ubs_check_domain_number(x)   ((x)->_type_)
 
#define ubs_check_module_(x)   ubs_check_module(x) /**old hack compatible */
 
#define ubs_check_module(x)   ((x)->_ubs_check_module_)
 
#define ubs_check_variable_(x)   ubs_check_variable(x) /**old hack compatible */
 
#define ubs_check_variable(x)   ((x)->_ubs_check_variable_)
 
#define UBS(x)   ((ubs)((x).p))
 UBS. More...
 
#define ubs_CAST(x)   UBS(x)
 
#define UBS_CAST(x)   UBS(x)
 
#define UBS_(x)   ((x).e)
 
#define UBS_TYPE   ubs
 
#define ubs_TYPE   ubs
 
#define ubs_undefined   ((ubs)gen_chunk_undefined)
 
#define ubs_undefined_p(x)   ((x)==ubs_undefined)
 
#define gen_UBS_cons   gen_ubs_cons
 
#define ubs_domain_number(x)   ((x)->_type_)
 
#define ubs_list(x)   ((x)->_ubs_holder_)
 
#define ubs_private_spec   "\--NEWGEN-START 96\n\import entity from \"ri.newgen\";\n\ubs_check = module:entity x variable:entity;\n\ubs = list:ubs_check*;\n\"
 

Typedefs

typedef struct _newgen_struct_entity_entity
 
typedef struct _newgen_struct_ubs_check_ubs_check
 
typedef struct _newgen_struct_ubs_ubs
 

Functions

ubs_check copy_ubs_check (ubs_check)
 UBS_CHECK. More...
 
void free_ubs_check (ubs_check)
 
ubs_check check_ubs_check (ubs_check)
 
bool ubs_check_consistent_p (ubs_check)
 
bool ubs_check_defined_p (ubs_check)
 
list gen_ubs_check_cons (ubs_check, list)
 
void ubs_check_assign_contents (ubs_check, ubs_check)
 
void ubs_check_non_recursive_free (ubs_check)
 
void write_ubs_check (FILE *, ubs_check)
 
ubs_check read_ubs_check (FILE *)
 
ubs_check make_ubs_check (entity, entity)
 
ubs copy_ubs (ubs)
 UBS. More...
 
void free_ubs (ubs)
 
ubs check_ubs (ubs)
 
bool ubs_consistent_p (ubs)
 
bool ubs_defined_p (ubs)
 
list gen_ubs_cons (ubs, list)
 
void ubs_assign_contents (ubs, ubs)
 
void ubs_non_recursive_free (ubs)
 
void write_ubs (FILE *, ubs)
 
ubs read_ubs (FILE *)
 
ubs make_ubs (list)
 

Macro Definition Documentation

◆ _gen_ubs_private_start

#define _gen_ubs_private_start   96

Definition at line 3 of file ubs_private.h.

◆ _newgen_entity_domain_defined_

#define _newgen_entity_domain_defined_

Definition at line 11 of file ubs_private.h.

◆ _newgen_ubs_check_domain_defined_

#define _newgen_ubs_check_domain_defined_

Definition at line 19 of file ubs_private.h.

◆ _newgen_ubs_domain_defined_

#define _newgen_ubs_domain_defined_

Definition at line 27 of file ubs_private.h.

◆ ENTITY_NEWGEN_DOMAIN

#define ENTITY_NEWGEN_DOMAIN   (entity_domain)

Definition at line 12 of file ubs_private.h.

◆ entity_NEWGEN_DOMAIN

#define entity_NEWGEN_DOMAIN   (entity_domain)

Definition at line 13 of file ubs_private.h.

◆ gen_UBS_CHECK_cons

#define gen_UBS_CHECK_cons   gen_ubs_check_cons

Definition at line 49 of file ubs_private.h.

◆ gen_UBS_cons

#define gen_UBS_cons   gen_ubs_cons

Definition at line 85 of file ubs_private.h.

◆ UBS

#define UBS (   x)    ((ubs)((x).p))

UBS.

Definition at line 71 of file ubs_private.h.

◆ UBS_

#define UBS_ (   x)    ((x).e)

Definition at line 74 of file ubs_private.h.

◆ ubs_CAST

#define ubs_CAST (   x)    UBS(x)

Definition at line 72 of file ubs_private.h.

◆ UBS_CAST

#define UBS_CAST (   x)    UBS(x)

Definition at line 73 of file ubs_private.h.

◆ UBS_CHECK

#define UBS_CHECK (   x)    ((ubs_check)((x).p))

newgen_ubs_domain_defined

UBS_CHECK

Definition at line 35 of file ubs_private.h.

◆ UBS_CHECK_

#define UBS_CHECK_ (   x)    ((x).e)

Definition at line 38 of file ubs_private.h.

◆ ubs_check_CAST

#define ubs_check_CAST (   x)    UBS_CHECK(x)

Definition at line 36 of file ubs_private.h.

◆ UBS_CHECK_CAST

#define UBS_CHECK_CAST (   x)    UBS_CHECK(x)

Definition at line 37 of file ubs_private.h.

◆ ubs_check_domain

#define ubs_check_domain   (_gen_ubs_private_start+0)

newgen_entity_domain_defined

Definition at line 17 of file ubs_private.h.

◆ ubs_check_domain_number

#define ubs_check_domain_number (   x)    ((x)->_type_)

Definition at line 63 of file ubs_private.h.

◆ ubs_check_module

#define ubs_check_module (   x)    ((x)->_ubs_check_module_)

Definition at line 65 of file ubs_private.h.

◆ ubs_check_module_

#define ubs_check_module_ (   x)    ubs_check_module(x) /**old hack compatible */

Definition at line 64 of file ubs_private.h.

◆ UBS_CHECK_NEWGEN_DOMAIN

#define UBS_CHECK_NEWGEN_DOMAIN   (ubs_check_domain)

Definition at line 20 of file ubs_private.h.

◆ ubs_check_NEWGEN_DOMAIN

#define ubs_check_NEWGEN_DOMAIN   (ubs_check_domain)

Definition at line 21 of file ubs_private.h.

◆ UBS_CHECK_TYPE

#define UBS_CHECK_TYPE   ubs_check

Definition at line 39 of file ubs_private.h.

◆ ubs_check_TYPE

#define ubs_check_TYPE   ubs_check

Definition at line 40 of file ubs_private.h.

◆ ubs_check_undefined

#define ubs_check_undefined   ((ubs_check)gen_chunk_undefined)

Definition at line 41 of file ubs_private.h.

◆ ubs_check_undefined_p

#define ubs_check_undefined_p (   x)    ((x)==ubs_check_undefined)

Definition at line 42 of file ubs_private.h.

◆ ubs_check_variable

#define ubs_check_variable (   x)    ((x)->_ubs_check_variable_)

Definition at line 67 of file ubs_private.h.

◆ ubs_check_variable_

#define ubs_check_variable_ (   x)    ubs_check_variable(x) /**old hack compatible */

Definition at line 66 of file ubs_private.h.

◆ ubs_domain

#define ubs_domain   (_gen_ubs_private_start+1)

newgen_ubs_check_domain_defined

Definition at line 25 of file ubs_private.h.

◆ ubs_domain_number

#define ubs_domain_number (   x)    ((x)->_type_)

Definition at line 98 of file ubs_private.h.

◆ ubs_list

#define ubs_list (   x)    ((x)->_ubs_holder_)

Definition at line 99 of file ubs_private.h.

◆ UBS_NEWGEN_DOMAIN

#define UBS_NEWGEN_DOMAIN   (ubs_domain)

Definition at line 28 of file ubs_private.h.

◆ ubs_NEWGEN_DOMAIN

#define ubs_NEWGEN_DOMAIN   (ubs_domain)

Definition at line 29 of file ubs_private.h.

◆ ubs_private_spec

#define ubs_private_spec   "\--NEWGEN-START 96\n\import entity from \"ri.newgen\";\n\ubs_check = module:entity x variable:entity;\n\ubs = list:ubs_check*;\n\"

Definition at line 101 of file ubs_private.h.

◆ UBS_TYPE

#define UBS_TYPE   ubs

Definition at line 75 of file ubs_private.h.

◆ ubs_TYPE

#define ubs_TYPE   ubs

Definition at line 76 of file ubs_private.h.

◆ ubs_undefined

#define ubs_undefined   ((ubs)gen_chunk_undefined)

Definition at line 77 of file ubs_private.h.

◆ ubs_undefined_p

#define ubs_undefined_p (   x)    ((x)==ubs_undefined)

Definition at line 78 of file ubs_private.h.

Typedef Documentation

◆ entity

typedef struct _newgen_struct_entity_* entity

Definition at line 14 of file ubs_private.h.

◆ ubs

typedef struct _newgen_struct_ubs_* ubs

Definition at line 30 of file ubs_private.h.

◆ ubs_check

Definition at line 22 of file ubs_private.h.

Function Documentation

◆ check_ubs()

ubs check_ubs ( ubs  p)

Definition at line 64 of file ubs_private.c.

64  {
65  return (ubs) gen_check((gen_chunk*) p, ubs_domain);
66 }
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
#define ubs_domain
newgen_ubs_check_domain_defined
Definition: ubs_private.h:25
A gen_chunk is used to store every object.
Definition: genC.h:58

References gen_check(), and ubs_domain.

Referenced by ubs_assign_contents(), and ubs_consistent_p().

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

◆ check_ubs_check()

ubs_check check_ubs_check ( ubs_check  p)

Definition at line 22 of file ubs_private.c.

22  {
24 }
#define ubs_check_domain
newgen_entity_domain_defined
Definition: ubs_private.h:17

References gen_check(), and ubs_check_domain.

Referenced by ubs_check_assign_contents(), and ubs_check_consistent_p().

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

◆ copy_ubs()

ubs copy_ubs ( ubs  p)

UBS.

Definition at line 58 of file ubs_private.c.

58  {
59  return (ubs) gen_copy_tree((gen_chunk*) p);
60 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

Referenced by used_before_set().

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

◆ copy_ubs_check()

ubs_check copy_ubs_check ( ubs_check  p)

UBS_CHECK.

Definition at line 16 of file ubs_private.c.

16  {
17  return (ubs_check) gen_copy_tree((gen_chunk*) p);
18 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ free_ubs()

void free_ubs ( ubs  p)

Definition at line 61 of file ubs_private.c.

61  {
62  gen_free((gen_chunk*) p);
63 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

+ Here is the call graph for this function:

◆ free_ubs_check()

void free_ubs_check ( ubs_check  p)

Definition at line 19 of file ubs_private.c.

19  {
20  gen_free((gen_chunk*) p);
21 }

References gen_free().

+ Here is the call graph for this function:

◆ gen_ubs_check_cons()

list gen_ubs_check_cons ( ubs_check  p,
list  l 
)

Definition at line 32 of file ubs_private.c.

32  {
34 }
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
#define UBS_CHECK_NEWGEN_DOMAIN
Definition: ubs_private.h:20

References gen_typed_cons(), and UBS_CHECK_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_ubs_cons()

list gen_ubs_cons ( ubs  p,
list  l 
)

Definition at line 74 of file ubs_private.c.

74  {
75  return gen_typed_cons(UBS_NEWGEN_DOMAIN, p, l);
76 }
#define UBS_NEWGEN_DOMAIN
Definition: ubs_private.h:28

References gen_typed_cons(), and UBS_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_ubs()

ubs make_ubs ( list  a)

Definition at line 94 of file ubs_private.c.

94  {
95  return (ubs) gen_alloc(2*sizeof(gen_chunk), GEN_CHECK_ALLOC, ubs_domain, a);
96 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References gen_alloc(), GEN_CHECK_ALLOC, and ubs_domain.

Referenced by used_before_set().

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

◆ make_ubs_check()

ubs_check make_ubs_check ( entity  a1,
entity  a2 
)

Definition at line 52 of file ubs_private.c.

52  {
53  return (ubs_check) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, ubs_check_domain, a1, a2);
54 }

References gen_alloc(), GEN_CHECK_ALLOC, and ubs_check_domain.

Referenced by verify_used_before_set_call().

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

◆ read_ubs()

ubs read_ubs ( FILE *  f)

Definition at line 91 of file ubs_private.c.

91  {
92  return (ubs) gen_read(f);
93 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_ubs_check()

ubs_check read_ubs_check ( FILE *  f)

Definition at line 49 of file ubs_private.c.

49  {
50  return (ubs_check) gen_read(f);
51 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ ubs_assign_contents()

void ubs_assign_contents ( ubs  r,
ubs  v 
)

Definition at line 77 of file ubs_private.c.

77  {
78  check_ubs(r);
79  check_ubs(v);
80  message_assert("defined references to domain ubs",
81  ubs_defined_p(r) && ubs_defined_p(v));
82  memcpy(r, v, sizeof(struct _newgen_struct_ubs_));
83 }
ubs check_ubs(ubs p)
Definition: ubs_private.c:64
bool ubs_defined_p(ubs p)
Definition: ubs_private.c:71
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_ubs(), message_assert, and ubs_defined_p().

+ Here is the call graph for this function:

◆ ubs_check_assign_contents()

void ubs_check_assign_contents ( ubs_check  r,
ubs_check  v 
)

Definition at line 35 of file ubs_private.c.

35  {
36  check_ubs_check(r);
37  check_ubs_check(v);
38  message_assert("defined references to domain ubs_check",
40  memcpy(r, v, sizeof(struct _newgen_struct_ubs_check_));
41 }
ubs_check check_ubs_check(ubs_check p)
Definition: ubs_private.c:22
bool ubs_check_defined_p(ubs_check p)
Definition: ubs_private.c:29

References check_ubs_check(), message_assert, and ubs_check_defined_p().

+ Here is the call graph for this function:

◆ ubs_check_consistent_p()

bool ubs_check_consistent_p ( ubs_check  p)

Definition at line 25 of file ubs_private.c.

25  {
26  check_ubs_check(p);
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_ubs_check(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ ubs_check_defined_p()

bool ubs_check_defined_p ( ubs_check  p)

Definition at line 29 of file ubs_private.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by ubs_check_assign_contents().

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

◆ ubs_check_non_recursive_free()

void ubs_check_non_recursive_free ( ubs_check  p)

Definition at line 42 of file ubs_private.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ ubs_consistent_p()

bool ubs_consistent_p ( ubs  p)

Definition at line 67 of file ubs_private.c.

67  {
68  check_ubs(p);
69  return gen_consistent_p((gen_chunk*) p);
70 }

References check_ubs(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ ubs_defined_p()

bool ubs_defined_p ( ubs  p)

Definition at line 71 of file ubs_private.c.

71  {
72  return gen_defined_p((gen_chunk*) p);
73 }

References gen_defined_p().

Referenced by ubs_assign_contents().

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

◆ ubs_non_recursive_free()

void ubs_non_recursive_free ( ubs  p)

Definition at line 84 of file ubs_private.c.

84  {
85  // should clear up contents...
86  free(p);
87 }

References free().

+ Here is the call graph for this function:

◆ write_ubs()

void write_ubs ( FILE *  f,
ubs  p 
)

Definition at line 88 of file ubs_private.c.

88  {
89  gen_write(f, (gen_chunk*) p);
90 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_ubs_check()

void write_ubs_check ( FILE *  f,
ubs_check  p 
)

Definition at line 46 of file ubs_private.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }

References f(), and gen_write().

+ Here is the call graph for this function: