File: gprolog030.html

package info (click to toggle)
gprolog 1.3.0-6.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 13,512 kB
  • ctags: 8,954
  • sloc: ansic: 57,431; perl: 16,620; sh: 5,900; makefile: 1,284
file content (359 lines) | stat: -rw-r--r-- 17,435 bytes parent folder | download | duplicates (2)
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="gprolog.css">
<TITLE>
Dynamic clause management
</TITLE>
</HEAD>
<BODY TEXT=black BGCOLOR=white>
<A HREF="gprolog029.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="gprolog023.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="gprolog031.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H3 CLASS="subsection"><A NAME="htoc91">7.7</A>&nbsp;&nbsp;Dynamic clause management</H3><UL>
<LI><A HREF="gprolog030.html#toc63">Introduction</A>
<LI><A HREF="gprolog030.html#toc64"><TT>asserta/1</TT>,
 <TT>assertz/1</TT></A>
<LI><A HREF="gprolog030.html#toc65"><TT>retract/1</TT></A>
<LI><A HREF="gprolog030.html#toc66"><TT>retractall/1</TT></A>
<LI><A HREF="gprolog030.html#toc67"><TT>clause/2</TT></A>
<LI><A HREF="gprolog030.html#toc68"><TT>abolish/1</TT></A>
</UL>

<A NAME="toc63"></A>
<H4 CLASS="subsubsection"><A NAME="htoc92">7.7.1</A>&nbsp;&nbsp;Introduction</H4>
<A NAME="Introduction:(Dynamic-clause-management)"></A>
<B>Static and dynamic procedures</B>: a procedure is either dynamic or
static. All built-in predicates are static. A user-defined procedure is
static by default unless a <TT>dynamic/1</TT> directive precedes its
definition (section&nbsp;<A HREF="gprolog021.html#dynamic/1">6.1.2</A>). Adding a clause to a non-existent procedure
creates a dynamic procedure. The clauses of a dynamic procedure can be
altered (e.g. using <TT>asserta/1</TT>), the clauses of a static procedure
cannot be altered. <BR>
<BR>
<B>Private and public procedures</B>: each procedure is either public or
private. A dynamic procedure is always public. Each built-in predicate is
private, and a static user-defined procedure is private by default unless a
<TT>public/1</TT> directive precedes its definition (section&nbsp;<A HREF="gprolog021.html#public/1">6.1.3</A>). If a
dynamic declaration exists it is unnecessary to add a public declaration
since a dynamic procedure is also public. A clause of a public procedure can
be inspected (e.g. using <TT>clause/2</TT>), a clause of a private procedure
cannot be inspected.<BR>
<BR>
<B>A logical database update view</B>: any change in the database that
occurs as the result of executing a goal (e.g. when a sub-goal is a call of
<TT>assertz/1</TT> or <TT>retract/1</TT>) only affects subsequent
activations. The change does not affect any activation that is currently
being executed. Thus the database is frozen during the execution of a goal,
and the list of clauses defining a predication is fixed at the moment of its
execution.<BR>
<BR>
<A NAME="toc64"></A>
<H4 CLASS="subsubsection"><A NAME="htoc93">7.7.2</A>&nbsp;&nbsp;<TT>asserta/1</TT>,
 <TT>assertz/1</TT></H4>
 
 
<B>Templates</B>
<DL CLASS="list" COMPACT="compact"><DT CLASS="dt-list"><DD CLASS="dd-list"><TT>
asserta(+clause)<BR>
assertz(+clause)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>asserta(Clause)</TT> first converts the term <TT>Clause</TT> to a clause
and then adds it to the current internal database. The predicate concerned
must be dynamic (section&nbsp;<A HREF="#Introduction:(Dynamic-clause-management)">7.7.1</A>) or
undefined and the clause is inserted before the first clause of the
predicate. If the predicated is undefined it is created as a dynamic
procedure.<BR>
<BR>
<TT>assertz(Clause)</TT> acts like <TT>asserta/1</TT> except that the clause
is added at the end of all existing clauses of the concerned predicate.<BR>
<BR>
<B>Converting a term <TT>Clause</TT> to a clause <TT>Clause1</TT>:</B> 
<UL CLASS="itemize"><LI CLASS="li-itemize">extract the head and the body of <TT>Clause</TT>: either
<TT>Clause</TT> = <TT>(Head :- Body)</TT> or <TT>Clause</TT> = <TT>Head</TT>
and <TT>Body</TT> = <TT>true</TT>.<BR>
<BR>
<LI CLASS="li-itemize"><TT>Head</TT> must be a callable term (or else the conversion fails).<BR>
<BR>
<LI CLASS="li-itemize">convert <TT>Body</TT> to a body clause (i.e. a goal) <TT>Body1</TT>.<BR>
<BR>
<LI CLASS="li-itemize">the converted clause <TT>Clause1</TT> = <TT>(Head :- Body1)</TT>.</UL>
<B>Converting a term <TT>T</TT> to a goal:</B>
<UL CLASS="itemize"><LI CLASS="li-itemize">if <TT>T</TT> is a variable it is replaced by the term
<TT>call(T)</TT>.<BR>
<BR>
<LI CLASS="li-itemize">if <TT>T</TT> is a control construct <TT>(',')/2</TT>, <TT>(;)/2</TT>
or <TT>(-&gt;)/2</TT> each argument of the control construct is recursively
converted to a goal.<BR>
<BR>
<LI CLASS="li-itemize">if <TT>T</TT> is a callable term it remains unchanged.<BR>
<BR>
<LI CLASS="li-itemize">otherwise the conversion fails (<TT>T</TT> is neither a variable nor a
callable term).</UL>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is neither a variable nor a callable term</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Head)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Body</TT> cannot be converted to a goal</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Body)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>The predicate indicator <TT>Pred</TT> of <TT>Head</TT> is that of a
static procedure</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(modify, static_procedure, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicates.<BR>
<BR>
<A NAME="toc65"></A>
<H4 CLASS="subsubsection"><A NAME="htoc94">7.7.3</A>&nbsp;&nbsp;<TT>retract/1</TT></H4>
 
<B>Templates</B>
<DL CLASS="list" COMPACT="compact"><DT CLASS="dt-list"><DD CLASS="dd-list"><TT>
retract(+clause)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>retract(Clause)</TT> erases the first clause of the database
that unifies with <TT>Clause</TT>. The concerned predicate must be a
dynamic procedure
(section&nbsp;<A HREF="#Introduction:(Dynamic-clause-management)">7.7.1</A>). Removing all clauses
of a procedure does not erase the procedure definition. To achieve
this use <TT>abolish/1</TT> (section&nbsp;<A HREF="#abolish/1">7.7.6</A>). <TT>retract/1</TT> is
re-executable on backtracking.<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is neither a variable nor a callable term</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Head)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>The predicate indicator <TT>Pred</TT> of <TT>Head</TT> is that of a
static procedure</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(modify, static_procedure, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicate. In the ISO reference, the operation associated with the
<TT>permission_error</TT> is <TT>access</TT> while it is <TT>modify</TT> in
GNU Prolog. This seems to be an error of the ISO reference since for
<TT>asserta/1</TT> (which is similar in spirit to <TT>retract/1</TT>) the
operation is also <TT>modify</TT>.<BR>
<BR>
<A NAME="toc66"></A>
<H4 CLASS="subsubsection"><A NAME="htoc95">7.7.4</A>&nbsp;&nbsp;<TT>retractall/1</TT></H4>
 
<B>Templates</B>
<DL CLASS="list" COMPACT="compact"><DT CLASS="dt-list"><DD CLASS="dd-list"><TT>
retractall(+head)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>retractall(Head)</TT> erases all clauses whose head unifies with
<TT>Head</TT>. The concerned predicate must be a dynamic procedure
(section&nbsp;<A HREF="#Introduction:(Dynamic-clause-management)">7.7.1</A>). The procedure definition
is not removed so that it is found by <TT>current_predicate/1</TT>
(section&nbsp;<A HREF="gprolog031.html#current-predicate/1">7.8.1</A>). <TT>abolish/1</TT> should be used to remove the
procedure (section&nbsp;<A HREF="#abolish/1">7.7.6</A>).<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is not a callable term</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Head)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>The predicate indicator <TT>Pred</TT> of <TT>Head</TT> is that of a
static procedure</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(modify, static_procedure, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
GNU Prolog predicate.<BR>
<BR>
<A NAME="toc67"></A>
<H4 CLASS="subsubsection"><A NAME="htoc96">7.7.5</A>&nbsp;&nbsp;<TT>clause/2</TT></H4>
 
<B>Templates</B>
<DL CLASS="list" COMPACT="compact"><DT CLASS="dt-list"><DD CLASS="dd-list"><TT>
clause(+head, ?callable_term)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>clause(Head, Body)</TT> succeeds if there exists a clause in the
database that unifies with <TT>Head :- Body</TT>. The predicate in question
must be a public procedure (section&nbsp;<A HREF="#Introduction:(Dynamic-clause-management)">7.7.1</A>). Clauses are delivered from the first to the last. This
predicate is re-executable on backtracking. <BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Head</TT> is neither a variable nor a callable term</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Head)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>The predicate indicator <TT>Pred</TT> of <TT>Head</TT> is that of a
private procedure</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(access, private_procedure, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Body</TT> is neither a variable nor a callable term</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(callable, Body)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicate.<BR>
<BR>
<A NAME="toc68"></A>
<H4 CLASS="subsubsection"><A NAME="htoc97">7.7.6</A>&nbsp;&nbsp;<TT>abolish/1</TT></H4>
<A NAME="abolish/1"></A>
 
<B>Templates</B>
<DL CLASS="list" COMPACT="compact"><DT CLASS="dt-list"><DD CLASS="dd-list"><TT>
abolish(+predicate_indicator)</TT></DL>
<B>Description</B><BR>
<BR>
<TT>abolish(Pred)</TT> removes from the database the procedure whose
predicate indicator is <TT>Pred</TT>. The concerned predicate must be a
dynamic procedure (section&nbsp;<A HREF="#Introduction:(Dynamic-clause-management)">7.7.1</A>).<BR>
<BR>
<B>Errors</B><BR>
<TABLE CELLSPACING=2 CELLPADDING=0>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a term <TT>Name/Arity</TT> and either
<TT>Name</TT> or <TT>Arity</TT> is a variable</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>instantiation_error</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is neither a variable nor a predicate indicator</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(predicate_indicator, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a term <TT>Name/Arity</TT> and <TT>Arity</TT> is
neither a variable nor an integer</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(integer, Arity)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a term <TT>Name/Arity</TT> and <TT>Name</TT> is
neither a variable nor an atom</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>type_error(atom, Name)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a term <TT>Name/Arity</TT> and <TT>Arity</TT> is
an integer &lt; 0</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>domain_error(not_less_than_zero, Arity)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left><TT>Pred</TT> is a term <TT>Name/Arity</TT> and <TT>Arity</TT> is
an integer &gt; <TT>max_arity</TT> flag (section&nbsp;<A HREF="gprolog045.html#set-prolog-flag/2">7.22.1</A>)</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>representation_error(max_arity)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR>
<TR><TD VALIGN=top ALIGN=left>The predicate indicator <TT>Pred</TT> is that of a static
procedure</TD>
<TD VALIGN=top ALIGN=center NOWRAP>&nbsp;&nbsp;</TD>
<TD VALIGN=top ALIGN=left><TT>permission_error(modify, static_procedure, Pred)</TT></TD>
</TR>
<TR><TD BGCOLOR=black COLSPAN=3><TABLE BORDER=0 WIDTH="100%" CELLSPACING=0 CELLPADDING=1><TR><TD></TD></TR></TABLE></TD>
</TR></TABLE><BR>
<B>Portability</B><BR>
<BR>
ISO predicate.<BR>
<BR>

<HR SIZE=2>
Copyright (C) 1999-2007 Daniel Diaz
<BR>
<BR>
Verbatim copying and distribution of this entire article is permitted in any
medium, provided this notice is preserved. <BR>
<BR>
<A HREF="index.html#copyright">More about the copyright</A>
<HR>
<A HREF="gprolog029.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="gprolog023.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="gprolog031.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>