home *** CD-ROM | disk | FTP | other *** search
- % INIT.WAM Initialization file for WAM emulator
- %
- % This file is part of Prolog-68.
- %
- % Copyright © 1990,1991 Jens Kilian
- %
- % This program is free software; you can redistribute it and/or modify
- % it under the terms of the GNU General Public License as published by
- % the Free Software Foundation; either version 1, or (at your option)
- % any later version.
- %
- % This program is distributed in the hope that it will be useful,
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- % GNU General Public License for more details.
- %
- % You should have received a copy of the GNU General Public License
- % along with this program; if not, write to the Free Software
- % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- %
- %------------------------------------------------------------------------------
- % This file serves as a script to set up the data structures of the
- % WAM emulator. It is divided into several parts. An empty line
- % terminates each part.
- % Lines beginning with '%' contain comments and are ignored. All
- % other lines must be given in the correct format to be recognized.
- %
- %---- Part I : names of atoms known to the emulator ---------------------------
- %
- % Each line contains the name of an atom, enclosed in apostrophes.
- % A line corresponds to an entry in the STD...[] array.
- %
- %---- basic atoms
- '[]'
- '{}'
- ','
- ';'
- '-'
- 'end_of_file'
- %---- entry points
- 'shell'
- 'failure_error_handler'
- %---- comparison codes
- '<'
- '='
- '>'
- %---- keywords for statistics/2
- 'runtime'
- 'memory'
- 'core'
- 'program'
- 'heap'
- 'global_stack'
- 'local_stack'
- 'trail'
- 'garbage_collection'
- %---- atoms for the decompiler
- 'true'
- 'fail'
- '!'
- %---- names of predefined I/O streams
- 'user'
- 'user_input'
- 'user_output'
- 'user_error'
- 'printer_output'
- 'modem_input'
- 'modem_output'
- 'midi_input'
- 'midi_output'
- 'ikbd_output'
- ''
- %---- stream opening modes
- 'read'
- 'write'
- 'append'
- 'read_binary'
- 'write_binary'
- 'append_binary'
- %---- error ID codes
- 'generic_error'
- 'type_error'
- 'instantiation_error'
- 'range_error'
- 'existence_error'
- 'expression_error'
- 'zero_division_error'
- 'input_output_error'
- 'memory_error'
- 'system_error'
- %---- names of global flags
- 'character_escapes'
- 'fileerrors'
- 'gc_trace'
- 'unknown'
- 'error_handling'
- '$debugger_mode'
- '$debugger_counter'
- '$debugger_skip_id'
-
- %---- Part II : names and arities of functors known to the emulator -----------
- %
- % Each line contains the name of an atom (see above) and a decimal
- % number, separated by '/'.
- % A line corresponds to an entry in the STD...[] array.
- %
- %---- basic functors
- '.'/2
- '{}'/1
- ':-'/2
- ','/2
- ';'/2
- 'call'/1
- %---- decompiler data : arithmetic predicates, relations, operations etc.
- 'is'/2
- '=:='/2
- '=\\='/2
- '<'/2
- '=<'/2
- '>'/2
- '>='/2
- '-'/1
- '\\'/1
- 'abs'/1
- '+'/2
- '-'/2
- '*'/2
- '/'/2
- 'mod'/2
- '/\\'/2
- '\\/'/2
- 'xor'/2
- '<<'/2
- '>>'/2
- '->'/2
- %---- functor used to mark variables for write/[1,2] and writeq/[1,2]
- '$VAR'/1
- %---- functors used to construct database references, streams etc.
- '$ref'/2
- '$stream'/2
-
- %---- Part III : names and arities of built-in predicates ---------------------
- %
- % Each line corresponds to an entry in the emulator's dispatching table
- % for built-ins. The table index is given before the name of the builtin.
- %
- %---- system predicates
- 0 'halt'/1
- 1 'true'
- 2 '$CALL'/1
- 3 '$CREATE_BLOCK'/2
- 4 '$DELETE_BLOCK'
- 5 '$LOCK_BLOCK'
- 6 '$UNLOCK_BLOCK'
- 7 'signal_exception'/1
- 8 '$MARK'/1
- 9 '$CUT'/1
- 10 '$GC'
- 11 '$UNKNOWN'
- 12 'statistics'
- 13 '$STATISTICS'/2
- 14 'abort'/0
- 16 'system'/1
- 20 'signal_error'/3
- 21 'propagate_error'/4
- 22 '$LOCAL_HANDLERS'/2
- 23 'set_error_handler'/3
- %---- term comparison
- 32 '='/2
- 33 'compare'/3
- 34 '=='/2
- 35 '\\=='/2
- 36 '@<'/2
- 37 '@=<'/2
- 38 '@>'/2
- 39 '@>='/2
- 40 'sort'/2
- 41 'keysort'/2
- 42 'msort'/2
- %---- input & output of terms
- 48 'read'/1
- 49 'read'/2
- 50 'sread'/2
- 51 'sread'/3
- 52 'write'/1
- 53 'write'/2
- 54 'writeq'/1
- 55 'writeq'/2
- 56 'display'/1
- 57 'display'/2
- 58 'displayq'/1
- 59 'displayq'/2
- %---- input & output of characters
- 60 'get0'/1
- 61 'get0'/2
- 62 'get'/1
- 63 'get'/2
- 64 'skip'/1
- 65 'skip'/2
- 66 'put'/1
- 67 'put'/2
- 68 'tab'/1
- 69 'tab'/2
- %---- I/O support
- 72 'op'/3
- 73 'prompt'/2
- 74 'prolog_flag'/3
- %---- BIOS access (for demos only)
- 75 'biosstat'
- 76 'biosget0'/1
- 77 'biosput'/1
- %---- stream operations
- 80 'open'/3
- 81 'open_null_stream'/1
- 82 '$CLOSE'/1
- 83 'flush_output'/1
- 84 '$STREAM'/3
- 85 '$NEXT_STREAM'/2
- 86 'set_input'/1
- 87 'set_output'/1
- 88 'current_input'/1
- 89 'current_output'/1
- 90 'character_count'/2
- 91 'line_count'/2
- 92 'line_position'/2
- 93 '$SET_STREAM_POS'/4
- 94 '$ABS_FILE_NAME'/3
- %---- structure access
- 96 '=..'/2
- 97 'functor'/3
- 98 'arg'/3
- 99 'atom_chars'/2
- 100 'number_chars'/2
- 101 'name'/2
- 102 'copy_term'/2
- %---- database access
- 130 '$FUNCTOR'/3
- 131 '$PROCEDURE'/3
- 133 '$LOAD_CODE'/4
- 134 '$DECOMPILE'/2
- 136 '$NEXT_ATOM'/2
- 137 '$CURR_PROC'/1
- 138 '$NEXT_PROC'/2
- 139 '$NEXT_OP'/5
- 140 '$INSTALL_CODE'/2
- 141 '$ABOLISH'/2
- 152 'recorda'/3
- 153 'recordz'/3
- 154 '$RECORDED'/3
- 155 '$NEXT_RECORDED'
- 156 '$CURR_KEY'/1
- 157 '$NEXT_KEY'
- 159 'erase'/1
- %---- term classification
- 160 'var'/1
- 161 'nonvar'/1
- 162 'constant'/1
- 163 'nonconstant'/1
- 164 'composite'/1
- 165 'simple'/1
- 166 'integer'/1
- 167 'atom'/1
- 168 'atomic'/1
- 169 'nonatomic'/1
-
- %---- Part IV : names, types and priorities of standard operators -------------
- %
- % Each line contains the name of an atom, a (decimal) priority
- % and an operator type, separated by single spaces.
- %
- ':-' 1200 xfx
- '-->' 1200 xfx
- '?-' 1200 fx
- ':-' 1200 fx
- 'meta_predicate' 1150 fx
- 'multifile' 1150 fx
- 'mode' 1150 fx
- 'public' 1150 fx
- 'dynamic' 1150 fx
- ';' 1100 xfy
- '->' 1050 xfy
- ',' 1000 xfy
- '\\+' 900 fy
- 'spy' 900 fy
- 'not' 900 fy
- 'nospy' 900 fy
- '=' 700 xfx
- 'is' 700 xfx
- '=..' 700 xfx
- '==' 700 xfx
- '\\==' 700 xfx
- '@<' 700 xfx
- '@>' 700 xfx
- '@=<' 700 xfx
- '@>=' 700 xfx
- '=:=' 700 xfx
- '=\\=' 700 xfx
- '<' 700 xfx
- '>' 700 xfx
- '=<' 700 xfx
- '>=' 700 xfx
- '\\' 700 xfy
- ':' 600 xfy
- '+' 500 yfx
- '-' 500 yfx
- '\\/' 500 yfx
- '/\\' 500 yfx
- 'and' 500 yfx
- 'or' 500 yfx
- 'xor' 500 yfx
- '+' 500 fx
- '-' 500 fx
- '*' 400 yfx
- '/' 400 yfx
- '//' 400 yfx
- '>>' 400 yfx
- '<<' 400 yfx
- 'mod' 300 xfx
- '^' 200 xfy
- % '+' 100 fx
- % '-' 100 fx
-
- %---- END OF FILE -------------------------------------------------------------
-