all.htm
5.47 KB
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
<HTML>
<HEAD>
<!-- Created with AOLpress/2.0 -->
<TITLE>Specifying Web Architecture with Larch (WWW9 Presentation)</TITLE>
</HEAD>
<BODY>
<H1>
Specifying Web Architecture with Larch
</H1>
<ADDRESS>
<A HREF="http://www.w3.org/People/Connolly/">Dan Connolly</A><BR>
<A HREF="http://www9.org/">9th International World Wide Web
Conference</A><BR>
Amsterdam<BR>
May 2000
</ADDRESS>
<H1>
Why Formal Systems?
</H1>
<P>
They help me...
<UL>
<LI>
check consistency within and across specs
<LI>
check consistency of code (hopefully)
<LI>
form concise, compelling arguments
<LI>
think clearly
</UL>
<H1>
Why Larch?
</H1>
<UL>
<LI>
(relatively) low cost of entry:
<UL>
<LI>
easy to install
<LI>
familiar notation
<LI>
interactive tools, FAQ
</UL>
<LI>
practical integration with running code
<LI>
practical integration with a proof assistant
</UL>
<H1>
Some Results
</H1>
<P>
in <A HREF="http://www.w3.org/XML/9711theory/Overview.html">Specifying Web
Architecture with Larch</A>:
<UL>
<LI>
harmonized character set terminology between SGML and MIME
<LI>
reviewed XML Infoset, RDF, XML Schema specs
<LI>
found a bug in Wadler's XPath semantics
<LI>
working through Makoto's hedge automata
<LI>
found a satisfying model of HTTP optimizations
</UL>
<H1>
The Semantic Web needs a model of State in the Web
</H1>
<UL>
<LI>
on page p1, we find P
<LI>
on page p2, we find P->Q
<LI>
can we conclude Q?
<UL>
<LI>
is the data from p2 still fresh?
<LI>
are p1 and p2 credible sources? on the subject of P and Q?
</UL>
</UL>
<H1>
A Simple Model of State in the Web
</H1>
<P>
cf discussion with Paul Burchard, circa 1995:
<PRE>GET : URI -> Literal
</PRE>
<P>
e.g.
<PRE>GET("http://example.com") =
"<html><head><title>Example</title> ...</html>"
</PRE>
<H1>
Multiple Formats
</H1>
<PRE>GET("http://example.com/logo") = ...GIF data...
</PRE>
<P>
but... hmm... later, I find
<PRE>GET("http://example.com/logo") = ...PNG data...
</PRE>
<P>
so I've got
<PRE>GET("http://example.com/logo") != GET("http://example.com/logo")
</PRE>
<P>
so how about
<PRE>GET : URI -> Set[Literal]
</PRE>
<P>
e.g.
<PRE>GET("http://example.com/logo") =
{...GIF data..., ...PNG data...}
</PRE>
<H1>
The Web Varies over Time
</H1>
<P>
one day I find:
<PRE>GET("http://example.com", t1) =
{"<html><head><title>Example</title> ...</html>", ...}
</PRE>
<P>
and the next:
<PRE>GET("http://example.com", t2) =
{"<html><head><title>Example Company</title> ...</html>", ... }
</PRE>
<P>
so how about
<P>
GET : URI, Time -> Set[Literal]
<P>
but:
<UL>
<LI>
who's time? client's? servers'? are they syncrhonized?
<LI>
is this <TT>Set[Literal]</TT> ever observeable?
<LI>
... and other issues
</UL>
<H1>
The HTTP Trait
</H1>
<P>
<A HREF="../../../XML/9711theory/HTTP">HTTP trait</A>
<PRE>...
introduces
http: absoluteURI, Message, Message, HTTPFormat, HTTPFormat -> Bool
% for http(i, q, p, qf, pf) read:
% the message q, the request, and the message p, the reply,
% constitute a conforming HTTP transaction; the parsed data
% in the request and the reply are pf and pf respectively,
% and the request URI is i.
</PRE>
<H1>
The 200 OK Axiom
</H1>
<PRE> http(i, mq, mp, reqData, repData)
/\ method(reqData) = GET
/\ status(repData) = OK
=> represents(mp, i, content(repData));
</PRE>
<H1>
The Origin Server Axiom, TCP/IP/DNS case
</H1>
<PRE> %
% If you make a TCP connection to the origin server, whatever
% it says is valid/authoritative, as long as its formatted correctly.
i.scheme = HTTPURISchemeID
/\ account(i) = nil % leave http://user@host/ unspecified for now
/\ says(ma, [URIOfDomain(host(i)), RRTypePropertyID(A), lit1])
/\ hostAddr(lit1) = ip1
/\ fresh(ma, mq, TTL(ma))
/\ host(callee(conn(mq))) = ip1
/\ port(callee(conn(mq))) = port(i)
/\ conn(mq) = conn(mp)
/\ idx(mq) = idx(mp)
/\ httpParseReqs(callerBytes(conn(mq)), cmsgs)
/\ httpParseReps(calleeBytes(conn(mp)), smsgs)
/\ path(cmsgs[idx(mq)]) = i.path
/\ host(cmsgs[idx(mq)]) = host(i) % HTTP 1.1-ism
=> http(i, mq, mp, cmsgs[idx(mq)], cmsgs[idx(mp)]);
</PRE>
<H1>
The Conditional GET Axiom, If_Modified_Since case
</H1>
<P>
Ari Luotonen and Kevin Altis<BR>
<CITE><A href='http://www1.cern.ch/PapersWWW94/luotonen.ps'>World-Wide Web
Proxies</A></CITE><BR>
Proceedings of the 1st International WWW Conference, May 1994.
<PRE>
http(i, mq, mp, reqData, repData)
/\ represents(mp, i, cbody)
/\ mp < mq2
/\ http(i, mq2, mp2, reqData2, repData2)
/\ method(reqData2) = GET
/\ Last_Modified(repData) = If_Modified_Since(reqData2)
/\ status(repData2) = NotModified
=> represents(mp2, i, cbody);
% The Conditional GET Axiom, If_None_Match case
http(i, mq, mp, reqData, repData)
/\ represents(mp, i, cbody)
/\ mp < mq2
/\ http(i, mq2, mp2, reqData2, repData2)
/\ method(reqData2) = GET
/\ ETag(repData) \in If_None_Match(reqData2) % leave * unspecified for now
/\ status(repData2) = NotModified
/\ ETag(repData2) = ETag(repData)
=> represents(mp2, i, cbody); % implied metadata?
</PRE>
</BODY></HTML>