2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
8 ** based on set_template.h
16 abst_typedef /*@null@*/ struct
20 /*@reldef@*/ /*@relnull@*/ usymId *elements;
23 extern usymIdSet usymIdSet_new(void);
24 extern bool usymIdSet_member (usymIdSet p_s, usymId p_el) /*@*/ ;
25 extern usymIdSet usymIdSet_subtract (usymIdSet p_s, usymIdSet p_t);
26 extern void usymIdSet_free (/*@only@*/ /*@only@*/ usymIdSet p_s);
27 extern /*@only@*/ cstring usymIdSet_unparse (usymIdSet p_ll);
28 extern /*@only@*/ cstring usymIdSet_dump (usymIdSet p_lset);
29 extern usymIdSet usymIdSet_undump (char **p_s);
30 extern /*@only@*/ usymIdSet usymIdSet_single (usymId p_t);
32 extern int usymIdSet_compare (usymIdSet p_l1, usymIdSet p_l2);
34 /*@constant int usymIdSetBASESIZE;@*/
35 # define usymIdSetBASESIZE SMALLBASESIZE
37 extern usymIdSet usymIdSet_newUnion (usymIdSet p_s1, usymIdSet p_s2) /*@*/ ;
38 extern usymIdSet usymIdSet_add (usymIdSet p_s, usymId p_el) /*@*/ ;
40 extern /*@only@*/ usymIdSet
41 usymIdSet_removeFresh (/*@temp@*/ usymIdSet p_s, usymId p_el);
43 /*@constant null usymIdSet usymIdSet_undefined; @*/
44 # define usymIdSet_undefined ((usymIdSet) NULL)
46 extern /*@falsenull@*/ bool usymIdSet_isDefined (usymIdSet p_s) /*@*/ ;
47 # define usymIdSet_isDefined(s) ((s) != usymIdSet_undefined)
49 extern /*@truenull@*/ bool usymIdSet_isUndefined (usymIdSet p_s) /*@*/ ;
50 # define usymIdSet_isUndefined(s) ((s) == usymIdSet_undefined)
52 /*@iter usymIdSet_elements (sef usymIdSet u, yield usymId el); @*/
53 # define usymIdSet_elements(x, m_el) \
54 { int m_ind; if (usymIdSet_isDefined (x)) { \
55 for (m_ind = 0 ; m_ind < usymIdSet_size(x); m_ind++) \
56 { usymId m_el = (x)->elements[m_ind];
58 # define end_usymIdSet_elements }}}
60 extern int usymIdSet_size (/*@sef@*/ usymIdSet p_s);
61 # define usymIdSet_size(s) (usymIdSet_isUndefined(s) ? 0 : (s)->entries)
64 # error "Multiple include"