-
Notifications
You must be signed in to change notification settings - Fork 0
/
cwm.html
executable file
·165 lines (160 loc) · 14.8 KB
/
cwm.html
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
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module cwm</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>cwm</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/cwm.py">/home/syosi/cvs-trunk/WWW/2000/10/swap/cwm.py</a></font></td></tr></table>
<p><tt>$Id: cwm.html,v 1.52 2007-12-16 01:06:11 syosi Exp $<br>
<br>
Closed World Machine<br>
<br>
(also, in Wales, a valley - topologiclly a partially closed world perhaps?)<br>
<br>
This is an application which knows a certian amount of stuff and can manipulate<br>
it. It uses llyn, a (forward chaining) query engine, not an (backward chaining)<br>
inference engine: that is, it will apply all rules it can but won't figure out<br>
which ones to apply to prove something. <br>
<br>
<br>
License<br>
-------<br>
Cwm: <a href="http://www.w3.org/2000/10/swap/doc/cwm.html">http://www.w3.org/2000/10/swap/doc/cwm.html</a><br>
<br>
Copyright (c) 2000-2004 World Wide Web Consortium, (Massachusetts <br>
Institute of Technology, European Research Consortium for Informatics <br>
and Mathematics, Keio University). All Rights Reserved. This work is <br>
distributed under the W3C Software License [1] in the hope that it <br>
will be useful, but WITHOUT ANY WARRANTY; without even the implied <br>
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br>
<br>
[1] <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</a></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="swap.RDFSink.html">swap.RDFSink</a><br>
<a href="swap.diag.html">swap.diag</a><br>
</td><td width="25%" valign=top><a href="swap.llyn.html">swap.llyn</a><br>
<a href="swap.notation3.html">swap.notation3</a><br>
</td><td width="25%" valign=top><a href="string.html">string</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="swap.toXML.html">swap.toXML</a><br>
<a href="swap.uripath.html">swap.uripath</a><br>
</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="-chdir"><strong>chdir</strong></a>(...)</dt><dd><tt><a href="#-chdir">chdir</a>(path)<br>
<br>
Change the current working directory to the specified path.</tt></dd></dl>
<dl><dt><a name="-doCommand"><strong>doCommand</strong></a>()</dt><dd><tt>Command line RDF/N3 tool<br>
<br>
<command> <options> <steps> [--with <more args> ]<br>
<br>
options:<br>
<br>
--pipe Don't store, just pipe out *<br>
<br>
steps, in order left to right:<br>
<br>
--rdf Input & Output ** in RDF/XML insead of n3 from now on<br>
--n3 Input & Output in N3 from now on. (Default)<br>
--rdf=flags Input & Output ** in RDF and set given RDF flags<br>
--n3=flags Input & Output in N3 and set N3 flags<br>
--ntriples Input & Output in NTriples (equiv --n3=usbpartane -bySubject -quiet)<br>
--language=x Input & Output in "x" (rdf, n3, etc) --rdf same as: --language=rdf<br>
--languageOptions=y --n3=sp same as: --language=n3 --languageOptions=sp<br>
--ugly Store input and regurgitate, data only, fastest *<br>
--bySubject Store input and regurgitate in subject order *<br>
--no No output *<br>
(default is to store and pretty print with anonymous nodes) *<br>
--base=<uri> Set the base URI. Input or output is done as though theis were the document URI.<br>
--closure=flags Control automatic lookup of identifiers (see below)<br>
<uri> Load document. URI may be relative to current directory.<br>
<br>
--apply=foo Read rules from foo, apply to store, adding conclusions to store<br>
--patch=foo Read patches from foo, applying insertions and deletions to store<br>
--filter=foo Read rules from foo, apply to store, REPLACING store with conclusions<br>
--query=foo Read a N3QL query from foo, apply it to the store, and replace the store with its conclusions<br>
--sparql=foo Read a SPARQL query from foo, apply it to the store, and replace the store with its conclusions<br>
--rules Apply rules in store to store, adding conclusions to store<br>
--think as -rules but continue until no more rule matches (or forever!)<br>
--engine=otter use otter (in your $PATH) instead of llyn for linking, etc<br>
--why Replace the store with an explanation of its contents<br>
--why=u proof tries to be shorter<br>
--mode=flags Set modus operandi for inference (see below)<br>
--reify Replace the statements in the store with statements describing them.<br>
--dereify Undo the effects of --reify<br>
--flatten Reify only nested subexpressions (not top level) so that no {} remain.<br>
--unflatten Undo the effects of --flatten<br>
--think=foo as -apply=foo but continue until no more rule matches (or forever!)<br>
--purge Remove from store any triple involving anything in class log:Chaff<br>
--data Remove all except plain RDF triples (formulae, forAll, etc)<br>
--strings Dump :s to stdout ordered by :k whereever { :k log:outputString :s }<br>
--crypto Enable processing of crypto builtin functions. Requires python crypto.<br>
--help print this message<br>
--revision print CVS revision numbers of major modules<br>
--chatty=50 Verbose debugging output of questionable use, range 0-99<br>
--sparqlServer instead of outputting, start a SPARQL server on port 8000 of the store<br>
--sparqlResults After sparql query, print in sparqlResults format instead of rdf<br>
<br>
finally:<br>
<br>
--with Pass any further arguments to the N3 store as os:argv values<br>
<br>
<br>
* mutually exclusive<br>
** doesn't work for complex cases :-/<br>
Examples:<br>
cwm --rdf foo.rdf --n3 --pipe Convert from rdf/xml to rdf/n3<br>
cwm foo.n3 bar.n3 --think Combine data and find all deductions<br>
cwm foo.n3 --flat --n3=spart<br>
<br>
Mode flags affect inference extedning to the web:<br>
r Needed to enable any remote stuff.<br>
a When reading schema, also load rules pointed to by schema (requires r, s)<br>
E Errors loading schemas of definitive documents are ignored<br>
m Schemas and definitive documents laoded are merged into the meta knowledge<br>
(otherwise they are consulted independently)<br>
s Read the schema for any predicate in a query.<br>
u Generate unique ids using a run-specific<br>
<br>
Closure flags are set to cause the working formula to be automatically exapnded to<br>
the closure under the operation of looking up:<br>
<br>
s the subject of a statement added<br>
p the predicate of a statement added<br>
o the object of a statement added<br>
t the object of an rdf:type statement added<br>
i any owl:imports documents<br>
r any doc:rules documents<br>
E errors are ignored --- This is independant of --mode=E<br>
<br>
n Normalize IRIs to URIs<br>
e Smush together any nodes which are = (owl:sameAs)<br>
<br>
See <a href="http://www.w3.org/2000/10/swap/doc/cwm">http://www.w3.org/2000/10/swap/doc/cwm</a> for more documentation.<br>
<br>
Setting the environment variable CWM_RDFLIB to 1 maked Cwm use rdflib to parse<br>
rdf/xml files. Note that this requires rdflib.</tt></dd></dl>
<dl><dt><a name="-getcwd"><strong>getcwd</strong></a>(...)</dt><dd><tt><a href="#-getcwd">getcwd</a>() -> path<br>
<br>
Return a string representing the current working directory.</tt></dd></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>cvsRevision</strong> = '$Revision: 1.52 $'<br>
<strong>path</strong> = ['.', '/usr/lib/python2.4/site-packages/Cheesecake-0.6-py2.4.egg', '/usr/lib/python2.4/site-packages/setuptools-0.6c6-py2.4.egg', '/usr/lib/python2.4/site-packages/FuXi-0.85b.dev_r107-py2.4.egg', '/usr/lib/python2.4/site-packages/rdflib-2.4.0-py2.4-linux-i686.egg', '/usr/lib/python2.4/site-packages/storm-0.10-py2.4.egg', '/home/syosi/cvs-trunk/WWW/2000/10/swap', '/home/syosi/cvs-trunk/WWW/2000/10', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/HTMLgen', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/PIL', '/usr/lib/python2.4/site-packages/cairo', '/usr/lib/python2.4/site-packages/gnuradio', ...]<br>
<strong>qqq</strong> = '/home/syosi/cvs-trunk/WWW/2000/10/swap'<br>
<strong>tracking</strong> = 0</td></tr></table>
</body></html>