Predator  [unstable] git snapshot
symcut.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 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_SYM_CUT_H
21 #define H_GUARD_SYM_CUT_H
22 
23 /**
24  * @file symcut.hh
25  * split/join algorithms operating on symbolic heap - splitHeapByCVars() and
26  * joinHeapsByCVars()
27  */
28 
29 #include "symheap.hh"
30 
31 class SymBackTrace;
32 
33 /**
34  * split symbolic heap into two parts regarding the list of program variables
35  * @note In the corner case, the result may be identical to the input. Then
36  * the heap pointed by saveFrameTo will be empty.
37  * @param srcDst the instance of heap to operate on, it has to contain all
38  * program variables that are specified by cut.
39  * @param cut list of program variables to cut the heap by
40  * @param saveFrameTo if not null, it must point to a fresh instance of
41  * SymHeap; it will be used to stored the (possibly empty) part of heap that is
42  * cut off
43  */
44 void splitHeapByCVars(
45  SymHeap *srcDst,
46  const TCVarList &cut,
47  SymHeap *saveFrameTo = 0);
48 
49 /**
50  * split two disjunct symbolic heaps together, going from program variables
51  * @param srcDst the instance of heap to operate on
52  * @param src2 the other instance of heap, which is used read-only
53  */
54 void joinHeapsByCVars(
55  SymHeap *srcDst,
56  const SymHeap *src2);
57 
58 #endif /* H_GUARD_SYM_CUT_H */