/* SimpleDefaultTheory.h
 * Contains the definition for simple default theory type and inline
 *  definitions of functions for working with them.
 *
 * Written by Matt Levy.
 * Modified by Artur Mikitiuk.
 * Modified 20 Aug 1999 by Neil Moore <neil@cs.uky.edu>
 * Modified  5 Sep 1999 by Neil Moore <neil@cs.uky.edu>
 *
 * Part of lderes.  See COPYRIGHT for copyright information.
 *
 */

/* A simple default theory has the following definition:
 *  1. Every formula in W is a conjunction of literals.
 *  2. Every consequent of a default rule is a conjunction of literals. 
 *  3. Every justification is either a conjunction or disjunction of literals.
 *  4. Every prerequisite is either a conjunction or disjunction of literals.
 */
#ifndef _SIMPLEDEFAULTTHEORY_H
#define _SIMPLEDEFAULTTHEORY_H	1
#include "default_types.h"
#include "prover.h"
#include "global.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

typedef struct simpledefault {
  Set Reduct;
  int *W;      /* Stores indices of formulae in W */
  /* DefaultTable[0].prerequisite stores the size of the array */
  DefaultRulePtr DefaultTable;
  FormulaPtr formulae;
  TableProver prover;
  int *strata;
} SimpleDefaultTheory;

void InitializeSimpleDefaultTheory(SimpleDefaultTheory *theory, char *file);
Boolean CandidateIsExtension(SimpleDefaultTheory *theory, int startRule,
    int endRule, Set candidate);

#endif /* _SIMPLEDEFAULTTHEORY_H */
