The INTERSCRIPT Standard
Draft 2.0
September 1983

Current Status


Overview of the standard's technical content


What needs to be done
Current Status

Draft Standard "Version 2.0/September 1983" published


There has been almost no experimental implementation


There are still technical details to be worked out


Other documents are needed
Contents of the Draft Standard
1. Introduction
2. The Language Basis: Syntax and Semantics
3. Tag Declaration, Node Invariants, and Safety Rules for Editors
4. Standard Document Constructs
5. Layout
6. Other Constructs
7. Encoding
Appendix A: Glossary
Appendix B: Example of Script Evaluation
Appendix P: Paragraph% ReducesTo
Appendix Q: Line% ReducesTo
Current Status
Rating: 1nonexistent
 . . .
5first draft
 . . .
10well polished
7  1. Introduction
8  2. The Language Basis: Syntax and Semantics
6  3. Tag Declaration, Node Invariants, and Safety Rules for Editors
6  4. Standard Document Constructs
5  5. Layout
6  6. Other Constructs
7  7. Encoding
6  Appendix A: Glossary
8  Appendix B: Example of Script Evaluation
6  Appendix P: Paragraph% ReducesTo
6  Appendix Q: Line% ReducesTo
1  Index
Layer 0: Syntax  (Publication Encoding)
script ::= header node trailer
header ::= "INTERSCRIPT/INTERCHANGE/1.0 "
trailer ::= "ENDSCRIPT"
item ::= tag | indirection | binding | sBinding | term |
openedNode | scope
items ::= empty | items item
tag ::= primary "$"
openedNode ::= (term | name "%") "|"
scope ::= "[" items "]"
binding ::= name "←" term
sBinding ::= name "%←" ( term | indirection | "'" term "'" )
term ::= primary | term op primary
op ::= "+" | "—" | "*" | "/" | "!" | "LT" | "EQ"
primary ::= literal | invocation | node | "(" term ")"
literal ::= name | number | string
name ::= id | name "." id
invocation ::= primary "^"
indirection ::= name "%"
node ::= "{" items "}"
Examples of Syntax
INTERSCRIPT/INTERCHANGE/1.0
{ -- body of the script -- }
ENDSCRIPT
INTERSCRIPT/INTERCHANGE/1.0
{Text$ "Now is the ... party." "A second string"
font←{Font$ name←Helvetica}}
ENDSCRIPT
INTERSCRIPT/INTERCHANGE/1.0
{Paragraph$ lineJustification𡤁 leftMargin𡤁.0*inch
{Text$ "Now is the ... party." "A second string"
font←{Font$ name←Helvetica}}
}
ENDSCRIPT
INTERSCRIPT/INTERCHANGE/1.0
{BarChart$
xEdge←{edge | range←{1970 1980} delta𡤁 lbl←"Year"}}
yEdge←{edge | range←{0 11.5} delta𡤀.5
lbl←"Corn(tons)"}
{1970 7.7} {1980 11.2} {1973 7.8}
}
ENDSCRIPT
Layer 1: Semantics
value space: atoms, numbers, strings, nodes, quoted expressions
bindings and content
structure: bindings, evaluation
scope for names
external environment
The Interscript semantic function maps a script into a tree
two scripts are equivalent if their semantic representations are equal
Formal Semantics

Lefthand Side Alternative  S[e, Alternative]
script ::= node  S[X, node]
items ::= emptyempty
| items item {t: VS=S[
e, items]; RETURN[
    ConcatVs[t, S[ConcatVs[
e, Bindings[t]], item]}
tag ::= primary  MkTag[e, S[e, primary]]
scope ::= items  MkScope[S[e, items]]
openedNode ::= term  Items[S[e, term]]
  | name  MkV[m: onodeStruc,
    cVs: Items[evalName[
e, S[NIL, name]]], name]
binding ::= name term  MkBinding[e, S[e, term], S[NIL, name], bind]
sBinding ::= name sRhs MkBinding[e, S[e, sRhs], S[NIL, name], bindStruc]
quoted ::= term  MkV[m: quotedTerm, cTerm: term]
term ::= term op primary apply[op, S[e, term], S[e, primary]]
literal ::= name  MkV[m: atom, xName: S[NIL, name]]
 | number  MkV[m: num, cNum: number]
 | string  MkV[m: string, cStr: string]
name ::= id  MkAtom[id]
 | name id CONS[MkAtom[id], S[NIL, name]]
invocation ::= primary evalName[e, S[e, primary].xName]
indirection ::= name MkV[m: evalStruc, cV: evalName[e, S[NIL,
   name]], xName: S[NIL, name]]
node ::= items  {t: Vs=S[e, items]; RETURN[
   MkNode[ConcatVs[
e, bindings[t]], t]
Safe Editing
A tag on a node is like a type in Mesa
A tag definition specifies
relevant attributes
other required tags
allowed parent tags
type of the contents
a node invariant
what more basic tag it can be reduced to (if any)
Tag definitions enable an editor to edit safely nodes with tags that it doesn't directly implement
Next Steps
Feedback on the draft standard
Trial implementations
Final version of the standard
Implementor's guide