/*
 *=========================================================
 * FILE: proto.h
 *
 * modified 19 Apr 1999 by Neil Moore <neil@cs.uky.edu>
 * modified 20 Aug 1999 by Neil Moore <neil@cs.uky.edu>
 * modified  5 Sep 1999 by Neil Moore <neil@cs.uky.edu>
 *
 * Part of sderes.  See COPYRIGHT for copyright information.
 *=========================================================
 */

#ifndef _PROTO_H_INCLUDED
#define _PROTO_H_INCLUDED

#include <stdio.h>
#include <time.h>
#include "global.h"

/* main.c */
int setoptions(int argc, char *argv[]);
void init_working_memory(void);
void print_timing(clock_t to, clock_t frm);

/* scanner.c */
int getdata(void);
int getdata_default(void);
int get_input_text(FILE *, int*, int*, struct symbolbox **);
int nextline(char *, int, FILE *);
void error(char *, int);
int lexscan(char *, int *, struct symbolbox **);
int hashkey(char *);
struct symbolbox *lookup(char *, int, struct symbolbox **);
struct symbolbox *insert(char *, int, struct symbolbox **);

/* interf.c (interface.c) */
int loadtheory(char *);

/* emitter.c */
void emitextnsn(int, int *);
int  printliteral(int, char**);
void printformula(int);
void printtoken(int);

/* atmprv.c */
int prove(int,int);
void SetProverStructures(int *mth, int *ath, int *spell, int mth_size, int ath_size, 
			 int *ftb, int atoms_no, long *cntr, char **alex);
int build_atomtable(int *);
int stopsearch(int tt);
int store_facts(int psi);
int notdisjunctionfree(int tt);
int save_vars(int psi);
int clean_vars(int psi);
int restore_vars(int psi);
void clean_atomtable(void);
int add_facts(int psi, int *revvar, int *revval);
int remove_facts(int *revvar, int *revval);
int save_stratum(int from, int to);
int restore_stratum(int from, int to);

/* stratex.c */
int stratified_extnsns(int);
int read_stratification(void);

/* deflib.c */
int form_prover_structures(void);
int rewindft(int,int);
int default_is_consistent(int);
int Bomega(void);
int new_monrule_first_fireable(int, int);

#endif /* _PROTO_H_INCLUDED */
