perm filename SAIL.XGP[DOC,AIL]7 blob
sn#178601 filedate 1975-09-23 generic text, type T, neo UTF8
/LMAR=0/XLINE=3/FONT#0=BDR30/FONT#1=BDR40/FONT#2=BDR30/FONT#3=LPT
␈↓ α∧␈↓STANFORD ARTIFICIAL INTELLIGENCE LABORATORY␈↓
,SEPTEMBER 1975
␈↓ α∧␈↓↓␈↓ ¬ESAIL USER MANUAL
␈↓ α∧␈↓␈↓ εPUPDATE
␈↓ α∧␈↓␈↓ ε3James R. Low
␈↓ α∧␈↓␈↓ ε/John F. Reiser
␈↓ α∧␈↓␈↓ ε,Hanan J. Samet
␈↓ α∧␈↓␈↓ ε%Robert L. Smith
␈↓ α∧␈↓␈↓ ε≤Robert F. Sproull
␈↓ α∧␈↓␈↓ εDaniel C. Swinehart
␈↓ α∧␈↓␈↓ ε≤Russell H. Taylor
␈↓ α∧␈↓␈↓ ε≡Kurt A. VanLehn
␈↓ α∧␈↓␈↓ ε?ABSTRACT
␈↓ α∧␈↓This␈α
document␈α
describes␈α
recent␈α
changes␈α
to␈α
the␈α
SAIL␈α
language␈α
since␈α
the␈α
"new"␈α∞manual␈α
(AIM-204)
␈↓ α∧␈↓was␈αpublished␈αin␈αJuly␈α1973.␈α It␈αreflects␈αthe␈αvarious␈αnew␈αfeatures␈αimplemented␈αas␈αof␈α
22␈αSeptember,
␈↓ α∧␈↓1975 for SAIL version 18 and corrects a number of minor errors in the earlier manual.
␈↓ α∧␈↓SAIL Addendum 1␈↓ ZTABLE OF CONTENTS
␈↓ α∧␈↓
␈↓ α∧␈↓␈↓ ∧0␈↓↓T A B L E O F C O N T E N T S␈↓
␈↓ α∧␈↓␈↓ βtSECTION␈↓ XPAGE
␈↓ α∧␈↓␈↓ βt1␈↓ ∧DINTRODUCTION␈↓
⊗1
␈↓ α∧␈↓␈↓ βt2␈↓ ∧DNUMERICAL ROUTINES␈↓
⊗2
␈↓ α∧␈↓␈↓ βt␈↓ ∧D1␈↓ ¬∀OVERFLOW␈↓
⊗3
␈↓ α∧␈↓␈↓ βt␈↓ ∧D2␈↓ ¬∀ENTRY POINTS␈↓
⊗3
␈↓ α∧␈↓␈↓ βt3␈↓ ∧DNEW PROCESS FEATURES␈↓
⊗4
␈↓ α∧␈↓␈↓ βt␈↓ ∧D1␈↓ ¬∀SPROUT APPLY␈↓
⊗4
␈↓ α∧␈↓␈↓ βt␈↓ ∧D2␈↓ ¬∀SPROUT_DEFAULTS␈↓
⊗4
␈↓ α∧␈↓␈↓ βt␈↓ ∧D3␈↓ ¬∀SUSPEND␈↓
⊗6
␈↓ α∧␈↓␈↓ βt␈↓ ∧D4␈↓ ¬∀FAIL AND SUCCEED␈↓
⊗6
␈↓ α∧␈↓␈↓ βt4␈↓ ∧DERROR HANDLING␈↓
⊗7
␈↓ α∧␈↓␈↓ βt␈↓ ∧D1␈↓ ¬∀ERROR MODES␈↓
⊗7
␈↓ α∧␈↓␈↓ βt␈↓ ∧D2␈↓ ¬∀ALTMODE RESPONSE␈↓
⊗7
␈↓ α∧␈↓␈↓ βt␈↓ ∧D3␈↓ ¬∀USER ERROR PROCEDURES␈↓
⊗7
␈↓ α∧␈↓␈↓ βt5␈↓ ∧DINEXHAUSTIBLE STRING SPACE␈↓
⊗9
␈↓ α∧␈↓SAIL Addendum 1␈↓ ZTABLE OF CONTENTS
␈↓ α∧␈↓␈↓ βt6␈↓ ∧DRECORD STRUCTURES␈↓
λ11
␈↓ α∧␈↓␈↓ βt␈↓ ∧D1␈↓ ¬∀INTRODUCTORY REMARKS␈↓
λ11
␈↓ α∧␈↓␈↓ βt␈↓ ∧D2␈↓ ¬∀RECORD CLASS DECLARATIONS␈↓
λ11
␈↓ α∧␈↓␈↓ βt␈↓ ∧D3␈↓ ¬∀RECORD POINTER DECLARATIONS␈↓
λ12
␈↓ α∧␈↓␈↓ βt␈↓ ∧D4␈↓ ¬∀ALLOCATION␈↓
λ13
␈↓ α∧␈↓␈↓ βt␈↓ ∧D5␈↓ ¬∀SUBFIELDS␈↓
λ13
␈↓ α∧␈↓␈↓ βt␈↓ ∧D6␈↓ ¬∀GARBAGE COLLECTION␈↓
λ15
␈↓ α∧␈↓␈↓ βt␈↓ ∧D7␈↓ ¬∀INTERNAL REPRESENTATIONS ␈↓
λ15
␈↓ α∧␈↓␈↓ βt␈↓ ∧D8␈↓ ¬∀HANDLER PROCEDURES␈↓
λ17
␈↓ α∧␈↓␈↓ βt␈↓ ∧D9␈↓ ¬∀STRING SUBFIELDS␈↓
λ18
␈↓ α∧␈↓␈↓ βt␈↓ ∧D10␈↓ ¬∀MORE ABOUT GARBAGE COLLECTION␈↓
λ18
␈↓ α∧␈↓␈↓ βt7␈↓ ∧DSAVE/CONTINUE␈↓
λ20
␈↓ α∧␈↓SAIL Addendum 1␈↓ ZTABLE OF CONTENTS
␈↓ α∧␈↓␈↓ βt8␈↓ ∧DMISCELLANEOUS NEW FEATURES␈↓
λ23
␈↓ α∧␈↓␈↓ βt␈↓ ∧D1␈↓ ¬∀NEW MTAPE OPTIONS␈↓
λ23
␈↓ α∧␈↓␈↓ βt␈↓ ∧D2␈↓ ¬∀INITIALIZATION PHASES␈↓
λ23
␈↓ α∧␈↓␈↓ βt␈↓ ∧D3␈↓ ¬∀CHNCDB␈↓
λ24
␈↓ α∧␈↓␈↓ βt␈↓ ∧D4␈↓ ¬∀ARRCLR␈↓
λ24
␈↓ α∧␈↓␈↓ βt␈↓ ∧D5␈↓ ¬∀SETPL␈↓
λ25
␈↓ α∧␈↓␈↓ βt␈↓ ∧D6␈↓ ¬∀EVALREDEFINE␈↓
λ25
␈↓ α∧␈↓␈↓ βt␈↓ ∧D7␈↓ ¬∀CVPS␈↓
λ25
␈↓ α∧␈↓␈↓ βt␈↓ ∧D8␈↓ ¬∀EXPRESSIONS IN REQUIRES␈↓
λ25
␈↓ α∧␈↓␈↓ βt␈↓ ∧D9␈↓ ¬∀RELEASE␈↓
λ26
␈↓ α∧␈↓␈↓ βt␈↓ ∧D10␈↓ ¬∀TTYUP␈↓
λ26
␈↓ α∧␈↓␈↓ βt␈↓ ∧D11␈↓ ¬∀BREAKSET MODES "K" AND "F"␈↓
λ26
␈↓ α∧␈↓␈↓ βt␈↓ ∧D12␈↓ ¬∀INOUT␈↓
λ27
␈↓ α∧␈↓␈↓ βt␈↓ ∧D13␈↓ ¬∀GETSTS & SETSTS␈↓
λ27
␈↓ α∧␈↓␈↓ βt␈↓ ∧D14␈↓ ¬∀CHANGES TO "OPEN" ERROR HANDLING␈↓
λ27
␈↓ α∧␈↓␈↓ βt␈↓ ∧D15␈↓ ¬∀ASH␈↓
λ28
␈↓ α∧␈↓␈↓ βt␈↓ ∧D16␈↓ ¬∀ARG_LIST␈↓
λ28
␈↓ α∧␈↓␈↓ βt␈↓ ∧D17␈↓ ¬∀CLOSE␈↓
λ28
␈↓ α∧␈↓␈↓ βt␈↓ ∧D18␈↓ ¬∀TYPEIT␈↓
λ29
␈↓ α∧␈↓␈↓ βt␈↓ ∧D19␈↓ ¬∀COMPARISON OF .REL FILES␈↓
λ29
␈↓ α∧␈↓␈↓ βt␈↓ ∧D20␈↓ ¬∀SCAN Optimizations␈↓
λ29
␈↓ α∧␈↓␈↓ βt␈↓ ∧D21␈↓ ¬∀BREAK TABLES␈↓
λ29
␈↓ α∧␈↓␈↓ βt␈↓ ∧D22␈↓ ¬∀CV6STR␈↓
λ30
␈↓ α∧␈↓␈↓ βt␈↓ ∧D23␈↓ ¬∀TENEX RUNTIMES␈↓
λ30
␈↓ α∧␈↓␈↓ βt␈↓ ∧D24␈↓ ¬∀CVASTR␈↓
λ31
␈↓ α∧␈↓␈↓ βt␈↓ ∧D25␈↓ ¬∀NEW SWITCHES␈↓
λ31
␈↓ α∧␈↓␈↓ βt␈↓ ∧D26␈↓ ¬∀EDFILE␈↓
λ32
␈↓ α∧␈↓␈↓ βt␈↓ ∧D27␈↓ ¬∀INIACS␈↓
λ32
␈↓ α∧␈↓␈↓ βt␈↓ ∧D28␈↓ ¬∀GOGTAB␈↓
λ33
␈↓ α∧␈↓␈↓ βt␈↓ ∧D29␈↓ ¬∀ARERR␈↓
λ33
␈↓ α∧␈↓␈↓ βt9␈↓ ∧DMINOR CORRECTIONS TO AIM-204␈↓
λ34
␈↓ α∧␈↓SAIL Addendum 1␈↓
1INTRODUCTION
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 1␈↓
␈↓ α∧␈↓␈↓ ¬m␈↓↓INTRODUCTION␈↓
␈↓ α∧␈↓The␈αfollowing␈αshort␈αmanual␈αdescribes␈αthe␈αchanges␈αthat␈αhave␈αhappened␈αto␈αSAIL␈αsince␈αthe␈αpublishing
␈↓ α∧␈↓of␈α∞the␈α∞Manual␈α∞in␈α∞July␈α∂1973.␈α∞It␈α∞accurately␈α∞reflects␈α∞the␈α∞state␈α∂of␈α∞SAIL,␈α∞version␈α∞18,␈α∞which␈α∂was␈α∞last
␈↓ α∧␈↓modified␈α
on␈α
September␈α∞22,␈α
1975.␈α
The␈α
reader␈α∞should␈α
be␈α
warned␈α
that␈α∞many␈α
of␈α
these␈α∞new␈α
features
␈↓ α∧␈↓were designed for veteran SAIL hackers.
␈↓ α∧␈↓The reader may also want to refer to the following documents, which are usually kept updated.
␈↓ α∧␈↓MACLIE.WRU[DOC,AIL]␈↓ ∧DA␈α
summary␈α
of␈α
commonly␈αmade␈α
errors␈α
when␈α
using␈αmacros␈α
and␈α
what␈α
to␈αdo
␈↓ α∧␈↓␈↓ ∧Dabout them.
␈↓ α∧␈↓TUTOR.DOC[DOC,AIL]␈↓ ∧DIn introduction to LEAP.
␈↓ α∧␈↓LEAP.WRU[DOC,AIL]␈↓ ∧DA␈αdetailed␈αdescription␈αof␈αthe␈αruntime␈αenvironment␈αof␈αLEAP␈αfor␈αthe␈αhardy
␈↓ α∧␈↓␈↓ ∧Dfew who want to interface to LEAP in assembly language.
␈↓ α∧␈↓SAIL.DOC[AIM,DOC]␈↓ ∧DThe␈α
July␈α
'73␈α∞manual␈α
(AIM-204)␈α
in␈α
LPT␈α∞form.␈α
Warning:␈α
this␈α
version␈α∞is␈α
the
␈↓ α∧␈↓␈↓ ∧DStanford␈α∞character␈α∞set.␈α∞ It␈α∂is␈α∞also␈α∞almost␈α∞300␈α∂pages␈α∞long.␈α∞ You␈α∞can␈α∂get␈α∞a
␈↓ α∧␈↓␈↓ ∧D120␈α∩page␈α∩version,␈α∩set␈α∩in␈α∩two␈α∩columns␈α∩of␈α∩nice␈α∩type␈α∩from␈α∩the␈α⊃National
␈↓ α∧␈↓␈↓ ∧DTechnical Information Service, Springfield, Virginia 22151.
␈↓ α∧␈↓LIES[DOC,AIL]␈↓ ∧DThis␈α∩file␈α⊃contains␈α∩the␈α⊃know␈α∩mistakes␈α⊃in␈α∩the␈α⊃Manual.␈α∩Soon␈α⊃it␈α∩will␈α⊃also
␈↓ α∧␈↓␈↓ ∧Dcontain the known mistakes in this document.
␈↓ α∧␈↓␈↓ π¬1␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ NNUMERICAL ROUTINES
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 2␈↓
␈↓ α∧␈↓␈↓ ¬%␈↓↓NUMERICAL ROUTINES␈↓
␈↓ α∧␈↓A␈α∪collection␈α∪of␈α∩numerical␈α∪routines␈α∪has␈α∪been␈α∩added␈α∪to␈α∪SAIL.␈α∩ These␈α∪are␈α∪pre-declared␈α∪in␈α∩the
␈↓ α∧␈↓compiler,␈α∪and␈α∪are␈α∪loaded␈α∪from␈α∪the␈α∩standard␈α∪SAIL␈α∪library.␈α∪ The␈α∪functions␈α∪are␈α∪quite␈α∩standard;
␈↓ α∧␈↓following are the equivalent definitions:
␈↓ α∧␈↓1.␈↓ αDThe␈α⊂standard␈α⊂trigonometric␈α⊃functions.␈α⊂ ASIN,␈α⊂ACOS,␈α⊂ATAN␈α⊃and␈α⊂ATAN2␈α⊂return␈α⊃results␈α⊂in
␈↓ α∧␈↓␈↓ αDradians.␈α
The␈α
ATAN2␈αcall␈α
takes␈α
arc-tangent␈αof␈α
the␈α
quotient␈αof␈α
its␈α
arguments;␈αin␈α
this␈α
way,␈αit
␈↓ α∧␈↓␈↓ αDcorrectly preserves sign information.
␈↓ α∧␈↓ REAL PROCEDURE SIN (REAL RADIANS);
␈↓ α∧␈↓ REAL PROCEDURE COS (REAL RADIANS);
␈↓ α∧␈↓ REAL PROCEDURE SIND (REAL DEGREES);
␈↓ α∧␈↓ REAL PROCEDURE COSD (REAL DEGREES);
␈↓ α∧␈↓ REAL PROCEDURE ASIN (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE ACOS (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE ATAN (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE ATAN2 (REAL NUMERATOR,DENOMINATOR);
␈↓ α∧␈↓2.␈↓ αDThe hyperbolic trigonometric functions.
␈↓ α∧␈↓ REAL PROCEDURE SINH (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE COSH (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE TANH (REAL ARGUMENT);
␈↓ α∧␈↓3. ␈↓ αDThe square-root function:
␈↓ α∧␈↓ REAL PROCEDURE SQRT (REAL ARGUMENT);
␈↓ α∧␈↓4.␈↓ αDA␈αpseudo-random␈αnumber␈αgenerator.␈α The␈αargument␈αspecifies␈αa␈αnew␈αvalue␈αfor␈αthe␈αseed␈α(If␈αthe
␈↓ α∧␈↓␈↓ αDargument␈α∩is␈α∩0,␈α∩the␈α∪old␈α∩seed␈α∩value␈α∩is␈α∩used.␈α∪ Thus␈α∩to␈α∩get␈α∩differing␈α∩random␈α∪numbers,␈α∩this
␈↓ α∧␈↓␈↓ αDargument should be zero.) Results are normalized to lie in the range [0,1].
␈↓ α∧␈↓ REAL PROCEDURE RAN (INTEGER SEED);
␈↓ α∧␈↓␈↓ π¬2␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ NNUMERICAL ROUTINES
␈↓ α∧␈↓5.␈↓ αDLogarithm␈α⊃and␈α⊃exponentiation␈α⊃functions.␈α⊃ These␈α⊃functions␈α⊃are␈α⊃the␈α⊃same␈α⊃ones␈α⊃used␈α⊃by␈α⊂the
␈↓ α∧␈↓␈↓ αDSAIL␈α
exponentiation␈α∞operator.␈α
The␈α
base␈α∞is␈α
e␈α
(2.71828182845904).␈α∞ The␈α
logarithm␈α
to␈α∞the␈α
base
␈↓ α∧␈↓␈↓ αD10 of e is .4342944819.
␈↓ α∧␈↓ REAL PROCEDURE LOG (REAL ARGUMENT);
␈↓ α∧␈↓ REAL PROCEDURE EXP (REAL ARGUMENT);
␈↓ α∧␈↓These␈αfunctions␈αmay␈αoccasionally␈αbe␈αasked␈αto␈αcompute␈αnumbers␈αthat␈αlie␈αoutside␈αthe␈αrange␈αof␈αlegal
␈↓ α∧␈↓floating-point␈αnumbers␈αon␈αthe␈αPDP-10.␈α In␈αthese␈αcases,␈αthe␈αroutines␈αissue␈αsprightly␈αerror␈αmessages
␈↓ α∧␈↓that are continuable.
␈↓ α∧␈↓2.1 - ␈↓↓OVERFLOW␈↓
␈↓ α∧␈↓In␈α∂order␈α∂to␈α∂better␈α⊂perform␈α∂their␈α∂tasks,␈α∂these␈α∂routines␈α⊂enable␈α∂the␈α∂system␈α∂interrupt␈α⊂facility␈α∂for
␈↓ α∧␈↓floating-point␈αoverflow␈αand␈αunderflow␈αerrors.␈α If␈αan␈αunderflow␈αis␈αdetected,␈αthe␈αresults␈αare␈αset␈αto
␈↓ α∧␈↓0␈α∞(a␈α
feat␈α∞not␈α∞done␈α
by␈α∞the␈α∞PDP-10␈α
hardware,␈α∞alas).␈α∞ Be␈α
aware␈α∞that␈α∞such␈α
underflow␈α∞fixups␈α∞will␈α
be
␈↓ α∧␈↓done to every underflow that occurs in your program.
␈↓ α∧␈↓If you would like to be informed of any numerical exceptions, you can call the runtime:
␈↓ α∧␈↓ TRIGINI ( LOCATION(simple-procedure-name) );
␈↓ α∧␈↓Every␈α∪floating-point␈α∪exception␈α∪that␈α∪is␈α∪not␈α∪expected␈α∪by␈α∪the␈α∪interrupt␈α∪handler␈α∀(the␈α∪numerical
␈↓ α∧␈↓routines␈α∞use␈α∞a␈α∞special␈α∞convention␈α∞to␈α
indicate␈α∞that␈α∞arithmetic␈α∞exception␈α∞was␈α∞expected)␈α∞will␈α
cause
␈↓ α∧␈↓the␈α∪specified␈α∪simple␈α∩procedure␈α∪to␈α∪be␈α∪called.␈α∩ This␈α∪procedure␈α∪may␈α∩look␈α∪around␈α∪the␈α∪world␈α∩as
␈↓ α∧␈↓described␈α∞in␈α
the␈α∞Manual␈α∞for␈α
'export'␈α∞interrupt␈α∞handlers,␈α
page␈α∞79.␈α
If␈α∞no␈α∞TRIGINI␈α
call␈α∞is␈α∞done,␈α
the
␈↓ α∧␈↓interrupt routine will simply dismiss unexpected floating-point interrupts.
␈↓ α∧␈↓2.2 - ␈↓↓ENTRY POINTS␈↓
␈↓ α∧␈↓In␈αorder␈αto␈αavoid␈αconfusion␈α(by␈αthe␈αloader)␈αwith␈αolder␈αtrig␈αpackages,␈αthe␈αentry␈αpoints␈αof␈αthe␈αSAIL
␈↓ α∧␈↓arithmetic␈α
routines␈α
all␈α
have␈α
a␈α
"$"␈α
appended␈α
to␈α
the␈α
end.␈α
Thus,␈α
SIN␈α
has␈α
the␈α
entry␈α
point␈α∞SIN$,␈α
etc.
␈↓ α∧␈↓WARNING:␈αIf␈αa␈αprogram␈αplans␈αto␈αuse␈αthe␈αSAIL␈αintrinsic␈αnumerical␈αroutines,␈αit␈αshould␈αNOT␈αinclude
␈↓ α∧␈↓external␈αdeclarations␈αto␈αthem,␈αsince␈αthis␈αwill␈αprobably␈αcause␈αthe␈αFORTRAN␈αlibrary␈αroutines␈αto␈αbe
␈↓ α∧␈↓loaded.
␈↓ α∧␈↓␈↓ π¬3␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ *NEW PROCESS FEATURES
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 3␈↓
␈↓ α∧␈↓␈↓ ¬␈↓↓NEW PROCESS FEATURES␈↓
␈↓ α∧␈↓3.1 - ␈↓↓SPROUT APPLY␈↓
␈↓ α∧␈↓The␈α<procedure␈αcall>␈αin␈αa␈αSPROUT␈αstatement␈αmay␈αbe␈αan␈αAPPLY␈αconstruct.␈α In␈α this␈αcase␈αSPROUT
␈↓ α∧␈↓will␈α∂ do␈α∂the␈α⊂"right"␈α∂thing␈α∂ about␈α∂setting␈α⊂up␈α∂the␈α∂static␈α∂link␈α⊂for␈α∂ the␈α∂APPLY.␈α∂That␈α⊂is,␈α∂"up-level"
␈↓ α∧␈↓references␈α
by␈α
the␈αprocess␈α
will␈α
be␈αmade␈α
to␈α
the␈α
same␈αvariable␈α
instances␈α
that␈αwould␈α
be␈α
used␈α
if␈αthe
␈↓ α∧␈↓APPLY did not occur in a SPROUT statement. (See page 77 of the manual.)
␈↓ α∧␈↓However,␈α
there␈α
is␈α
a␈α
glitch.␈α
The␈α
sprout␈α
mechanism␈α∞is␈α
not␈α
yet␈α
smart␈α
enough␈α
to␈α
find␈α
out␈α∞the␈α
block
␈↓ α∧␈↓of␈αthe␈α
declaration␈αof␈αthe␈α
procedure␈αused␈α
to␈αdefine␈αthe␈α
procedure␈αitem.␈α
It␈αwould␈αbe␈α
nice␈αif␈α
it␈αdid,
␈↓ α∧␈↓since␈αthen␈αit␈αcould␈αwarn␈αthe␈αuser␈αwhen␈αthat␈αblock␈αwas␈αexited␈αand␈αyet␈αthe␈αprocess␈αwas␈αstill␈αalive,
␈↓ α∧␈↓and␈α
thus␈α
potentially␈α
able␈α
to␈α
refer␈α
to␈α
deallocated␈α
arrays␈α
and␈α
etc.␈α
What␈α
the␈α
sprout␈α
does␈α∞instead␈α
is
␈↓ α∧␈↓assume␈α
the␈α
procedure␈α
was␈α
declared␈α
in␈α
the␈α
outer␈α
block.␈α
This␈α
may␈α
be␈α
fixed␈α
eventually,␈α
but␈α
in␈α
the
␈↓ α∧␈↓meantime␈α⊂ some␈α⊂extra␈α⊂care␈α⊂should␈α∂be␈α⊂taken␈α⊂ when␈α⊂using␈α⊂ apply␈α∂in␈α⊂sprouts␈α⊂to␈α⊂ avoid␈α⊂ exiting␈α∂a
␈↓ α∧␈↓block␈α∞ with␈α∞dependents.␈α∞ Similarly,␈α∞be␈α∞warned␈α∞ that␈α∞the␈α∞"DEPENDENTS␈α∞(<blockid>)"␈α∞construct
␈↓ α∧␈↓may␈α∪ not␈α∪give␈α∪ the␈α∪ "right"␈α∪result␈α∪ for␈α∩ sprout␈α∪applies.␈α∪Page␈α∪68␈α∪of␈α∪the␈α∪Manual␈α∪contains␈α∩the
␈↓ α∧␈↓description of this protection mechanism for non-APPLY Sprouts.
␈↓ α∧␈↓3.2 - ␈↓↓SPROUT_DEFAULTS␈↓
␈↓ α∧␈↓SAIL␈α
now␈α∞provides␈α
a␈α∞mechanism␈α
by␈α
which␈α∞ the␈α
user␈α∞ may␈α
specify␈α
the␈α∞"default"␈α
options␈α∞to␈α
be
␈↓ α∧␈↓used when individual procedures are sprouted.
␈↓ α∧␈↓␈↓ π¬4␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ *NEW PROCESS FEATURES
␈↓ α∧␈↓αSyntax:
␈↓ α∧␈↓α PROCEDURE <procid> ...
␈↓ α∧␈↓α BEGIN
␈↓ α∧␈↓α <some declarations>;
␈↓ α∧␈↓α SPROUT_DEFAULTS <integer constant>;
␈↓ α∧␈↓α <perhaps some more declarations>;
␈↓ α∧␈↓α :
␈↓ α∧␈↓α :
␈↓ α∧␈↓α <statements>
␈↓ α∧␈↓α :
␈↓ α∧␈↓α END;
␈↓ α∧␈↓In other words, SPROUT_DEFAULTS is a declaration.
␈↓ α∧␈↓Semantics:
␈↓ α∧␈↓If␈α⊃ one␈α⊂of␈α⊃the␈α⊃"allocation"␈α⊂fields␈α⊃of␈α⊃ the␈α⊂options␈α⊃word␈α⊂passed␈α⊃to␈α⊃the␈α⊂SPROUT␈α⊃routine␈α⊃--␈α⊂i.e.
␈↓ α∧␈↓QUANTUM,STRINGSTACK,PSTACK,␈α⊃or␈α⊃ PRIORITY␈α⊃--␈α⊃is␈α⊃zero,␈α⊃ then␈α⊃ SPROUT␈α⊃ will␈α∩look␈α⊃ at
␈↓ α∧␈↓the␈αcorresponding␈α field␈αof␈α the␈αspecified␈α<integer␈αconstant>␈αfor␈αthe␈αprocedure␈αbeing␈αsprouted.␈αIf
␈↓ α∧␈↓the␈α
field␈α
is␈α
non-zero,␈α
then␈α
that␈α
value␈α
will␈α
be␈α
used;␈α
otherwise␈α
the␈α
current␈α
"system"␈αdefault
␈↓ α∧␈↓will be used.
␈↓ α∧␈↓NOTE:␈α SPROUT_DEFAULTS␈α only␈αapplies␈α to␈α "allocations",␈αi.e.␈α the␈αprocess␈αstatus␈αcontrol␈αbits
␈↓ α∧␈↓(e.g. SUSPME) are not affected.
␈↓ α∧␈↓αExample:
␈↓ α∧␈↓α RECURSIVE PROCEDURE FOO;
␈↓ α∧␈↓α BEGIN
␈↓ α∧␈↓α SPROUT_DEFAULTS STRINGSTACK(10);
␈↓ α∧␈↓α INTEGER XXX;
␈↓ α∧␈↓α :
␈↓ α∧␈↓α :
␈↓ α∧␈↓α END;
␈↓ α∧␈↓α :
␈↓ α∧␈↓α SPROUT(P1,FOO,STRINGSTACK(3));
␈↓ α∧␈↓α SPROUT(P2,FOO);
␈↓ α∧␈↓α COMMENT P1 will have a string stack of 3*32 words.
␈↓ α∧␈↓α P2 will have a string stack of 10*32 words;
␈↓ α∧␈↓␈↓ π¬5␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ *NEW PROCESS FEATURES
␈↓ α∧␈↓3.3 - ␈↓↓SUSPEND␈↓
␈↓ α∧␈↓SUSPEND now behaves like RESUME in that it returns an item.
␈↓ α∧␈↓ itm ← SUSPEND(<process item>)
␈↓ α∧␈↓Frequently,␈α∂one␈α∞is␈α∂suspending␈α∞some␈α∂other␈α∞process␈α∂than␈α∞the␈α∂one␈α∞that␈α∂is␈α∞executing␈α∂the␈α∞SUSPEND
␈↓ α∧␈↓statement. In this case, the item returned is ANY. However, in cases like:
␈↓ α∧␈↓ X ← SUSPEND(MYPROC);
␈↓ α∧␈↓where␈α∪the␈α∀process␈α∪suspends␈α∪itself,␈α∀it␈α∪might␈α∪happen␈α∀that␈α∪this␈α∪process␈α∀is␈α∪made␈α∪running␈α∀by␈α∪a
␈↓ α∧␈↓RESUME␈α
from␈α
another␈α
process.␈α
If␈α
so,␈α
then␈α
X␈α
receives␈α
the␈α
<return_item>␈α
that␈α
was␈α∞an␈α
argument
␈↓ α∧␈↓to the RESUME.
␈↓ α∧␈↓3.4 - ␈↓↓FAIL AND SUCCEED␈↓
␈↓ α∧␈↓FAIL␈α∂and␈α∂SUCCEED␈α∂now␈α∂behave␈α∂like␈α∂RESUME␈α∞and␈α∂SUSPEND␈α∂in␈α∂that␈α∂they␈α∂also␈α∂return␈α∂an␈α∞item.
␈↓ α∧␈↓The␈α
item␈αreturned␈α
is␈α
ANY␈αunless␈α
the␈α
Matching␈αProcedure␈α
containing␈α
the␈αFAIL␈α
or␈α
SUCCEED␈αwas
␈↓ α∧␈↓(1)␈α
sprouted␈α
as␈α∞a␈α
process,␈α
and␈α∞(2)␈α
made␈α
running␈α
by␈α∞a␈α
RESUME␈α
construct.␈α∞ In␈α
the␈α
latter␈α∞case,␈α
the
␈↓ α∧␈↓item␈α
returned␈α∞is␈α
the␈α∞<return_item>␈α
that␈α∞was␈α
an␈α∞argument␈α
to␈α∞the␈α
RESUME.␈α∞ [Note␈α
that␈α∞the␈α
only
␈↓ α∧␈↓case in which a Matching Procedure can be reactivated at a FAIL is by being RESUMEd.]
␈↓ α∧␈↓␈↓ π¬6␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓
∀ERROR HANDLING
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 4␈↓
␈↓ α∧␈↓␈↓ ¬T␈↓↓ERROR HANDLING␈↓
␈↓ α∧␈↓4.1 - ␈↓↓ERROR MODES␈↓
␈↓ α∧␈↓SAIL's␈αerror␈α handler␈αhas␈αat␈α long␈αlast␈αbeen␈α modified␈αto␈αdo␈α what␈αis␈αclaimed␈αit␈αwill␈αdo␈α in␈αSection
␈↓ α∧␈↓20␈αof␈αthe␈αmanual␈α(pgs␈α95␈α-␈α97),␈αand␈αin␈αthe␈αdescription␈αof␈αUSERERR␈α(pg␈α42).␈α In␈αbrief,␈αit␈αallows␈αone
␈↓ α∧␈↓to␈α have␈αerror␈α messages␈αautomatically␈α sent␈α to␈α a␈α"log"␈α file␈α while␈αone␈α is␈αcompiling,␈αand␈αto␈αuse
␈↓ α∧␈↓USERERR as a trace statement.
␈↓ α∧␈↓The␈αdescription␈αgiven␈αin␈αthe␈α
manual␈αdiffers␈αfrom␈αreality␈αin␈α
two␈αways:␈α"Keep"␈αmode␈αhas␈α
not␈α been
␈↓ α∧␈↓implemented␈α(the␈αerror␈αhandler␈α will␈αflush␈αall␈αtype-ahead␈αexcept␈αa␈α<lf>);␈α all␈αof␈αthe␈α other␈αmodes
␈↓ α∧␈↓("Quiet",␈α "Logging",␈αand␈α"Numbers")␈αare␈αimplemented␈αONLY␈α IN␈αTHE␈αCOMPILER.␈α However,␈αone
␈↓ α∧␈↓can␈α⊂get␈α∂the␈α⊂effect␈α⊂of␈α∂error␈α⊂modes␈α⊂at␈α∂runtime␈α⊂by␈α⊂using␈α∂a␈α⊂brand␈α⊂new␈α∂feature␈α⊂called␈α⊂user␈α∂error
␈↓ α∧␈↓procedures.
␈↓ α∧␈↓4.2 - ␈↓↓ALTMODE RESPONSE␈↓
␈↓ α∧␈↓After␈α
an␈α
"E"␈α
or␈α
"T"␈α
response␈α
to␈α
the␈α∞error␈α
handler,␈α
an␈α
altmode␈α
will␈α
return␈α
to␈α
the␈α∞question␈α
loop;
␈↓ α∧␈↓i.e.,␈αyou␈αmay␈αchange␈αyour␈αmind␈αif␈αyou␈αdo␈αnot␈αwish␈αto␈αedit.␈α Normal␈αmonitor␈αline␈αediting␈αof␈αthe␈αfile
␈↓ α∧␈↓name is allowed.
␈↓ α∧␈↓4.3 - ␈↓↓USER ERROR PROCEDURES␈↓
␈↓ α∧␈↓A␈α user␈αerror␈α procedure␈αis␈αa␈α user␈αprocedure␈α that␈αis␈αrun␈α before␈αor␈αinstead␈αof␈α the␈α SAIL␈αerror
␈↓ α∧␈↓handler␈α⊂ everytime␈α⊂ an␈α⊃error␈α⊂ occurs␈α⊂ at␈α⊃runtime.␈α⊂ This␈α⊂ includes␈α⊃all␈α⊂array␈α⊂errors,␈α⊃IO␈α⊂ errors,
␈↓ α∧␈↓Leapish␈α∞errors␈α
and␈α∞all␈α
USERERRs.␈α∞ It␈α
does␈α∞not␈α
include␈α∞system␈α
errors,␈α∞such␈α
as␈α∞Ill␈α
Mem␈α∞Ref␈α∞or␈α
Ill
␈↓ α∧␈↓UUO.
␈↓ α∧␈↓The procedure one uses for a user error procedure must be of the following type:
␈↓ α∧␈↓␈↓ π¬7␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓
∀ERROR HANDLING
␈↓ α∧␈↓␈↓ β7SIMPLE INTEGER PROCEDURE proc (INTEGER loc; STRING msg, rsp);
␈↓ α∧␈↓Only␈α∞the␈α∞names␈α∞ proc,␈α∞loc,␈α∞ msg,␈α∞and␈α∞rsp␈α∞ may␈α∞vary␈α∞ from␈α∞the␈α∞ example␈α∞above,␈α∞except␈α∞ that␈α∞one
␈↓ α∧␈↓may declare the procedure INTERNAL if one wishes to use it across files.
␈↓ α∧␈↓Whenever␈α the␈α
external␈αinteger␈α
_ERRP_␈α is␈αloaded␈α
with␈αLOCATION(proc),␈α
the␈αerror␈α
handler␈αwill
␈↓ α∧␈↓call␈α
proc␈α∞before␈α
it␈α
does␈α∞anything␈α
else.␈α
It␈α∞will␈α
set␈α∞loc␈α
to␈α
the␈α∞core␈α
location␈α
of␈α∞the␈α
call␈α∞ to␈α
the
␈↓ α∧␈↓error␈α∞handler.␈α∞ Msg␈α∞ will␈α∞be␈α∞ the␈α∞message␈α∞ that␈α∞it␈α∞ would␈α∞have␈α∞ printed.␈α∞ Rsp␈α∞will␈α∂be␈α∞non-NULL
␈↓ α∧␈↓only␈αif␈αthe␈αerror␈αwas␈αfrom␈αa␈αUSERERR␈αwhich␈αhad␈αresponse␈αstring␈αargument.␈α Proc␈αcan␈αdo␈αanything
␈↓ α∧␈↓that␈α⊂ a␈α∂simple␈α⊂procedure␈α∂can␈α⊂do.␈α∂ When␈α⊂it␈α∂exits,␈α⊂it␈α∂should␈α⊂ return␈α∂an␈α⊂ integer␈α∂which␈α⊂ tells␈α∂the
␈↓ α∧␈↓error␈αhandler␈α if␈α it␈αshould␈αdo␈αanything␈αmore.␈α If␈αthe␈αinteger␈αis␈α0,␈αthe␈αerror␈αhandler␈αwill␈α(1)␈α print
␈↓ α∧␈↓the␈α message,␈α(2)␈α print␈αthe␈αlocation,␈αand␈α(3)␈αquery␈αthe␈αtty␈αand␈αdispatch␈αon␈αthe␈αresponse␈αcharacter
␈↓ α∧␈↓(i.e␈αask␈αfor␈αa␈α<cr>,␈α<lf>,␈αetc.).␈α If␈αthe␈αright␈αhalf␈αof␈αthe␈αinteger␈αis␈αnon-zero,␈αit␈αis␈αtaken␈αas␈αthe␈αascii
␈↓ α∧␈↓for␈α
a␈α
character␈αto␈α
dispatch␈α
upon.␈α
The␈αleft␈α
half␈α
may␈αhave␈α
two␈α
bits␈α
to␈αcontrol␈α
printing.␈α
If␈α
bit␈α17
␈↓ α∧␈↓in␈α∂the␈α∂integer␈α∞is␈α∂on,␈α∂message␈α∂printing␈α∞is␈α∂inhibited.␈α∂ If␈α∞bit␈α∂16␈α∂is␈α∂on,␈α∞then␈α∂the␈α∂location␈α∂printing␈α∞is
␈↓ α∧␈↓inhibited.␈α⊃For␈α⊃example,␈α⊃"X"+(1␈α⊃LSH␈α⊂18)␈α⊃will␈α⊃cause␈α⊃the␈α⊃location␈α⊂to␈α⊃be␈α⊃printed␈α⊃and␈α⊃the␈α⊂program
␈↓ α∧␈↓exited. "C"+(3 LSH 18) will cause the error handler to continue without printing anything.
␈↓ α∧␈↓Note␈α∞that␈α∞simple␈α∞ procedures␈α∞can␈α
not␈α∞do␈α∞ a␈α∞non-local␈α∞GOTO.␈α
However,␈α∞the␈α∞ effect␈α∞of␈α∞ a␈α
non-
␈↓ α∧␈↓local␈α∪ GOTO␈α∩ can␈α∪be␈α∩ achieved␈α∪in␈α∩ a␈α∪ user␈α∩error␈α∪procedure␈α∩by␈α∪loading␈α∩the␈α∪external␈α∩integer
␈↓ α∧␈↓_ERRJ_␈αwith␈αthe␈αLOCATION␈αof␈αa␈αlabel.␈αThe␈αlabel␈αshould␈αbe␈αa␈αon␈αa␈αcall␈αto␈αa␈αnon-simple␈αprocedure
␈↓ α∧␈↓which␈αdoes␈α
the␈αdesired␈α
GOTO.␈α The␈α
error␈αhandler␈αclears␈α
_ERRJ_␈αbefore␈α
calling␈αthe␈α
procedure␈αin
␈↓ α∧␈↓_ERRP_.␈α If␈α_ERRJ_␈α is␈αnon-zero␈αwhen␈α
the␈α user␈αprocedure␈αreturns,␈αand␈αcontinuing␈α
was␈αspecified,
␈↓ α∧␈↓then␈α
the␈α
error␈α
handler's␈α
exit␈α∞ consists␈α
of␈α
a␈α
simple␈α
transfer␈α∞to␈α
that␈α
location.␈α
Note␈α
that␈α∞for␈α
this
␈↓ α∧␈↓simple␈α
transfer␈α
to␈α
work␈α∞properly,␈α
the␈α
place␈α
where␈α
the␈α∞error␈α
occurred␈α
(or␈α
the␈α
call␈α∞to␈α
USERERR)
␈↓ α∧␈↓must␈αbe␈αin␈α
the␈αsame␈αstatic␈α(lexical)␈α
scope␈αas␈αthe␈α
label␈αwhose␈αLOCATION␈αis␈α
in␈α_ERRJ_.␈α If␈α
this␈αis
␈↓ α∧␈↓really important to you, see a SAIL hacker.
␈↓ α∧␈↓WARNING!␈α⊂Handling␈α⊂errors␈α⊂from␈α⊂strange␈α⊂places␈α⊂like␈α⊂the␈α⊂string␈α⊂garbage␈α⊂collector␈α⊂and␈α⊃the␈α⊂core
␈↓ α∧␈↓management routines will get you into deep trouble.
␈↓ α∧␈↓␈↓ π¬8␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ\INEXHAUSTIBLE STRING SPACE
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 5␈↓
␈↓ α∧␈↓␈↓ ∧L␈↓↓INEXHAUSTIBLE STRING SPACE␈↓
␈↓ α∧␈↓The␈αstring␈αgarbage␈αcollector␈αhas␈αbeen␈αmodified␈αto␈αexpand␈αstring␈αspace␈α(using␈αdiscontiguous␈αblocks)
␈↓ α∧␈↓whenever␈α
necessary␈α
to␈α
satisfy␈α
the␈α
demand␈α
for␈α∞places␈α
to␈α
put␈α
strings.␈α
To␈α
take␈α
advantage␈α∞ of␈α
this
␈↓ α∧␈↓feature, one need not change his programs.
␈↓ α∧␈↓Here are some points which might be of interest, however:
␈↓ α∧␈↓1)␈↓ αDAlthough␈α⊃ we␈α⊃ are␈α∩ going␈α⊃ to␈α⊃ provide␈α⊃ user␈α∩control␈α⊃over␈α⊃all␈α⊃size␈α∩parameters␈α⊃eventually,
␈↓ α∧␈↓␈↓ αDcurrently␈α∃only␈α∃ the␈α∃ initial␈α∃ string␈α∃ space␈α∃size␈α∃ is␈α∃ settable␈α∃ by␈α∃ the␈α∃ user,␈α⊗either␈α∃via
␈↓ α∧␈↓␈↓ αDREQUIRE␈α
or␈α
the␈α
ALLOC␈α
sequence,␈α
as␈α
before.␈α
The␈α
size␈α
of␈α
each␈α
string␈α
space␈α
increment␈αwill
␈↓ α∧␈↓␈↓ αDbe␈α
the␈α
same␈α
as␈α
the␈α
original␈α
size,␈α
which␈α
need␈α
not␈α
be␈α
monstrous␈α
any␈α
more␈α
unless␈α∞you␈α
know
␈↓ α∧␈↓␈↓ αDthat␈α∃all␈α∃runs␈α∃of␈α∃your␈α∃program␈α⊗will␈α∃ need␈α∃ a␈α∃monstrous␈α∃ string␈α∃ space␈α⊗ anyhow.␈α∃ The
␈↓ α∧␈↓␈↓ αDthreshold␈α
(see␈α∞below)␈α
for␈α
expanding␈α∞will␈α
be␈α
set␈α∞at␈α
1/8␈α
the␈α∞ string␈α
space␈α∞ size␈α
(increment
␈↓ α∧␈↓␈↓ αDsize).
␈↓ α∧␈↓2)␈↓ αDOne␈α∩can,␈α∩in␈α∩his␈α∩program,␈α∩modify␈α∩these␈α∩values␈α∩independently,␈α∩if␈α∩he␈α∩is␈α∩willing␈α∩to␈α∩use␈α∩the
␈↓ α∧␈↓␈↓ αDUSERCON function, and to follow this format:
␈↓ α∧␈↓β USER TABLE ENTRY NAME VALUE
␈↓ α∧␈↓β STINCR lh: number of chars. in increment
␈↓ α∧␈↓β rh: number of words in increment + 4
␈↓ α∧␈↓β STREQD lh: number of chars. in threshold
␈↓ α∧␈↓β rh: number of words in threshold.
␈↓ α∧␈↓3)␈↓ αDThe␈αthreshold.␈α After␈αgarbage␈αcollection,␈αlet␈αus␈αsay␈αthat␈αM-1␈αdiscontiguous␈αstring␈αspaces␈α are
␈↓ α∧␈↓␈↓ αDfull,␈α
and␈α the␈α
M'th␈α
has␈α n␈α
free␈α characters␈α
in␈α
it␈α(available␈α
for␈αnew␈α
strings).␈α
The␈α garbage
␈↓ α∧␈↓␈↓ αDcollector␈α was␈α called␈αbecause␈α some␈αroutine␈αwanted␈αto␈αcreate␈αa␈αstring␈αR␈αcharacters␈αlong,␈αand
␈↓ α∧␈↓␈↓ αDthere␈α
were␈α
not␈αthat␈α
many␈α
available␈α(free).␈α
After␈α
garbage␈αcollection,␈α
the␈α
new␈αalgorithm
␈↓ α∧␈↓␈↓ αDrequires␈α
that␈α
N␈α
be␈α
greater␈α
than␈α
R+LH(STREQD).␈α If␈α
it␈α
is␈α
not,␈α
expansion␈α
takes␈α
place␈α
(to␈αM+1
␈↓ α∧␈↓␈↓ αDspaces),␈α∞to␈α∞ satisfy␈α
this␈α∞requirement.␈α∞ In␈α∞other␈α
words,␈α∞if␈α∞STREQD␈α∞is␈α
1/8␈α∞the␈α∞size␈α∞of␈α
the
␈↓ α∧␈↓␈↓ αDcurrent␈α⊃space,␈α⊂that␈α⊃space␈α⊂will␈α⊃not␈α⊃be␈α⊂ allowed␈α⊃ to␈α⊂become␈α⊃ more␈α⊂ than␈α⊃ about␈α⊃ 7/8␈α⊂ full.
␈↓ α∧␈↓␈↓ αDThis␈αhelps␈αavoid␈α
frequent,␈αnearly␈αuseless␈α
calls␈αon␈αthe␈αgarbage␈α
collector␈αwhen␈α space␈α
is␈αabout
␈↓ α∧␈↓␈↓ αDgone. All but the current space are allowed to become as full as possible, however.
␈↓ α∧␈↓␈↓ π¬9␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ\INEXHAUSTIBLE STRING SPACE
␈↓ α∧␈↓4)␈↓ αDNew␈α∞statistics␈α∞are␈α∞maintained␈α∞by␈α∞the␈α∞ garbage␈α∞ collector.␈α∞ Soon␈α∞there␈α∞ will␈α∞ be␈α∂a␈α∞built-in
␈↓ α∧␈↓␈↓ αDroutine␈α∪you␈α∪can␈α∩use␈α∪to␈α∪print␈α∩them.␈α∪ For␈α∪now,␈α∩you␈α∪may␈α∪look␈α∩at␈α∪them␈α∪using␈α∩USERCON,
␈↓ α∧␈↓␈↓ αDalthough␈α
this␈α∞ document␈α
does␈α∞not␈α
say␈α∞ what␈α
they␈α
are.␈α∞ In␈α
order␈α∞to␈α
activate␈α∞timing␈α
of
␈↓ α∧␈↓␈↓ αDthe garbage collector (slows it down), set SGCTIME in the user table to -1.
␈↓ α∧␈↓5)␈↓ αDFuture␈α∂plans.␈α∂ The␈α∂ new␈α∂ structure␈α∂ not␈α∂only␈α∂allows␈α∂expansion␈α∂of␈α∂string␈α∂space,␈α∂it␈α∂also␈α∞will
␈↓ α∧␈↓␈↓ αDallow␈α
for␈α
partial␈α
garbage␈α
collections␈α (no␈α
visible␈α
benefits␈α
except␈α
increased␈α
speed,␈αsince
␈↓ α∧␈↓␈↓ αDa␈αpartial␈αcollection␈αwill␈αbe␈αalmost␈αas␈αeffective␈αas␈αa␈αcomplete␈αone,␈αand␈α much␈α faster),␈α and␈αthe
␈↓ α∧␈↓␈↓ αDability␈α∂ to␈α∂ move␈α∂ string␈α⊂ space␈α∂ blocks,␈α∂in␈α∂order␈α∂to␈α⊂compact␈α∂memory.␈α∂ Push␈α∂on␈α⊂your␈α∂local
␈↓ α∧␈↓␈↓ αDrepresentative to get these things done.
␈↓ α∧␈↓␈↓ ε}10␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 6␈↓
␈↓ α∧␈↓␈↓ ¬-␈↓↓RECORD STRUCTURES␈↓
␈↓ α∧␈↓6.1 - ␈↓↓INTRODUCTORY REMARKS␈↓
␈↓ α∧␈↓Record␈α⊂structures␈α⊂are␈α∂a␈α⊂fairly␈α⊂recent␈α⊂addition␈α∂to␈α⊂SAIL.␈α⊂ Essentially,␈α∂they␈α⊂provide␈α⊂ a␈α⊂means␈α∂by
␈↓ α∧␈↓which␈αa␈α
number␈αof␈α
closely␈αrelated␈α
variables␈αmay␈α
be␈αallocated␈α
and␈αmanipulated␈α
as␈αa␈α
unit,␈αwithout
␈↓ α∧␈↓the␈α⊂overhead␈α∂ or␈α⊂limitations␈α∂associated␈α⊂ with␈α⊂using␈α∂parallel␈α⊂ arrays␈α∂and␈α⊂without␈α⊂the␈α∂restriction
␈↓ α∧␈↓that␈αthe␈αvariables␈αall␈αbe␈αof␈αthe␈αsame␈αdata␈αtype.␈α In␈α the␈αcurrent␈αimplementation,␈αeach␈α record␈αis␈αan
␈↓ α∧␈↓instance␈α⊂of␈α⊂a␈α⊂user-defined␈α⊂"record␈α⊂class",␈α⊃which␈α⊂serves␈α⊂as␈α⊂ a␈α⊂template␈α⊂describing␈α⊃the␈α⊂ various
␈↓ α∧␈↓subfields␈α∞of␈α∞the␈α∞record.␈α∞ Internally,␈α∞records␈α∞are␈α∞small␈α∞blocks␈α∞of␈α∞storage␈α∞which␈α∞contain␈α∞space␈α
for
␈↓ α∧␈↓the␈αvarious␈α subfields␈αand␈α a␈αpointer␈α to␈αa␈α class␈αdescriptor␈αrecord.␈α Subfields␈α are␈αallocated␈α one
␈↓ α∧␈↓per␈α∪ word␈α∪and␈α∪ are␈α∩accessed␈α∪by␈α∪ constant␈α∪indexing␈α∩off␈α∪the␈α∪ record␈α∪pointer.␈α∪ Deallocation␈α∩is
␈↓ α∧␈↓performed␈αautomatically␈αby␈αa␈αgarbage␈αcollector␈αor␈αmanually␈αthrough␈αexplicit␈αcalls␈αto␈αa␈αdeallocation
␈↓ α∧␈↓procedure.
␈↓ α∧␈↓Records␈α
were␈α
originally␈α∞added␈α
to␈α
SAIL␈α
to␈α∞ fullfill␈α
a␈α
number␈α
of␈α∞ very␈α
specific␈α
needs␈α∞at␈α
Stanford,
␈↓ α∧␈↓and␈α were␈αsubsequently␈αgeneralized␈αto␈αthe␈αform␈α seen␈α here.␈α The␈αstructures␈α described␈α in␈α this
␈↓ α∧␈↓section␈α∃are␈α∀implemented␈α∃and,␈α∃so␈α∀far␈α∃as␈α∃is␈α∀known,␈α∃work␈α∃correctly.␈α∀ (They␈α∃have␈α∃been␈α∀used
␈↓ α∧␈↓successfully␈α
over␈α
the␈α∞ past␈α
3␈α
months␈α
by␈α∞several␈α
different␈α
people␈α
to␈α∞produce␈α
a␈α
number␈α∞of␈α
sizable
␈↓ α∧␈↓programs).␈α Readers␈αare␈αstrongly␈αurged␈αto␈αlook␈αat␈αthe␈α file␈αRECAUX.SAI[CSP,SYS],␈αwhich␈αcontains
␈↓ α∧␈↓a number of useful examples and auxilliary functions.
␈↓ α∧␈↓6.2 - ␈↓↓RECORD CLASS DECLARATIONS␈↓
␈↓ α∧␈↓ RECORD_CLASS <classid> (<subfield declarations>)
␈↓ α∧␈↓For instance,
␈↓ α∧␈↓ RECORD_CLASS VECTOR (REAL X,Y,Z);
␈↓ α∧␈↓ RECORD_CLASS CELL (RECORD_POINTER(ANY_CLASS) CAR,CDR);
␈↓ α∧␈↓ RECORD_CLASS TABLEAU (REAL ARRAY A,B,C;INTEGER N,M);
␈↓ α∧␈↓ RECORD_CLASS FOO(LIST L;ITEMVAR A);
␈↓ α∧␈↓␈↓ ε}11␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓Generally,␈α the␈α<subfield␈α declarations>␈α have␈α the␈α same␈αform␈α as␈α a␈αprocedure's␈α formal␈αparamter
␈↓ α∧␈↓list,␈αexcept␈αthat␈α the␈αwords␈α VALUE␈αand␈αREFERENCE␈αshould␈α not␈α be␈αused.␈α Each␈αrecord␈α class
␈↓ α∧␈↓declaration␈α∞is␈α
compiled␈α∞into␈α
a␈α∞"record␈α∞ descriptor"␈α
which␈α∞is␈α
a␈α∞record␈α
of␈α∞constant␈α∞record␈α
class
␈↓ α∧␈↓$CLASS and is used by the runtime system for allocation, deallocation, garbage collection, etc.
␈↓ α∧␈↓6.3 - ␈↓↓RECORD POINTER DECLARATIONS␈↓
␈↓ α∧␈↓ RECORD_POINTER(<classid list>) <id list>
␈↓ α∧␈↓ RECORD_POINTER(ANY_CLASS) <id list>
␈↓ α∧␈↓For instance,
␈↓ α∧␈↓ RECORD_POINTER(VECTOR) V1,V2;
␈↓ α∧␈↓ RECORD_POINTER(VECTOR,TABLEAU) T1,T2;
␈↓ α∧␈↓ RECORD_POINTER(ANY_CLASS) R;
␈↓ α∧␈↓At␈α⊂runtime,␈α⊂these␈α⊂variables␈α⊂either␈α⊃contain␈α⊂the␈α⊂value␈α⊂NULL_RECORD␈α⊂(internally,␈α⊂zero)␈α⊃or␈α⊂else
␈↓ α∧␈↓contains␈α⊃a␈α⊃pointer␈α⊃to␈α⊃a␈α⊃record.␈α⊃ The␈α⊃<classid␈α⊃list>␈α⊃is␈α⊃used␈α⊃to␈α⊃make␈α⊃a␈α⊃compile-time␈α⊃check␈α⊂on
␈↓ α∧␈↓assignments␈α∀and␈α∪subfield␈α∀references.␈α∀ The␈α∪pseudo-class␈α∀ANY_CLASS␈α∪matches␈α∀all␈α∀classes,␈α∪and
␈↓ α∧␈↓effectively disables this compile-time check. For instance:
␈↓ α∧␈↓ RECORD_POINTER(FOO,BAR) FB1,FB2;
␈↓ α∧␈↓ RECORD_POINTER(FOO) FB3;
␈↓ α∧␈↓ RECORD_POINTER(CELL) C;
␈↓ α∧␈↓ RECORD_POINTER(ANY_CLASS) RP;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ COMMENT the following are all ok syntactically;
␈↓ α∧␈↓ C←NEW_RECORD(CELL);
␈↓ α∧␈↓ RP←C;
␈↓ α∧␈↓ FB2←NEW_RECORD(FOO);
␈↓ α∧␈↓ FB1←FB3;
␈↓ α∧␈↓ FB3←RP; COMMENT Note that this is most likely a runtime bug
␈↓ α∧␈↓ Since RP will contain a cell record. SAIL
␈↓ α∧␈↓ won't catch it, however;
␈↓ α∧␈↓ CELL:CAR[RP]←FB1;
␈↓ α∧␈↓ CELL:CAR[RP]←FB1;
␈↓ α∧␈↓ COMMENT The compiler will complain about these: ;
␈↓ α∧␈↓ FB1←C;
␈↓ α∧␈↓ FB3←NEW_RECORD(CELL);
␈↓ α∧␈↓␈↓ ε}12␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓ RP←CELL:CAR[FB3];
␈↓ α∧␈↓NO␈α
runtime␈αclass␈α
information␈αis␈α
kept␈αwith␈α
the␈α
variable,␈αand␈α
no␈αruntime␈α
class␈αchecks␈α
are␈α
made␈αon
␈↓ α∧␈↓record␈αassignment␈αor␈αsubfield␈αaccess.␈α Record␈αpointer␈αvariables␈αare␈αallocated␈αquantities,␈αand␈αshould
␈↓ α∧␈↓not␈αappear␈αinside␈αSIMPLE␈αprocedures.␈α They␈αresemble␈αlists␈αin␈αthat␈αthey␈αare␈αnot␈αgiven␈αany␈αspecial
␈↓ α∧␈↓value␈α⊂upon␈α⊂block␈α⊃entry␈α⊂and␈α⊂they␈α⊃are␈α⊂set␈α⊂to␈α⊃a␈α⊂null␈α⊂value␈α⊃(NULL_RECORD)␈α⊂when␈α⊂the␈α⊃block␈α⊂in
␈↓ α∧␈↓which␈αthey␈αare␈αdeclared␈αis␈αexited.␈α (This␈αis␈αso␈αthat␈αany␈αrecords␈αreferred␈αto␈αonly␈αin␈αthat␈αblock␈αcan
␈↓ α∧␈↓be reclaimed by the garbage collector.)
␈↓ α∧␈↓6.4 - ␈↓↓ALLOCATION␈↓
␈↓ α∧␈↓Records are allocated by means of the construct
␈↓ α∧␈↓ NEW_RECORD(<classid>)
␈↓ α∧␈↓which␈αreturns␈αa␈αnew␈αrecord␈αof␈αthe␈αspecified␈αclass.␈α All␈αsubfields␈αof␈αthe␈αnew␈αrecord␈αare␈αset␈αto␈αthe
␈↓ α∧␈↓"null"␈α
or␈α∞"zero"␈α
value␈α∞for␈α
that␈α∞subfield␈α
--␈α∞i.e.,␈α
real␈α
&␈α∞integer␈α
subfields␈α∞will␈α
be␈α∞set␈α
to␈α∞0,␈α
itemvar
␈↓ α∧␈↓subfields␈α∞will␈α∞be␈α∞set␈α∞to␈α∞ANY,␈α∂lists␈α∞will␈α∞be␈α∞set␈α∞to␈α∞PHI,␈α∂etc.␈α∞ Again,␈α∞note␈α∞that␈α∞entry␈α∞into␈α∂a␈α∞block
␈↓ α∧␈↓with␈αlocal␈αrecord␈αpointer␈αvariables␈αdoes␈αNOT␈αcause␈αrecords␈αto␈αbe␈αallocated␈αand␈αassigned␈αto␈αthose
␈↓ α∧␈↓variables.
␈↓ α∧␈↓6.5 - ␈↓↓SUBFIELDS␈↓
␈↓ α∧␈↓Record subfields are referenced by means of the construct
␈↓ α∧␈↓ <classid>:<fieldid>[<record pointer expression>]
␈↓ α∧␈↓and may be used wherever an array element may be used. For example
␈↓ α∧␈↓ RECORD_POINTER(VECTOR) V;
␈↓ α∧␈↓ RECORD_POINTER(CELL) C;
␈↓ α∧␈↓ RECORD_POINTER(FOO) F;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ VECTOR:X[V]←VECTOR:Y[V];
␈↓ α∧␈↓ CELL:CAR[C←NEW_RECORD(CELL)]←V;
␈↓ α∧␈↓␈↓ ε}13␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓ VECTOR:Z[V]←VECTOR:X[CELL:CAR[C]];
␈↓ α∧␈↓ SUBLIS ← FOO:L[F][1 TO 3];
␈↓ α∧␈↓ :
␈↓ α∧␈↓If␈α⊂the␈α⊂<record␈α⊂pointer␈α⊂expression>␈α⊂gives␈α⊂a␈α⊃null␈α⊂record,␈α⊂then␈α⊂a␈α⊂runtime␈α⊂error␈α⊂message␈α⊃will␈α⊂be
␈↓ α∧␈↓generated.␈α∞ This␈α∞is␈α∂the␈α∞only␈α∞runtime␈α∞check␈α∂that␈α∞is␈α∞made␈α∞at␈α∂present.␈α∞ I.e.,␈α∞no␈α∞runtime␈α∂checks␈α∞are
␈↓ α∧␈↓made␈α⊃to␈α⊃verify␈α⊃that␈α⊃the␈α⊃<classid>␈α⊃in␈α⊃the␈α⊃subfield␈α⊃statement␈α⊃matches␈α⊃the␈α⊃class␈α⊃of␈α⊃the␈α⊃record
␈↓ α∧␈↓whose subfield is being extracted.
␈↓ α∧␈↓An array subfield may be used as an array name, as in
␈↓ α∧␈↓ RECORD_POINTER(TABLEAU) T;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ TABLEAU:A[T][I,J] ← 2.5;
␈↓ α∧␈↓provided␈α⊂that␈α⊂you␈α⊂have␈α⊂stored␈α⊂a␈α∂valid␈α⊂array␈α⊂descriptor␈α⊂into␈α⊂the␈α⊂subfield.␈α⊂ Unfortunately,␈α∂SAIL
␈↓ α∧␈↓does not provide any clean way to do this. One unclean way is
␈↓ α∧␈↓ INTEGER PROCEDURE NEWARY(INTEGER LB,UB);
␈↓ α∧␈↓ BEGIN
␈↓ α∧␈↓ INTEGER ARRAY A[LB:UB];
␈↓ α∧␈↓ INTEGER AA;
␈↓ α∧␈↓ AA←MEMORY[LOCATION(A)];
␈↓ α∧␈↓ MEMORY[LOCATION(A)]←0;
␈↓ α∧␈↓ COMMENT defeats deallocation;
␈↓ α∧␈↓ RETURN(AA);
␈↓ α∧␈↓ END;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ RECORD_CLASS FUBAR(INTEGER ARRAY A);
␈↓ α∧␈↓ RECORD_POINTER(FUBAR) FB;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ MEMORY[LOCATION(FUBAR:A[FB])]←NEWARY(1,100);
␈↓ α∧␈↓(Warning:␈αthe␈αabove␈α"advice"␈αis␈αprimarily␈αintended␈αfor␈αhackers;␈αwe␈αmake␈αno␈αpromisses␈αthat␈αit␈αwill
␈↓ α∧␈↓never␈α∞get␈α∞you␈α∞into␈α∞trouble,␈α
although␈α∞this␈α∞particular␈α∞trick␈α∞is␈α
unlikely␈α∞to␈α∞be␈α∞made␈α∞obsolete␈α∞in␈α
the
␈↓ α∧␈↓forseeable future).
␈↓ α∧␈↓␈↓ ε}14␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓6.6 - ␈↓↓GARBAGE COLLECTION␈↓
␈↓ α∧␈↓The␈αSAIL␈αrecord␈αservice␈αroutines␈αallocate␈αrecords␈αas␈α"small␈αblocks"␈αfrom␈αlarger␈α"buffers"␈αof␈αfree
␈↓ α∧␈↓storage␈αobtained␈αfrom␈αthe␈αnormal␈αSAIL␈αfree␈αstorage␈αsystem.␈α(The␈αformat␈αof␈αthese␈αrecords␈αwill␈αbe
␈↓ α∧␈↓discussed␈α⊂in␈α⊃a␈α⊂later␈α⊂section).␈α⊃ From␈α⊂time␈α⊃to␈α⊂time,␈α⊂a␈α⊃garbage␈α⊂collector␈α⊂is␈α⊃called␈α⊂to␈α⊃reclaim␈α⊂the
␈↓ α∧␈↓storage␈αfor␈αrecords␈αwhich␈αare␈αno␈αlonger␈αaccessible␈αby␈αthe␈αuser's␈αprogram␈α(i.e.,␈αare␈αnot␈α
pointed␈αto
␈↓ α∧␈↓by␈αany␈αvariables,␈αaren't␈αpointed␈αto␈αby␈αany␈αaccessible␈αrecords,␈αetc.).␈α The␈αgarbage␈αcollector␈αmay␈αbe
␈↓ α∧␈↓called␈α
explicitly␈α
from␈α
SAIL␈α
programs␈α
as␈α
external␈α
procedure␈α
$RECGC,␈α
and␈α
automatic␈α∞invocation␈α
of
␈↓ α∧␈↓the␈α∂garbage␈α∂collection␈α∞may␈α∂be␈α∂inhibited␈α∂by␈α∞setting␈α∂user␈α∂table␈α∂entry␈α∞RGCOFF␈α∂to␈α∂TRUE.␈α∂(In␈α∞this
␈↓ α∧␈↓case,␈αSAIL␈αwill␈αjust␈αkeep␈αallocating␈αmore␈αspace,␈αwith␈αnothing␈αbeing␈αreclaimed␈αuntil␈αRGCOFF␈αis␈αset
␈↓ α∧␈↓back␈α
to␈α∞FALSE␈α
or␈α
$RECGC␈α∞is␈α
called␈α
explicitly).␈α∞ In␈α
addition,␈α
SAIL␈α∞provides␈α
a␈α
number␈α∞of␈α
"hooks"
␈↓ α∧␈↓that␈α∪allow␈α∪a␈α∪user␈α∪to␈α∪control␈α∀the␈α∪automatic␈α∪invocation␈α∪of␈α∪the␈α∪garbage␈α∪collector.␈α∀ These␈α∪are
␈↓ α∧␈↓discussed in a subsequent section.
␈↓ α∧␈↓6.7 - ␈↓↓INTERNAL REPRESENTATIONS ␈↓
␈↓ α∧␈↓Each record has the following form:
␈↓ α∧␈↓ -1: <pointers to ring of all records of class>
␈↓ α∧␈↓ 0: <garbage collector pointer>,,<pntr to class descriptor>
␈↓ α∧␈↓ +1: <first subfield>
␈↓ α∧␈↓ :
␈↓ α∧␈↓ +n: <last subfield>
␈↓ α∧␈↓Record pointer variables point at word 0 of such records.
␈↓ α∧␈↓The␈αpredefined␈αrecord␈αclass␈α$CLASS␈αis␈αused␈αto␈αdefine␈αall␈αrecord␈αclasses,␈αand␈αis␈αitself␈αa␈α
record␈αof
␈↓ α∧␈↓class $CLASS.
␈↓ α∧␈↓ RECORD_CLASS $CLASS (INTEGER RECRNG,HNDLER,RECSIZ;
␈↓ α∧␈↓ INTEGER ARRAY TYPARR;
␈↓ α∧␈↓ STRING ARRAY TXTARR);
␈↓ α∧␈↓where
␈↓ α∧␈↓RECRNG is a ring (bidirectional linked list) of all records of the particular class,
␈↓ α∧␈↓HNDLER is a pointer to the handler procedure for the class (default $REC$)
␈↓ α∧␈↓RECSIZ is the number of subfields in the class,
␈↓ α∧␈↓␈↓ ε}15␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓TYPARR is an array of subfield descriptors for each subfield of the class.
␈↓ α∧␈↓TXTARR is an array of subfield names for the class.
␈↓ α∧␈↓The␈α∞normal␈α∂ value␈α∞for␈α∞the␈α∂ handler␈α∞procedure␈α∞is␈α∂ $REC$,␈α∞which␈α∞ is␈α∂the␈α∞standard␈α∂procedure␈α∞ for
␈↓ α∧␈↓such functions as allocation, deallocation, etc.
␈↓ α∧␈↓TYPARR␈α∩and␈α⊃TXTARR␈α∩are␈α⊃indexed␈α∩[0:RECSIZ].␈α⊃ TXTARR[0]␈α∩is␈α⊃the␈α∩name␈α⊃of␈α∩the␈α∩record␈α⊃class.
␈↓ α∧␈↓TYPARR[0] contains type bits for the record class.
␈↓ α∧␈↓Example:
␈↓ α∧␈↓ RECORD_CLASS FOO(LIST L;ITEMVAR A);
␈↓ α∧␈↓The record class descriptor for FOO would contain:
␈↓ α∧␈↓ FOO-1: <pointers for ring of all records of $CLASS>
␈↓ α∧␈↓ FOO: <pointer to $CLASS>
␈↓ α∧␈↓ FOO+1: <pointers for ring of all records of class FOO
␈↓ α∧␈↓ initialized to <FOO+2,,FOO+2> >.
␈↓ α∧␈↓ FOO+2: <pointer to handler procedure: $REC$>
␈↓ α∧␈↓ FOO+3: 2
␈↓ α∧␈↓ FOO+4 <pointer to TYPARR>
␈↓ α∧␈↓ FOO+5: <pointer to TXTARR>
␈↓ α∧␈↓The subfields of FOO will be:
␈↓ α∧␈↓ $CLASS:FOO[RECRNG] = <initialized to null ring,
␈↓ α∧␈↓ i.e., xwd(loc(FOO)+2,loc(FOO)+22)>
␈↓ α∧␈↓ $CLASS:FOO[HNDLER] = $REC$
␈↓ α∧␈↓ $CLASS:FOO[RECSIZ] = 2
␈↓ α∧␈↓ $CLASS:FOO[TXTARR] [0] = "FOO"
␈↓ α∧␈↓ $CLASS:FOO[TXYARR] [1] = "L"
␈↓ α∧␈↓ $CLASS:FOO[TXTARR] [2] = "A"
␈↓ α∧␈↓ $CLASS:FOO[TYPARR] [0] = <magic bits for garbage collector>
␈↓ α∧␈↓ $CLASS:FOO[TYPARR] [1] = <descriptor for LIST>
␈↓ α∧␈↓ $CLASS:FOO[TYPARR] [2] = <descriptor for ITEMVAR>
␈↓ α∧␈↓␈↓ ε}16␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓6.8 - ␈↓↓HANDLER PROCEDURES␈↓
␈↓ α∧␈↓The␈α
normal␈α
value␈α∞for␈α
the␈α
handler␈α
procedure␈α∞is␈α
$REC$,␈α
which␈α
is␈α∞the␈α
standard␈α
procedure␈α∞for␈α
such
␈↓ α∧␈↓functions␈α∂as␈α∞allocation,␈α∂deallocation,␈α∂etc.␈α∞It␈α∂is␈α∞possible␈α∂for␈α∂a␈α∞user␈α∂to␈α∞substitute␈α∂his␈α∂own␈α∞handler
␈↓ α∧␈↓procedure␈α∂for␈α∂a␈α∂given␈α⊂class␈α∂of␈α∂records␈α∂by␈α∂including␈α⊂the␈α∂procedure␈α∂name␈α∂ in␈α∂brackets␈α⊂after␈α∂the
␈↓ α∧␈↓record class declaration:
␈↓ α∧␈↓ RECORD_CLASS <id> (<subfields>) [<handler>]
␈↓ α∧␈↓This handler must have the form
␈↓ α∧␈↓ RECORD_POINTER(ANY_CLASS) PROCEDURE <procid>
␈↓ α∧␈↓ (INTEGER OP;RECORD_POINTER(ANY_CLASS) R);
␈↓ α∧␈↓Where␈αOP␈α will␈αbe␈αa␈α small␈αinteger␈α saying␈αwhat␈αis␈α to␈αbe␈α done.␈α The␈αcurrent␈αassignments␈αfor␈αOP
␈↓ α∧␈↓are:
␈↓ α∧␈↓ OP value meaning
␈↓ α∧␈↓ 0 invalid
␈↓ α∧␈↓ 1 allocate a new record of record class R
␈↓ α∧␈↓ 2 not used
␈↓ α∧␈↓ 3 not used
␈↓ α∧␈↓ 4 Mark all subfields of record R
␈↓ α∧␈↓ 5 Delete all space for record R
␈↓ α∧␈↓$REC$(1,R)␈αallocates␈αa␈αrecord␈αof␈αthe␈αrecord␈αclass␈αspecified␈αby␈αR.␈α All␈αsubfields␈α(except␈αstring)␈αare
␈↓ α∧␈↓initialized␈α
to␈α
zero.␈α
String␈α
subfields␈α
are␈α
initialized␈α
to␈α
a␈α
pointer␈α
to␈α
a␈α
string␈α
descriptor␈α
with␈αlength
␈↓ α∧␈↓zero (null string).
␈↓ α∧␈↓$REC$(4,R) is used for marking by the garbage collector and it not generally useful to the user.
␈↓ α∧␈↓$REC$(5,R)␈α
deallocates␈αrecord␈α
R,␈αand␈α
deallocates␈α
all␈αstring␈α
and␈αarray␈α
subfields␈αof␈α
record␈α
R.␈α Care
␈↓ α∧␈↓must␈α∞be␈α∞exercised␈α
to␈α∞prevent␈α∞multiple␈α
pointers␈α∞to␈α∞string␈α
and␈α∞array␈α∞subfields,␈α
ie.␈α∞DO␈α∞NOT␈α
store
␈↓ α∧␈↓the␈α
location␈α
of␈αan␈α
array␈α
in␈αsubfields␈α
of␈α
two␈αdifferent␈α
records␈α
unless␈αextreme␈α
caution␈α
is␈α
taken␈αto
␈↓ α∧␈↓handle␈α⊃deletion.␈α⊃ This␈α⊃can␈α⊃be␈α∩accomplished␈α⊃through␈α⊃user␈α⊃handler␈α⊃procedures␈α⊃which␈α∩zero␈α⊃array
␈↓ α∧␈↓subfields (without actually deleting the arrays) prior to the call on $REC$(5,R).
␈↓ α∧␈↓␈↓ ε}17␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓6.9 - ␈↓↓STRING SUBFIELDS␈↓
␈↓ α∧␈↓String␈α⊃subfields␈α∩presented␈α⊃an␈α∩implementation␈α⊃difficulty␈α⊃due␈α∩to␈α⊃the␈α∩fact␈α⊃that␈α∩string␈α⊃discriptors
␈↓ α∧␈↓require␈α
2␈αwords,␈α
but␈α
record␈αsubfields␈α
are␈αexactly␈α
one␈α
word.␈α This␈α
problem␈αwas␈α
solved␈α
by␈αmaking
␈↓ α∧␈↓string␈α⊃subfields␈α⊃contain␈α∩a␈α⊃pointer␈α⊃to␈α∩the␈α⊃descriptor␈α⊃for␈α∩the␈α⊃string␈α⊃(like␈α∩REFERENCE␈α⊃STRING
␈↓ α∧␈↓formal parameters).
␈↓ α∧␈↓When␈αa␈αrecord␈αwith␈αstring␈αsubfields␈αis␈αallocated␈αby␈αa␈αcall␈αto␈αNEW_RECORD,␈αthe␈αstring␈αdescriptor
␈↓ α∧␈↓blocks␈α(2␈α
words␈αeach)␈α
are␈αallocated␈α
from␈αa␈α
linked␈αlist␈α
of␈αfree␈α
string␈αdescriptors.␈α
Likewise,␈αwhen
␈↓ α∧␈↓a␈α↔record␈α↔is␈α↔deallocated␈α↔either␈α↔explicitly␈α⊗or␈α↔by␈α↔the␈α↔garbage␈α↔collector,␈α↔the␈α↔string␈α⊗subfield
␈↓ α∧␈↓descriptors are released to the free list. The free list is automatically expanded when exhausted.
␈↓ α∧␈↓6.10 - ␈↓↓MORE ABOUT GARBAGE COLLECTION␈↓
␈↓ α∧␈↓The␈α⊂information␈α∂used␈α⊂by␈α⊂the␈α∂system␈α⊂to␈α⊂decide␈α∂when␈α⊂to␈α∂call␈α⊂$RECGC␈α⊂on␈α∂its␈α⊂own␈α⊂is␈α∂accessible
␈↓ α∧␈↓through␈α∩global␈α∩array,␈α∩$SPCAR.␈α⊃ In␈α∩general,␈α∩$SPCAR[n]␈α∩points␈α⊃at␈α∩a␈α∩"descriptor␈α∩block"␈α∩used␈α⊃to
␈↓ α∧␈↓control the allocation of small blocks of n words. This descriptor includes the following fields:
␈↓ α∧␈↓ BLKSIZ -- number of words per block in this "space"
␈↓ α∧␈↓ TRIGGER -- a counter used to control when to garbage collect
␈↓ α∧␈↓ TGRMIN -- described below.
␈↓ α∧␈↓ TUNUSED -- number of unused blocks on the "free list"
␈↓ α∧␈↓ TINUSE -- total number of blocks "in use" for this space.
␈↓ α∧␈↓ CULPRIT -- the number of times this space has caused collection.
␈↓ α∧␈↓The␈α⊃appropriate␈α⊃macro␈α⊃definitions␈α⊃for␈α⊃access␈α⊃of␈α⊃these␈α⊃fields␈α⊃may␈α⊃be␈α⊃found␈α⊃in␈α⊃the␈α⊃source␈α⊂file
␈↓ α∧␈↓"SYS:RECORD.DEF".␈α As␈αone␈αmight␈α
expect,␈αthe␈αdecision␈αto␈α
invoke␈αthe␈αgarbage␈αcollector␈α
is␈α made
␈↓ α∧␈↓as part of the block allocation procedure, which works (roughly) as follows:
␈↓ α∧␈↓ INTEGER spc,size;
␈↓ α∧␈↓ size ← $CLASS:RECSIZ[classid]+2;
␈↓ α∧␈↓ IF size>16 THEN
␈↓ α∧␈↓ return a CORGET block;
␈↓ α∧␈↓ spc ← $SPCAR[size];
␈↓ α∧␈↓ L1: IF (MEMORY[spc+TRIGGER]←MEMORY[spc+TRIGGER]-1) < 0 THEN
␈↓ α∧␈↓ BEGIN
␈↓ α∧␈↓ IF ¬MEMORY[GOGTAB+RGCOFF] THEN
␈↓ α∧␈↓ BEGIN
␈↓ α∧␈↓ MEMORY[spc+CULPRIT]←MEMORY[spc+CULPRIT]+1;
␈↓ α∧␈↓ $RECGC;
␈↓ α∧␈↓ GO TO L1;
␈↓ α∧␈↓␈↓ ε}18␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ WRECORD STRUCTURES
␈↓ α∧␈↓ END;
␈↓ α∧␈↓ END;
␈↓ α∧␈↓ <allocate the block from space spc, update counters, etc.>
␈↓ α∧␈↓Once␈α
$RECGC␈α
has␈α
returned␈α
all␈α
unused␈α
records␈α
to␈α
the␈α
free␈α
lists␈α
associated␈α
with␈α
their␈αrespective
␈↓ α∧␈↓block␈α
sizes,␈α
it␈α
must␈α∞adjust␈α
the␈α
trigger␈α
levels␈α∞in␈α
the␈α
various␈α
spaces.␈α
To␈α∞do␈α
this,␈α
it␈α
first␈α∞looks␈α
to
␈↓ α∧␈↓see␈α
if␈α
the␈α
user␈α
has␈α
specified␈α
the␈α∞location␈α
of␈α
an␈α
adjustment␈α
procedure␈α
in␈α
TGRADJ(USER).␈α∞ If␈α
this
␈↓ α∧␈↓cell␈αis␈αnon-zero,␈αthen␈α$RECGC␈αcalls␈αthat␈αprocedure␈α(which␈αmust␈αhave␈αno␈αparameters).␈α Otherwise,
␈↓ α∧␈↓it calls a default system procedure that works roughly like this:
␈↓ α∧␈↓ <set all TRIGGER levels to -1>
␈↓ α∧␈↓ FOR size ← 3 STEP 1 UNTIL 16 DO
␈↓ α∧␈↓ BEGIN
␈↓ α∧␈↓ spc ← $SPCAR[size];
␈↓ α∧␈↓ IF MEMORY[spc+TRIGGER]<0 THEN
␈↓ α∧␈↓ BEGIN
␈↓ α∧␈↓ t←MEMORY[spc+TINUSE]*RGCRHO(USER);
␈↓ α∧␈↓ t←MAX(t,MEMORY[spc+TUNUSED],
␈↓ α∧␈↓ MEMORY[spc+TGRMIN]);
␈↓ α∧␈↓ END;
␈↓ α∧␈↓ END;
␈↓ α∧␈↓RGCRHO(USER)␈α⊂is␈α⊂a␈α⊂real␈α⊂number␈α⊂currently␈α⊃initialized␈α⊂by␈α⊂the␈α⊂system␈α⊂to␈α⊂0.33.␈α⊂ Thus,␈α⊃users␈α⊂can
␈↓ α∧␈↓modify the behavior or SAIL's automatic garbage collection by some combination of:
␈↓ α∧␈↓ (1) Setting RGCOFF(USER).
␈↓ α∧␈↓ (2) Supplying their own procedure in TGRADJ(USER).
␈↓ α∧␈↓ (3) Modifying RGCRHO(USER).
␈↓ α∧␈↓ (4) Modifying the TGRMIN entries in the space descriptors.
␈↓ α∧␈↓One␈α⊂word␈α⊂of␈α⊂caution:␈α⊂User␈α⊃procedures␈α⊂that␈α⊂set␈α⊂trigger␈α⊂levels␈α⊃must␈α⊂be␈α⊂sure␈α⊂not␈α⊂to␈α⊃leave␈α⊂the
␈↓ α∧␈↓trigger␈α∂level␈α∂of␈α∂the␈α∂space␈α⊂that␈α∂caused␈α∂collection␈α∂to␈α∂be␈α∂set␈α⊂to␈α∂zero.␈α∂ This␈α∂will␈α∂cause␈α⊂a␈α∂runtime
␈↓ α∧␈↓error message to be generated.
␈↓ α∧␈↓␈↓ ε}19␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓
≤SAVE/CONTINUE
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 7␈↓
␈↓ α∧␈↓␈↓ ¬e␈↓↓SAVE/CONTINUE␈↓
␈↓ α∧␈↓A␈α∪save/continue␈α∪facility␈α∪has␈α∪been␈α∪implemented␈α∪in␈α∪the␈α∪SAIL␈α∪compiler.␈α∪ This␈α∪allows␈α∪compiling
␈↓ α∧␈↓header␈α⊃files,␈α⊃saving␈α⊃the␈α⊃state␈α⊃of␈α⊃the␈α⊂compiler,␈α⊃and␈α⊃resuming␈α⊃compilation␈α⊃at␈α⊃a␈α⊃later␈α⊃time.␈α⊂ The
␈↓ α∧␈↓save/continue␈α∞facility␈α∞works␈α
with␈α∞files␈α∞as␈α∞the␈α
basic␈α∞unit;␈α∞compilation␈α
can␈α∞be␈α∞interrupted␈α∞only␈α
at
␈↓ α∧␈↓the end of a file. The /X (eXtend) switch controls the new feature.
␈↓ α∧␈↓Example:
␈↓ α∧␈↓.R SAIL
␈↓ α∧␈↓*INTRMD.REL[PRJ,PRG]←A,B,C/X
␈↓ α∧␈↓ A.SAI 1 etc.
␈↓ α∧␈↓SAVE ME FOR USE AS XSAIL.
␈↓ α∧␈↓EXIT
␈↓ α∧␈↓.SAVE XSAIL
␈↓ α∧␈↓JOB SAVED IN 25K
␈↓ α∧␈↓UPPER NOT SAVED!
␈↓ α∧␈↓.RU XSAIL
␈↓ α∧␈↓*FINAL←D,E,F
␈↓ α∧␈↓ D.SAI
␈↓ α∧␈↓Copying DSK:INTRMD.REL[PRJ,PRG]
␈↓ α∧␈↓ 2 3 etc.
␈↓ α∧␈↓*↑C
␈↓ α∧␈↓The above is equivalent to
␈↓ α∧␈↓.R SAIL
␈↓ α∧␈↓*FINAL←A,B,C,D,E,F
␈↓ α∧␈↓Information␈αis␈αsaved␈αin␈αXSAIL.SAV␈αand␈αin␈αthe␈αbinary␈αfile␈αfrom␈αthe␈αfirst␈α"compilation"␈α(in␈αthis␈αcase
␈↓ α∧␈↓INTRMD.REL).␈α⊂ When␈α⊂compilation␈α⊂is␈α⊂resumed,␈α⊂the␈α⊃final␈α⊂binary␈α⊂file␈α⊂is␈α⊂initialized␈α⊂by␈α⊃copying␈α⊂the
␈↓ α∧␈↓intermediate file.
␈↓ α∧␈↓Save/continue␈α
is␈αnot␈α
allowed␈α
if␈αthe␈α
file␈αbreak␈α
occurs␈α
while␈αscanning␈α
false␈α
conditional␈αcompilation
␈↓ α∧␈↓or actual parameters to a macro call.
␈↓ α∧␈↓␈↓ ε}20␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓
≤SAVE/CONTINUE
␈↓ α∧␈↓A␈αhint␈αon␈αusing␈αthis␈αfeature:␈α If␈αthe␈αsource␈αterm␈αof␈αyour␈αcommand␈αstring␈αconsists␈αof␈αjust␈αone␈αfile,
␈↓ α∧␈↓and this one file does REQUIREs of other source files, the following setup works well.
␈↓ α∧␈↓Original file FOO.SAI:
␈↓ α∧␈↓ BEGIN "FOO"
␈↓ α∧␈↓ REQUIRE "[][]" DELIMITERS;
␈↓ α∧␈↓ DEFINE !=[COMMENT];
␈↓ α∧␈↓ REQUIRE "BAZ.SAI" SOURCE_FILE;
␈↓ α∧␈↓ REQUIRE "MUMBLE.SAI" SOURCE_FILE;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ <rest of file>
␈↓ α∧␈↓ :
␈↓ α∧␈↓ END "FOO"
␈↓ α∧␈↓New file FOO.SAI:
␈↓ α∧␈↓ IFCR NOT DECLARATION(GARPLY) THENC
␈↓ α∧␈↓ BEGIN "FOO"
␈↓ α∧␈↓ REQUIRE "[][]" DELIMITERS;
␈↓ α∧␈↓ DEFINE GARPLY=TRUE;
␈↓ α∧␈↓ DEFINE !=[COMMENT];
␈↓ α∧␈↓ REQUIRE "BAZ.SAI" SOURCE_FILE;
␈↓ α∧␈↓ REQUIRE "MUMBLE.SAI" SOURCE_FILE;
␈↓ α∧␈↓ ENDC;
␈↓ α∧␈↓ :
␈↓ α∧␈↓ <rest of file>
␈↓ α∧␈↓ :
␈↓ α∧␈↓ END "FOO"
␈↓ α∧␈↓New file FOO.HDR:
␈↓ α∧␈↓ IFCR NOT DECLARATION(GARPLY) THENC
␈↓ α∧␈↓ BEGIN "FOO"
␈↓ α∧␈↓ REQUIRE "[][]" DELIMITERS;
␈↓ α∧␈↓ DEFINE GARPLY=TRUE;
␈↓ α∧␈↓ DEFINE !=[COMMENT];
␈↓ α∧␈↓ REQUIRE "BAZ.SAI" SOURCE_FILE;
␈↓ α∧␈↓ REQUIRE "MUMBLE.SAI" SOURCE_FILE;
␈↓ α∧␈↓ ENDC;
␈↓ α∧␈↓Initial compilation:
␈↓ α∧␈↓ .R SAIL
␈↓ α∧␈↓ *FOO.INT[PRJ,PRG]←FOO.HDR/X
␈↓ α∧␈↓ SAVE ME!
␈↓ α∧␈↓␈↓ ε}21␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓
≤SAVE/CONTINUE
␈↓ α∧␈↓ .SAV XSAIL
␈↓ α∧␈↓Now the command string
␈↓ α∧␈↓ FOO←FOO
␈↓ α∧␈↓will work both in the case of .R SAIL and in the case .RU XSAIL.
␈↓ α∧␈↓␈↓ ε}22␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 8␈↓
␈↓ α∧␈↓␈↓ ∧<␈↓↓MISCELLANEOUS NEW FEATURES␈↓
␈↓ α∧␈↓8.1 - ␈↓↓NEW MTAPE OPTIONS␈↓
␈↓ α∧␈↓ MTAPE(chan,NULL)
␈↓ α∧␈↓will␈αcause␈αan␈αMTAPE␈α0␈αto␈αbe␈αissued␈αfor␈αchannel␈αchan.␈α For␈αmag.␈αtapes,␈αthis␈αwill␈αcause␈αyou␈αto␈αwait
␈↓ α∧␈↓until␈α∞all␈α∞activity␈α
ceases.␈α∞ For␈α∞other␈α∞devices,␈α
various␈α∞random␈α∞things␈α
can␈α∞happen,␈α∞depending␈α∞on␈α
the
␈↓ α∧␈↓device and system.
␈↓ α∧␈↓In␈α∂export␈α⊂SAIL,␈α∂MTAPE(chnl,"I")␈α∂sets␈α⊂the␈α∂'IBM␈α∂compatible'␈α⊂mode␈α∂for␈α∂a␈α⊂tape␈α∂drive.␈α∂ (It␈α⊂does␈α∂an
␈↓ α∧␈↓MTAPE chnl,101.)
␈↓ α∧␈↓These␈αfeatures␈αdo␈αnot␈αwork␈αin␈αTENEX␈αSAIL.␈α Full␈αaccess␈αto␈αTENEX␈αmagtapes␈αis␈αobtained␈αthrough
␈↓ α∧␈↓the MTOPR, GDSTS and SDSTS routines, which are TENEX-only runtimes.
␈↓ α∧␈↓8.2 - ␈↓↓INITIALIZATION PHASES␈↓
␈↓ α∧␈↓User␈α
initializations␈α
are␈α
now␈αdone␈α
in␈α
successive␈α
phases,␈αwith␈α
all␈α
initializations␈α
required␈α for
␈↓ α∧␈↓one phase being done before initializations required for the next phase.
␈↓ α∧␈↓Syntax:
␈↓ α∧␈↓ REQUIRE <procid> INITIALIZATION;
␈↓ α∧␈↓ REQUIRE <procid> INITIALIZATION [<phase no>];
␈↓ α∧␈↓where <phase no> is an integer constant.
␈↓ α∧␈↓Semantics:
␈↓ α∧␈↓␈↓ ε}23␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓<phase␈αno>␈αspecifies␈α the␈αnumber␈α of␈αthe␈αuser␈α initialization␈αphase.␈α If␈α it␈αis␈αleft␈αout,␈α then␈αone␈αis
␈↓ α∧␈↓used.␈α Currently,␈αthere␈αare␈αthree␈α phases,␈αnumbered␈α0,␈α1,␈αand␈α 2.␈α If␈αthe␈α demand␈αis␈αgreat␈αenough,
␈↓ α∧␈↓additional␈α⊃phases␈α⊂may␈α⊃ be␈α⊂added␈α⊃later.␈α⊃ (Note␈α⊂for␈α⊃assembly␈α⊂ language␈α⊃hackers:␈α⊃internally,␈α⊂user
␈↓ α∧␈↓phases are numbered '400000, '400001, etc.)
␈↓ α∧␈↓8.3 - ␈↓↓CHNCDB␈↓
␈↓ α∧␈↓ val←CHNCDB(channel)
␈↓ α∧␈↓This␈α∂integer␈α∂procedure␈α∂returns␈α⊂a␈α∂pointer␈α∂to␈α∂the␈α∂three␈α⊂word␈α∂block␈α∂used␈α∂to␈α∂open␈α⊂the␈α∂ specified
␈↓ α∧␈↓channel.␈α∞ It␈α∞is␈α∞provided␈α∞ for␈α∞the␈α∞benefit␈α∞ of␈α∞assembly␈α∞language␈α∞procedures␈α∞that␈α∞may␈α∞want␈α∞to␈α
do
␈↓ α∧␈↓I/O␈αinside␈αsome␈αfast␈αinner␈αloop,␈αbut␈αwhich␈αmay␈αwant␈αto␈αlive␈αin␈αa␈αSAIL␈αcore␈αimage␈α&␈αuse␈αthe␈αSAIL
␈↓ α∧␈↓OPEN, etc.
␈↓ α∧␈↓This feature does not work in TENEX SAIL. See a hacker if you want these features.
␈↓ α∧␈↓8.4 - ␈↓↓ARRCLR␈↓
␈↓ α∧␈↓ ARRCLR(arry)
␈↓ α∧␈↓This␈αnew␈αruntime␈αroutine␈αclears␈αany␈αkind␈αof␈αarray.␈αThat␈αis,␈αarthmetic␈αarrays␈αget␈αfilled␈αwith␈αzeros,
␈↓ α∧␈↓string␈α∞arrays␈α∂with␈α∞NULLs,␈α∞and␈α∂itemvar␈α∞arrays␈α∞with␈α∂ANYs.␈α∞ One␈α∞may␈α∂use␈α∞ARRCLR␈α∞with␈α∂set␈α∞and
␈↓ α∧␈↓list␈α⊂arrays,␈α⊂but␈α∂the␈α⊂set␈α⊂and␈α⊂list␈α∂space␈α⊂will␈α⊂be␈α∂lost␈α⊂(i.e.␈α⊂un-garbage-collectable).␈α⊂The␈α∂alternative
␈↓ α∧␈↓form:
␈↓ α∧␈↓ ARRCLR(arry,val)
␈↓ α∧␈↓where␈αval␈α
is␈αeither␈α
an␈αinteger␈αor␈α
a␈αreal␈α
number,␈αwill␈αfill␈α
arry␈αwith␈α
that␈αvalue.␈α Do␈α
not␈αdo␈α
this␈αto
␈↓ α∧␈↓string␈α∞or␈α∞list␈α∞arrays␈α∞unless␈α∞you␈α∞do␈α∞not␈α
care␈α∞whether␈α∞or␈α∞not␈α∞your␈α∞program␈α∞works.␈α∞ Also␈α∞using␈α
a
␈↓ α∧␈↓real␈α
val␈α
for␈α
an␈α
itemvar␈α
array␈α
is␈α
apt␈α
to␈α∞cause␈α
strange␈α
results.␈α
(If␈α
you␈α
use␈α
an␈α
integer,␈α
arry␈α∞will␈α
be
␈↓ α∧␈↓filled with CVI(val).)
␈↓ α∧␈↓␈↓ ε}24␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.5 - ␈↓↓SETPL␈↓
␈↓ α∧␈↓ SETPL(channel, @linnum, @pagnum, @sosnum)
␈↓ α∧␈↓This␈α∃new␈α⊗runtime␈α∃routine␈α⊗allows␈α∃one␈α⊗to␈α∃keep␈α∃track␈α⊗of␈α∃the␈α⊗string␈α∃input␈α⊗from␈α∃CHANNEL.
␈↓ α∧␈↓Whenever␈α∃a␈α∃'12␈α∃is␈α∃encountered,␈α⊗LINNUM␈α∃is␈α∃incremented.␈α∃ Whenever␈α∃a␈α∃'14␈α⊗is␈α∃encountered,
␈↓ α∧␈↓PAGNUM␈α
is␈αincremented,␈α
and␈α
LINNUM␈αis␈α
zeroed.␈α Whenever␈α
an␈α
SOS␈αline␈α
number␈α
is␈αencountered,
␈↓ α∧␈↓it␈α
is␈α
placed␈α
into␈α∞SOSNUM.␈α
When␈α
fully␈α
implemented␈α
(soon),␈α∞this␈α
will␈α
work␈α
on␈α
the␈α∞INPUT,␈α
INTIN,
␈↓ α∧␈↓and REALIN functions as well.
␈↓ α∧␈↓8.6 - ␈↓↓EVALREDEFINE␈↓
␈↓ α∧␈↓EVALREDEFINE␈α⊃bears␈α⊂the␈α⊃same␈α⊂relationship␈α⊃to␈α⊂REDEFINE␈α⊃as␈α⊂EVALDEFINE␈α⊃does␈α⊃to␈α⊂DEFINE.
␈↓ α∧␈↓See pages 47 and 50 of the Manual.
␈↓ α∧␈↓8.7 - ␈↓↓CVPS␈↓
␈↓ α∧␈↓CVPS(<macro_parameter>)␈α∂converts␈α∂<macro_parameter>␈α∂to␈α∂a␈α∂string␈α∂and␈α∂returns␈α∂the␈α∂string.␈α∞See
␈↓ α∧␈↓about macro parameters on page 48 of the manual.
␈↓ α∧␈↓8.8 - ␈↓↓EXPRESSIONS IN REQUIRES␈↓
␈↓ α∧␈↓Previously,␈αall␈αREQUIRE␈αconstructs␈αhad␈αto␈αhave␈αonly␈αconstants␈αin␈αthem.␈αNow␈αSAIL␈αallows␈αcompile
␈↓ α∧␈↓time expressions as well. See about compile time expressions on page 47 of the Manual.
␈↓ α∧␈↓␈↓ ε}25␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.9 - ␈↓↓RELEASE␈↓
␈↓ α∧␈↓RELEASE␈αnow␈αtakes␈αan␈αoptional␈αsecond␈αargument,␈αthe␈αCLOSE␈αinhibit␈αbits.␈α These␈αare␈αdescribed␈αin
␈↓ α∧␈↓the␈α∞UUO␈α∞manual␈α∞(Stanford␈α∞System).␈α
These␈α∞are␈α∞defaulted␈α∞to␈α∞zero␈α
when␈α∞not␈α∞specified␈α∞so␈α∞that␈α
old
␈↓ α∧␈↓programs which did not specify them will work as before.
␈↓ α∧␈↓The CLOSE inhibit feature only works at SU-AI.
␈↓ α∧␈↓8.10 - ␈↓↓TTYUP␈↓
␈↓ α∧␈↓ oldval←TTYUP(newval)
␈↓ α∧␈↓This␈αroutine␈αcasuse␈αconversion␈αof␈αlower␈αcase␈αcharacters␈α(a-z)␈αto␈αtheir␈αupper␈αcase␈αequivalents␈αfor
␈↓ α∧␈↓strings␈α⊂read␈α∂by␈α⊂any␈α⊂of␈α∂the␈α⊂SAIL␈α⊂teletype␈α∂routines␈α⊂that␈α⊂do␈α∂not␈α⊂use␈α⊂break␈α∂tables.␈α⊂ If␈α⊂newval␈α∂is
␈↓ α∧␈↓TRUE,␈αthen␈αconversion␈αwill␈αtake␈αplace␈αon␈αall␈αsubsequent␈αinputs␈αuntil␈αTTYUP␈αis␈αcalled␈αwith␈αnewval
␈↓ α∧␈↓FALSE.␈α∞ Oldval␈α
will␈α∞always␈α
get␈α∞set␈α
to␈α∞the␈α
value␈α∞of␈α
newval␈α∞used␈α
in␈α∞the␈α
previous␈α∞call.␈α∞(If␈α
TTYUP
␈↓ α∧␈↓has␈α⊃never␈α⊃been␈α⊃called,␈α⊃then␈α⊂no␈α⊃conversions␈α⊃will␈α⊃take␈α⊃place,␈α⊂and␈α⊃the␈α⊃first␈α⊃call␈α⊃to␈α⊃TTYUP␈α⊂will
␈↓ α∧␈↓return FALSE).
␈↓ α∧␈↓In TENEX, TTYUP sets the system parameter using the STPAR jsys to convert to upper case.
␈↓ α∧␈↓8.11 - ␈↓↓BREAKSET MODES "K" AND "F"␈↓
␈↓ α∧␈↓A␈α∞"K"␈α∞specification␈α∞as␈α∞a␈α∞BREAKSET␈α∞mode␈α
will␈α∞cause␈α∞lower␈α∞to␈α∞upper␈α∞case␈α∞conversion␈α∞when␈α
that
␈↓ α∧␈↓break␈α⊂table␈α∂is␈α⊂used.␈α∂ Conversion␈α⊂takes␈α⊂place␈α∂before␈α⊂each␈α∂character␈α⊂is␈α∂checked␈α⊂for␈α⊂breaking␈α∂or
␈↓ α∧␈↓omission. An "F" specification turns off the conversion -- i.e. it undoes the effects of "K".
␈↓ α∧␈↓␈↓ ε}26␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.12 - ␈↓↓INOUT␈↓
␈↓ α∧␈↓ INOUT(inchan,outchan,howmany)
␈↓ α∧␈↓INOUT␈αreads␈αhowmany␈αwords␈αfrom␈αchannel␈αinchan␈αand␈αwrites␈αthem␈αout␈αon␈αchannel␈αoutchan.␈α Each
␈↓ α∧␈↓channel␈α∂must␈α∂be␈α∂open␈α∞in␈α∂a␈α∂mode␈α∂between␈α∂8␈α∞and␈α∂12.␈α∂ on␈α∂return,␈α∞the␈α∂EOF␈α∂variables␈α∂for␈α∂the␈α∞two
␈↓ α∧␈↓channels␈α∂will␈α∂be␈α∞the␈α∂same␈α∂as␈α∞if␈α∂ARRYIN␈α∂&␈α∂ARRYOUT␈α∞had␈α∂been␈α∂used.␈α∞ If␈α∂howmany␈α∂is␈α∂less␈α∞than
␈↓ α∧␈↓zero, then transfer of data will cease only upon end of file or a device error.
␈↓ α∧␈↓(note: INOUT uses BLTs to transfer data directly from one set of buffers to the other)
␈↓ α∧␈↓INOUT is not available in TENEX SAIL.
␈↓ α∧␈↓8.13 - ␈↓↓GETSTS & SETSTS␈↓
␈↓ α∧␈↓ SETSTS(chan,new_status)
␈↓ α∧␈↓issues a SETSTS uuo on channel chan with the status value new_status.
␈↓ α∧␈↓ status←GETSTS(chan)
␈↓ α∧␈↓returns the results of a GETSTS uuo on channel chan.
␈↓ α∧␈↓These␈α∂functions␈α∞do␈α∂not␈α∞exist␈α∂in␈α∞TENEX␈α∂SAIL.␈α∞ Instead,␈α∂see␈α∞GTSTS,␈α∂GDSTS,␈α∞STSTS,␈α∂and␈α∞SDSTS
␈↓ α∧␈↓for analogous features.
␈↓ α∧␈↓8.14 - ␈↓↓CHANGES TO "OPEN" ERROR HANDLING␈↓
␈↓ α∧␈↓If␈αthe␈αEOF␈αvariable␈αsupplied␈αto␈αOPEN␈αis␈αnon-zero␈αand␈αthe␈αdevice␈αname␈αis␈αinvalid,␈αthen␈αOPEN␈αwill
␈↓ α∧␈↓fail␈αwithout␈αgiving␈αthe␈αerror␈αmessage␈α
"INVALID␈αDEVICE␈αNAME␈αFOR␈αOPEN",␈αand␈αthe␈α
EOF␈αvalue
␈↓ α∧␈↓will␈α
be␈α
unchanged.␈α
If␈αa␈α
device␈α
is␈α
unavailable,␈αand␈α
EOF=0,␈α
then␈α
the␈αuser␈α
is␈α
now␈α
given␈α
the␈αoptions
␈↓ α∧␈↓of␈α∞trying␈α∞again␈α∞or␈α∞going␈α∞on␈α∞without␈α∞opening␈α∂the␈α∞device,␈α∞in␈α∞which␈α∞case␈α∞EOF␈α∞will␈α∞be␈α∞set␈α∂to␈α∞non-
␈↓ α∧␈↓zero as usual.
␈↓ α∧␈↓␈↓ ε}27␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.15 - ␈↓↓ASH␈↓
␈↓ α∧␈↓ASH␈α∪has␈α∩been␈α∪added␈α∩as␈α∪an␈α∪arithmetic␈α∩operator.␈α∪ Its␈α∩syntax␈α∪is␈α∪just␈α∩like␈α∪that␈α∩of␈α∪LSH,␈α∪and␈α∩it
␈↓ α∧␈↓generates similar code (except for putting out a PDP-10 ASH instruction instead of a LSH).
␈↓ α∧␈↓8.16 - ␈↓↓ARG_LIST␈↓
␈↓ α∧␈↓ ARG_LIST(<arg1>,...,<argn>)
␈↓ α∧␈↓where␈α∂each␈α⊂<arg>␈α∂may␈α∂be␈α⊂any␈α∂valid␈α∂argument␈α⊂to␈α∂the␈α∂REF_ITEM␈α⊂construct,␈α∂assembles␈α∂a␈α⊂list␈α∂of
␈↓ α∧␈↓"temporary"␈α
reference␈α
items␈α
that␈α∞will␈α
be␈α
deleted␈α
by␈α∞APPLY␈α
after␈α
the␈α
applied␈α∞procedure␈α
returns.
␈↓ α∧␈↓Thus
␈↓ α∧␈↓ APPLY(proc,ARG_LIST(foo,bar,VALUE baz))
␈↓ α∧␈↓is roughly equivalent to
␈↓ α∧␈↓ tmplst←{{REF_ITEM(foo),REF_ITEM(bar),REF_ITEM(VALUE baz)}};
␈↓ α∧␈↓ APPLY(proc,tmplst);
␈↓ α∧␈↓ WHILE LENGTH(tmplst) DO DELETE(LOP(tmplst));
␈↓ α∧␈↓but␈α∂is␈α∞somewhat␈α∂easier␈α∂to␈α∞type.␈α∂ Note␈α∞that␈α∂the␈α∂reference␈α∞items␈α∂created␈α∞by␈α∂ARG_LIST␈α∂are␈α∞just
␈↓ α∧␈↓like␈α∞those␈α
created␈α∞by␈α∞REF_ITEM,␈α
except␈α∞that␈α∞they␈α
are␈α∞marked␈α
so␈α∞that␈α∞APPLY␈α
will␈α∞know␈α∞to␈α
kill
␈↓ α∧␈↓them.
␈↓ α∧␈↓8.17 - ␈↓↓CLOSE␈↓
␈↓ α∧␈↓The␈α
CLOSE␈α
function␈α
now␈α
has␈α
an␈α
additional␈α
optional␈α
argument␈α
that␈α
allows␈α
the␈α
CLOSE␈α
inhibit␈α
bits
␈↓ α∧␈↓to␈α
be␈αturned␈α
on.␈α The␈α
second␈αargument␈α
is␈αthe␈α
bit␈αpattern␈α
for␈αthe␈α
inhibition,␈αand␈α
it␈αis␈α
defaulted␈α0.
␈↓ α∧␈↓See the UUO manual for details.
␈↓ α∧␈↓This feature is available only at SU-AI, and is not available in the TENEX version of SAIL.
␈↓ α∧␈↓␈↓ ε}28␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.18 - ␈↓↓TYPEIT␈↓
␈↓ α∧␈↓The␈α∂number␈α∂returned␈α∂by␈α∂the␈α∂TYPEIT␈α∂procedure␈α∂(which␈α∂identifies␈α∂the␈α∂type␈α∂of␈α∂the␈α∂datum␈α∂of␈α∂its
␈↓ α∧␈↓item␈α
expression␈α
argument)␈α
is␈α
now␈α∞changed␈α
for␈α
arrays.␈α
Now␈α
it␈α
is␈α∞'24␈α
plus␈α
the␈α
scalar␈α
value␈α∞of␈α
the
␈↓ α∧␈↓type (e.g., INTEGER), whereas before it was '15 plus the scalar value.
␈↓ α∧␈↓Additional types added to TYPEIT are: '16 for labels, '17 for record classes.
␈↓ α∧␈↓8.19 - ␈↓↓COMPARISON OF .REL FILES␈↓
␈↓ α∧␈↓Starting␈αwith␈αversion␈α18,␈αthe␈αcompiler␈αemits␈αinformation␈αinto␈αeach␈α.REL␈αfile␈αcontaining␈αthe␈αversion
␈↓ α∧␈↓of␈αthe␈αcompiler␈αused.␈α Then,␈αduring␈αthe␈αSAIL␈αinitialization␈αsequence,␈αthese␈αversions␈α
are␈αcompared,
␈↓ α∧␈↓and␈α
a␈α
warning␈αmessage␈α
is␈α
issued␈αif␈α
necessary.␈α
Thus,␈αthe␈α
problem␈α
of␈αconverting␈α
from␈α
one␈αversion
␈↓ α∧␈↓of␈αthe␈αcompiler␈αto␈αa␈αnew␈αversion␈αis␈αlessened.␈α This␈αfeature␈αmay␈αnot␈αwork␈αas␈αwell␈αin␈α
the␈α current
␈↓ α∧␈↓changeover as it will in the future.
␈↓ α∧␈↓8.20 - ␈↓↓SCAN Optimizations␈↓
␈↓ α∧␈↓The␈α
SCAN␈α
function␈α
has␈α
been␈α
modified␈α
to␈α
return␈α
true␈α
substrings␈α
instead␈α
of␈α
copies␈α
in␈α∞those␈α
cases
␈↓ α∧␈↓that␈αthe␈αbreak␈αtable␈αin␈αquestion␈αwas␈αnot␈αomitting␈αany␈αcharacters.␈α This␈αshould␈αbe␈αan␈αimprovement
␈↓ α∧␈↓in the efficiency of those routines.
␈↓ α∧␈↓8.21 - ␈↓↓BREAK TABLES␈↓
␈↓ α∧␈↓There␈αare␈α
now␈α54␈αuser-setable␈α
break␈αtables␈αavailable␈α
to␈αthe␈αSCAN,␈α
INPUT,␈αTTYINL␈α
functions,␈αas
␈↓ α∧␈↓well as SETBREAK and BREAKSET. These tables are allocated and deallocated dynamically.
␈↓ α∧␈↓In␈α∃addition,␈α∃GETBREAK␈α∃now␈α∃returns␈α∃the␈α∃value␈α∃of␈α∃the␈α∃smallest␈α∃unallocated␈α∃breaktable,␈α∀and
␈↓ α∧␈↓RELBREAK␈α
releases␈α
its␈α∞table␈α
argument.␈α
The␈α
implicit␈α∞declarations␈α
of␈α
these␈α
new␈α∞runtime␈α
routines
␈↓ α∧␈↓are:
␈↓ α∧␈↓␈↓ ¬ INTEGER PROCEDURE GETBREAK
␈↓ α∧␈↓␈↓ ∧iPROCEDURE RELBREAK(INTEGER TABLE)
␈↓ α∧␈↓␈↓ ε}29␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓NOTE:␈α∞ a␈α∞breaktable␈α
is␈α∞allocated␈α∞by␈α
either␈α∞GETBREAK,␈α∞SETBREAK,␈α
BREAKSET␈α∞or␈α∞STDBRK.␈α
A
␈↓ α∧␈↓breaktable␈α≤is␈α≤de-allocated␈α≤(and␈α≤thereby␈α≤made␈α≤available␈α≤to␈α≤GETBREAK)␈α≥by␈α≤RELBREAK.
␈↓ α∧␈↓Breaktables␈α∂are␈α∂stored␈α∂in␈α∂groups␈α∂of␈α∂18,␈α∂so␈α∂it␈α∂is␈α∂more␈α∂efficient␈α∂to␈α∂use␈α∂all␈α∂the␈α∂tables␈α∂in␈α∂a␈α∂given
␈↓ α∧␈↓group␈α∂before␈α⊂going␈α∂to␈α⊂another␈α∂group.␈α⊂ The␈α∂use␈α⊂of␈α∂GETBREAK␈α⊂is␈α∂particularly␈α⊂recommended␈α∂for
␈↓ α∧␈↓load-modules␈α∂and␈α∂the␈α∂like,␈α∂so␈α∂that␈α∂conflicts␈α∂will␈α∂be␈α∂minimzed.␈α∂ Breaktable␈α∂zero␈α∂is␈α∂special.␈α∂ It␈α∂is
␈↓ α∧␈↓predeclared␈α
to␈αproduce␈α
the␈α
same␈αresults␈α
as␈α
SETBREAK(0,NULL,NULL,"I").␈α This␈α
results␈α
in␈αbreak-
␈↓ α∧␈↓on-count␈α
for␈α
calls␈α
to␈α
INPUT,␈α
and␈α
always␈αreturns␈α
the␈α
whole␈α
string␈α
for␈α
SCAN.␈α
Breaktable␈α
zero␈αis
␈↓ α∧␈↓stored along with breaktables 1 to 18, and thus takes up no additional space.
␈↓ α∧␈↓HACKERS:␈α∂ Actually␈α∂there␈α∂are␈α∂17␈α∂additional␈α∞system␈α∂breaktables␈α∂which␈α∂are␈α∂reserved␈α∂for␈α∂use␈α∞by
␈↓ α∧␈↓the␈α∩SAIL␈α∩runtime␈α∩system.␈α∩ These␈α∩tables␈α∪are␈α∩numbers␈α∩-17␈α∩through␈α∩-1,␈α∩and␈α∩are␈α∪ordinarily␈α∩not
␈↓ α∧␈↓available to the user. They will be used by the debugger and by additional SAIL system software.
␈↓ α∧␈↓The␈α∞user␈α∂can␈α∞obtain␈α∂access␈α∞to␈α∂breaktables␈α∞-17␈α∂through␈α∞-1␈α∂by␈α∞setting␈α∂BRKPRV(USER)␈α∞to␈α∂-1,␈α∞for
␈↓ α∧␈↓example␈α∞by␈α∞the␈α∞USERCON␈α∞function␈α∞which␈α∞accesses␈α∞the␈α∞SAIL␈α∞user␈α∞table.␈α∞ WARNING:␈α∞ absolutely
␈↓ α∧␈↓no␈αguarantees␈αare␈αmade␈αto␈αthe␈αuser␈αwho␈αaccesses␈αthese␈αbreaktables.␈α This␈αinformation␈αis␈αintended
␈↓ α∧␈↓for completeness only; the use of these special breaktables by the user is not recommended.
␈↓ α∧␈↓8.22 - ␈↓↓CV6STR␈↓
␈↓ α∧␈↓CV6STR␈αdoes␈αwhat␈αyou␈αalways␈αwished␈αCVXSTR␈αdid.␈α I.e.,␈αit␈αstops␈αconverting␈αas␈αsoon␈αas␈αit␈α
sees␈αa
␈↓ α∧␈↓blank rather than always returning a six-character string. Example:
␈↓ α∧␈↓ CV6STR(CVSIX("XYZ"))="XYZ", not "XYZ ".
␈↓ α∧␈↓Beware, however, since
␈↓ α∧␈↓ CV6STR(CVSIX("X Y Z")) ="X", not "X Y Z" or "XYZ".
␈↓ α∧␈↓8.23 - ␈↓↓TENEX RUNTIMES␈↓
␈↓ α∧␈↓The␈α∀TENEX␈α∀version␈α∃of␈α∀SAIL␈α∀now␈α∀has␈α∃these␈α∀additional␈α∀teletype-oriented␈α∃routines:␈α∀ STTYP,
␈↓ α∧␈↓GTTYP, STPAR, STI, and DELNF, all named after jsyses. See TENEX-specific documentation.
␈↓ α∧␈↓␈↓ ε}30␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.24 - ␈↓↓CVASTR␈↓
␈↓ α∧␈↓CVASTR␈α⊂is␈α⊂the␈α⊃"correct"␈α⊂inverse␈α⊂function␈α⊂to␈α⊃CVASC.␈α⊂ I.e.,␈α⊂it␈α⊂stops␈α⊃on␈α⊂a␈α⊂null␈α⊃character.␈α⊂ For
␈↓ α∧␈↓instance,
␈↓ α∧␈↓ CVASTR(CVASC("ABC")) is "ABC"
␈↓ α∧␈↓whereas
␈↓ α∧␈↓ CVSTR(CVASC("ABC")) is "ABC"&0&0
␈↓ α∧␈↓8.25 - ␈↓↓NEW SWITCHES␈↓
␈↓ α∧␈↓/V␈α∩ forces␈α∩loader␈α∩link␈α∪blocks␈α∩and␈α∩constant␈α∩string␈α∩texts␈α∪into␈α∩the␈α∩low␈α∩segment;␈α∪intended␈α∩for
␈↓ α∧␈↓overlay systems in which code is overlaid but data is not.
␈↓ α∧␈↓/X controls compiler save/continue; see the section on save/continue.
␈↓ α∧␈↓/W␈α⊂ generates␈α⊂additional␈α⊂(suppressed)␈α⊂DDT␈α⊂symbols.␈α∂ These␈α⊂symbols␈α⊂are␈α⊂designed␈α⊂to␈α⊂serve␈α∂as
␈↓ α∧␈↓comments␈α↔to␈α⊗a␈α↔programmer␈α⊗or␈α↔processor␈α⊗rummaging␈α↔though␈α⊗the␈α↔generated␈α↔code.␈α⊗ Symbols
␈↓ α∧␈↓generated␈α
by␈α
this␈αswitch␈α
all␈α
begin␈αwith␈α
a␈α
percent␈αsign␈α
(%),␈α
and␈αmany␈α
come␈α
in␈αpairs.␈α
A␈α
%$␈αsymbol
␈↓ α∧␈↓points␈α∂to␈α∂the␈α∂first␈α∞word␈α∂of␈α∂an␈α∂area␈α∂and␈α∞a␈α∂%.␈α∂symbol␈α∂points␈α∂to␈α∞the␈α∂first␈α∂word␈α∂beyond␈α∂the␈α∞area.
␈↓ α∧␈↓Thus the length of an area is the difference of its %. and %$ symbols. The symbols are:
␈↓ α∧␈↓ %$ADCN %.ADCN address constant area
␈↓ α∧␈↓ %$LIT %.LIT literal area
␈↓ α∧␈↓ %$RLIT %.RLIT reference literal area
␈↓ α∧␈↓ %$SCOD %.SCOD START!CODE or QUICK!CODE area
␈↓ α∧␈↓ %$STRC %$STRC string variable area
␈↓ α∧␈↓ %$VARS %.VARS simple variable area
␈↓ α∧␈↓ %ALSTO registers are about to be cleared
␈↓ α∧␈↓ %$ARRY first data word of a fixed array
␈↓ α∧␈↓ %$FORE FOREACH satisfier block
␈↓ α∧␈↓ %$SUCC SUCCEED/FAIL return block
␈↓ α∧␈↓/W tends to increase the number of DDT symbols by a factor of 2 or 3.
␈↓ α∧␈↓The␈α∞statement␈α∞REQUIRE␈α∞"chars"␈α∞COMPILER_SWITCHES;␈α∂can␈α∞be␈α∞used␈α∞to␈α∞change␈α∞the␈α∂settings␈α∞of
␈↓ α∧␈↓the␈α⊂compiler␈α⊃switches.␈α⊂ "chars"␈α⊃must␈α⊂be␈α⊃a␈α⊂string␈α⊂constant␈α⊃which␈α⊂is␈α⊃a␈α⊂legitimate␈α⊃switch␈α⊂string,
␈↓ α∧␈↓containing none of the characters "(/)"; e.g.,
␈↓ α∧␈↓ REQUIRE "20F" COMPILER_SWITCHES;
␈↓ α∧␈↓␈↓ ε}31␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓The␈α⊂string␈α⊂of␈α⊂characters␈α⊂is␈α⊂merely␈α⊂passed␈α⊂to␈α⊂the␈α⊂switch␈α⊂processor,␈α⊂and␈α⊂it␈α⊂may␈α⊂be␈α⊂possible␈α∂to
␈↓ α∧␈↓cause␈α∂all␈α⊂sorts␈α∂of␈α⊂problems␈α∂depending␈α⊂on␈α∂the␈α⊂switches␈α∂you␈α⊂try␈α∂to␈α⊂modify.␈α∂ Currently␈α⊂the␈α∂only
␈↓ α∧␈↓switches␈αworth␈αmodifying␈αare␈α
the␈α/F␈α(listing␈αformat␈αcontrol)␈α
and␈α/B␈α(BAIL␈αcontrol)␈α
switches.␈α A
␈↓ α∧␈↓new␈α
value,␈α
/40F,␈α
has␈α
been␈α
added.␈α
If␈α
this␈α
bit␈α
is␈α
turned␈α
on,␈α
characters␈α
will␈α
no␈α
longer␈α
be␈α
added␈α
to
␈↓ α∧␈↓the␈α
listing␈αfile;␈α
and␈α
if␈αthe␈α
bit␈αis␈α
off,␈α
the␈αlisting␈α
will␈α
resume.␈α Be␈α
sure␈αthat␈α
you␈α
have␈αa␈α
file␈α
open␈αif
␈↓ α∧␈↓you play with the /F or /B switches.
␈↓ α∧␈↓8.26 - ␈↓↓EDFILE␈↓
␈↓ α∧␈↓ EDFILE("filename",line,page,bits[0])
␈↓ α∧␈↓Exits␈αto␈αan␈αeditor.␈α Which␈αeditor␈αis␈αdetermined␈αby␈αthe␈αbits␈αwhich␈αare␈αon␈αin␈αthe␈αsecond␈αparameter,
␈↓ α∧␈↓line␈α.␈αIf␈αbit␈α0␈αor␈αbit␈α1␈α(600000,,0␈αbits)␈αis␈αon,␈αthen␈αline␈αis␈αassumed␈αto␈αbe␈αASCID␈αand␈αSOS␈αis␈αcalled.␈α If
␈↓ α∧␈↓neither␈αof␈α
these␈αbits␈αis␈α
on,␈αthen␈α line␈α
is␈αassumed␈αto␈α
be␈αof␈αthe␈α
form␈α attach␈α
count,,sequential␈αline
␈↓ α∧␈↓number␈α
and␈α
E␈α
is␈α
called.␈α
Page␈α
is␈α
the␈α
binary␈α
page␈α
number.␈α
Bits␈α
defaults␈α
to␈α
zero␈α
and␈α
controls␈α
the
␈↓ α∧␈↓editing mode:
␈↓ α∧␈↓ 0 edit
␈↓ α∧␈↓ 1 no directory (as in /N)
␈↓ α∧␈↓ 2 readonly (as in /R)
␈↓ α∧␈↓ 4 create
␈↓ α∧␈↓In␈αaddition,␈αthe␈αaccumulators␈αare␈αset␈αup␈αfrom␈αINIACS␈α(see␈αbelow)␈αso␈αthat␈αthe␈αE␈αcommand␈ααX␈αRUN
␈↓ α∧␈↓will␈αrun␈αthe␈αdump␈αfile␈αfrom␈αwhich␈αthe␈αcurrent␈αprogram␈αwas␈αgotten.␈α[Accumulators␈α0␈α(file␈α
name),␈α1
␈↓ α∧␈↓(extention), and 6 (device) are loaded from the corresponding values in INIACS.]
␈↓ α∧␈↓8.27 - ␈↓↓INIACS␈↓
␈↓ α∧␈↓The␈αcontents␈αof␈αlocations␈α0-'17␈αare␈αsaved␈αin␈αblock␈αINIACS␈αwhen␈αthe␈αcore␈αimage␈αis␈αstarted␈αfor␈αthe
␈↓ α∧␈↓first␈α%time.␈α% Declare␈α&INIACS␈α%as␈α%an␈α%external␈α&integer␈α%and␈α%use␈α&START_CODE␈α%or
␈↓ α∧␈↓MEMORY[LOCATION( INIACS)+n] to reference this block.
␈↓ α∧␈↓␈↓ ε}32␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ7MISCELLANEOUS NEW FEATURES
␈↓ α∧␈↓8.28 - ␈↓↓GOGTAB␈↓
␈↓ α∧␈↓Direct␈α∃access␈α∀to␈α∃the␈α∃user␈α∀table␈α∃can␈α∀be␈α∃gained␈α∃by␈α∀declaring␈α∃EXTERNAL␈α∃INTEGER␈α∀ARRAY
␈↓ α∧␈↓GOGTAB[0:n]; The clumsy USERCON linkage is obsolete.
␈↓ α∧␈↓8.29 - ␈↓↓ARERR␈↓
␈↓ α∧␈↓The␈α∂effective␈α∞address␈α∂of␈α∞an␈α∂ARERR␈α∞UUO␈α∂(op␈α∞code␈α∂007)␈α∞may␈α∂be␈α∞either␈α∂word␈α∞1␈α∂or␈α∞word␈α∂2␈α∂of␈α∞a
␈↓ α∧␈↓string descriptor. This allows ARERR 1,["array name"] from START_CODE.
␈↓ α∧␈↓␈↓ ε}33␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ)MINOR CORRECTIONS TO AIM-204
␈↓ α∧␈↓␈↓ ε~␈↓↓SECTION 9␈↓
␈↓ α∧␈↓␈↓ ∧:␈↓↓MINOR CORRECTIONS TO AIM-204␈↓
␈↓ α∧␈↓␈↓βThis␈α∪is␈α∀a␈α∪file␈α∪of␈α∀known␈α∪SAIL␈α∀manual␈α∪defects␈α∪(mainly␈α∀typos)␈α∪that␈α∀are␈α∪not
␈↓ α∧␈↓βalready␈α∨noted␈α≡in␈α∨the␈α∨preface␈α≡or␈α∨covered␈α≡by␈α∨the␈α∨"incremental"␈α≡SAIL
␈↓ α∧␈↓βmanual.␈α∀ It␈α∪is␈α∀primarily␈α∀an␈α∪internal␈α∀document␈α∀for␈α∪the␈α∀SAIL␈α∀hackers,␈α∪put
␈↓ α∧␈↓βis␈α∃being␈α∃provided␈α∃here␈α∃as␈α∃a␈α∃stopgap␈α∃measure␈α∃pending␈α∃a␈α∃full␈α∃new␈α∃edition
␈↓ α∧␈↓βfor␈α∩the␈α∩manual.␈α∩ This␈α∩list␈α∩is,␈α∩however,␈α∩not␈α∩complete␈α∩in␈α∩that␈α∩it␈α∩does␈α∩not
␈↓ α∧␈↓βinclude␈α∀a␈α∪number␈α∀of␈α∪typos␈α∀that␈α∪do␈α∀not␈α∪change␈α∀the␈α∪meaning.␈α∀ If,␈α∪however,
␈↓ α∧␈↓βyou␈α∃discover␈α∃any␈α∃defects␈α∃in␈α∃the␈α∃manual␈α∃or␈α∃in␈α∃the␈α∃update,␈α∃please␈α∃notify
␈↓ α∧␈↓βyour friendly local SAIL representative.
␈↓ α∧␈↓β99R KVL The synonym for "SUCH THAT" is "|" and not "␈↓#v"␈↓#
␈↓ α∧␈↓β32R KVL APPENDIX 5 has nothing to do with the
␈↓ α∧␈↓β bits for IO errors or mode enablings
␈↓ α∧␈↓β43L RHT FILEINFO documentation is a lie. You usually get:
␈↓ α∧␈↓β FILENAME
␈↓ α∧␈↓β EXT,,DATE
␈↓ α∧␈↓β prot(9)Mode(4)time(11)date(12)
␈↓ α∧␈↓β negative swapped word count (if did a lookup).
␈↓ α∧␈↓β 0 (unless you opened device in magic mode)
␈↓ α∧␈↓β 0
␈↓ α∧␈↓β The whole point is that what you get is the six words
␈↓ α∧␈↓β from the last lookup or enter. For details see the
␈↓ α∧␈↓β monitor manual.
␈↓ α∧␈↓β58R JRL if a designated bracketed triple is not found
␈↓ α∧␈↓β then bindit is returned and no error message is given
␈↓ α∧␈↓β33L JRL release now takes a second defaultable value integer
␈↓ α∧␈↓β argument, the close inhibit bits (see RELEAS in UUO
␈↓ α∧␈↓β manual). These are defaulted to zero when
␈↓ α∧␈↓β unspecified.
␈↓ α∧␈↓β72R KVL TELLALL does not do an implicit RESCHEDULE as the
␈↓ α∧␈↓β description implies -- it just sets the status of
␈↓ α∧␈↓β the concerned processes to "ready".
␈↓ α∧␈↓β102R RFS "33 through 36" S/B "33 through 35"
␈↓ α∧␈↓β105R RFS ". her are several" s/b " . There are several"
␈↓ α∧␈↓␈↓ ε}34␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ)MINOR CORRECTIONS TO AIM-204
␈↓ α∧␈↓β79R,L KVL JOBTPC should be loaded with the location of a CALL
␈↓ α∧␈↓β to a non-simple procedure.
␈↓ α∧␈↓β92R JRL 20F will in future surround macro expansions with
␈↓ α∧␈↓β "<>" not "⊂⊃".
␈↓ α∧␈↓β38R RHT The description of INCHWL is wrong. Actually, the
␈↓ α∧␈↓β activation character is never included in the string
␈↓ α∧␈↓β and is always put into _SKIP_. (<crlf> puts a <cr>
␈↓ α∧␈↓β into _SKIP_ & throws away the <lf>).
␈↓ α∧␈↓β24L RHT The compiler will not in fact turn division by a
␈↓ α∧␈↓β power of two into an ASH.
␈↓ α∧␈↓β90L REG "... See section 19 about these [compilation errors]"
␈↓ α∧␈↓β should be section 20.
␈↓ α∧␈↓β90L REG 19.1.3 "boundary" is misspelled.
␈↓ α∧␈↓β41R RHT CVSIX left-justifies the sixbit value it builds.
␈↓ α∧␈↓β43L RHT In POINT, it is "a PDP-10 byte pointer".
␈↓ α∧␈↓β45R RHT FORC syntax should be "FORC <identifier> ← ... "
␈↓ α∧␈↓β57R RHT " ... methods of searching the associative store ..."
␈↓ α∧␈↓β had "store" missing before.
␈↓ α∧␈↓β105L RHT "omaname" should be "the symbolic name"
␈↓ α∧␈↓β110L RHT added reference:
␈↓ α∧␈↓β Harvey, Brian "Monitor Command Manual" SAILON 54.3
␈↓ α∧␈↓β (Dec 1973)
␈↓ α∧␈↓β Also, there is a more current SOS manual: SAILON 50.3
␈↓ α∧␈↓β76L RHT Should be "REF_ITEM(VALUE <expression>)"
␈↓ α∧␈↓β43L RFS For FILEINFO, also should have a note to export users
␈↓ α∧␈↓β like "FILEINFO fills the array with the results of
␈↓ α∧␈↓β the last LOOKUP or ENTER (DEC 10-50 systems).
␈↓ α∧␈↓β Consult your local monitor manual for the format of
␈↓ α∧␈↓β these entries."
␈↓ α∧␈↓β28L JRL CALLING PROCEDURES FROM INSIDE CODE BLOCKS
␈↓ α∧␈↓β "... procedure is typed, it will return is value in
␈↓ α∧␈↓β AC 1 (a pointer to the second word if the procedure
␈↓ α∧␈↓β is a string procedure)." should be " procedure is
␈↓ α∧␈↓β typed and not a string procedure it will return
␈↓ α∧␈↓β its value in AC 1. String procedures push the two
␈↓ α∧␈↓β word string descriptor corresponding to the result
␈↓ α∧␈↓␈↓ ε}35␈↓ ∀
␈↓ α∧␈↓SAIL Addendum 1␈↓ λ)MINOR CORRECTIONS TO AIM-204
␈↓ α∧␈↓β on the SP stack."
␈↓ α∧␈↓β23L RHT The table of precedence for ∧ & ∨ is misleading.
␈↓ α∧␈↓β ∧ has higher precedence than ∨.
␈↓ α∧␈↓β26R JRL ARRYIN. No indication of how many words were actually
␈↓ α∧␈↓β read is given if EOF is encountered while reading a
␈↓ α∧␈↓β file in DUMP mode.
␈↓ α∧␈↓β25L RHT The description of the MEMORY[x,<type>] construct is
␈↓ α∧␈↓β very misleading. There is no restriction on the use
␈↓ α∧␈↓β of this construct as the left hand side of an
␈↓ α∧␈↓β assignment statement. In fact, MEMORY[x,<type>] may
␈↓ α∧␈↓β be used anywhere a simple variable of type <type> may
␈↓ α∧␈↓β be used.
␈↓ α∧␈↓␈↓ ε}36␈↓ ∀