#ifndef FCNF_H
#define FCNF_H 
#include "state.h"
#include "fol.h"
#include "tptp.h"
typedef struct fcnfstate {
  SCLSTATE sclstate;
  ARRAY recentlyUsedVariables;
  unsigned renamingCounter;
  char *renamingPrefix;
  unsigned skolemCounter;
  char *skolemFuncPrefix;
  char *skolemConstPrefix;
  ARRAY list1, list2;
  ARRAY arrIn, arrOut;
  ARRAY bindArr;
  ARRAY skolemDerivOutputArray;
} FCNFSTATE_NODE, *FCNFSTATE;
typedef struct fcnf_logstep {
  char *name;
  char *path;
  FILE *file;
  clock_t time0, time;
  unsigned long mem0, mem;
} FCNF_LOGSTEP_NODE, *FCNF_LOGSTEP;
#define FCNF_SKOLEM_LEVEL_OUTER 1
#define FCNF_SKOLEM_LEVEL_INNER 2
#define FCNF_SKOLEM_LEVEL_DEFAULT FCNF_SKOLEM_LEVEL_INNER
#define FCNF_SKOLEM_LEVEL_PREFIX "--skolemization="
#define FCNF_SKOLEM_LEVEL_DOCSTRING "" \
  "\n " FCNF_SKOLEM_LEVEL_PREFIX "<nat>         Choose the skolemization strategy (default " \
  misc_DEF_AS_STRING(FCNF_SKOLEM_LEVEL_DEFAULT) \
  ")" \
  "\n   1: Outer skolemization: Arguments based on forall-quantifiers above the variable." \
  "\n      Fast (linear-time wrt. final cnf size), but may use more arguments than necessary." \
  "\n   2: Inner skolemization: Using only the relevant free forall-quantified variables." \
  "\n      Worst-case runtime #variables times formula size."
int fcnf_ParseSkolemOption(const char *Param);
  FCNFSTATE fcnf_Init(SCLSTATE);
  void fcnf_Free(FCNFSTATE);
  SCLSTATE fcnf_GetSclstate(FCNFSTATE);
  TPTPSTATE fcnf_GetTptpstate(FCNFSTATE);
  FOLSTATE fcnf_GetFolstate(FCNFSTATE);
  TERMSTATE fcnf_GetTermstate(FCNFSTATE);
  SYMBSTATE fcnf_GetSymbstate(FCNFSTATE);
  MEMORY fcnf_GetMemory(FCNFSTATE);
  ARRAY fcnf_CNFScratch(SCLSTATE, const char *InputFile,
                        ARRAY Conjectures, ARRAY Axioms, int SkolemLevel);
  ARRAY fcnf_CNF(SCLSTATE, ARRAY Conjectures, ARRAY Axioms, int SkolemLevel);
  ARRAY fcnf_CNFWithTPTPDerivations(FCNFSTATE, TPTP_FORMULA, int SkolemLevel, ARRAY Clauses);
#endif
