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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
/*-----------------------------------------------------------------------
File : ccl_garbage_coll.c
Author: Stephan Schulz (schulz@eprover.org)
Contents
Code for simplifying term cell garbage collection.
Copyright 2010-2022 by the author.
This code is released under the GNU General Public Licence and
the GNU Lesser General Public License.
See the file COPYING in the main E directory for details..
Run "eprover -h" for contact information.
Changes
<1> Sat Mar 20 09:55:09 CET 2010
New
-----------------------------------------------------------------------*/
#include "ccl_garbage_coll.h"
/*---------------------------------------------------------------------*/
/* Global Variables */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Forward Declarations */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Internal Functions */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Exported Functions */
/*---------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
//
// Function: TBGCCollect()
//
// Perform garbage collection on bank.
//
// Global Variables: -
//
// Side Effects : -
//
/----------------------------------------------------------------------*/
long TBGCCollect(TB_p bank)
{
PTree_p entry;
PStack_p trav;
assert(bank);
assert(bank->gc);
//printf("# GCCollect(%p)\n", gc);
trav = PTreeTraverseInit(bank->gc->clause_sets);
while((entry = PTreeTraverseNext(trav)))
{
//printf("# Marking clause set %p\n", entry->key);
ClauseSetGCMarkTerms(entry->key);
}
PTreeTraverseExit(trav);
trav = PTreeTraverseInit(bank->gc->formula_sets);
while((entry = PTreeTraverseNext(trav)))
{
//printf("# Marking formula set %p\n", entry->key);
FormulaSetGCMarkCells(entry->key);
}
PTreeTraverseExit(trav);
return TBGCSweep(bank);
}
/*---------------------------------------------------------------------*/
/* End of File */
/*---------------------------------------------------------------------*/
|