#ifndef _SPLSTATE_
#define _SPLSTATE_ 
#include <math.h>
#include "clock.h"
#include "string.h"
#include "array.h"
#include "fol.h"
#include "ohash.h"
#include "clause.h"
#include "folsubst.h"
#include "distrn.h"
#include "tptp.h"
#include "sharing.h"
#include "inst.h"
#include "congrbs.h"
#ifdef SPASS_CHECK
#include "ntwfo.h"
#endif
typedef struct SCLSTATE_HELP {
  MEMORY memory;
  SYMBSTATE symbstate;
  TERMSTATE termstate;
  FOLSTATE folstate;
  SUBSTSTATE sstate;
  TPTPSTATE tptpstate;
  CCBS_STATE congrstate;
  char * filename;
  TYPE foltype;
  OHASH namehash;
  ARRAY predicates;
  ARRAY functions;
  ARRAY constants;
  ARRAY groundatoms;
  DISTRN poslits;
  DISTRN neglits;
  SHARER sharer;
  ARRAY pconstants;
  ARRAY redclauses;
  unsigned lastclauseid;
  ARRAY workedoff;
  ARRAY usable;
  ARRAY candidates;
  ARRAY inferences;
  CLAUSE empty;
  INST instance;
  unsigned id;
  unsigned inputlits;
  unsigned inputclauses;
  ARRAY clauses;
  ARRAY conclauses;
  ARRAY lclauses;
  BOOL equations;
  BOOL variables;
  BOOL linear;
  BOOL inputconjecture;
  unsigned learned;
  unsigned decisions;
  unsigned propagations;
  unsigned resolutions;
  unsigned subres;
  unsigned condens;
  CLOCK overall;
  int seconds;
  BOOL abstr;
#ifdef SPASS_CHECK
  NTWFO ntwfo;
#endif
} SCLSTATE_NODE,*SCLSTATE;
typedef enum {
  THEORY_CONFLICT_PROP_UNSAT,
  THEORY_CONFLICT_LEARN_CLAUSE
} THEORY_CONFLICT;
SCLSTATE state_Create(MEMORY,FOLSTATE,TERMSTATE,SYMBSTATE,SUBSTSTATE, CCBS_STATE, CLOCK, SHARER);
void state_Delete(SCLSTATE);
void state_SetId(SCLSTATE, unsigned);
unsigned state_GetId(SCLSTATE);
unsigned state_GetNextIncrementId(SCLSTATE);
void state_SetNumberInputLits(SCLSTATE, unsigned);
unsigned state_GetNumberInputLits(SCLSTATE);
void state_SetPredicates(SCLSTATE , ARRAY);
void state_SetFolConstants(SCLSTATE, ARRAY);
void state_SetProblemHasEquations(SCLSTATE, BOOL);
void state_SetProblemHasVariables(SCLSTATE, BOOL);
ARRAY state_GetRedClauses(SCLSTATE);
void state_SetRedClauses(SCLSTATE, ARRAY);
OHASH state_GetNamehash(SCLSTATE);
TYPE state_GetFolType(SCLSTATE);
void state_SetClauses(SCLSTATE, ARRAY);
ARRAY state_GetClauses(SCLSTATE);
void state_AddConClause(SCLSTATE, CLAUSE);
ARRAY state_GetConClauses(SCLSTATE);
void state_AddLearnedClause(SCLSTATE, CLAUSE);
ARRAY state_GetLearnedClauses(SCLSTATE);
SHARER state_GetSharer(SCLSTATE);
CLAUSE state_GetClauseById(SCLSTATE,unsigned);
MEMORY state_GetMemory(SCLSTATE);
TERMSTATE state_GetTermstate(SCLSTATE);
CCBS_STATE state_GetCongrstate(SCLSTATE);
SYMBSTATE state_GetSymbstate(SCLSTATE);
FOLSTATE state_GetFolstate(SCLSTATE);
SUBSTSTATE state_GetSubststate(SCLSTATE);
TPTPSTATE state_GetTptpstate(SCLSTATE);
void state_SetTptpstate(SCLSTATE, TPTPSTATE);
DISTRN state_GetPoslits(SCLSTATE);
DISTRN state_GetNeglits(SCLSTATE);
void state_SetNumberInputClauses(SCLSTATE, unsigned);
unsigned state_GetNumberInputClauses(SCLSTATE);
void state_SetNamehash(SCLSTATE, OHASH);
void state_SetFilename(SCLSTATE, char *);
char * state_GetFilename(SCLSTATE);
ARRAY state_GetPredicates(SCLSTATE);
void state_SetPredicates(SCLSTATE,ARRAY);
void state_AddPredicate(SCLSTATE, SYMBOL);
ARRAY state_GetFunctions(SCLSTATE);
void state_SetFunctions(SCLSTATE,ARRAY);
void state_AddFunction(SCLSTATE, SYMBOL);
ARRAY state_GetConstants(SCLSTATE);
void state_SetConstants(SCLSTATE,ARRAY);
void state_AddConstant(SCLSTATE, SYMBOL);
ARRAY state_GetPConstants(SCLSTATE);
void state_SetPConstants(SCLSTATE,ARRAY);
void state_AddPConstant(SCLSTATE, SYMBOL);
void state_SetGroundAtoms(SCLSTATE, ARRAY);
ARRAY state_GetGroundAtoms(SCLSTATE);
void state_AddGroundAtom(SCLSTATE, TERM);
void state_AddClause(SCLSTATE, CLAUSE);
void state_SetEmptyClause(SCLSTATE, CLAUSE);
CLAUSE state_GetEmptyClause(SCLSTATE);
void state_SetInputConjecture(SCLSTATE, BOOL);
BOOL state_HasInputConjecture(SCLSTATE);
const char* state_GetSZSUnsatStatus(SCLSTATE);
const char* state_GetSZSSatStatus(SCLSTATE);
void state_SetLastClauseId(SCLSTATE, unsigned);
unsigned state_GetLastClauseId(SCLSTATE);
ARRAY state_GetUsables(SCLSTATE);
void state_SetUsables(SCLSTATE, ARRAY);
ARRAY state_GetWorkedOff(SCLSTATE);
void state_SetWorkedOff(SCLSTATE, ARRAY);
ARRAY state_GetCandidates(SCLSTATE);
void state_SetCandidates(SCLSTATE, ARRAY);
ARRAY state_GetInferences(SCLSTATE);
void state_SetInferences(SCLSTATE, ARRAY);
BOOL state_InferencesEqual(ARRAY, ARRAY);
void state_InferencesRemoveDuplicates(SCLSTATE);
INST state_GetInstance(SCLSTATE);
void state_SetProblemHasEquations(SCLSTATE, BOOL);
void state_SetProblemHasVariables(SCLSTATE, BOOL);
void state_SetProblemIsLinear(SCLSTATE, BOOL);
BOOL state_IsBSProblem(SCLSTATE);
BOOL state_IsProblemLinear(SCLSTATE);
BOOL state_IsBSREqProblem(SCLSTATE);
BOOL state_IsGroundProblem(SCLSTATE);
BOOL state_IsPropGroundProblem(SCLSTATE);
BOOL state_IsEqualityProblem(SCLSTATE);
void state_PrintProblemProperties(SCLSTATE);
void state_PrintStatistics(SCLSTATE);
void state_SetSeconds(SCLSTATE, int);
int state_GetSeconds(SCLSTATE);
CLOCK state_GetClockOverall(SCLSTATE);
unsigned state_GetNumberOfLearnedClauses(SCLSTATE);
void state_IncLearnedClauses(SCLSTATE);
unsigned state_GetDecisions(SCLSTATE);
void state_IncDecisions(SCLSTATE);
unsigned state_GetPropagations(SCLSTATE);
void state_IncPropagations(SCLSTATE);
unsigned state_GetResolutions(SCLSTATE);
void state_IncResolutions(SCLSTATE);
unsigned state_GetSubResolutions(SCLSTATE);
void state_IncSubResolutions(SCLSTATE);
unsigned state_GetCondensations(SCLSTATE);
void state_IncCondensations(SCLSTATE);
void state_AnalyzeInputClauses(SCLSTATE);
BOOL state_GetAbstraction(SCLSTATE);
void state_SetAbstraction(SCLSTATE, BOOL);
#endif
