states: white space fix
[smatch.git] / smatch_slist.h
blob42cb5c32137a6da16b29b8dce2e4773f168f194f
1 struct stree;
3 DECLARE_PTR_LIST(state_list, struct sm_state);
4 DECLARE_PTR_LIST(state_list_stack, struct state_list);
5 DECLARE_PTR_LIST(stree_stack, struct stree);
7 struct named_stree {
8 char *name;
9 struct stree *stree;
11 DECLARE_ALLOCATOR(named_stree);
12 DECLARE_PTR_LIST(named_stree_stack, struct named_stree);
15 extern struct state_list_stack *implied_pools;
16 extern int __stree_id;
18 char *show_sm(struct sm_state *sm);
19 void __print_stree(struct stree *stree);
20 void add_history(struct sm_state *sm);
21 int cmp_tracker(const struct sm_state *a, const struct sm_state *b);
22 char *alloc_sname(const char *str);
23 struct sm_state *alloc_sm_state(int owner, const char *name,
24 struct symbol *sym, struct smatch_state *state);
26 void free_every_single_sm_state(void);
27 struct sm_state *clone_sm(struct sm_state *s);
28 int is_merged(struct sm_state *sm);
29 int is_implied(struct sm_state *sm);
30 struct state_list *clone_slist(struct state_list *from_slist);
32 int slist_has_state(struct state_list *slist, struct smatch_state *state);
33 struct smatch_state *merge_states(int owner, const char *name,
34 struct symbol *sym,
35 struct smatch_state *state1,
36 struct smatch_state *state2);
38 int too_many_possible(struct sm_state *sm);
39 struct sm_state *merge_sm_states(struct sm_state *one, struct sm_state *two);
40 struct smatch_state *get_state_stree(struct stree *stree, int owner, const char *name,
41 struct symbol *sym);
43 struct sm_state *get_sm_state_stree(struct stree *stree, int owner, const char *name,
44 struct symbol *sym);
46 void overwrite_sm_state_stree(struct stree **stree, struct sm_state *sm);
47 void overwrite_sm_state_stree_stack(struct stree_stack **stack, struct sm_state *sm);
48 struct sm_state *set_state_stree(struct stree **stree, int owner, const char *name,
49 struct symbol *sym, struct smatch_state *state);
50 void set_state_stree_perm(struct stree **stree, int owner, const char *name,
51 struct symbol *sym, struct smatch_state *state);
52 void delete_state_stree(struct stree **stree, int owner, const char *name,
53 struct symbol *sym);
55 void delete_state_stree_stack(struct stree_stack **stack, int owner, const char *name,
56 struct symbol *sym);
58 void push_stree(struct stree_stack **list_stack, struct stree *stree);
59 struct stree *pop_stree(struct stree_stack **list_stack);
61 void free_slist(struct state_list **slist);
62 void free_stree_stack(struct stree_stack **stack);
63 void free_stack_and_strees(struct stree_stack **stree_stack);
65 struct sm_state *set_state_stree_stack(struct stree_stack **stack, int owner, const char *name,
66 struct symbol *sym, struct smatch_state *state);
68 struct sm_state *get_sm_state_stree_stack(struct stree_stack *stack,
69 int owner, const char *name,
70 struct symbol *sym);
71 struct smatch_state *get_state_stree_stack(struct stree_stack *stack, int owner,
72 const char *name, struct symbol *sym);
74 int out_of_memory(void);
75 int low_on_memory(void);
76 void merge_stree(struct stree **to, struct stree *stree);
77 void merge_stree_no_pools(struct stree **to, struct stree *stree);
78 void merge_fake_stree(struct stree **to, struct stree *stree);
79 void filter_stree(struct stree **stree, struct stree *filter);
80 void and_stree_stack(struct stree_stack **stree_stack);
82 void or_stree_stack(struct stree_stack **pre_conds,
83 struct stree *cur_stree,
84 struct stree_stack **stack);
86 struct stree **get_named_stree(struct named_stree_stack *stack,
87 const char *name);
89 void overwrite_stree(struct stree *from, struct stree **to);
91 /* add stuff smatch_returns.c here */
93 void all_return_states_hook(void (*callback)(struct stree *slist));