Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove USE_ALLOCATOR where it very likely makes no difference #506

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions DP/ShortConflictMetaDP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ using namespace SAT;

class ShortConflictMetaDP : public DecisionProcedure {
public:
USE_ALLOCATOR(ShortConflictMetaDP);

/**
* Create object using @c inner decision procedure. Object takes ownership of the @c inner object.
*/
Expand Down
2 changes: 0 additions & 2 deletions DP/SimpleCongruenceClosure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ using namespace Kernel;
class SimpleCongruenceClosure : public DecisionProcedure
{
public:
USE_ALLOCATOR(SimpleCongruenceClosure);

SimpleCongruenceClosure(Ordering* ord);

virtual void addLiterals(LiteralIterator lits, bool onlyEqualites) override;
Expand Down
2 changes: 0 additions & 2 deletions Debug/TimeProfiling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ class TimeTraceOrdering : public Kernel::Ordering
const char* _nameTerm;
Ord _ord;
public:
USE_ALLOCATOR(TimeTraceOrdering);

TimeTraceOrdering(const char* nameLit, const char* nameTerm, Ord ord)
: _nameLit(nameLit)
, _nameTerm(nameTerm)
Expand Down
2 changes: 0 additions & 2 deletions FMB/FiniteModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ using namespace Kernel;
*
*/
class FiniteModel {
USE_ALLOCATOR(FiniteModel);

public:

const unsigned _size;
Expand Down
9 changes: 0 additions & 9 deletions FMB/FiniteModelBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ using namespace SAT;

class FiniteModelBuilder : public MainLoop {
public:
USE_ALLOCATOR(FiniteModelBuilder);

FiniteModelBuilder(Problem& prb, const Options& opt);
~FiniteModelBuilder();

Expand Down Expand Up @@ -251,8 +249,6 @@ class FiniteModelBuilder : public MainLoop {

class HackyDSAE : public DSAEnumerator {
struct Constraint_Generator {
USE_ALLOCATOR(FiniteModelBuilder::HackyDSAE::Constraint_Generator);

Constraint_Generator_Vals _vals;
unsigned _weight;

Expand Down Expand Up @@ -287,8 +283,6 @@ class FiniteModelBuilder : public MainLoop {
bool checkConstriant(DArray<unsigned>& newSortSizes, Constraint_Generator_Vals& constraint);

public:
USE_ALLOCATOR(FiniteModelBuilder::HackyDSAE);

HackyDSAE(bool keepOldGenerators) : _maxWeightSoFar(0), _keepOldGenerators(keepOldGenerators) {}

bool init(unsigned _startSize, DArray<unsigned>&, Stack<std::pair<unsigned,unsigned>>& dsc, Stack<std::pair<unsigned,unsigned>>& sdsc) override {
Expand All @@ -314,9 +308,6 @@ class FiniteModelBuilder : public MainLoop {
unsigned loadSizesFromSmt(DArray<unsigned>& szs);
void reportZ3OutOfMemory();
public:
// the following is not sufficient, since z3::solver and z3::context allocate internally
USE_ALLOCATOR(FiniteModelBuilder::SmtBasedDSAE);

SmtBasedDSAE() : _smtSolver(_context) {}

bool init(unsigned, DArray<unsigned>&, Stack<std::pair<unsigned,unsigned>>&, Stack<std::pair<unsigned,unsigned>>&) override;
Expand Down
2 changes: 0 additions & 2 deletions FMB/FiniteModelMultiSorted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ using namespace Kernel;
*
*/
class FiniteModelMultiSorted {
USE_ALLOCATOR(FiniteModelMultiSorted);

DHMap<unsigned,unsigned> _sizes;

public:
Expand Down
3 changes: 0 additions & 3 deletions FMB/Monotonicity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ namespace FMB {
using namespace Lib;

class Monotonicity{

USE_ALLOCATOR(Monotonicity);

public:
// Assumes clauses are flattened
Monotonicity(ClauseList* clauses, unsigned srt);
Expand Down
4 changes: 0 additions & 4 deletions FMB/SortInference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ using namespace Shell;
using namespace Lib;

struct SortedSignature{
USE_ALLOCATOR(SortedSignature);

unsigned sorts;
DArray<Stack<unsigned>> sortedConstants;
DArray<Stack<unsigned>> sortedFunctions;
Expand Down Expand Up @@ -77,8 +75,6 @@ struct SortedSignature{

class SortInference {
public:
USE_ALLOCATOR(SortInference);

SortInference(ClauseList* clauses,
DArray<unsigned> del_f,
DArray<unsigned> del_p,
Expand Down
2 changes: 0 additions & 2 deletions Indexing/AcyclicityIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ class AcyclicityIndex
void remove(Kernel::Literal *lit, Kernel::Clause *c);

CycleQueryResultsIterator queryCycles(Kernel::Literal *lit, Kernel::Clause *c);

USE_ALLOCATOR(AcyclicityIndex);
protected:
void handleClause(Kernel::Clause* c, bool adding);
private:
Expand Down
4 changes: 0 additions & 4 deletions Indexing/ClauseVariantIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class ClauseVariantIndex
class SubstitutionTreeClauseVariantIndex : public ClauseVariantIndex
{
public:
USE_ALLOCATOR(SubstitutionTreeClauseVariantIndex);

SubstitutionTreeClauseVariantIndex() : _emptyClauses(0) {}
virtual ~SubstitutionTreeClauseVariantIndex() override;

Expand All @@ -76,8 +74,6 @@ class SubstitutionTreeClauseVariantIndex : public ClauseVariantIndex
class HashingClauseVariantIndex : public ClauseVariantIndex
{
public:
USE_ALLOCATOR(HashingClauseVariantIndex);

virtual ~HashingClauseVariantIndex() override;

virtual void insert(Clause* cl) override;
Expand Down
4 changes: 0 additions & 4 deletions Indexing/CodeTreeInterfaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ using namespace Lib;
class CodeTreeTIS : public TermIndexingStructure
{
public:
USE_ALLOCATOR(CodeTreeTIS);

void insert(TypedTermList t, Literal* lit, Clause* cls);
void remove(TypedTermList t, Literal* lit, Clause* cls);

Expand Down Expand Up @@ -78,8 +76,6 @@ class CodeTreeSubsumptionIndex
: public ClauseSubsumptionIndex
{
public:
USE_ALLOCATOR(CodeTreeSubsumptionIndex);

ClauseSResResultIterator getSubsumingOrSResolvingClauses(Clause* c, bool subsumptionResolution);
protected:
//overrides Index::handleClause
Expand Down
2 changes: 0 additions & 2 deletions Indexing/GroundingIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ using namespace Shell;

class GroundingIndex : public Index {
public:
USE_ALLOCATOR(GroundingIndex);

GroundingIndex(const Options& opt);

SATSolverWithAssumptions& getSolver() { return *_solver; }
Expand Down
4 changes: 0 additions & 4 deletions Indexing/Index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ typedef VirtualIterator<FormulaQueryResult> FormulaQueryResultIterator;
class Index
{
public:
USE_ALLOCATOR(Index);

virtual ~Index();

void attachContainer(ClauseContainer* cc);
Expand All @@ -157,8 +155,6 @@ class ClauseSubsumptionIndex
: public Index
{
public:
USE_ALLOCATOR(ClauseSubsumptionIndex);

virtual ClauseSResResultIterator getSubsumingOrSResolvingClauses(Clause* c,
bool subsumptionResolution)
{ NOT_IMPLEMENTED; };
Expand Down
2 changes: 0 additions & 2 deletions Indexing/IndexManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ enum IndexType {
class IndexManager
{
public:
USE_ALLOCATOR(IndexManager);

/** alg can be zero, then it must be set by setSaturationAlgorithm */
explicit IndexManager(SaturationAlgorithm* alg) : _alg(alg) {}
void setSaturationAlgorithm(SaturationAlgorithm* alg)
Expand Down
24 changes: 0 additions & 24 deletions Indexing/LiteralIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class LiteralIndex
: public Index
{
public:
USE_ALLOCATOR(LiteralIndex);

virtual ~LiteralIndex();

SLQueryResultIterator getAll();
Expand Down Expand Up @@ -60,8 +58,6 @@ class BinaryResolutionIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(BinaryResolutionIndex);

BinaryResolutionIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {};
protected:
Expand All @@ -72,8 +68,6 @@ class BackwardSubsumptionIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(BackwardSubsumptionIndex);

BackwardSubsumptionIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {};
protected:
Expand All @@ -84,8 +78,6 @@ class FwSubsSimplifyingLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(FwSubsSimplifyingLiteralIndex);

FwSubsSimplifyingLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is)
{ }
Expand All @@ -98,8 +90,6 @@ class FSDLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(FSDLiteralIndex);

FSDLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is)
{ }
Expand All @@ -112,8 +102,6 @@ class UnitClauseLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(UnitClauseLiteralIndex);

UnitClauseLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {};
protected:
Expand All @@ -124,8 +112,6 @@ class UnitClauseWithALLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(UnitClauseWithALLiteralIndex);

UnitClauseWithALLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {};
protected:
Expand All @@ -136,8 +122,6 @@ class NonUnitClauseLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(NonUnitClauseLiteralIndex);

NonUnitClauseLiteralIndex(LiteralIndexingStructure* is, bool selectedOnly=false)
: LiteralIndex(is), _selectedOnly(selectedOnly) {};
protected:
Expand All @@ -150,8 +134,6 @@ class NonUnitClauseWithALLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(NonUnitClauseWithALLiteralIndex);

NonUnitClauseWithALLiteralIndex(LiteralIndexingStructure* is, bool selectedOnly=false)
: LiteralIndex(is), _selectedOnly(selectedOnly) {};
protected:
Expand All @@ -164,8 +146,6 @@ class RewriteRuleIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(RewriteRuleIndex);

RewriteRuleIndex(LiteralIndexingStructure* is, Ordering& ordering);
~RewriteRuleIndex();

Expand All @@ -188,8 +168,6 @@ class DismatchingLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(DismatchingLiteralIndex);

DismatchingLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {};
void handleClause(Clause* c, bool adding);
Expand All @@ -200,8 +178,6 @@ class UnitIntegerComparisonLiteralIndex
: public LiteralIndex
{
public:
USE_ALLOCATOR(UnitIntegerComparisonLiteralIndex);

UnitIntegerComparisonLiteralIndex(LiteralIndexingStructure* is)
: LiteralIndex(is) {}

Expand Down
2 changes: 0 additions & 2 deletions Indexing/LiteralSubstitutionTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class LiteralSubstitutionTree
using Leaf = SubstitutionTree::Leaf;

public:
USE_ALLOCATOR(LiteralSubstitutionTree);

LiteralSubstitutionTree(bool useC=false);

void insert(Literal* lit, Clause* cls) override { handleLiteral(lit, cls, /* insert */ true); }
Expand Down
2 changes: 0 additions & 2 deletions Indexing/RequestedIndex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ template <typename Index>
class RequestedIndex final
{
public:
USE_ALLOCATOR(RequestedIndex);

RequestedIndex()
{ }

Expand Down
1 change: 0 additions & 1 deletion Indexing/SubstitutionTree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class SubstitutionTree
public:
static constexpr int QRS_QUERY_BANK = 0;
static constexpr int QRS_RESULT_BANK = 1;
USE_ALLOCATOR(SubstitutionTree);

SubstitutionTree(bool useC, bool rfSubs);

Expand Down
Loading