#ifndef _HLMDG_
#define _HLMDG_ 
#include "array.h"
#include "clause.h"
#include "memory.h"
#include "sharing.h"
#include "twfo.h"
#include "term.h"
#include "upqueue.h"
#include "state.h"
#include "lmodel.h"
typedef struct HLMDG_HELP {
  TWFO twfo;
  ARRAY active;
  ARRAY inactive;
  ARRAY proplits;
  ARRAY extraproplits;
  ARRAY nonground;
  ARRAY trailhits;
  ARRAY inflits;
  SYMBOL iconst;
  BOOL ireduce;
  LMODSTATE lmodstate;
  unsigned heur;
  unsigned backtrack;
  unsigned extraprops;
  unsigned forget;
  unsigned keep;
  unsigned max;
  unsigned lastid;
  unsigned sattest;
  unsigned infbonus;
} HLMDG_NODE,*HLMDGSTATE;
HLMDGSTATE hlmdg_Create(SCLSTATE, TWFO);
void hlmdg_Delete(MEMORY, HLMDGSTATE);
void hlmdg_Print(SCLSTATE, HLMDGSTATE);
void hlmdg_PrintStat(HLMDGSTATE);
unsigned hlmdg_ActiveAtoms(HLMDGSTATE);
unsigned hlmdg_MissingPropLits(HLMDGSTATE, TWFO, TRAIL);
TERM hlmdg_NextTrailLiteral(SCLSTATE, HLMDGSTATE, TRAIL, TWFO);
void hlmdg_UpdateBacktrack(SCLSTATE, HLMDGSTATE, TRAIL, TWFO, unsigned);
void hlmdg_UpdateRestart(SCLSTATE, HLMDGSTATE, TRAIL, TWFO);
void hlmdg_UpdateReduction(SCLSTATE, HLMDGSTATE, TRAIL, TWFO);
BOOL hlmdg_PerformReduction(SCLSTATE, HLMDGSTATE);
void hlmdg_UpdateNewResolution(SCLSTATE, HLMDGSTATE, TERM, CLAUSE, SUBST, ARRAY);
void hlmdg_UpdateLearnedClause(SCLSTATE, HLMDGSTATE, TRAIL, CLAUSE, SUBST);
BOOL hlmdg_ExtendActiveLiterals(SCLSTATE, HLMDGSTATE, TRAIL, TWFO, BOOL*);
BOOL hlmdg_PerformSATTest(SCLSTATE, HLMDGSTATE);
BOOL hlmdg_PerformSATAbstraction(SCLSTATE, HLMDGSTATE);
#endif
