#ifndef _ABSTR_
#define _ABSTR_ 
#include "array.h"
#include "clause.h"
#include "memory.h"
#include "psolver.h"
#include "sharing.h"
#include "term.h"
#include "distrn.h"
#include "state.h"
#include "pclause.h"
#include "trail.h"
typedef struct ABSTR_CLAUSES_HELP {
  ARRAY pclauses;
  ARRAY folclauses;
  ARRAY substs;
} ABSTR_CLAUSES_NODE, *ABSTR_CLAUSES;
typedef struct ABSTR_HELP {
  MEMORY mem;
  TERMSTATE termstate;
  FOLSTATE folstate;
  SYMBSTATE symbstate;
  SHARER sharer;
  TRAIL trail;
  PSTATE pstate;
  ARRAY mapping;
  ARRAY plits;
  BOOL first;
  BOOL unsat;
  ABSTR_CLAUSES clauses;
  ARRAY reductions;
  CLAUSE emptyclause;
} ABSTR_NODE, *ABSTR;
ABSTR abstr_Create(MEMORY, TERMSTATE, FOLSTATE, SYMBSTATE, SHARER, TRAIL);
void abstr_Delete(ABSTR);
MEMORY abstr_GetMemory(ABSTR);
void abstr_SetMemory(ABSTR, MEMORY);
CLAUSE abstr_GetEmptyClause(ABSTR);
void abstr_SetEmptyClause(ABSTR, CLAUSE);
TERMSTATE abstr_GetTermState(ABSTR);
void abstr_SetTermState(ABSTR, TERMSTATE);
FOLSTATE abstr_GetFOLState(ABSTR);
void abstr_SetFOLState(ABSTR, FOLSTATE);
SYMBSTATE abstr_GetSymbState(ABSTR);
void abstr_SetSymbState(ABSTR, SYMBSTATE);
SHARER abstr_GetSharer(ABSTR);
void abstr_SetSharer(ABSTR, SHARER);
TRAIL abstr_GetSCLTrail(ABSTR);
void abstr_SetSCLTrail(ABSTR, TRAIL);
PSTATE abstr_GetSATState(ABSTR);
void abstr_SetSATState(ABSTR, PSTATE);
ARRAY abstr_GetMapping(ABSTR);
void abstr_SetMapping(ABSTR, ARRAY);
ARRAY abstr_GetPropLitsArray(ABSTR);
void abstr_SetPropLitsArray(ABSTR, ARRAY);
BOOL abstr_GetFirst(ABSTR);
void abstr_SetFirst(ABSTR, BOOL);
BOOL abstr_GetPropUNSAT(ABSTR);
void abstr_SetPropUNSAT(ABSTR, BOOL);
ARRAY abstr_GetPropClauses(ABSTR);
void abstr_SetPropClauses(ABSTR, ARRAY);
ARRAY abstr_GetFOLClauses(ABSTR);
void abstr_SetFOLClauses(ABSTR, ARRAY);
ARRAY abstr_GetSubsts(ABSTR);
void abstr_SetSubsts(ABSTR, ARRAY);
ARRAY abstr_GetReductions(ABSTR);
void abstr_SetReductions(ABSTR, ARRAY);
void abstr_AddClauseAbstractionInfo(ABSTR, PCLAUSE, CLAUSE, SUBST);
PCLAUSE abstr_FOLClauseToPropClause(ABSTR, CLAUSE, SUBST);
void abstr_MappingAdd(ABSTR, TERM);
void abstr_MappingPrint(ABSTR);
void abstr_AddClause(ABSTR, PCLAUSE,BOOL);
BOOL abstr_RunSATSolver(ABSTR);
BOOL abstr_RunSATSolverAddClause(ABSTR, PCLAUSE);
BOOL abstr_RunSATSolverDecisionLiterals(ABSTR);
void abstr_AddAllGroundClauses(ABSTR, ARRAY);
void abstr_RefreshSolverState(ABSTR);
void abstr_FindUNSATCore(ABSTR);
void abstr_PrintUNSATCore(ABSTR, ARRAY,BOOL);
void abstr_PrintDivisor(int);
void abstr_HandleReduction(ABSTR, ARRAY);
void abstr_HandleReductionIter(ABSTR, ARRAY, TERM, unsigned);
void abstr_AddReductionRecord(ABSTR, unsigned, PLIT);
void abstr_SAT(SHARER, SCLSTATE);
ARRAY abstr_ComputeGeneralAtoms(SHARER, SCLSTATE);
#endif
