perm filename PUI1S.PUI[S,AIL] blob sn#052825 filedate 1973-07-06 generic text, type T, neo UTF8
1⎇⎇␈F2SAIL USER MANUAL␈F1
2⎇⎇␈→960⎇0⎇164⎇⎇␈F2PREFACE␈F1␈←
3⎇⎇␈F1␈F2HISTORY⎇OF⎇THE⎇LANGUAGE␈F1
4⎇⎇The⎇GOGOL⎇compilers,⎇developed⎇principally⎇by⎇Dan
5⎇⎇Swinehart⎇at⎇the⎇Stanford⎇Artificial⎇Intelligence⎇Project,
6⎇⎇were⎇the⎇basis⎇for⎇the⎇non-LEAP⎇portions⎇of⎇SAIL.
7⎇⎇Robert⎇Sproull⎇joined⎇Swinehart⎇in⎇incorporating⎇the
8⎇⎇features⎇of⎇the⎇LEAP⎇language,⎇developed⎇by⎇J.
9⎇⎇Feldman⎇and⎇P.⎇Rovner⎇on⎇the⎇Lincoln⎇Laboratory's⎇TX-
10⎇⎇2,⎇into⎇SAIL.⎇ The⎇first⎇version⎇of⎇the⎇language⎇was
11⎇⎇released⎇in⎇November,⎇1969.⎇ Since⎇then,⎇the
12⎇⎇language⎇has⎇been⎇maintained,⎇expanded,⎇and⎇improved
13⎇⎇by⎇many⎇people.⎇ Foremost⎇amoung⎇these⎇are⎇Russell
14⎇⎇Taylor,⎇Jim⎇Low,⎇and⎇Hanan⎇Samet.⎇ They⎇were
15⎇⎇responsible⎇for⎇the⎇introduction⎇into⎇the⎇language⎇of
16⎇⎇processes,⎇procedure⎇variables,⎇interrupts,⎇contexts,
17⎇⎇matching⎇procedures,⎇the⎇new⎇macro⎇system,⎇and⎇many
18⎇⎇other⎇ features.
19⎇⎇␈F2USING⎇THIS⎇MANUAL␈F1
20⎇⎇For⎇the⎇first⎇reading,⎇a⎇light⎇skim⎇of⎇sections⎇1
21⎇⎇through⎇4⎇followed⎇by⎇a⎇careful⎇perusal⎇of⎇subsection
22⎇⎇19.1⎇should⎇be⎇adequate⎇to⎇familiarize⎇the⎇new⎇user
23⎇⎇with⎇the⎇differences⎇between⎇ALGOL⎇and⎇SAIL⎇and
24⎇⎇allow⎇him⎇to⎇start⎇writing⎇programs⎇in⎇SAIL.⎇ The⎇other
25⎇⎇sections⎇of⎇this⎇manual⎇are⎇relatively⎇self⎇contained,
26⎇⎇and⎇can⎇be⎇read⎇when⎇one⎇wants⎇to⎇know⎇about⎇the
27⎇⎇features⎇they⎇describe.⎇ The⎇exceptions⎇to⎇this⎇rule
28⎇⎇are⎇sections⎇10,⎇11,⎇and⎇12.⎇These⎇describe⎇the
29⎇⎇basics⎇of⎇the⎇LEAP⎇and⎇are⎇essential⎇for⎇understanding
30⎇⎇of⎇the⎇following⎇sections.⎇Much⎇of⎇the⎇implementation
31⎇⎇information⎇contained⎇in⎇older⎇versions⎇of⎇this⎇manual
32⎇⎇has⎇been⎇moved⎇to⎇the⎇appendices⎇and⎇a⎇forthcoming
33⎇⎇implementation⎇manual.
34⎇⎇An⎇attempt⎇has⎇been⎇made⎇to⎇keep⎇forward⎇references
35⎇⎇to⎇a⎇minimum.⎇ In⎇other⎇words,⎇if⎇the⎇manual⎇is⎇freely
36⎇⎇using⎇concepts⎇unfamiliar⎇to⎇you,⎇they⎇are⎇probably
37⎇⎇defined⎇in⎇an⎇earlier⎇section.⎇ However,⎇the⎇definitions
38⎇⎇of⎇some⎇common⎇concepts⎇such⎇as⎇"variable"⎇and
39⎇⎇"identifier"⎇have⎇been⎇left⎇until⎇section⎇19.
40⎇⎇␈F2CHANGES⎇IN⎇THE⎇LANGUAGE␈F1
41⎇⎇One⎇of⎇the⎇ design⎇goals⎇for⎇ the⎇current
42⎇⎇implementation⎇of⎇ SAIL⎇was⎇to⎇retain,⎇as⎇ far⎇as
43⎇⎇possible,⎇compatibility⎇with⎇previous⎇versions.⎇ We
44⎇⎇have⎇ been⎇ fairly⎇  successful⎇ in⎇ retaining⎇ source
45⎇⎇language⎇compatibility,⎇ but⎇not⎇ completely
46⎇⎇successful,⎇ since⎇other⎇ design⎇considerations
47⎇⎇frequently⎇proved⎇ to⎇be⎇ overriding.⎇ Most⎇ of⎇these
48⎇⎇exceptions⎇ occur⎇ with⎇ constructs⎇ that,⎇ while
49⎇⎇never⎇ explicitly⎇illegal,⎇ were⎇never⎇ quite⎇"legal"
50⎇⎇either.⎇Essentially,⎇ this⎇means⎇that⎇programs⎇which
51⎇⎇contain⎇"hacks"⎇may⎇ or⎇may⎇not⎇ be⎇able⎇to⎇ run
52⎇⎇unchanged.⎇For⎇instance,⎇assignment⎇of⎇an⎇integer⎇to
53⎇⎇the⎇datum⎇of⎇a⎇ set⎇item⎇will⎇cause⎇horrible⎇things⎇to
54⎇⎇happen⎇when⎇the⎇item⎇is⎇deleted.⎇ One⎇should⎇consult
55⎇⎇the⎇appropriate⎇sections⎇of⎇ this⎇manual⎇for⎇detailed
56⎇⎇information.⎇Other⎇notable⎇incompatibilities⎇include:
57⎇⎇␈→960⎇-16000⎇164⎇⎇␈F2PREFACE␈F1␈←
58⎇⎇␈→960⎇-16000⎇0⎇⎇␈F216397⎇␈F1␈←
59⎇⎇1.␈=64⎇The⎇procedure⎇ implementation⎇was⎇ somewhat
60⎇⎇␈F1␈=64⎇changed.⎇ This⎇change⎇should⎇ not⎇adversely
61⎇⎇␈=64⎇affect⎇any⎇programs⎇ that⎇do⎇not⎇use
62⎇⎇␈=64⎇START_CODE⎇or⎇link⎇to⎇assembly⎇language
63⎇⎇␈=64⎇routines.⎇ However,⎇for⎇efficiency⎇the⎇user⎇ may
64⎇⎇␈=64⎇want⎇to⎇consider⎇ declaring⎇some⎇ of⎇his⎇ smaller
65⎇⎇␈=64⎇procedures⎇ SIMPLE.⎇ The⎇new⎇implementation
66⎇⎇␈=64⎇required⎇that⎇another⎇register⎇ ('12)⎇be
67⎇⎇␈=64⎇dedicated⎇ to⎇SAIL's⎇ exclusive⎇use.⎇  Programs
68⎇⎇␈=64⎇that⎇modify⎇ this⎇register⎇do⎇so⎇at⎇their⎇utmost
69⎇⎇␈=64⎇peril.
70⎇⎇2.␈=64⎇Non-own⎇sets⎇are⎇ deallocated⎇when⎇ the⎇block
71⎇⎇␈=64⎇in⎇which⎇ they⎇are⎇declared⎇is⎇exited.
72⎇⎇3.␈=64⎇The⎇ storage⎇ management⎇ system⎇for⎇ arrays
73⎇⎇␈=64⎇has⎇ been⎇ modified.⎇ Again,⎇this⎇ change⎇ can
74⎇⎇␈=64⎇only⎇ affect⎇programs⎇ that⎇allocate⎇ arrays⎇using
75⎇⎇␈=64⎇START_CODE.
76⎇⎇␈F1WARNING:⎇ This⎇list⎇is⎇primarily⎇ intended⎇as⎇a⎇general
77⎇⎇guide⎇to⎇the⎇most⎇outstanding⎇incompatibilities,⎇ and
78⎇⎇should⎇ not⎇be⎇construed⎇ as⎇being⎇complete.⎇  Users
79⎇⎇are⎇strongly⎇ urged⎇to⎇read⎇over⎇ the⎇manual,⎇since
80⎇⎇doing⎇ so⎇ will⎇introduce⎇ them⎇ to⎇the⎇ new⎇ features
81⎇⎇of⎇the⎇language,⎇some⎇of⎇which⎇are⎇ quite⎇useful,⎇as
82⎇⎇well⎇as⎇ informing⎇them⎇of⎇ any⎇ subtle⎇ changes⎇in
83⎇⎇the⎇ old⎇ semantics.⎇ In⎇any⎇ event⎇ the⎇experience⎇at
84⎇⎇Stanford⎇ was⎇that⎇ conversion⎇of⎇   programs⎇proved
85⎇⎇to⎇be⎇surprisingly⎇ easy,⎇with⎇the⎇only⎇real⎇ holdouts
86⎇⎇being⎇a⎇couple⎇giants⎇ that⎇made⎇heavy⎇and⎇subtle⎇use
87⎇⎇of⎇ START_CODE⎇blocks⎇and⎇assembly⎇language
88⎇⎇routines.
89⎇⎇␈F2UNIMPLEMENTED⎇CONSTRUCTS␈F1
90⎇⎇The⎇following⎇items⎇are⎇described⎇in⎇the⎇manual⎇as⎇if
91⎇⎇they⎇existed.⎇As⎇the⎇manual⎇goes⎇to⎇press,⎇they⎇are
92⎇⎇not⎇implemented.⎇ The⎇are⎇listed⎇in⎇the⎇probably⎇order
93⎇⎇of⎇their⎇implementation.
94⎇⎇1.␈=64⎇NEW⎇(<context_variable>).⎇ Creates⎇a⎇new⎇item
95⎇⎇␈=64⎇which⎇has⎇a⎇datum⎇that⎇is⎇a⎇context.
96⎇⎇2.␈=64⎇Useing⎇a⎇<context_variable>⎇instead⎇of⎇a⎇list⎇of
97⎇⎇␈=64⎇variables⎇in⎇any⎇of⎇the⎇REMEMBER,⎇FORGET⎇or
98⎇⎇␈=64⎇RESTORE⎇statements.
99⎇⎇3.␈=64⎇Using⎇∞⎇in⎇the⎇expression⎇n⎇of⎇REMOVE⎇n⎇FROM
100⎇⎇␈=64⎇list.
101⎇⎇4.␈=64⎇ANY⊗ANY≡ANY⎇searches⎇in⎇Leap.⎇ That⎇is,⎇any
102⎇⎇␈=64⎇search⎇where⎇no⎇constraints⎇at⎇all⎇are⎇made⎇on
103⎇⎇␈=64⎇the⎇triple⎇returned.
104⎇⎇5.␈=64⎇CHECKED⎇itemvars.⎇ The⎇dynamic⎇comparison⎇of
105⎇⎇␈=64⎇the⎇datum⎇type⎇of⎇an⎇item⎇to⎇the⎇datum⎇type⎇of
106⎇⎇␈=64⎇the⎇CHECKED⎇itemvar⎇that⎇the⎇item⎇is⎇being
107⎇⎇␈=64⎇assigned⎇to.⎇Currently,⎇for⎇example,⎇if⎇you⎇assign
108⎇⎇␈=64⎇an⎇item⎇with⎇an⎇integer⎇datum⎇to⎇an⎇itemvar⎇that
109⎇⎇␈=64⎇was⎇declared⎇a⎇string⎇itemvar,⎇no⎇check⎇is
110⎇⎇␈F2PREFACE␈F1
111⎇⎇␈F216398⎇␈F1
112⎇⎇␈=64⎇performed.⎇It⎇is⎇the⎇user's⎇responsibility⎇to⎇see
113⎇⎇␈F1␈=64⎇that⎇the⎇datum⎇is⎇not⎇subsequently⎇not⎇accessed,
114⎇⎇␈=64⎇for⎇if⎇it⎇is,⎇it⎇will⎇be⎇treated⎇as⎇a⎇string.