repos
/
cl-unification
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Initial revision
Annotate for file docs/html/vector-template-class.html
2004-11-17 mantoniotti
1
<html>
22:19:54 '
2
<head>
'
3
<title>CL Unification: Class VECTOR-TEMPLATE</title>
'
4
<link rel="stylesheet" href="main.css">
'
5
</head>
'
6
'
7
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#ffffff">
'
8
'
9
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" vspace="0" hspace="0">
'
10
<tr>
'
11
<td colspan="3">
'
12
<div class="header"
'
13
style="font-family:=Verdana,Arial,Helvetica; font-size: 18px; color: #41286f;">
'
14
<strong><i>CL Unification: Class VECTOR-TEMPLATE</title></i></strong>
'
15
<div class="navigation">
'
16
<a href="index.html" class="navigation-link">Home</a>
'
17
| <a href="unification-package.html" class="navigation-link">Previous</a>
'
18
| <a href="index.html" class="navigation-link">Next</a>
'
19
| <a href="downloads.html" class="navigation-link">Downloads</a>
'
20
| <a href="links.html" class="navigation-link">Links</a>
'
21
</div>
'
22
</div>
'
23
<div class="black-line"><img src="images/shim.gif" height="1" width="1"></div>
'
24
<div class="middle-bar"><img src="images/shim.gif" height="5" width="1"></div>
'
25
<div class="black-line"><img src="images/shim.gif" height="1" width="1"></div>
'
26
</td>
'
27
</tr>
'
28
'
29
<tr height="100%">
'
30
<td height="100%"> </td>
'
31
<td valign="top" width="80%" height="100%">
'
32
'
33
<div class="content">
'
34
<div class="text" style="padding-top: 10px;">
'
35
'
36
<h1><i>Class</i> <strong>VECTOR-TEMPLATE</strong></h1>
'
37
'
38
<h2>Package:</h2>
'
39
'
40
<p><code>COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.UNIFICATION</code></p>
'
41
'
42
'
43
<h2>Class Precedence List:</h2>
'
44
'
45
<p>
'
46
VECTOR-TEMPLATE, SEQUENCE-TEMPLATE, ARRAY-TEMPLATE, TYPE-TEMPLATE, TEMPLATE, STANDARD-OBJECT, T.
'
47
</p>
'
48
'
49
<h2>Known Subclasses:</h2>
'
50
'
51
<p>
'
52
STRING-TEMPLATE.
'
53
</p>
'
54
'
55
'
56
<h2>Slots:</h2>
'
57
'
58
<p>None.</p>
'
59
'
60
'
61
<h2>Description:</h2>
'
62
'
63
<p>The VECTOR-TEMPLATE class denotes those object that are used
'
64
to unify against a VECTOR.</p>
'
65
'
66
<h3>Template Syntax:</h3>
'
67
'
68
<p>
'
69
<pre>
'
70
#T(<b>vector</b> . <i><destructuring template lambda list></i>)
'
71
</pre>
'
72
</p>
'
73
'
74
<p>
'
75
<pre>
'
76
#T(<i><<strong>CL</strong> vector type specifier></i> . <i><destructuring template lambda list></i>)
'
77
</pre>
'
78
</p>
'
79
'
80
'
81
<p>The VECTOR-TEMPLATE syntax denotes a VECTOR object. A
'
82
VECTOR-TEMPLATE must be unified against an VECTOR object. The elements
'
83
of the array must be unified against the
'
84
<i><destructuring template lambda list></i>
'
85
'
86
'
87
<h2>Examples:</h2>
'
88
'
89
<p>
'
90
<pre>
'
91
cl-prompt> (setf e (unify #(0 1 42 3 4 5) #T(<b>vector</b> 0 1 ?x 3 4 5)))
'
92
#<ENVIRONMENT xxx>
'
93
'
94
cl-prompt> (find-variable-value '?x e)
'
95
42
'
96
'
97
cl-prompt> (setq e (unify #(0 1 42 3 4 5) #T(<b>vector</b> 0 1 "FOO" 3 4 5)))
'
98
--> Error: UNIFICATION-FAILURE
'
99
'
100
cl-prompt> (setq e (unify #("foo" "bar" 42)) #T(<b>vector</b> _ _ ?x))
'
101
#<ENVIRONMENT xxx>
'
102
'
103
cl-prompt> (find-variable-value '?x e)
'
104
42
'
105
'
106
cl-prompt> (setq e (unify #("foo" "bar" 42) #T(<b>vector</b> _ &rest ?x)))
'
107
#<ENVIRONMENT xxx>
'
108
'
109
cl-prompt> (find-variable-value '?x e)
'
110
#("bar" 42)
'
111
'
112
cl-prompt> (setq e (unify #("foo" "bar" 42) #T((<b>vector</b> fixnum) _ &rest ?x)))
'
113
--> Error: UNIFICATION-FAILURE
'
114
</pre>
'
115
</p>
'
116
'
117
'
118
<h2>Affected By:</h2>
'
119
'
120
<p>None.</p>
'
121
'
122
'
123
<h2>Exceptional Situations:</h2>
'
124
'
125
<p>Unifying an VECTOR-TEMPLATE against a non-VECTOR object results in
'
126
an UNIFICATION-FAILURE error being signaled.</p>
'
127
'
128
'
129
<h2>See Also:</h2>
'
130
'
131
<p>UNIFY</p>
'
132
'
133
'
134
<h2>Notes:</h2>
'
135
'
136
<h3>ARRAY Structural Properties</h3>
'
137
'
138
<p>There is no way to "unify" against structural properties of
'
139
vectors like fill pointers and displacements.</p>
'
140
'
141
<h3>Current Implementation Note</h3>
'
142
'
143
<p>Type checking for templates like
'
144
<code>#T((<b>vector</b> fixnum) 1 2 3)</code>
'
145
is not yet implemented.</p>
'
146
'
147
</td>
'
148
'
149
<!-- <td height="100%"> </td> -->
'
150
</tr>
'
151
'
152
<tr height="100%">
'
153
<td height="100%"> </td>
'
154
<td valign="top" width="80%" height="100%">
'
155
'
156
<div class="content">
'
157
<div class="text" style="padding-top: 10px;">
'
158
'
159
<h1>News</h1>
'
160
'
161
<p>News in chronological order, most recent on top.
'
162
</p>
'
163
'
164
<ul>
'
165
<li><strong>2004-10-30</strong><br>
'
166
Completed description.
'
167
</li>
'
168
'
169
</ul>
'
170
'
171
</div>
'
172
</div>
'
173
'
174
</td>
'
175
'
176
<td height="100%"> </td>
'
177
</tr>
'
178
'
179
'
180
'
181
'
182
<tr>
'
183
<td colspan="3" valign="bottom" align="right">
'
184
<div class="copyright">
'
185
© 2003-2004, Marco Antoniotti, all rights reserved.
'
186
</div>
'
187
</td>
'
188
</tr>
'
189
'
190
</table>
'
191
</body>
'
192
</html>
'
193
'
194
<!-- end of file -- expression-template-class.html -->