#ifndef _NTWFO_
#define _NTWFO_ 
#include "array.h"
#include "clause.h"
#include "distrn.h"
#include "folsubst.h"
#include "memory.h"
#include "prlits.h"
#include "sharing.h"
#include "symbol.h"
#include "term.h"
#include "trail.h"
typedef struct NTWFO_PROPAGATION_HELP {
  CLAUSE clause;
  SUBST subst;
  unsigned idx;
  unsigned trailsize;
} * NTWFO_PROPAGATION;
typedef struct NTWFO_HELP {
  MEMORY mem;
  SUBSTSTATE subststate;
  TERMSTATE termstate;
  SYMBSTATE symbstate;
  SHARER sharer;
  PRLITS prlits;
  DISTRN postraillits;
  DISTRN negtraillits;
  DISTRN posclauselits;
  DISTRN negclauselits;
  ARRAY tmpPropagations;
  ARRAY substsToDelete;
} * NTWFO;
NTWFO ntwfo_Create(MEMORY, SUBSTSTATE, TERMSTATE, SYMBSTATE, SHARER, ARRAY, DISTRN, DISTRN);
void ntwfo_Delete(NTWFO);
PRLITS ntwfo_GetPrlits(NTWFO);
BOOL ntwfo_NewLiteralOnTrail(NTWFO, TRAIL);
unsigned ntwfo_ComputeBacktrackLevelLearnNewClause(NTWFO, TRAIL, CLAUSE);
void ntwfo_Backtrack(NTWFO, TRAIL);
void ntwfo_ClearStackDeletedUnits(NTWFO Ntwfo);
#endif
