-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathis_threaded.h
56 lines (41 loc) · 1.14 KB
/
is_threaded.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*******************************************************************\
Module: Over-approximate Concurrency for Threaded Goto Programs
Author: Daniel Kroening
Date: October 2012
\*******************************************************************/
/// \file
/// Over-approximate Concurrency for Threaded Goto Programs
#ifndef CPROVER_ANALYSES_IS_THREADED_H
#define CPROVER_ANALYSES_IS_THREADED_H
#include <set>
#include <goto-programs/goto_model.h>
class is_threadedt
{
public:
explicit is_threadedt(
const goto_functionst &goto_functions)
{
compute(goto_functions);
}
explicit is_threadedt(
const goto_modelt &goto_model)
{
compute(goto_model.goto_functions);
}
bool operator()(const goto_programt::const_targett t) const
{
return is_threaded_set.find(t)!=is_threaded_set.end();
}
bool operator()(void) const
{
return !is_threaded_set.empty();
}
protected:
typedef std::
set<goto_programt::const_targett, goto_programt::target_less_than>
is_threaded_sett;
is_threaded_sett is_threaded_set;
void compute(
const goto_functionst &goto_functions);
};
#endif // CPROVER_ANALYSES_IS_THREADED_H