2 * Copyright (c) 2000-2001
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 #include "setst-var.h"
38 extern region setst_region
;
39 extern term_hash setst_hash
;
41 struct setst_term
/* extends gen_e */
50 typedef struct setst_term
*setst_term
;
52 stamp
setst_get_stamp(gen_e e
);
53 void setst_inclusion(con_match_fn_ptr
,gen_e
, gen_e
);
55 gen_e
setst_zero(void);
56 gen_e
setst_one(void);
57 gen_e
setst_fresh(const char *name
);
58 gen_e
setst_fresh_large(const char *name
);
59 gen_e
setst_fresh_small(const char *name
);
60 gen_e
setst_constant(const char *name
) deletes
;
61 gen_e
setst_union(gen_e_list exprs
) deletes
;
62 gen_e
setst_inter(gen_e_list exprs
) deletes
;
63 bool setst_is_zero(gen_e e
);
64 bool setst_is_one(gen_e e
);
65 bool setst_is_var(gen_e e
);
66 bool setst_is_union(gen_e e
);
67 bool setst_is_inter(gen_e e
);
68 bool setst_is_constant(gen_e e
);
70 char *setst_get_constant_name(gen_e e
);
71 gen_e_list
setst_get_union(gen_e e
);
72 gen_e_list
setst_get_inter(gen_e e
);
74 gen_e_list
setst_tlb(gen_e e
,incl_fn_ptr setst_incl
) deletes
;
75 void setst_set_proj_cache(gen_e e
, gen_e elem
);
76 gen_e_list
setst_get_proj_cache(gen_e e
);
79 void setst_init(void);
80 void setst_reset(void) deletes
;
81 void setst_print_stats(FILE *f
);
83 extern struct setst_stats setst_stats
;
91 int distinct_constructors
;
92 int hashed_constructors
;
93 int distinct_constants
;
98 int distinct_intersections
;
99 int filtered_intersections
;
100 int hashed_intersections
;
103 int redundant_source
;
115 int cycles_collapsed
;
120 #endif /* SETST_SORT_H */