4 DECLARE_PTR_LIST(history_list
, struct state_history
);
10 struct smatch_state
*state
;
11 struct history_list
*line_history
;
12 struct state_list_stack
*pools
;
13 struct state_list
*possible
;
16 DECLARE_ALLOCATOR(sm_state
);
17 DECLARE_PTR_LIST(state_list
, struct sm_state
);
18 DECLARE_PTR_LIST(state_list_stack
, struct state_list
);
21 struct state_list
*slist
;
23 DECLARE_ALLOCATOR(named_slist
);
24 DECLARE_PTR_LIST(named_stack
, struct named_slist
);
26 extern struct state_list_stack
*implied_pools
;
28 void __print_slist(struct state_list
*slist
);
29 void add_history(struct sm_state
*state
);
30 struct sm_state
*alloc_state(const char *name
, int owner
,
32 struct smatch_state
*state
);
34 struct sm_state
*clone_state(struct sm_state
*s
);
35 struct state_list
*clone_slist(struct state_list
*from_slist
);
36 struct state_list_stack
*clone_stack(struct state_list_stack
*from_stack
);
38 int slist_has_state(struct state_list
*slist
, struct smatch_state
*state
);
39 struct smatch_state
*merge_states(const char *name
, int owner
,
41 struct smatch_state
*state1
,
42 struct smatch_state
*state2
);
44 struct smatch_state
*get_state_slist(struct state_list
*slist
, const char *name
, int owner
,
47 struct sm_state
*get_sm_state_slist(struct state_list
*slist
, const char *name
, int owner
,
50 void set_state_slist(struct state_list
**slist
, const char *name
, int owner
,
51 struct symbol
*sym
, struct smatch_state
*state
);
53 void merge_state_slist(struct state_list
**slist
, const char *name
, int owner
,
54 struct symbol
*sym
, struct smatch_state
*state
);
56 void delete_state_slist(struct state_list
**slist
, const char *name
, int owner
,
59 struct smatch_state
*get_state_slist(struct state_list
*slist
, const char *name
, int owner
,
62 void push_slist(struct state_list_stack
**list_stack
, struct state_list
*slist
);
64 struct state_list
*pop_slist(struct state_list_stack
**list_stack
);
66 void del_slist(struct state_list
**slist
);
68 void del_slist_stack(struct state_list_stack
**slist_stack
);
70 void set_state_stack(struct state_list_stack
**stack
, const char *name
,
71 int owner
, struct symbol
*sym
, struct smatch_state
*state
);
73 struct smatch_state
*get_state_stack(struct state_list_stack
*stack
, const char *name
,
74 int owner
, struct symbol
*sym
);
76 void merge_slist(struct state_list
**to
, struct state_list
*slist
);
77 struct state_list
*clone_states_in_pool(struct state_list
*pool
,
78 struct state_list
*cur_slist
);
79 void filter(struct state_list
**slist
, struct state_list
*filter
,
80 struct state_list
*cur_slist
);
81 void and_slist_stack(struct state_list_stack
**slist_stack
);
83 void or_slist_stack(struct state_list_stack
**slist_stack
);
85 struct state_list
**get_slist_from_named_stack(struct named_stack
*stack
,
88 void overwrite_slist(struct state_list
*from
, struct state_list
**to
);