:-    op(740,fx,~).          % not (no parens needed, lowest precedence)
:-    op(750,yfx,and).       % (a and b and c) is left associated.
:-    op(760,yfx,or).        % (a or b or c) is left associated.
:-    op(770,xfx,[imp,iff]). % (a iff b iff c) is illegal.

   %  a and ~b and c or ~d or e iff (~f imp g)               means
   %  iff(or(or(and(and(a,~(b)),c),~(d)),e),imp(~(f),g))     i.e.,
   %  ((((a and ~b) and c) or ~d) or e) iff (~f imp g)

   %  flags(X) is a list of the flags that can be set and unset.
   %  flag(X) is true if the flag is currently set.
   %  The two routines set(X) and unset(X) can be used to set and
   %  clear flags.  They check if the given flag is really a flag,
   %  and then assert or retract the appropriate "flag".
   %  For example the goal "unset(first_lit)" clears the flag and
   %  succeeds.  The call fails if a non-flag is given.
   %
   %  The effects af the flags are:
   %     verbose - generate lots of output during resolution;
   %     log - output the results of "go" and "go2" calls to a log file;
   %     first_lit - resolve on the only the first literal of the given clause;
   %     sos_light - for resolution in stage 2, pick the initial sos
   %         to be the shortest clause;
   %     sos_new - for resolution in stage 2, pick the initial sos
   %         to be the clauses from ~C[RNEW];  if neither sos_light
   %         nor sos_new is set, the initial sos is chosen to be the
   %         clauses form C[ROLD];
   %      

 /*B Quintus*/
:- dynamic flags/1.    % Make flags a dymanic procedure.
:- dynamic flag/1.     % Make flag a dymanic procedure.
:- dynamic option/2.   % Make option a dymanic procedure.
:- dynamic commutative/1.
 /*E Quintus*/

flags([verbose,log,sos_light,sos_new,first_lit]).

   %  The following flags are initially set.

flag(sos_light).
flag(first_lit).
flag(log).

   %  The default settings of the options are:

option(demod_limit,100).   % max # of rewrites per clause
option(unsat_limit,50).    % max # of given clauses to do in stage 3

commutative(=).

   %  Atoms that start with u-z are treated as variables.
   %  Atoms that start with f,g are treated as Skolem constants/functions.
   %  To be safe, DO NOT USE ATOMS THAT START WITH THESE CHARACTERS FOR
   %  OTHER PURPOSES.  
   
varstart([u,v,w,x,y,z]).  
skolemstart([f,g]).

get_seconds(Secs) :-
     /*B Quintus*/
        statistics(runtime,[Millisecs,_]),
        Secs is Millisecs / 1000.
     /*E Quintus*/
    
     /*B C-Prolog
        Secs is cputime.
     E C-Prolog*/
