#ifndef _PRLITS_
#define _PRLITS_ 
#include "array.h"
#include "clause.h"
#include "memory.h"
#include "ohash.h"
#include "sharing.h"
#include "term.h"
#include "instset.h"
typedef struct PRLITS_ANNO_LIT_HELP {
  TERM atom;
  VSUBST variable_mapping;
  CLAUSE clause;
  SUBST subst;
  BOOL value;
  unsigned pos;
  unsigned trailsize;
} * PRLITS_ANNO_LIT;
typedef struct PRLITS_HELP {
  MEMORY mem;
  ARRAY stack;
  OHASH litsmap;
} * PRLITS;
PRLITS prlits_Create(MEMORY);
void prlits_Delete(PRLITS);
PRLITS_ANNO_LIT prlits_CreateAnnoLit(MEMORY, SHARER, TERMSTATE, SUBSTSTATE, CLAUSE, SUBST, unsigned, unsigned);
void prlits_DeleteAnnoLit(MEMORY, PRLITS_ANNO_LIT);
TERM prlits_GetAnnoLitAtom(PRLITS_ANNO_LIT);
VSUBST prlits_GetAnnoLitVarMap(PRLITS_ANNO_LIT);
CLAUSE prlits_GetAnnoLitOriginClause(PRLITS_ANNO_LIT);
SUBST prlits_GetAnnoLitSubst(PRLITS_ANNO_LIT);
BOOL prlits_GetAnnoLitValue(PRLITS_ANNO_LIT);
unsigned prlits_GetAnnoLitPosition(PRLITS_ANNO_LIT);
unsigned prlits_GetAnnoLitTrailsize(PRLITS_ANNO_LIT);
MEMORY prlits_GetMemory(PRLITS);
ARRAY prlits_GetStack(PRLITS);
void prlits_SetStack(PRLITS, ARRAY);
OHASH prlits_GetLitsmap(PRLITS);
void prlits_SetLitsmap(PRLITS, OHASH);
BOOL prlits_IsAnnoLitPropagated(PRLITS Plit, PRLITS_ANNO_LIT AnnoLit);
BOOL prlits_IsPropagated(PRLITS, SHARER, TERMSTATE, SUBSTSTATE, CLAUSE, SUBST, unsigned);
void prlits_AddAnnoLit(PRLITS, PRLITS_ANNO_LIT, BOOL);
void prlits_Add(PRLITS, SHARER, TERMSTATE, SUBSTSTATE, CLAUSE, SUBST, unsigned, unsigned);
BOOL prlits_AddIfNotMemberPos(PRLITS, SHARER, TERMSTATE, SUBSTSTATE, CLAUSE, SUBST, unsigned, unsigned);
BOOL prlits_AddIfNotMember(PRLITS, SHARER, TERMSTATE, SUBSTSTATE, CLAUSE, SUBST, unsigned, unsigned);
void prlits_RemoveUntilTrailsize(PRLITS, TERMSTATE, unsigned);
void prlits_RestartAndForget(PRLITS, TERMSTATE, ARRAY);
void prlits_Print(PRLITS, TERMSTATE, BOOL);
void prlits_Sort(PRLITS);
void prlits_HashDataDelete(MEMORY, intptr_t);
uint32_t prlits_Hash(const intptr_t);
BOOL prlits_KeyEqual(const intptr_t, const intptr_t);
void prlits_Test(MEMORY, ARRAY, TERMSTATE, SUBSTSTATE, SHARER, SYMBOL);
#endif
