/usr/share/doc/python-swap/why.html is in python-swap 1.2.1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module why</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>why</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/syosi/cvs-trunk/WWW/2000/10/swap/why.py">/home/syosi/cvs-trunk/WWW/2000/10/swap/why.py</a></font></td></tr></table>
<p><tt>$Id: why.py,v 1.53 2007/06/27 17:58:39 syosi Exp $<br>
<br>
A class for storing the reason why something is known.<br>
The dontAsk constant reason is used as a reason for the explanations themselves-<br>
we could make it more complicated here for the recursively minded but i don't<br>
see the need at the moment.<br>
<br>
Assumes wwe are using the process-global store -- uses Namespace() @@@</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="binascii.html">binascii</a><br>
<a href="diag.html">diag</a><br>
</td><td width="25%" valign=top><a href="md5.html">md5</a><br>
<a href="string.html">string</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="uripath.html">uripath</a><br>
</td><td width="25%" valign=top><a href="urllib.html">urllib</a><br>
<a href="weakref.html">weakref</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="why.html#Reason">Reason</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="why.html#Because">Because</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="why.html#BecauseOfCommandLine">BecauseOfCommandLine</a>
</font></dt><dt><font face="helvetica, arial"><a href="why.html#BecauseOfData">BecauseOfData</a>
</font></dt><dt><font face="helvetica, arial"><a href="why.html#BecauseOfExperience">BecauseOfExperience</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="why.html#BecauseIncludes">BecauseIncludes</a>
</font></dt><dt><font face="helvetica, arial"><a href="why.html#BecauseSupports">BecauseSupports</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="why.html#BecauseOfRule">BecauseOfRule</a>
</font></dt><dt><font face="helvetica, arial"><a href="why.html#BecauseSubexpression">BecauseSubexpression</a>
</font></dt><dt><font face="helvetica, arial"><a href="why.html#KBReasonTracker">KBReasonTracker</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="why.html#BecauseMerge">BecauseMerge</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="why.html#Premise">Premise</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Because">class <strong>Because</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>For the reason given on the string.<br>
This is a kinda end of the road reason.<br>
<br>
A nested reason can also be given.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Because-__init__"><strong>__init__</strong></a>(self, str, because<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Because-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="Because-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseBuiltIn">class <strong>BecauseBuiltIn</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Because">Because</a> the built-in function given concluded so.<br>
A nested reason for running the function must be given<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BecauseBuiltIn-__init__"><strong>__init__</strong></a>(self, context, subj, pred, obj)</dt></dl>
<dl><dt><a name="BecauseBuiltIn-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>This is just a plain fact - or was at the time.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseBuiltIn-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseIncludes">class <strong>BecauseIncludes</strong></a>(<a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Because">Because</a> of the speific built-in log:includes<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseIncludes">BecauseIncludes</a></dd>
<dd><a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods inherited from <a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a>:<br>
<dl><dt><a name="BecauseIncludes-__init__"><strong>__init__</strong></a>(self, context, subj, pred, obj)</dt></dl>
<dl><dt><a name="BecauseIncludes-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>This is just a plain fact - or was at the time.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseIncludes-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseMerge">class <strong>BecauseMerge</strong></a>(<a href="why.html#KBReasonTracker">KBReasonTracker</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Because">Because</a> this formula is a merging of others<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseMerge">BecauseMerge</a></dd>
<dd><a href="why.html#KBReasonTracker">KBReasonTracker</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="BecauseMerge-__init__"><strong>__init__</strong></a>(self, f, set)</dt></dl>
<dl><dt><a name="BecauseMerge-explain"><strong>explain</strong></a>(self, ko, flags)</dt></dl>
<dl><dt><a name="BecauseMerge-newStatement"><strong>newStatement</strong></a>(self, s, why)</dt></dl>
<hr>
Methods inherited from <a href="why.html#KBReasonTracker">KBReasonTracker</a>:<br>
<dl><dt><a name="BecauseMerge-explanation"><strong>explanation</strong></a>(self, ko<font color="#909090">=None</font>, flags<font color="#909090">=''</font>)</dt><dd><tt>Produce a justification for this formula into the output formula<br>
<br>
Creates an output formula if necessary.<br>
returns it.<br>
(This is different from reason.<a href="#BecauseMerge-explain">explain</a>(ko) which returns the reason)</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseMerge-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseOfCommandLine">class <strong>BecauseOfCommandLine</strong></a>(<a href="why.html#Because">Because</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Because">Because</a> of the command line given in the string<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseOfCommandLine">BecauseOfCommandLine</a></dd>
<dd><a href="why.html#Because">Because</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="BecauseOfCommandLine-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Because">Because</a>:<br>
<dl><dt><a name="BecauseOfCommandLine-__init__"><strong>__init__</strong></a>(self, str, because<font color="#909090">=None</font>)</dt></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseOfCommandLine-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseOfData">class <strong>BecauseOfData</strong></a>(<a href="why.html#Because">Because</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Directly from data in the resource whose URI is the string.<br>
<br>
A nested reason can also be given, for why this resource was parsed.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseOfData">BecauseOfData</a></dd>
<dd><a href="why.html#Because">Because</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="BecauseOfData-__init__"><strong>__init__</strong></a>(self, source, because<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="BecauseOfData-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseOfData-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseOfExperience">class <strong>BecauseOfExperience</strong></a>(<a href="why.html#Because">Because</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Becase of the experience of this agent, as described in the string<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseOfExperience">BecauseOfExperience</a></dd>
<dd><a href="why.html#Because">Because</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods inherited from <a href="why.html#Because">Because</a>:<br>
<dl><dt><a name="BecauseOfExperience-__init__"><strong>__init__</strong></a>(self, str, because<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="BecauseOfExperience-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseOfExperience-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseOfRule">class <strong>BecauseOfRule</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BecauseOfRule-__init__"><strong>__init__</strong></a>(self, rule, bindings, knownExistentials, evidence, kb, because<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="BecauseOfRule-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseOfRule-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseSubexpression">class <strong>BecauseSubexpression</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>This was generated as part of a calculatio of a subexpression.<br>
<br>
It is is not necessarily believed<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BecauseSubexpression-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseSubexpression-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="BecauseSubexpression-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="BecauseSupports">class <strong>BecauseSupports</strong></a>(<a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt><a href="#Because">Because</a> of the very special build-in log:supports<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="why.html#BecauseSupports">BecauseSupports</a></dd>
<dd><a href="why.html#BecauseBuiltIn">BecauseBuiltIn</a></dd>
<dd><a href="why.html#Reason">Reason</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="BecauseSupports-__init__"><strong>__init__</strong></a>(self, context, subj, conclusion, pred, obj, reason)</dt></dl>
<dl><dt><a name="BecauseSupports-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="BecauseSupports-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>This is just a plain fact - or was at the time.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="BecauseSupports-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="KBReasonTracker">class <strong>KBReasonTracker</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>A reason tracker tracks the reasons for the statements in its formula.<br>
<br>
Beware that when a new formula is<br>
interned, the proofsOf dict must be informed that its identity has changed.<br>
The ForumulaReason is informed of each statement added to the knowlege<br>
base.<br>
<br>
A knowledge base (open formula) is made from the addition of forumlae,<br>
which result from, for example parsing a document or doing inference.<br>
Within such added formulae, there are variables, including bnodes, which<br>
have a cetain scope. It is impossible to consider the process<br>
as being one of simply adding statements, as the cross-reference of<br>
the vaiables within the add formuls mst be preserved. <br>
Variable renaming may occur as thr formula is added. <br>
<br>
When we track these operations for generating a proof, a proof reason<br>
such as an <a href="#BecauseOfRule">BecauseOfRule</a> or <a href="#BecauseOfData">BecauseOfData</a> corresponds to an added formula.<br>
The <a href="#KBReasonTracker">KBReasonTracker</a> tracks which statements in a formula came from which<br>
addion operations.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="KBReasonTracker-__init__"><strong>__init__</strong></a>(self, formula<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="KBReasonTracker-explain"><strong>explain</strong></a>(self, ko, flags)</dt></dl>
<dl><dt><a name="KBReasonTracker-explanation"><strong>explanation</strong></a>(self, ko<font color="#909090">=None</font>, flags<font color="#909090">=''</font>)</dt><dd><tt>Produce a justification for this formula into the output formula<br>
<br>
Creates an output formula if necessary.<br>
returns it.<br>
(This is different from reason.<a href="#KBReasonTracker-explain">explain</a>(ko) which returns the reason)</tt></dd></dl>
<dl><dt><a name="KBReasonTracker-newStatement"><strong>newStatement</strong></a>(self, s, why)</dt></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="KBReasonTracker-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Premise">class <strong>Premise</strong></a>(<a href="why.html#Reason">Reason</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>For the reason given on the string.<br>
This is a kinda end of the road reason.<br>
It contais the info which was literally supplied as a premise.<br>
<br>
A nested reason can also be given.<br>
<a href="#Because">Because</a> a premise has to be taken for granted, the tracker<br>
has to tell a Premis what statements it has.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Premise-__init__"><strong>__init__</strong></a>(self, str, because<font color="#909090">=None</font>)</dt></dl>
<dl><dt><a name="Premise-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this reason as interned in the store.</tt></dd></dl>
<hr>
Methods inherited from <a href="why.html#Reason">Reason</a>:<br>
<dl><dt><a name="Premise-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Reason">class <strong>Reason</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The <a href="#Reason">Reason</a> class holds a reason for having some information.<br>
Well, its subclasses actually do hold data. This class should not be used<br>
itself to make instances. Reasons may be given to any functions which put<br>
data into stores, is tracking or proof/explanation generation may be<br>
required<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Reason-__init__"><strong>__init__</strong></a>(self)</dt></dl>
<dl><dt><a name="Reason-explain"><strong>explain</strong></a>(self, ko, flags)</dt><dd><tt>Describe this reason to an RDF store<br>
Returns the value of this object as interned in the store.</tt></dd></dl>
<dl><dt><a name="Reason-meIn"><strong>meIn</strong></a>(self, ko)</dt><dd><tt>The representation of this object in the formula ko</tt></dd></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-describeStatement"><strong>describeStatement</strong></a>(s_l, ko, flags)</dt><dd><tt>Describe the statement into the output formula ko</tt></dd></dl>
<dl><dt><a name="-explainFormula"><strong>explainFormula</strong></a>(f, flags<font color="#909090">=''</font>)</dt><dd><tt>Return the explanation formula for f</tt></dd></dl>
<dl><dt><a name="-explainStatement"><strong>explainStatement</strong></a>(s, ko, ss<font color="#909090">=None</font>, flags<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="-explainStatements"><strong>explainStatements</strong></a>(s_l, ko, ss<font color="#909090">=None</font>, flags<font color="#909090">=''</font>)</dt></dl>
<dl><dt><a name="-formulaStandIn"><strong>formulaStandIn</strong></a>(self, ko, f, flags)<font color="#909090"><font face="helvetica, arial"> method of <a href="__builtin__.html#dict">__builtin__.dict</a> instance</font></font></dt></dl>
<dl><dt><a name="-getStatementReason"><strong>getStatementReason</strong></a>(s)</dt></dl>
<dl><dt><a name="-isTopLevel"><strong>isTopLevel</strong></a>(f)</dt></dl>
<dl><dt><a name="-newTopLevelFormula"><strong>newTopLevelFormula</strong></a>(f)</dt></dl>
<dl><dt><a name="-report"><strong>report</strong></a>(statement, why)</dt><dd><tt>Report a new statement to the reason tracking software<br>
<br>
This module stores the reasons. The store should call this<br>
method to report new data. See the <a href="#KBReasonTracker">KBReasonTracker</a> class<br>
<br>
Most formulas don't need collectors. Let's see if we can change that.</tt></dd></dl>
<dl><dt><a name="-smushedFormula"><strong>smushedFormula</strong></a>(F, G)</dt><dd><tt>The formula F has been replaced by G<br>
<br>
<a href="#Because">Because</a> this module tracks formula in stores, if ever the address<br>
of a formula is changed, that is (currently) when it is <br>
canonicalized, then the fact must be reported here.</tt></dd></dl>
<dl><dt><a name="-sorted"><strong>sorted</strong></a>(...)</dt><dd><tt><a href="#-sorted">sorted</a>(iterable, cmp=None, key=None, reverse=False) --> new sorted list</tt></dd></dl>
<dl><dt><a name="-subFormulaStandIn"><strong>subFormulaStandIn</strong></a>(self, ko, f, flags)<font color="#909090"><font face="helvetica, arial"> method of <a href="__builtin__.html#dict">__builtin__.dict</a> instance</font></font></dt></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>MAX_INLINE_SIZE</strong> = 10<br>
<strong>REIFY_NS</strong> = 'http://www.w3.org/2004/06/rei#'<br>
<strong>becauseSubexpression</strong> = <why.BecauseSubexpression instance><br>
<strong>dontAsk</strong> = <why.Because instance><br>
<strong>flagHelp</strong> = '<font color="#c040c0">\n</font>n use iNdirect formulas when they get...ays give the :gives clause, even when not needed<font color="#c040c0">\n</font>'<br>
<strong>log</strong> = <myStore.Namespace object><br>
<strong>proofsOf</strong> = <WeakKeyDictionary at 1076571532><br>
<strong>rdf</strong> = <myStore.Namespace object><br>
<strong>reason</strong> = <myStore.Namespace object></td></tr></table>
</body></html>
|