Predator  [unstable] git snapshot
fixed_point_proxy.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Kamil Dudka <kdudka@redhat.com>
3  *
4  * This file is part of predator.
5  *
6  * predator is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * any later version.
10  *
11  * predator is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with predator. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef H_GUARD_FIXED_POINT_PROXY_H
21 #define H_GUARD_FIXED_POINT_PROXY_H
22 
23 #include "symstate.hh"
24 
25 #include <map>
26 
27 namespace CodeStorage {
28  struct Insn;
29 }
30 
31 namespace FixedPoint {
32 
33  typedef const CodeStorage::Insn *TInsn;
34 
35  class StateByInsn {
36  public:
37  typedef std::map<TInsn, SymStateWithJoin> TStateMap;
38 
39  StateByInsn();
40  ~StateByInsn();
41 
42  bool /* any change */ insert(TInsn insn, const SymHeap &sh);
43 
44  const TStateMap& stateMap() const;
45 
46  void plotAll();
47 
48  private:
49  struct Private;
50  Private *d;
51  };
52 
53 } // namespace FixedPoint
54 
55 #endif /* H_GUARD_FIXED_POINT_PROXY_H */