ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
avl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  avl_node_struct
 
struct  avl_tree_struct
 
struct  avl_generator_struct
 

Macros

#define EXTERN
 
#define ARGS(protos)
 
#define MAX(a, b)
 
#define NIL(type)
 
#define ALLOC(type, num)
 
#define REALLOC(type, obj, num)
 
#define FREE(obj)
 
#define AVL_FORWARD   0
 
#define AVL_BACKWARD   1
 
#define avl_is_member(tree, key)
 
#define avl_foreach_item(table, gen, dir, key_p, value_p)
 

Typedefs

typedef struct avl_node_struct avl_node
 
typedef struct avl_tree_struct avl_tree
 
typedef struct avl_generator_struct avl_generator
 

Functions

EXTERN avl_tree *avl_init_table ARGS ((int(*)()))
 
EXTERN int avl_delete ARGS ((avl_tree *, char **, char **))
 
EXTERN int avl_insert ARGS ((avl_tree *, char *, char *))
 
EXTERN int avl_lookup ARGS ((avl_tree *, char *, char **))
 
EXTERN int avl_find_or_add ARGS ((avl_tree *, char *, char ***))
 
EXTERN int avl_count ARGS ((avl_tree *))
 
EXTERN int avl_numcmp ARGS ((char *, char *))
 
EXTERN int avl_gen ARGS ((avl_generator *, char **, char **))
 
EXTERN void avl_foreach ARGS ((avl_tree *, void(*)(), int))
 
EXTERN void avl_free_gen ARGS ((avl_generator *))
 
EXTERN avl_generator *avl_init_gen ARGS ((avl_tree *, int))
 

Macro Definition Documentation

◆ ALLOC

#define ALLOC ( type,
num )
Value:
((type *) malloc(sizeof(type) * (num)))
type
CUBE COVER and CUBE typedefs ///.
Definition exor.h:90
char * malloc()

Definition at line 27 of file avl.h.

27#define ALLOC(type, num) \
28 ((type *) malloc(sizeof(type) * (num)))

◆ ARGS

#define ARGS ( protos)
Value:
protos

Definition at line 20 of file avl.h.

◆ AVL_BACKWARD

#define AVL_BACKWARD   1

Definition at line 63 of file avl.h.

◆ avl_foreach_item

#define avl_foreach_item ( table,
gen,
dir,
key_p,
value_p )
Value:
for(gen = avl_init_gen(table, dir); \
avl_gen(gen, key_p, value_p) || (avl_free_gen(gen),0);)
avl_generator * avl_init_gen(avl_tree *tree, int dir)
Definition avl.c:287
void avl_free_gen(avl_generator *gen)
Definition avl.c:338

Definition at line 83 of file avl.h.

83#define avl_foreach_item(table, gen, dir, key_p, value_p) \
84 for(gen = avl_init_gen(table, dir); \
85 avl_gen(gen, key_p, value_p) || (avl_free_gen(gen),0);)

◆ AVL_FORWARD

#define AVL_FORWARD   0

Definition at line 62 of file avl.h.

◆ avl_is_member

#define avl_is_member ( tree,
key )
Value:
avl_lookup(tree, key, (char **) 0)
avl_lookup(avl_tree *tree, char *key, char **value_p)
Definition avl.c:61
enum keys key
Definition main.h:25

Definition at line 81 of file avl.h.

◆ EXTERN

#define EXTERN

Definition at line 17 of file avl.h.

◆ FREE

#define FREE ( obj)
Value:
free((char *) (obj))
VOID_HACK free()

Definition at line 31 of file avl.h.

31#define FREE(obj) \
32 free((char *) (obj))

◆ MAX

#define MAX ( a,
b )
Value:
((a) > (b) ? (a) : (b))

Definition at line 23 of file avl.h.

◆ NIL

#define NIL ( type)
Value:
((type *) 0)

Definition at line 25 of file avl.h.

25#define NIL(type) \
26 ((type *) 0)

◆ REALLOC

#define REALLOC ( type,
obj,
num )
Value:
((type *) realloc((char *) obj, sizeof(type) * (num)))
char * realloc()

Definition at line 29 of file avl.h.

29#define REALLOC(type, obj, num) \
30 ((type *) realloc((char *) obj, sizeof(type) * (num)))

Typedef Documentation

◆ avl_generator

Definition at line 54 of file avl.h.

◆ avl_node

typedef struct avl_node_struct avl_node

Definition at line 36 of file avl.h.

◆ avl_tree

typedef struct avl_tree_struct avl_tree

Definition at line 45 of file avl.h.

Function Documentation

◆ ARGS() [1/11]

EXTERN void avl_free_gen ARGS ( (avl_generator *) )
Here is the call graph for this function:

◆ ARGS() [2/11]

EXTERN int avl_gen ARGS ( (avl_generator *, char **, char **) )
Here is the call graph for this function:

◆ ARGS() [3/11]

EXTERN int avl_count ARGS ( (avl_tree *) )
Here is the call graph for this function:

◆ ARGS() [4/11]

EXTERN int avl_last ARGS ( (avl_tree *, char **, char **) )
Here is the call graph for this function:

◆ ARGS() [5/11]

EXTERN int avl_insert ARGS ( (avl_tree *, char *, char *) )
Here is the call graph for this function:

◆ ARGS() [6/11]

EXTERN int avl_lookup ARGS ( (avl_tree *, char *, char **) )
Here is the call graph for this function:

◆ ARGS() [7/11]

EXTERN int avl_find_or_add ARGS ( (avl_tree *, char *, char ***) )
Here is the call graph for this function:

◆ ARGS() [8/11]

Here is the call graph for this function:

◆ ARGS() [9/11]

EXTERN void avl_free_table ARGS ( (avl_tree *, void(*  )(), int))
Here is the call graph for this function:

◆ ARGS() [10/11]

EXTERN char *util_tempnam ARGS ( (char *, char *) )
Here is the call graph for this function:

◆ ARGS() [11/11]

EXTERN avl_tree *avl_init_table ARGS ( (int(*  )()))
Here is the call graph for this function: