Here is some prolog procedures that convert first-order formulas
to clause form.  This is not a polished product--these procedures
were just extracted from a big application.  I am sure that there
are some extra procedures in here, and there might be some missing
ones.  They run under Quintus Prolog and C-Prolog, and they correctly
clausify the test data that I am including.  The source files are

    init_sent  -- contains operator declarations and utility and
		  support routines (must be loaded first becuase
		  of operator declatations)  
    skolem_sent  --  the interenting routines.

I am also including  a file of test data:

    data_sent -- a file of quantified formulas

ones the prolog code is loaded, execute the goal `test_skolem(test_data)'
which reads formulas from the file and clausifies them.

I am sending 3 separate mail messages.  This is the first, and it
includes `data_sent'.  The other two messages comtain the
2 source files.

Here is data_sent:


   %  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.  

all(x,all(y,sale(x,y) imp exists(z,supply(z,x,y)))).

all(x,all(y,all(z,supply(x,y,z) and class(z,type4) 
     imp (x=comp)))).

all(x,all(y,supply(x,y,handguns) imp 
			 exists(z,supply(x,z,bullets)))).

all(x,all(y,all(z,supply(x,y,z) and class(z,type1) 
    imp exists(u,exists(v,supply(x,v,u) and class(u,type2)))))).

all(x,all(y,all(z,supply2(x,y,z,1) and class2(z,type1,1) 
    imp exists(u,exists(v,supply2(x,v,u,2) and class2(u,type2,2)))))).

all(x,all(y,all(z,supply(x,y,item1) and supply(x,z,item1)
     imp (y=z)))).

all(x,all(y,all(z,sub(x,y) and sub(y,z) imp sub(x,z)))).

all(x,all(y,all(z,sub2(x,y,1) and sub2(y,z,2) imp sub2(x,z,3)))).

exists(u,class(u,type3) and all(x,all(y,all(z,supply(x,y,z)
		imp exists(v,supply(x,v,u)))))).

exists(u,class(u,type3) and all(x,all(y,all(z,supply2(x,y,z,1)
		imp exists(v,supply2(x,v,u,2)))))).

all(x1,all(x2,all(x3,all(x4,all(x5,
    p(x1,x2,x3) and p(x1,x4,x5) imp p(x1,x2,x5)))))).

all(x,all(y,all(z,par(x,y) and par(y,z) imp r(x)))).

all(x,all(y,all(z,s(s3,x,y,z) imp 
		    exists(u,j(y,u,adelaide)) or 
		    exists(v,j(y,v,perth))))).

all(y,s2(s3,y) imp 
		    j2(y,adelaide) or 
		    j2(y,perth)).

all(x,s2(x,nuts) imp s2(x,bolts)).
