aboutsummaryrefslogtreecommitdiff
path: root/src/interp/debugsys.lisp.pamphlet
blob: 5a97e4c0b302dff4fdffe4b9b24996edf314c391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/interp debugsys.lisp}
\author{Timothy Daly}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{An explanation}

This file is basically the same as the one created during the build of
interpsys. See the echo lines in the {\bf SAVESYS} block in the
Makefile.pamphlet file. These are echoed into a temporary file which
gets loaded into the lisp image to create interpsys.  We simply
captured that temporary file, replaced the .o files with .lisp files
(or .lsp or .clisp) and saved it here.

This is a file that can be loaded into a raw lisp image to create a
running interpreter. Note that almost all of the files are loaded as
lisp code. cfuns and sockio are exceptions because they depend on the
loader to link to externs in the lisp image which cannot be done in
interpreted code. 

We assume that debugsys is being built after interpsys has been built
as the only use for a debugsys image is to debug a deep system
problem in interpsys. Thus we can assume that all of these files
exist. Note that these files are {\bf hard coded} to assume they
live under {\bf /home/axiomgnu/new}. You need to do a global
search and replace if you don't place them there. We should write
lisp code to grab the {\bf AXIOM} shell variable but since (a)
there is hardly any reason to use this level of debugging and (b)
if you're screwing around here you've got much harder problems
to solve so this is not an issue.

For debugging purposes you can add anything to this file
and it will show up in the debugsys image. 

Note that the nag files have been removed as there is a bug
in the handling of their autoload code.
\section{Non-portable code}
\subsection{GCL only code}
\subsubsection{use-fast-links}
The use-fast-links function is a speed optimization on function
calls. It basically assumes that the call has been properly
constructed so the compiler can skip argument checks. 
<<use-fast-links>>=
#+:gcl (si::use-fast-links nil)
@ 
\section{The debugsys.lisp code}
<<*>>=
<<use-fast-links>>
(unless (system:getenv "AXIOM") 
 (format t "The AXIOM shell variable must be set~%")
 (format t "The likely value is axiom/mnt/linux~%"))
(unless (system:getenv "SYS")   
 (format t "The SYS shell variable must be set~%") 
 (format t "The likely value is linux~%"))
(unless (system:getenv "DAASE")
 (format t "The DAASE shell variable must be set~%")
 (format t "The likely value is axiom/mnt/linux~%"))
(trace load)
#+:GCL
(defun thepath (file) 
  (concatenate 'string (system:getenv "AXIOM") "/../.." file))
(load "sys-pkg.lisp")
(load "nocompil.lisp")
(load "bookvol5.lisp")
(load "util.lisp")
(in-package "BOOT")
(setq *sys* (system:getenv "SYS"))
#+:GCL
(defun thesymb (file) (intern
  (concatenate 'string (system:getenv "AXIOM") "/../.." file)))
(progn (setq timestamp (user::thepath "/src/timestamp")) (yearweek))
@
The [[*build-version*]] variable is only introduced into the system
from the Makefile. Since this isn't going thru the Makefile when
loaded by hand we need to establish a value.
<<*>>=
(setq *build-version* "debug")
(build-interpsys 
 (append 
   (list 
      "vmlisp.lisp"
      "hash.lisp"
      "bootfuns.lisp"
      "macros.lisp"
      "unlisp.lisp"
      "setq.lisp"
      "astr.clisp"
      "bits.lisp"
      "alql.clisp"
      (thesymb "/int/interp/buildom.clisp")
      (thesymb "/int/interp/cattable.clisp")
      "cformat.clisp"
      (thesymb (concatenate 'string "/obj/" *sys* "/interp/cfuns.o"))
      (thesymb "/int/interp/clam.clisp")
      (thesymb "/int/interp/clammed.clisp")
      "comp.lisp"
      (thesymb "/int/interp/compat.clisp")
      (thesymb "/int/interp/compress.clisp")
      "cparse.clisp"
      "cstream.clisp"
      (thesymb "/int/interp/database.clisp")
      "debug.lisp"
      "dq.clisp"
      "fname.lisp"
      (thesymb "/int/interp/format.clisp")
      (thesymb "/int/interp/g-boot.clisp")
      (thesymb "/int/interp/g-cndata.clisp")
      (thesymb "/int/interp/g-error.clisp")
      (thesymb "/int/interp/g-opt.clisp")
      (thesymb "/int/interp/g-timer.clisp")
      (thesymb "/int/interp/g-util.clisp")
      "ggreater.lisp"
      (thesymb "/int/interp/hypertex.clisp")
      (thesymb "/int/interp/i-analy.clisp")
      (thesymb "/int/interp/i-code.clisp")
      (thesymb "/int/interp/i-coerce.clisp")
      (thesymb "/int/interp/i-coerfn.clisp")
      (thesymb "/int/interp/i-eval.clisp")
      (thesymb "/int/interp/i-funsel.clisp")
      (thesymb "/int/interp/i-intern.clisp")
      (thesymb "/int/interp/i-map.clisp")
      (thesymb "/int/interp/i-output.clisp")
      (thesymb "/int/interp/i-resolv.clisp")
      (thesymb "/int/interp/i-spec1.clisp")
      (thesymb "/int/interp/i-spec2.clisp")
      (thesymb "/int/interp/i-syscmd.clisp")
      (thesymb "/int/interp/i-toplev.clisp")
      (thesymb "/int/interp/i-util.clisp")
      "incl.clisp"
      "int-top.clisp"
      "intfile.clisp"
      (thesymb "/int/interp/lisplib.clisp")
      "macex.clisp"
      (thesymb "/int/interp/match.clisp")
      "monitor.lisp"
      "msg.clisp"
      (thesymb "/int/interp/msgdb.clisp")
      "nci.lisp"
      "newaux.lisp"
      (thesymb "/int/interp/newfort.clisp")
      "nlib.lisp"
      (thesymb "/int/interp/nrunfast.clisp")
      (thesymb "/int/interp/nrungo.clisp")
      (thesymb "/int/interp/nrunopt.clisp")
      (thesymb "/int/interp/nruntime.clisp")
      "osyscmd.clisp"
      "packtran.clisp"
      (thesymb "/int/interp/pathname.clisp")
      "pf2sex.clisp"
      "pile.clisp"
      "posit.clisp"
      "property.lisp"
      "ptrees.clisp"
      "ptrop.clisp"
      (thesymb "/int/interp/record.clisp")
      (thesymb "/int/interp/rulesets.clisp")
      "scan.clisp"
      "serror.clisp"
      (thesymb "/int/interp/server.clisp")
      (thesymb "/int/interp/setvars.clisp")
      "sfsfun-l.lisp"
      "sfsfun.clisp"
      (thesymb "/int/interp/simpbool.clisp")
      (thesymb "/int/interp/slam.clisp")
      (thesymb (concatenate 'string "/obj/" *sys* "/interp/sockio.o"))
      "spad.lisp"
      "spaderror.lisp"
      (thesymb "/int/interp/template.clisp")
      (thesymb "/int/interp/termrw.clisp")
      (thesymb "/int/interp/trace.clisp")
      "union.lisp"
      "daase.lisp"
      (thesymb "/int/interp/fortcall.clisp"))
  (list
    (thesymb "/int/interp/hashcode.clisp")
    (thesymb "/int/interp/as.clisp")
    "foam_l.lisp"
    "axext_l.lisp")
  (list
    "varini.clisp"
    "parini.clisp"
    (thesymb "/int/interp/setvart.clisp")
    "intint.lisp"
    (thesymb "/int/interp/xrun.clisp")
    (thesymb "/int/interp/interop.clisp")
    "patches.lisp"))
  (list
    "bootlex.lisp"
    "def.lisp"
    "fnewmeta.lisp"
    "metalex.lisp"
    "metameta.lisp"
    "parsing.lisp"
    "parse.clisp"
    "postpar.clisp"
    "postprop.lisp"
    "preparse.lisp")
  (list
    (thesymb "/int/interp/apply.clisp")
    (thesymb "/int/interp/c-doc.clisp")
    (thesymb "/int/interp/c-util.clisp")
    (thesymb "/int/interp/profile.clisp")
    (thesymb "/int/interp/category.clisp")
    (thesymb "/int/interp/compiler.clisp")
    (thesymb "/int/interp/define.clisp")
    (thesymb "/int/interp/functor.clisp")
    (thesymb "/int/interp/info.clisp")
    (thesymb "/int/interp/iterator.clisp")
    (thesymb "/int/interp/modemap.clisp")
    (thesymb "/int/interp/nruncomp.clisp")
    (thesymb "/int/interp/package.clisp")
    (thesymb "/int/interp/htcheck.clisp")
    (thesymb "/int/interp/xruncomp.clisp"))
  (list
    (thesymb "/int/interp/bc-matrix.clisp")
    (thesymb "/int/interp/bc-misc.clisp")
    (thesymb "/int/interp/bc-solve.clisp")
    (thesymb "/int/interp/bc-util.clisp")
    (thesymb "/int/interp/ht-util.clisp")
    (thesymb "/int/interp/htsetvar.clisp")
    (thesymb "/int/interp/ht-root.clisp")
    (thesymb "/int/interp/br-con.clisp")
    (thesymb "/int/interp/br-data.clisp")
    "showimp.clisp"
    (thesymb "/int/interp/br-op1.clisp")
    (thesymb "/int/interp/br-op2.clisp")
    (thesymb "/int/interp/br-search.clisp")
    (thesymb "/int/interp/br-util.clisp")
    (thesymb "/int/interp/topics.clisp")
    (thesymb "/int/interp/br-prof.clisp")
    (thesymb "/int/interp/br-saturn.clisp"))
  (list
    (thesymb "/int/interp/wi1.clisp")
    (thesymb "/int/interp/wi2.clisp")
    (thesymb "/int/interp/pspad1.clisp")
    (thesymb "/int/interp/pspad2.clisp")
    (thesymb "/int/interp/mark.clisp")
    "nspadaux.lisp"
    "def.lisp")
  (quote 
   ())
  (list 
   (thesymb "/int/interp/ax.clisp"))
  (system:getenv "AXIOM"))
(in-package "SCRATCHPAD-COMPILER")
(boot::set-restart-hook)
(in-package "BOOT")
(load (user::thepath "/int/algebra/warm.data"))
(|clearClams|)
(load "obey.lisp")
;(si::multiply-bignum-stack 10)
(si::gbc-time 0)
(setq si::*system-directory* 
  (user::thepath (concatenate 'string "/mnt/" *sys* "/bin/")))
(gbc t)

@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}