#!/bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #!/bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # COPYING # Makefile # README # SIMPATH # VERSIONS # cmplib # doc # index # lib # modlib # prolog # sim # This archive created: Sun Apr 1 04:26:45 1990 export PATH; PATH=/bin:$PATH if test -f 'COPYING' then echo shar: over-writing existing file "'COPYING'" fi cat << \SHAR_EOF > 'COPYING' SB-PROLOG GENERAL PUBLIC LICENSE Copyright (C) 1986 SUNY at Stony Brook. Everyone is permitted to copy and distribute verbatim copies of this license, but changing it is not allowed. The license agreements of most software companies keep you at the mercy of those companies. By contrast, our general public license is intended to give everyone the right to share SB-Prolog. To make sure that you get the rights we want you to have, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. Hence this license agreement. Specifically, we want to make sure that you have the right to give away copies of SB-Prolog, that you receive source code or else can get it if you want it, that you can change SB-Prolog or use pieces of it in new free programs, and that you know you can do these things. To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of SB-Prolog, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. Also, for our own protection, we must make certain that everyone finds out that there is no warranty for SB-Prolog. If SB-Prolog is modified by someone else and passed on, we want its recipients to know that what they have is not what we distributed, so that any problems introduced by others will not reflect on our reputation. Therefore we make the following terms which say what you must do to be allowed to distribute or change SB-Prolog. COPYING POLICIES 1. You may copy and distribute verbatim copies of SB-Prolog source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each file a valid copyright notice such as "Copyright (C) 1986 SUNY at Stony Brook", containing the year of last change and name of copyright holder for the file in question; keep intact the notices on all files that refer to this License Agreement and to the absence of any warranty; and give any other recipients of the SB-Prolog program a copy of this License Agreement along with the program. 2. You may modify your copy or copies of SB-Prolog source code or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating who last changed such files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains or is a derivative of SB-Prolog or any part thereof, to be freely distributed and licensed to all third parties on terms identical to those contained in this License Agreement (except that you may choose to grant more extensive warranty protection to third parties, at your option). 3. You may copy and distribute SB-Prolog or any portion of it in compiled, executable or object code form under the terms of Paragraphs 1 and 2 above provided that you do the following: a) cause each such copy of SB-Prolog to be accompanied by the corresponding machine-readable source code; or b) cause each such copy of SB-Prolog to be accompanied by a written offer, with no time limit, to give any third party free (except for a nominal shipping charge) machine readable copy of the corresponding source code; or c) in the case of a recipient of SB-Prolog in compiled, executable or object code form (without the corresponding source code) you shall cause copies you distribute to be accompanied by a copy of the written offer of source code which you received along with the copy of SB-Prolog. 4. You may not copy, sublicense, distribute or transfer SB-Prolog except as expressly provided under this License Agreement. Any attempt otherwise to copy, sublicense, distribute or transfer SB-Prolog is void and your rights to use SB-Prolog under this License agreement shall be automatically terminated. However, parties who have received computer software programs from you with this License Agreement will not have their licenses terminated so long as such parties remain in full compliance. Your comments and suggestions about our licensing policies and our software are welcome! Please contact Saumya K. Debray, University of Arizona, at 602-621-4527. NO WARRANTY BECAUSE SB-PROLOG IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING, SUNY AT STONY BROOK, SAUMYA K. DEBRAY AND/OR OTHER PARTIES PROVIDE SB-PROLOG "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE SB-PROLOG PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL SUNY AT STONY BROOK, SAUMYA K. DEBRAY, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE SB-PROLOG AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY FREE SOFTWARE FOUNDATION, INC.) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. This license is adapted from the GnuEmacs General Public License, (c) Richard Stallman, 1985. --- SHAR_EOF if test -f 'Makefile' then echo shar: over-writing existing file "'Makefile'" fi cat << \SHAR_EOF > 'Makefile' # Set P=& for Sequent parallel-make, and PARALLEL=-Pn for parallelism level. P= PARALLEL= CFLAGS= -O DEST= /usr/new/sbprolog FILES= COPYING README VERSIONS doc modlib cmplib lib install: cd sim; make P="${P}" ${PARALLEL} CFLAGS="${CFLAGS}" -mkdir ${DEST} cp -r ${FILES} ${DEST} find ${DEST} -name "*src*" -exec rm -rf "{}" \; cp sim/sbprolog ${DEST} sed s:DEST:${DEST}: < prolog > ${DEST}/prolog; chmod 755 ${DEST}/prolog clean: cd sim; make clean rm -rf ${DEST} SHAR_EOF if test -f 'README' then echo shar: over-writing existing file "'README'" fi cat << \SHAR_EOF > 'README' (0) A General Public License for SB-Prolog is in the file COPYING. (1) To install SB-Prolog, execute "make" in top-level directory. Alter DEST, if necessary, to choose a different destination directory. (2) For an SB-Prolog User Manual, in the "doc" directory, do something like: cat macros man.? man.?? | tbl | eqn | (3) The Prolog byte code files in cmplib, lib and modlib should not have to be recompiled except under exceptional circumstances (such as corruption during transmission), as they are machine independent. (4) Benchmarking: use the 'a' option when compiling benchmarks. A naive reverse benchmark program can be found in sim/newlips.P: to execute this, compile and load as follows: ?- compile('newlips.P', [a,v]). ?- load('newlips.P.out'). the benchmark can then be executed by calling bench/1, e.g. as ?- bench(100). --- SHAR_EOF if test -f 'SIMPATH' then echo shar: over-writing existing file "'SIMPATH'" fi cat << \SHAR_EOF > 'SIMPATH' setenv SIMPATH ".:$cwd/modlib:$cwd/lib:$cwd/cmplib" SHAR_EOF if test -f 'VERSIONS' then echo shar: over-writing existing file "'VERSIONS'" fi cat << \SHAR_EOF > 'VERSIONS' SB-Prolog: ========= Version# Date Notes ------- ---- ----- 2 2/86 The "basic" version. Differs from version 1 in introducing indexing, instruction format change for even length instructions. Also, numerous bug fixes. 2.1 2/87 Bug fixes; improvements to "assert" and "trace" packages. 2.2 3/87 Floating point numbers. SHAR_EOF if test ! -d 'cmplib' then mkdir 'cmplib' fi cd 'cmplib' if test ! -d 'cmplib_src' then mkdir 'cmplib_src' fi cd 'cmplib_src' if test ! -d 'defs' then mkdir 'defs' fi cd 'defs' if test -f '$asmpass21.P.def' then echo shar: over-writing existing file "'$asmpass21.P.def'" fi cat << \SHAR_EOF > '$asmpass21.P.def' prag($asm_p2,3, index). prag($asm_p4,3, index). SHAR_EOF if test -f '$aux1.P.def' then echo shar: over-writing existing file "'$aux1.P.def'" fi cat << \SHAR_EOF > '$aux1.P.def' prag($roundtosq,2, index). prag($aux_split_name,4, index(3)). SHAR_EOF if test -f '$cond1.P.def' then echo shar: over-writing existing file "'$cond1.P.def'" fi cat << \SHAR_EOF > '$cond1.P.def' prag($complementary,3, index). prag($inline_neg,2, index). SHAR_EOF if test -f '$convrhs1.P.def' then echo shar: over-writing existing file "'$convrhs1.P.def'" fi cat << \SHAR_EOF > '$convrhs1.P.def' prag($convrhs,12, index). prag($constr_goal,10,index). SHAR_EOF if test -f '$eval1.P.def' then echo shar: over-writing existing file "'$eval1.P.def'" fi cat << \SHAR_EOF > '$eval1.P.def' prag($eval_arithreloptab,4, index(2)). prag($eval_binoptab,4, index). prag($eval_binop,1, index). prag($arithrelop,1,index). SHAR_EOF if test -f '$flatten1.P.def' then echo shar: over-writing existing file "'$flatten1.P.def'" fi cat << \SHAR_EOF > '$flatten1.P.def' prag($flatten_same_str,1, index). SHAR_EOF if test -f '$geninline1.P.def' then echo shar: over-writing existing file "'$geninline1.P.def'" fi cat << \SHAR_EOF > '$geninline1.P.def' prag($geninline,7, index). prag($geninline_cut,6, index). prag($geninl_par,7, index(2)). prag($geninl_subpars,6, index(2)). prag($geninl_subpar,6, index(2)). SHAR_EOF if test -f '$index1.P.def' then echo shar: over-writing existing file "'$index1.P.def'" fi cat << \SHAR_EOF > '$index1.P.def' prag($index_gen0,5, index(2)). prag($index_sot_index,6,index). SHAR_EOF if test -f '$inline1.P.def' then echo shar: over-writing existing file "'$inline1.P.def'" fi cat << \SHAR_EOF > '$inline1.P.def' prag($inline_2,1, index). prag($inline_1,1, index). prag($inline_0,1, index). prag($inline1,2, index(2)). SHAR_EOF if test -f '$normvarocc1.P.def' then echo shar: over-writing existing file "'$normvarocc1.P.def'" fi cat << \SHAR_EOF > '$normvarocc1.P.def' prag($normalize_var_occ,7, index). prag($norm_pvars_seen,2, index). prag($normalize1,3, index(2)). SHAR_EOF if test -f '$inprog1.P.def' then echo shar: over-writing existing file "'$inprog1.P.def'" fi cat << \SHAR_EOF > '$inprog1.P.def' prag($inprog01,3, index). prag($inp_get_chunk_lastgoals,4, index). SHAR_EOF if test -f '$inst1.P.def' then echo shar: over-writing existing file "'$inst1.P.def'" fi cat << \SHAR_EOF > '$inst1.P.def' prag($varinst,8, index(1)). prag($inst_varinst_h,8,index(2)). prag($inst_varinst_b,8,index(2)). prag($inst_varinst_hf,8,index(3)). prag($inst_varinst_hs,8,index(3)). prag($inst_varinst_bf,8,index(3)). prag($inst_varinst_bs,8,index(3)). prag($coninst,5, index). prag($strinst,4, index). prag($varsubinst,7, index(1)). prag($inst_varsubinst_h,7,index(2)). prag($inst_varsubinst_b,7,index(2)). prag($inst_varsubinst_hf,7,index(3)). prag($inst_varsubinst_hs,7,index(3)). prag($inst_varsubinst_bf,7,index(3)). prag($inst_varsubinst_bs,7,index(3)). prag($consubinst,3, index). SHAR_EOF if test -f '$peephole1.P.def' then echo shar: over-writing existing file "'$peephole1.P.def'" fi cat << \SHAR_EOF > '$peephole1.P.def' prag($compile_popt11,3, index). prag($compile_popt1a1,3, index). prag($compile_popt21,3, index). prag($compile_popt31,3, index). prag($peep_use,2,index). prag($peep_term,2,index). SHAR_EOF if test -f '$preprocess1.P.def' then echo shar: over-writing existing file "'$preprocess1.P.def'" fi cat << \SHAR_EOF > '$preprocess1.P.def' prag($preprocess_transform0,4, index(3)). SHAR_EOF if test -f '$procarglist1.P.def' then echo shar: over-writing existing file "'$procarglist1.P.def'" fi cat << \SHAR_EOF > '$procarglist1.P.def' prag($proc_occ_arg,9, index). prag($proc_update_occ,4,index(2)). SHAR_EOF if test -f '$prococc1.P.def' then echo shar: over-writing existing file "'$prococc1.P.def'" fi cat << \SHAR_EOF > '$prococc1.P.def' prag($proc_occ1,4, index(3)). prag($proc_mark_last_lits,1, index). SHAR_EOF if test -f '$prococcbody1.P.def' then echo shar: over-writing existing file "'$prococcbody1.P.def'" fi cat << \SHAR_EOF > '$prococcbody1.P.def' prag($proc_occ_body,8, index). SHAR_EOF if test -f '$tgoal1.P.def' then echo shar: over-writing existing file "'$tgoal1.P.def'" fi cat << \SHAR_EOF > '$tgoal1.P.def' prag($tpar,8, index(2)). prag($tsubpars,6, index(2)). prag($tsubpar,6, index(2)). SHAR_EOF if test -f '$tindex1.P.def' then echo shar: over-writing existing file "'$tindex1.P.def'" fi cat << \SHAR_EOF > '$tindex1.P.def' prag($tindex_split_arg_clau1,4, index(2)). prag($tindex_genpred,7, index(4)). prag($tindex_newclau1,5, index(2)). prag($tindex_genclau1,4, index(2)). SHAR_EOF if test -f '$asm1.P.def' then echo shar: over-writing existing file "'$asm1.P.def'" fi cat << \SHAR_EOF > '$asm1.P.def' prag($asm_process_pil_inst,4, index). prag($asm_proc_index,3, index). prag($asm_index_inst,2,index). prag($asm_index_inst1,2,index). SHAR_EOF if test -f '$asmpass11.P.def' then echo shar: over-writing existing file "'$asmpass11.P.def'" fi cat << \SHAR_EOF > '$asmpass11.P.def' prag($asmpass1_do,2, index). prag($asmpass1_doinst,2, index). SHAR_EOF if test -f '$tprog1.P.def' then echo shar: over-writing existing file "'$tprog1.P.def'" fi cat << \SHAR_EOF > '$tprog1.P.def' prag($theadpars,7, index(3)). prag($tbody,9,index). prag($tprog_getnvars,2, index). prag($tprog_contains_branch,1,index). SHAR_EOF if test -f '$asmbgen1.P.def' then echo shar: over-writing existing file "'$asmbgen1.P.def'" fi cat << \SHAR_EOF > '$asmbgen1.P.def' prag($asm_gen,1, index). SHAR_EOF if test -f '$computil1.P.def' then echo shar: over-writing existing file "'$computil1.P.def'" fi cat << \SHAR_EOF > '$computil1.P.def' prag($release_if_done1,8,index(3)). SHAR_EOF if test -f '$translcuts1.P.def' then echo shar: over-writing existing file "'$translcuts1.P.def'" fi cat << \SHAR_EOF > '$translcuts1.P.def' prag($transl_softcuts,5, index(3)). prag($transl_hardcuts,6, index(4)). prag($transl_cut_clauses,3, index(2)). prag($transl_cutclauses1,3, index(2)). prag($transl_contains_cut,1,index). prag($inline_test,2, index). SHAR_EOF if test -f '$listutil1.P.def' then echo shar: over-writing existing file "'$listutil1.P.def'" fi cat << \SHAR_EOF > '$listutil1.P.def' prag($nthmember,3,index(2)). prag($nthmember1a,4,index(2)). SHAR_EOF if test -f '$macro1.P.def' then echo shar: over-writing existing file "'$macro1.P.def'" fi cat << \SHAR_EOF > '$macro1.P.def' prag($macro_decompose_rhs,2,index). prag($macro_exp_body,2,index(1)). SHAR_EOF if test -f '$alloctvars1.P.def' then echo shar: over-writing existing file "'$alloctvars1.P.def'" fi cat << \SHAR_EOF > '$alloctvars1.P.def' prag($alloc_request,4,index(4)). SHAR_EOF if test -f '$factor1.P.def' then echo shar: over-writing existing file "'$factor1.P.def'" fi cat << \SHAR_EOF > '$factor1.P.def' prag($factor_arith_test,2,index). prag($implied_mutex,3,index). SHAR_EOF chdir .. if test -f 'makeall' then echo shar: over-writing existing file "'makeall'" fi cat << \SHAR_EOF > 'makeall' $HOME/sbp/sim/sbprolog -p 100000 -m 400000 -b 60000 $HOME/sbprolog/modlib/\$readloop < ../\$compile SHAR_EOF chmod +x 'makeall' if test -f '$asm1.P' then echo shar: over-writing existing file "'$asm1.P'" fi cat << \SHAR_EOF > '$asm1.P' /* ***************************************************************** * * * SB-Prolog * * Copyright SUNY at Stony Brook, 1986 * * * ****************************************************************** */ /*----------------------------------------------------------------- SB-Prolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the SB-Prolog General Public License for full details. Everyone is granted permission to copy, modify and redistribute SB-Prolog, but only under the conditions described in the SB-Prolog General Public License. A copy of this license is supposed to have been given to you along with SB-Prolog so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. ------------------------------------------------------------------ */ /* begin $asm1.P *****************************************/ /* ********************************************************************** $asm1_export([$asm/3,$asm_PIL/2]). $asm1_use($blist,[$append/3,$member/2,$member1/2]). $asm1_use($bio,[$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,$tell/1, $telling/1,$told/0,$get/1,$get0/1,$see/1,$seeing/1,$seen/0]). $asm1_use($asmpass11,[$asm_dopass1/6]). $asm1_use($asmpass21,[$asm_p2/3,$asm_p4/3,$asm_lookup0/3,$asm_lookup/3]). $asm1_use($asmbgen1,[$asm_symbol/1,$asm_putnum/2,$asm_gen/1,$asm_mark_eot/0]). $asm1_use($read,[$read/1,_]). ********************************************************************** */ $asm(Infile,Outfile,Opts) :- (($member1(v,Opts), $writename(' - assembly phase commenced'),$nl) ; true), $see(Infile), $asm_getaslist(Inprog,Index, Nindex, [], 0), $seen, $asm_dopass1( Inprog, Index, Psctable, Labeltable, Ntext, Npsc), (($member1(v,Opts), $tab(15), $writename('pass 1 complete'),$nl, $told) ; true), $tell(Outfile), $asm_magic(3), $asm_putnum(Npsc, 4), $asm_putnum(Ntext, 4), $asm_putnum(Nindex, 4), $asm_pass2(Inprog, Index, Psctable, Labeltable,Opts), $asm_mark_eot, $told, $tell(user), (($member1(v,Opts), $tab(15), $writename('pass 2 complete'),$nl) ; true). $asm_PIL(Inprog,Opts) :- /* already telling outfile */ $asm_get_index(Inprog, NInprog, Index, Nindex, [], 0), $asm_dopass1(NInprog, Index, Psctable, Labeltable, Ntext, Npsc), $asm_magic(3), $asm_putnum(Npsc, 4), $asm_putnum(Ntext, 4), $asm_putnum(Nindex, 4), $asm_pass2(NInprog, Index, Psctable, Labeltable,Opts), $asm_mark_eot. $asm_get_index([],[],[],N,_,N). $asm_get_index([Inst|Rest],Inprog,Index,Nindex,Tail,Ni) :- $asm_index_inst(Inst,Size) -> (N is Ni + Size, Index = [Inst|Rindex], $asm_get_index(Rest,Inprog,Rindex,Nindex,Tail,N) ); (Inprog = [Inst|Rprog], $asm_get_index(Rest, Rprog, Index, Nindex, Tail, Ni) ). /* ---------------------------------------------------------------------- */ $asm_getaslist(Insts,Index,Nindex,Tail,Ni) :- $read(Inst0), (Inst0 = end_of_file -> (Insts = Tail, Index = Tail, Nindex = Ni) ; ($asm_index_inst(Inst0,Size) -> (N is Ni + Size, Index = [Inst0|Rindex], $asm_getaslist(Insts,Rindex,Nindex,Tail,N)) ; (Insts = [Inst0 | Rinsts], $asm_getaslist(Rinsts,Index,Nindex,Tail,Ni)) ) ). /* $asm_pass2 takes as input a program containing symbolic labels, structure symbols and constants and the symbol tables and returns a program in which all symbols have been replaced by their byte code offsets of PSC indices. Also, for "internal" predicates, i.e. those which are not exported, static linking is carried out as far as possible. */ $asm_pass2(Prog,Index,Csym,Lsym,Opts) :- $asm_symbol(Csym), $asm_pass2a(Prog,Csym,Lsym,Opts), $asm_index(Index, Csym, Lsym). $asm_index(Index,Csym,Lsym) :- $member(Inst, Index), $asm_proc_index(Inst, Csym, Lsym). $asm_index(_,_,_). $asm_proc_index(pred(Label, Num), Csym, Lsym) :- Label = (P, N, _), $asm_lookup((P, N, _), Csym, PSC_Index), $asm_gen(pred(PSC_Index, Num)), !, fail. $asm_proc_index(arglabel(T,Val,Label), Csym, Lsym) :- ((T = c, $asm_lookup((Val,0,_), Csym, Nval)); (T = s, Val = (Str, Arity), $asm_lookup((Str, Arity, _), Csym, Nval)); Nval = Val ), $asm_lookup((Label, L), Lsym, _), $asm_gen(arglabel(T, Nval, L)), !, fail. $asm_pass2a(Prog,Csym,Lsym,Opts) :- $member(Inst,Prog), $asm_process_pil_inst(Inst,Csym,Lsym,Opts). $asm_pass2a(_,_,_,_). $asm_process_pil_inst(label((_,_,_)),_,_,_) :- !, fail. $asm_process_pil_inst(call(Pred,N),Csym,Lsym,Opts) :- !, $asm_proc_call(Pred,N,Csym,Lsym,Inst,Opts), $asm_gen(Inst), !, fail. $asm_process_pil_inst(execute(Pred),Csym,Lsym,Opts) :- !, $asm_proc_exec(Pred,Csym,Lsym,Inst,Opts), $asm_gen(Inst), !, fail. $asm_process_pil_inst(Inst,Csym,Lsym,Opts) :- ($asm_p2(Inst, NInst, Csym) ; $asm_p4(Inst, NInst, Lsym) ; NInst = Inst), $asm_gen(NInst), !, fail. $asm_proc_call((Pred,Arity),Npars,_,Lsym,calld(EPaddr,Npars),Opts) :- not( ($member1(t,Opts), Arity >= 0) ), $asm_lookup0( ((Pred,Arity,_),EPaddr), Lsym, _), !. $asm_proc_call((Pred,Arity),Npars,Csym,_,call(PSC_Index,Npars),Opts) :- $asm_lookup( (Pred,Arity,_), Csym, PSC_Index). $asm_proc_exec((Pred,Arity),_,Lsym,jump(EPaddr),Opts) :- not( ($member1(t,Opts), Arity >= 0) ), $asm_lookup0( ((Pred,Arity,_),EPaddr), Lsym, _), !. $asm_proc_exec((Pred,Arity),Csym,_,execute(PSC_Index),Opts) :- $asm_lookup( (Pred,Arity,_), Csym, PSC_Index). $asm_magic(N) :- $asm_putnum(17, 1), $asm_putnum(18, 1), $asm_putnum(19, 1), $asm_putnum(N, 1). $asm_index_inst(pred(_,_),8). $asm_index_inst(arglabel(T,_,_),N) :- ($asm_index_inst1(T,N), !) ; N = 5. $asm_index_inst1(i,9). $asm_index_inst1(c,9). $asm_index_inst1(s,9). /* end $asm1.P ***************************************************/ SHAR_EOF if test -f '$preprocess1.P' then echo shar: over-writing existing file "'$preprocess1.P'" fi cat << \SHAR_EOF > '$preprocess1.P' /* ***************************************************************** * * * SB-Prolog * * Copyright SUNY at Stony Brook, 1986 * * * ****************************************************************** */ /*----------------------------------------------------------------- SB-Prolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the SB-Prolog General Public License for full details. Everyone is granted permission to copy, modify and redistribute SB-Prolog, but only under the conditions described in the SB-Prolog General Public License. A copy of this license is supposed to have been given to you along with SB-Prolog so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. ------------------------------------------------------------------ */ /* "preprocess0" effects a source-to-source translation of predicates whose clauses contain cuts, negations etc. */ /* ********************************************************************** $preprocess1_export([$preprocess0/3]). $preprocess1_use($translcuts1,[$transl_cuts/5, $transl_softcuts/5,$find_prag/4]). $preprocess1_use($tindex1,[$tindex/2]). $preprocess1_use($aux1,[_,_,_,_,_,_,_,_,$logical_or/3]). $preprocess1_use($cond1,[_,$get_test/3,$complementary/3,_]). $preprocess1_use($meta,[$functor/3,$univ/2,$length/2]). $preprocess1_use($compare,['$=='/2,_,_,_,_,_,_]). ********************************************************************** */ $preprocess0(PredDef,PragList,[NPredDefs]) :- PredDef = pred(P,N,CFlag,CutFlag,Clauses), $process_cpyflags(Clauses,CFlag,CutFlag), ( (CFlag =:= 0, $find_prag(P,N,PragList,Prag), $tindex(pred(P,N,CFlag,CutFlag,Clauses,Prag),NPredDefs) ) ; (CFlag =\= 0, $preprocess1(PredDef,PragList,NPredDefs)) ). $preprocess1(Pred,PragList,[NPred]) :- Pred = pred(P,N,0,C,Clauses), NPred = pred(P,N,0,C,Clauses,Prag), $find_prag(P,N,PragList,Prag). $preprocess1(pred(P,N,1,0,Clauses),PragList,NPred) :- $find_prag(P,N,PragList,Prag), $preprocess_transform0(P,N,Clauses,NClauses), /* no cuts, but needs processing */ $tindex(pred(P,N,1,0,NClauses,Prag),NPred). $preprocess1(pred(P,N,1,1,Clauses),PragList,NPredDefs) :- $transl_cuts(P,N,Clauses,PragList,NPredDefs). /* predicate has cuts */ $preprocess_transform0(_,_,[],[]). $preprocess_transform0(P,N,[Fact|Rest],[Fact|NRest]) :- Fact = fact(F,C), $preprocess_transform0(P,N,Rest,NRest). $preprocess_transform0(P,N,[Rule|Rest],[NRule|NRest]) :- Rule = rule(H,B,CFlag,CRest), ( (CFlag =:= 1, $transl_softcuts(P,N,B,NB,0), NRule = rule(H,NB,CFlag,CRest)) ; (CFlag =\= 1, NRule = Rule) ), ( (CRest =:= 1, $preprocess_transform0(P,N,Rest,NRest)) ; (CRest =\= 1, Rest = NRest) ). $process_cpyflags([],X,Y) :- (X = 0 ; X = 1), (Y = 0 ; Y = 1), !. $process_cpyflags([fact(_,CFlag)|CRest],CFlag,CutFlag) :- $process_cpyflags(CRest,CFlag,CutFlag). $process_cpyflags([rule(H,B,CFlag0,CFlag1)|CRest],CFlag,CutFlag) :- $process_cpyflags_1(B,CFlag0,CutFlag0), $process_cpyflags(CRest,CFlag1,CutFlag1), $logical_or(CFlag0,CFlag1,CFlag), $logical_or(CutFlag0,CutFlag1,CutFlag). $process_cpyflags_1(V,1,0) :- var(V), !. $process_cpyflags_1(','(G1,G2),CFlag,CutFlag) :- !, $process_cpyflags_1(G1,CFlag0,CutFlag0), ((CutFlag0 =:= 1, CFlag = 1, CutFlag = 1) ; (CutFlag0 =\= 1, $process_cpyflags_1(G2,CFlag1,CutFlag), $logical_or(CFlag0,CFlag1,CFlag)) ). $process_cpyflags_1('->'(G1,G2),1,0) :- !. /* cuts in -> are soft */ $process_cpyflags_1(';'('->'(T,G1),G2),1,0) :- !. /* cuts in -> are soft */ $process_cpyflags_1(';'(G1,G2),1,CutFlag) :- $get_test(G1,T1,_), $get_test(G2,T2,_), $univ(T1,[Op1 | Args1]), $univ(T2,[Op2 | Args2]), '$=='(Args1,Args2), $length(Args1,Arity), $complementary(Op1,Arity,Op2), !, /* if-then-else */ $process_cpyflags_1(G1,_,CutFlag0), ((CutFlag0 =:= 1, CutFlag = 1) ; (CutFlag0 =\= 1, $process_cpyflags_1(G2,_,CutFlag)) ). $process_cpyflags_1(';'(G1,G2),CFlag,CutFlag) :- !, $process_cpyflags_1(G1,CFlag0,CutFlag0), ((CutFlag0 =:= 1, CFlag = 1, CutFlag = 1) ; (CutFlag0 =\= 1, $process_cpyflags_1(G2,CFlag1,CutFlag), $logical_or(CFlag0,CFlag1,CFlag)) ). $process_cpyflags_1(not(G),1,0) :- !. /* cuts in not are soft */ $process_cpyflags_1(G,1,1) :- $functor(G,'!',0), !. $process_cpyflags_1(call(X),1,0) :- !. $process_cpyflags_1(G,0,0). /* --------------------------- $preprocess1.P --------------------------- */ SHAR_EOF if test -f '$asmbgen1.P' then echo shar: over-writing existing file "'$asmbgen1.P'" fi cat << \SHAR_EOF > '$asmbgen1.P' /* ***************************************************************** * * * SB-Prolog * * Copyright SUNY at Stony Brook, 1986 * * * ****************************************************************** */ /*----------------------------------------------------------------- SB-Prolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the SB-Prolog General Public License for full details. Everyone is granted permission to copy, modify and redistribute SB-Prolog, but only under the conditions described in the SB-Prolog General Public License. A copy of this license is supposed to have been given to you along with SB-Prolog so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. ------------------------------------------------------------------ */ /* begin asmbgen1.P ****************************************************/ /* ********************************************************************** $asmbgen1_export([$asm_symbol/1,$asm_putnum/2,$asm_gen/1,$asm_mark_eot/0]). $asmbgen1_use($name,[$name/2,_]). $asmbgen1_use($bio,[$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,$tell/1, $telling/1,$told/0,$get/1,$get0/1,$see/1,$seeing/1,$seen/0]). $asmbgen1_use($meta,[_,_,$length/2]). $asmbgen1_use($blist,[$append/3,$member/2,$member1/2]). $asmbgen1_use($aux1,[_,_,_,_,$umsg/1,_,_,_,_]). ********************************************************************** */ /* $asm_symbol outputs the PSC table in byte file header format */ $asm_symbol(Symtab) :- $member(Sym, Symtab), $asm_putsym(Sym), fail. $asm_symbol(_). $asm_putsym((String, Arity, Value)) :- $asm_putnum(Value, 4), $asm_putnum(Arity, 1), $name(String,Chars), $length(Chars,L), $asm_putnum(L,1), $writename(String), !. /* Putnum(Number, Length) will write Number as a binary number which will be Length bytes long */ $asm_putnum(Num,1) :- Num < 256, $put(Num). $asm_putnum(Num,Nbytes) :- Byte is Num /\ 255, Rest is Num >> 8, N is Nbytes - 1, $asm_putnum(Rest,N), $put(Byte). $asm_opgen(N) :- $asm_putnum(N, 1). $asm_opgen_even(N) :- $asm_putnum(N, 1), $asm_putnum(0, 1). $asm_strgen(N) :- $asm_putnum(N,4). $asm_gen(label(L)). $asm_gen(pred(I, N)) :- $asm_putnum(I, 4), $asm_putnum(N, 4). $asm_gen(arglabel(T, Val, L)) :- $writename(T), (((T = i; T = c; T = s), ($integer(Val) -> $asm_putnum(Val,4) ; $write4(Val))); true ), $asm_putnum(L, 4). $asm_gen(getpvar(V,R)) :- $asm_opgen_even(0), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(getpval(V,R)) :- $asm_opgen_even(1), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(gettval(R,R1)) :- $asm_opgen_even(3), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(getcon(I,R)) :- $asm_opgen(4), $asm_putnum(R,1), $asm_putnum(I,4). $asm_gen(getnil(R)) :- $asm_opgen(5), $asm_putnum(R,1). $asm_gen(getstr(I,R)) :- $asm_opgen(6), $asm_putnum(R,1), $asm_strgen(I). $asm_gen(getstrv(I,V)) :- $asm_opgen(2), $asm_putnum(V,1), $asm_strgen(I). $asm_gen(getlist(R)) :- $asm_opgen(7), $asm_putnum(R,1). $asm_gen(getlist_tvar_tvar(R0,R1,R2)) :- $asm_opgen(72), $asm_putnum(R0,1), $asm_putnum(R1,1), $asm_putnum(R2,1). $asm_gen(getcomma(R)) :- $asm_opgen(73), $asm_putnum(R,1). $asm_gen(getcomma_tvar_tvar(R0,R1,R2)) :- $asm_opgen(74), $asm_putnum(R0,1), $asm_putnum(R1,1), $asm_putnum(R2,1). $asm_gen(unipvar(V)) :- $asm_opgen(8), $asm_putnum(V,1). $asm_gen(unipval(V)) :- $asm_opgen(9), $asm_putnum(V,1). $asm_gen(unitvar(R)) :- $asm_opgen(10), $asm_putnum(R,1). $asm_gen(unitval(R)) :- $asm_opgen(11), $asm_putnum(R,1). $asm_gen(unicon(I)) :- $asm_opgen_even(12), $asm_putnum(I,4). $asm_gen(uninil) :- $asm_opgen_even(13). $asm_gen(putpvar(V,R)) :- $asm_opgen_even(16), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(putpval(V,R)) :- $asm_opgen_even(17), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(puttvar(R,R1)) :- $asm_opgen_even(18), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(putcon(I,R)) :- $asm_opgen(20), $asm_putnum(R,1), $asm_putnum(I,4). $asm_gen(putnil(R)) :- $asm_opgen(21), $asm_putnum(R,1). $asm_gen(putstr(I,R)) :- $asm_opgen(22), $asm_putnum(R,1), $asm_strgen(I). $asm_gen(putstrv(I,V)) :- $asm_opgen(19), $asm_putnum(V,1), $asm_strgen(I). $asm_gen(putlist(R)) :- $asm_opgen(23), $asm_putnum(R,1). $asm_gen(bldpvar(V)) :- $asm_opgen(24), $asm_putnum(V,1). $asm_gen(bldpval(V)) :- $asm_opgen(25), $asm_putnum(V,1). $asm_gen(bldtvar(R)) :- $asm_opgen(26), $asm_putnum(R,1). $asm_gen(bldtval(R)) :- $asm_opgen(27), $asm_putnum(R,1). $asm_gen(bldcon(I)) :- $asm_opgen_even(28), $asm_putnum(I,4). $asm_gen(bldnil) :- $asm_opgen_even(29). $asm_gen(getnumcon(N,R)) :- $asm_opgen(14), $asm_putnum(R,1), $asm_putnum(N,4). $asm_gen(putnumcon(N,R)) :- $asm_opgen(15), $asm_putnum(R,1), $asm_putnum(N,4). $asm_gen(uninumcon(I)) :- $asm_opgen_even(30), $asm_putnum(I,4). $asm_gen(bldnumcon(N)) :- $asm_opgen_even(31), $asm_putnum(N,4). $asm_gen(getfloatcon(N,R)) :- $asm_opgen(32), $asm_putnum(R,1), $write4(N). $asm_gen(putfloatcon(N,R)) :- $asm_opgen(33), $asm_putnum(R,1), $write4(N). $asm_gen(unifloatcon(N)) :- $asm_opgen_even(34), $write4(N). $asm_gen(bldfloatcon(N)) :- $asm_opgen_even(35), $write4(N). $asm_gen(switchonterm(R,L,L1)) :- $asm_opgen(176), $asm_putnum(R,1), $asm_putnum(L,4), $asm_putnum(L1,4). $asm_gen(switchoncon(L)) :- $asm_opgen_even(177), $asm_putnum(L,4). $asm_gen(switchonstr(L)) :- $asm_opgen_even(178), $asm_putnum(L,4). $asm_gen(switchonbound(R, L, L1)) :- $asm_opgen(179), $asm_putnum(R,1), $asm_putnum(L,4), $asm_putnum(L1, 4). $asm_gen(negate(R)) :- $asm_opgen(210), $asm_putnum(R,1). $asm_gen(and(R,R1)) :- $asm_opgen_even(211), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(or(R,R1)) :- $asm_opgen_even(212), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(logshiftl(R,R1)) :- $asm_opgen_even(213), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(logshiftr(R,R1)) :- $asm_opgen_even(214), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(addreg(R,R1)) :- $asm_opgen_even(215), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(subreg(R,R1)) :- $asm_opgen_even(216), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(mulreg(R,R1)) :- $asm_opgen_even(217), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(divreg(R,R1)) :- $asm_opgen_even(218), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(movreg(R,R1)) :- $asm_opgen_even(209), $asm_putnum(R,1), $asm_putnum(R1,1). $asm_gen(trymeelse(L,A)) :- $asm_opgen(160), $asm_putnum(A,1), $asm_putnum(L,4). $asm_gen(retrymeelse(L,A)) :- $asm_opgen(161), $asm_putnum(A,1), $asm_putnum(L,4). $asm_gen(trustmeelsefail(A)) :- $asm_opgen(162), $asm_putnum(A,1). $asm_gen(try(L,A)) :- $asm_opgen(163), $asm_putnum(A,1), $asm_putnum(L,4). $asm_gen(retry(L,A)) :- $asm_opgen(164), $asm_putnum(A,1), $asm_putnum(L,4). $asm_gen(trust(L,A)) :- $asm_opgen(165), $asm_putnum(A,1), $asm_putnum(L,4). $asm_gen(getpbreg(V)) :- $asm_opgen(166), $asm_putnum(V,1). $asm_gen(gettbreg(R)) :- $asm_opgen(167), $asm_putnum(R,1). $asm_gen(putpbreg(V)) :- $asm_opgen(168), $asm_putnum(V,1). $asm_gen(puttbreg(R)) :- $asm_opgen(169), $asm_putnum(R,1). $asm_gen(putdval(V,R)) :- $asm_opgen_even(224), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(putuval(V,R)) :- $asm_opgen_even(225), $asm_putnum(V,1), $asm_putnum(R,1). $asm_gen(call(I,B)) :- $asm_opgen(232), $asm_putnum(B,1), $asm_putnum(I,4). $asm_gen(allocate) :- $asm_opgen_even(233). $asm_gen(deallocate) :- $asm_opgen_even(234). $asm_gen(proceed) :- $asm_opgen_even(235). $asm_gen(execute(I)) :- $asm_opgen_even(236), $asm_putnum(I,4). $asm_gen(calld(L,B)) :- $asm_opgen(239), $asm_putnum(B,1), $asm_putnum(L,4). $asm_gen(jump(L)) :- $asm_opgen_even(240), $asm_putnum(L,4). $asm_gen(jumpz(R,L)) :- $asm_opgen(241), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(jumpnz(R,L)) :- $asm_opgen(242), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(jumplt(R,L)) :- $asm_opgen(243), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(jumple(R,L)) :- $asm_opgen(244), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(jumpgt(R,L)) :- $asm_opgen(245), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(jumpge(R,L)) :- $asm_opgen(246), $asm_putnum(R,1), $asm_putnum(L,4). $asm_gen(fail) :- $asm_opgen_even(248). $asm_gen(noop) :- $asm_opgen_even(249). $asm_gen(halt) :- $asm_opgen_even(250). $asm_gen(builtin(W)) :- $asm_opgen(251), $asm_putnum(W,1). $asm_gen(Junk) :- $umsg('unknown opcode detected in pass 2 :'), $umsg(Junk). $asm_mark_eot :- $asm_opgen_even(255),$asm_putnum(0,4). /* ---------------------------------------------------------------------- */ SHAR_EOF if test -f '$aux1.P' then echo shar: over-writing existing file "'$aux1.P'" fi cat << \SHAR_EOF > '$aux1.P' /* ***************************************************************** * * * SB-Prolog * * Copyright SUNY at Stony Brook, 1986 * * * ****************************************************************** */ /*----------------------------------------------------------------- SB-Prolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the SB-Prolog General Public License for full details. Everyone is granted permission to copy, modify and redistribute SB-Prolog, but only under the conditions described in the SB-Prolog General Public License. A copy of this license is supposed to have been given to you along with SB-Prolog so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. ------------------------------------------------------------------ */ /* ------------------------------ aux1.P ------------------------------ */ /* ********************************************************************** $aux1_export([$roundtosq/2,$get_compiletime/2,$message1/1, $output_msg/3,$umsg/1,$name_aslfile/2, $disj_targ_label/2,$gensym_pred/2,$logical_or/3]). $aux1_use($name,[$name/2,_]). $aux1_use($blist,[$append/3,$member/2,$member1/2]). $aux1_use($bio,[$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,$tell/1, $telling/1,$told/0,$get/1,$get0/1,$see/1,$seeing/1,$seen/0]). $aux1_use($glob,[_,_,$gensym/2]). ********************************************************************** * /* convert a round list to a square list */ $roundtosq(','(F,R),[F|Tr]) :- !, $roundtosq(R,Tr). $roundtosq(X,[X]) :- !. $roundtosq(true,[]). $get_compiletime(CTime,Time) :- CTime0 is (CTime + 5)/1000.0, $name(CTime0,N0), $get_2dec_places(N0,N1), $name(Time,N1). $get_2dec_places([46|L],[46,D0,D1]) :- $length(L,N), (N >= 2 -> L = [D0,D1|_] ; (N =:= 1 -> (L = [D0], D1 = 48) ; (D0 = 48, D1 = 48) ) ). $get_2dec_places([X|L],[X|L0]) :- X =\= 46, $get_2dec_places(L,L0). $message1(Opts) :- $member1(v,Opts), !, $writename(' - translation phase commenced'),nl. $message1(_). $output_msg(P,N,Opts) :- (($member1(v,Opts), !, $telling(X), $tell(user), $tab(15), $writename('translating : '), $writename(P), $writename('/'), $writename(N), $nl, $told, $tell(X) ) ; true ). $umsg( Text ) :- $telling( File ), $tell( user ), $umsg0( Text ), $nl, $told, $tell( File). $umsg0([]) :- !. $umsg0([H|T]) :- !, $writename(H), $writename(' '), $umsg0(T). $umsg0(Atom) :- $writename(Atom). $name_aslfile(InFile, AslFile) :- $name(InFile,InFileName), $append(InFileName, ".asl", OutFile1Name), $name(AslFile, OutFile1Name). $disj_targ_label(Label,Name) :- $name(Label,Name1), $name(Name,[100|Name1]). $gensym_pred(P,NP) :- $name(P, Pname), $gensym('_#',N2), $name(N2,Nname2), $append(Pname, Nname2, NPname), $name(NP,NPname). $logical_or(X,Y,Z) :- ((X =:= 1, Z = 1) ; (X =\= 1, ((Y =:= 1, Z = 1) ; (Y =\= 1, Z = 0) ) ) ). /* ---------------------------------------------------------------------- */ SHAR_EOF if test -f '$compile1.P' then echo shar: over-writing existing file "'$compile1.P'" fi cat << \SHAR_EOF > '$compile1.P' /* ***************************************************************** * * * SB-Prolog * * Copyright SUNY at Stony Brook, 1986 * * * ****************************************************************** */ /*----------------------------------------------------------------- SB-Prolog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the SB-Prolog General Public License for full details. Everyone is granted permission to copy, modify and redistribute SB-Prolog, but only under the conditions described in the SB-Prolog General Public License. A copy of this license is supposed to have been given to you along with SB-Prolog so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. ------------------------------------------------------------------ */ /* This Prolog program is a first attempt to take an input Prolog program in a simple syntax, relatively close to standard Prolog, and to output an annotated term, with pragmas attached, so that the pilgen translator can generate correct intermediate code. The input clauses will be read (using Prolog's read command) one at a time from standard input (for now), until end-of-file is reached. During the translation of a clause, a Symbol Table (St) is constructed. It contains information on each occurrence of a variable in the clause, as follows. It is a record st(Clist,Vlist); where Clist is the list of records c(Litno,Npars,Pragma) where Litno is the number of the literal on the rhs of the rule, Npars is the number of arguments to that literal, and Pragma is the pragma associated with the _call record for that literal in the clause; Vlist is a list of records, v(id,Occlist), one for each variable; where id the unique identifier for the variable, and Occlist is a list of occurrence records, o(Occno,Litno,Argno,Context,Pragma), one for each occurrence of the variable in the clause; where Occno uniquely determines the occurrence of this variable; Litno is the number of the literal (0=head, 1=first on rhs,...); Argno is the number of the argument in which it appears (starting with 1) Context is `s' if it is in a structure and `t' if it is at the top level; and Pragma is the list that is the Pragma for the occurrence of the variable in the code. */ $compile_export([$compile/0,$compile/1,$compile/2,$compile/3,$compile/4]). $compile_use($name,[$name/2,_]). $compile_use($blist,[$append/3,$member/2,$member1/2]). $compile_use($bio,[$writename/1,$writeqname/1,$put/1,$nl/0,$tab/1,$tell/1, $telling/1,$told/0,$get/1,$get0/1,$see/1,$seeing/1,$seen/0]). $compile_use($bmeta,[$atom/1,$atomic/1,$integer/1,$number/1,$structure/1, $functor0/2,$bldstr/3,$arg/3,$arity/2,$real/1,$floor/2]). $compile_use($prag,[$get_prag/2]). $compile_use($osys,[$cputime/1,_,_,_]). $compile_use($compare,['$=='/2,_,_,_,_,_,_]). /* ********************************************************************** $compile_use($aux1,[$roundtosq/2,$get_compiletime/2,$message1/1, $output_msg/3,$umsg/1,$name_aslfile/2,_,_,_]). $compile_use($translate1,[$translateasm/3,$translate/3]). ********************************************************************** */ $compile :- $writename('compile: Usage: compile( [,, [,