cwm 2.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cwm-2.9.3/LICENSE +26 -0
- cwm-2.9.3/LICENSE-APACHE-2.0 +201 -0
- cwm-2.9.3/LICENSE-W3C-2002 +49 -0
- cwm-2.9.3/LICENSE.n3 +13 -0
- cwm-2.9.3/LICENSE.rdf +19 -0
- cwm-2.9.3/NOTICE +17 -0
- cwm-2.9.3/PKG-INFO +205 -0
- cwm-2.9.3/README.md +177 -0
- cwm-2.9.3/cwm.egg-info/PKG-INFO +205 -0
- cwm-2.9.3/cwm.egg-info/SOURCES.txt +129 -0
- cwm-2.9.3/cwm.egg-info/dependency_links.txt +1 -0
- cwm-2.9.3/cwm.egg-info/entry_points.txt +5 -0
- cwm-2.9.3/cwm.egg-info/top_level.txt +1 -0
- cwm-2.9.3/pyproject.toml +68 -0
- cwm-2.9.3/setup.cfg +4 -0
- cwm-2.9.3/swap/__init__.py +24 -0
- cwm-2.9.3/swap/builtins/__init__.py +19 -0
- cwm-2.9.3/swap/builtins/cwm_crypto.py +201 -0
- cwm-2.9.3/swap/builtins/cwm_list.py +151 -0
- cwm-2.9.3/swap/builtins/cwm_math.py +278 -0
- cwm-2.9.3/swap/builtins/cwm_maths.py +243 -0
- cwm-2.9.3/swap/builtins/cwm_os.py +108 -0
- cwm-2.9.3/swap/builtins/cwm_set.py +209 -0
- cwm-2.9.3/swap/builtins/cwm_sparql.py +384 -0
- cwm-2.9.3/swap/builtins/cwm_sparql_ext.py +373 -0
- cwm-2.9.3/swap/builtins/cwm_string.py +376 -0
- cwm-2.9.3/swap/builtins/cwm_time.py +216 -0
- cwm-2.9.3/swap/builtins/cwm_times.py +214 -0
- cwm-2.9.3/swap/builtins/cwm_trigo.py +160 -0
- cwm-2.9.3/swap/builtins/cwm_xml.py +220 -0
- cwm-2.9.3/swap/cant.py +27 -0
- cwm-2.9.3/swap/check.py +27 -0
- cwm-2.9.3/swap/cli/__init__.py +19 -0
- cwm-2.9.3/swap/cli/cant.py +361 -0
- cwm-2.9.3/swap/cli/check.py +974 -0
- cwm-2.9.3/swap/cli/cwm.py +963 -0
- cwm-2.9.3/swap/cli/delta.py +548 -0
- cwm-2.9.3/swap/core/OrderedSequence.py +110 -0
- cwm-2.9.3/swap/core/__init__.py +19 -0
- cwm-2.9.3/swap/core/formula.py +1005 -0
- cwm-2.9.3/swap/core/mixin.py +84 -0
- cwm-2.9.3/swap/core/myStore.py +239 -0
- cwm-2.9.3/swap/core/set_importer.py +26 -0
- cwm-2.9.3/swap/core/term.py +1878 -0
- cwm-2.9.3/swap/core/triple_maker.py +288 -0
- cwm-2.9.3/swap/cwm.py +27 -0
- cwm-2.9.3/swap/diag.py +26 -0
- cwm-2.9.3/swap/interop/__init__.py +21 -0
- cwm-2.9.3/swap/interop/jena/__init__.py +38 -0
- cwm-2.9.3/swap/interop/jena/rules.py +566 -0
- cwm-2.9.3/swap/interop/jena/to_jena.py +208 -0
- cwm-2.9.3/swap/interop/jena/to_n3.py +471 -0
- cwm-2.9.3/swap/io/__init__.py +19 -0
- cwm-2.9.3/swap/io/importList.py +49 -0
- cwm-2.9.3/swap/io/uripath.py +552 -0
- cwm-2.9.3/swap/io/webAccess.py +476 -0
- cwm-2.9.3/swap/llyn.py +26 -0
- cwm-2.9.3/swap/myStore.py +26 -0
- cwm-2.9.3/swap/parser/__init__.py +19 -0
- cwm-2.9.3/swap/parser/isXML.py +483 -0
- cwm-2.9.3/swap/parser/n3p/__init__.py +15 -0
- cwm-2.9.3/swap/parser/n3p/n3meta.py +547 -0
- cwm-2.9.3/swap/parser/n3p/n3p.py +209 -0
- cwm-2.9.3/swap/parser/n3p_tm.py +348 -0
- cwm-2.9.3/swap/parser/notation3/__init__.py +78 -0
- cwm-2.9.3/swap/parser/notation3/constants.py +68 -0
- cwm-2.9.3/swap/parser/notation3/helpers.py +89 -0
- cwm-2.9.3/swap/parser/notation3/parser.py +1112 -0
- cwm-2.9.3/swap/parser/notation3/strings.py +156 -0
- cwm-2.9.3/swap/parser/notation3/tmToN3.py +268 -0
- cwm-2.9.3/swap/parser/notation3/toN3.py +490 -0
- cwm-2.9.3/swap/parser/reify.py +389 -0
- cwm-2.9.3/swap/parser/sax2rdf.py +1047 -0
- cwm-2.9.3/swap/query/__init__.py +25 -0
- cwm-2.9.3/swap/query/dbork/SqlDB.py +962 -0
- cwm-2.9.3/swap/query/dbork/TableRenderer.py +238 -0
- cwm-2.9.3/swap/query/dbork/__init__.py +15 -0
- cwm-2.9.3/swap/query/query/__init__.py +59 -0
- cwm-2.9.3/swap/query/query/constants.py +216 -0
- cwm-2.9.3/swap/query/query/query.py +688 -0
- cwm-2.9.3/swap/query/query/queryitem.py +602 -0
- cwm-2.9.3/swap/query/query/queue.py +88 -0
- cwm-2.9.3/swap/query/query/rules.py +350 -0
- cwm-2.9.3/swap/query/query/task.py +330 -0
- cwm-2.9.3/swap/query/sparql/__init__.py +15 -0
- cwm-2.9.3/swap/query/sparql/sparqlClient.py +354 -0
- cwm-2.9.3/swap/query/sparql/sparql_parser.py +158 -0
- cwm-2.9.3/swap/query/sparql/sparql_table.py +1649 -0
- cwm-2.9.3/swap/query/sparql/sparql_tokens.py +370 -0
- cwm-2.9.3/swap/query/sparql/sparql_tokens_table.py +229 -0
- cwm-2.9.3/swap/query/sparql/webserver.py +140 -0
- cwm-2.9.3/swap/query/sparql2cwm.py +1654 -0
- cwm-2.9.3/swap/reasoner/__init__.py +19 -0
- cwm-2.9.3/swap/reasoner/diag.py +94 -0
- cwm-2.9.3/swap/reasoner/llyn/__init__.py +111 -0
- cwm-2.9.3/swap/reasoner/llyn/builtins.py +569 -0
- cwm-2.9.3/swap/reasoner/llyn/constants.py +49 -0
- cwm-2.9.3/swap/reasoner/llyn/formula.py +760 -0
- cwm-2.9.3/swap/reasoner/llyn/store.py +667 -0
- cwm-2.9.3/swap/reasoner/update.py +172 -0
- cwm-2.9.3/swap/reasoner/why.py +827 -0
- cwm-2.9.3/swap/rete/__init__.py +19 -0
- cwm-2.9.3/swap/rete/pychinko/__init__.py +15 -0
- cwm-2.9.3/swap/rete/pychinko/builtins.py +498 -0
- cwm-2.9.3/swap/rete/pychinko/conclusion.py +72 -0
- cwm-2.9.3/swap/rete/pychinko/config.py +23 -0
- cwm-2.9.3/swap/rete/pychinko/exception.py +44 -0
- cwm-2.9.3/swap/rete/pychinko/helpers.py +243 -0
- cwm-2.9.3/swap/rete/pychinko/interpreter.py +203 -0
- cwm-2.9.3/swap/rete/pychinko/nodes.py +930 -0
- cwm-2.9.3/swap/rete/pychinko/prooftrace.py +42 -0
- cwm-2.9.3/swap/rete/pychinko/rete.py +224 -0
- cwm-2.9.3/swap/rete/pychinko/terms.py +293 -0
- cwm-2.9.3/swap/rete/pycwmko.py +553 -0
- cwm-2.9.3/swap/serialize/RDFSink.py +460 -0
- cwm-2.9.3/swap/serialize/__init__.py +19 -0
- cwm-2.9.3/swap/serialize/rdflib2rdf.py +180 -0
- cwm-2.9.3/swap/serialize/rdflib_user.py +115 -0
- cwm-2.9.3/swap/serialize/rdfxml.py +32 -0
- cwm-2.9.3/swap/serialize/toXML.py +1233 -0
- cwm-2.9.3/swap/serialize/xmlC14n.py +389 -0
- cwm-2.9.3/swap/term.py +26 -0
- cwm-2.9.3/swap/uripath.py +26 -0
- cwm-2.9.3/swap/util/__init__.py +19 -0
- cwm-2.9.3/swap/util/isodate.py +136 -0
- cwm-2.9.3/swap/util/local_decimal.py +489 -0
- cwm-2.9.3/swap/util/my_profiler.py +55 -0
- cwm-2.9.3/swap/util/pretty.py +956 -0
- cwm-2.9.3/swap/util/py2float.py +51 -0
- cwm-2.9.3/tests/test_n3_parser.py +117 -0
- cwm-2.9.3/tests/test_n3p.py +177 -0
cwm-2.9.3/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
CWM 2.0 — LICENCE
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
CWM 2.0 est une rénovation de CWM 1.2.1, lui-même développé sous le
|
|
5
|
+
W3C® SOFTWARE NOTICE AND LICENSE (2002/12/31).
|
|
6
|
+
|
|
7
|
+
Deux licences coexistent dans ce dépôt :
|
|
8
|
+
|
|
9
|
+
1. **W3C Software License (2002)** — s'applique au code d'origine de
|
|
10
|
+
CWM 1.2.1, inchangé. Texte intégral : voir `LICENSE-W3C-2002`.
|
|
11
|
+
Copyright (c) 2000-2004 World Wide Web Consortium (Massachusetts
|
|
12
|
+
Institute of Technology, European Research Consortium for Informatics
|
|
13
|
+
and Mathematics, Keio University). All Rights Reserved.
|
|
14
|
+
|
|
15
|
+
2. **Apache License, Version 2.0** — s'applique à l'ensemble des
|
|
16
|
+
modifications et ajouts apportés dans le cadre de CWM 2.0.
|
|
17
|
+
Texte intégral : voir `LICENSE-APACHE-2.0`.
|
|
18
|
+
|
|
19
|
+
Règle pratique :
|
|
20
|
+
- tout fichier issu de CWM 1.2.1 et **inchangé** reste sous la licence
|
|
21
|
+
W3C (sa notice est conservée dans le fichier) ;
|
|
22
|
+
- tout fichier **modifié ou créé** dans le cadre de CWM 2.0 porte un
|
|
23
|
+
en-tête Apache-2.0 (voir `NOTICE` pour les mentions d'attribution).
|
|
24
|
+
|
|
25
|
+
Les fichiers `LICENSE.n3` et `LICENSE.rdf` sont des notices de licence
|
|
26
|
+
historiques de CWM 1.2.1, conservées pour référence.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of that entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of,
|
|
58
|
+
the Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, you may act only
|
|
170
|
+
on your own behalf and on your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if you agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
W3C® SOFTWARE NOTICE AND LICENSE
|
|
2
|
+
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
|
3
|
+
|
|
4
|
+
This work (and included software, documentation
|
|
5
|
+
such as READMEs, or other related items) is being
|
|
6
|
+
provided by the copyright holders under the following
|
|
7
|
+
license. By obtaining, using and/or copying this
|
|
8
|
+
work, you (the licensee) agree that you have read,
|
|
9
|
+
understood, and will comply with the following terms and conditions.
|
|
10
|
+
|
|
11
|
+
Permission to copy, modify, and distribute this
|
|
12
|
+
software and its documentation, with or without
|
|
13
|
+
modification, for any purpose and without fee or
|
|
14
|
+
royalty is hereby granted, provided that you
|
|
15
|
+
include the following on ALL copies of the software
|
|
16
|
+
and documentation or portions thereof, including
|
|
17
|
+
modifications:
|
|
18
|
+
|
|
19
|
+
1. The full text of this NOTICE in a location
|
|
20
|
+
viewable to users of the redistributed or derivative work.
|
|
21
|
+
2. Any pre-existing intellectual property
|
|
22
|
+
disclaimers, notices, or terms and conditions.
|
|
23
|
+
If none exist, the W3C Software Short Notice
|
|
24
|
+
should be included (hypertext is preferred, text
|
|
25
|
+
is permitted) within the body of any redistributed
|
|
26
|
+
or derivative code.
|
|
27
|
+
3. Notice of any changes or modifications to the
|
|
28
|
+
files, including the date changes were made. (We
|
|
29
|
+
recommend you provide URIs to the location from
|
|
30
|
+
which the code is derived.)
|
|
31
|
+
|
|
32
|
+
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS,"
|
|
33
|
+
AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR
|
|
34
|
+
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
35
|
+
LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
|
|
36
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
|
|
37
|
+
SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD
|
|
38
|
+
PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
|
39
|
+
|
|
40
|
+
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,
|
|
41
|
+
INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
42
|
+
OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
|
43
|
+
|
|
44
|
+
The name and trademarks of copyright holders may
|
|
45
|
+
NOT be used in advertising or publicity pertaining
|
|
46
|
+
to the software without specific, written prior
|
|
47
|
+
permission. Title to copyright in this software
|
|
48
|
+
and any associated documentation will at all times
|
|
49
|
+
remain with copyright holders.
|
cwm-2.9.3/LICENSE.n3
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This licence is used for files in this distribution.
|
|
2
|
+
|
|
3
|
+
@prefix doc:<http://www.w3.org/2000/10/swap/pim/doc#>.
|
|
4
|
+
@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
+
|
|
6
|
+
<> a doc:OpenSourceLicense;
|
|
7
|
+
doc:subLicense <http://www.w3.org/Consortium/Legal/copyright-software-19980720>;
|
|
8
|
+
s:comment """Share and Enjoy. Open Source license:
|
|
9
|
+
Copyright (c) 2000,1,2 W3C (MIT, INRIA, Keio)
|
|
10
|
+
Copyright other contributers mentioned in individual files.
|
|
11
|
+
http://www.w3.org/Consortium/Legal/copyright-software-19980720""".
|
|
12
|
+
|
|
13
|
+
# ends
|
cwm-2.9.3/LICENSE.rdf
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
<!-- Processed by Id: cwm.py,v 1.96 2002/06/07 20:07:17 timbl Exp -->
|
|
3
|
+
<!-- using base file:/devel/WWW/2000/10/swap/LICENSE.n3-->
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<rdf:RDF xmlns="http://www.w3.org/2000/10/swap/pim/doc#"
|
|
7
|
+
xmlns:doc="http://www.w3.org/2000/10/swap/pim/doc#"
|
|
8
|
+
xmlns:log="http://www.w3.org/2000/10/swap/log#"
|
|
9
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
10
|
+
xmlns:s="http://www.w3.org/2000/01/rdf-schema#">
|
|
11
|
+
|
|
12
|
+
<OpenSourceLicense rdf:about="">
|
|
13
|
+
<s:comment>Share and Enjoy. Open Source license:
|
|
14
|
+
Copyright (c) 2000,1,2 W3C (MIT, INRIA, Keio)
|
|
15
|
+
Copyright other contributers mentioned in individual files.
|
|
16
|
+
http://www.w3.org/Consortium/Legal/copyright-software-19980720</s:comment>
|
|
17
|
+
<subLicense rdf:resource="http://www.w3.org/Consortium/Legal/copyright-software-19980720"/>
|
|
18
|
+
</OpenSourceLicense>
|
|
19
|
+
</rdf:RDF>
|
cwm-2.9.3/NOTICE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
CWM 2.0 — Closed World Machine (rénovation de CWM 1.2.1)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2000-2004 World Wide Web Consortium (Massachusetts
|
|
4
|
+
Institute of Technology, European Research Consortium for Informatics
|
|
5
|
+
and Mathematics, Keio University). All Rights Reserved.
|
|
6
|
+
Contributions notables : Tim Berners-Lee, Dan Connolly, Sean Palmer,
|
|
7
|
+
Mark Nottingham, Eric Prud'hommeaux, Sandro Hawke, Dan Brickley,
|
|
8
|
+
Karl Dubost, Yosi Scharf.
|
|
9
|
+
|
|
10
|
+
Ce projet inclut un logiciel développé au W3C / HP Labs (CWM 1.2.1),
|
|
11
|
+
fourni sous W3C Software License (2002/12/31).
|
|
12
|
+
Voir LICENSE-W3C-2002.
|
|
13
|
+
|
|
14
|
+
Les modifications et ajouts apportés dans le cadre de CWM 2.0
|
|
15
|
+
(rénovation, portage Python 3, outillage, documentation) sont
|
|
16
|
+
fournis sous Apache License, Version 2.0.
|
|
17
|
+
Voir LICENSE-APACHE-2.0.
|
cwm-2.9.3/PKG-INFO
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cwm
|
|
3
|
+
Version: 2.9.3
|
|
4
|
+
Summary: Closed World Machine — semantic web reasoner (RDF / N3 / SPARQL)
|
|
5
|
+
Author: Tim Berners-Lee, Dan Connolly, CWM contributors
|
|
6
|
+
Maintainer-email: "E. Desmontils" <emmanuel.desmontils@univ-nantes.fr>
|
|
7
|
+
License: W3C Software License (2002) for original code; Apache-2.0 for CWM 2.0 modifications (see LICENSE)
|
|
8
|
+
Project-URL: Homepage, https://www.w3.org/2000/10/swap/
|
|
9
|
+
Project-URL: Repository, https://gitlab.univ-nantes.fr/desmontils-e/cwm.git
|
|
10
|
+
Project-URL: Bug Tracker, https://gitlab.univ-nantes.fr/desmontils-e/cwm.git/-/issues
|
|
11
|
+
Project-URL: Original (CWM 1.2.1), https://www.w3.org/2000/10/swap/cwm/v1.2.1/cwm.tgz
|
|
12
|
+
Keywords: semantic-web,rdf,n3,sparql,reasoner,swat
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
License-File: LICENSE-APACHE-2.0
|
|
23
|
+
License-File: LICENSE-W3C-2002
|
|
24
|
+
License-File: LICENSE.n3
|
|
25
|
+
License-File: LICENSE.rdf
|
|
26
|
+
License-File: NOTICE
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# CWM 2.0 — Closed World Machine
|
|
30
|
+
|
|
31
|
+
> **CWM 2.0 est une rénovation de [CWM 1.2.1](https://www.w3.org/2000/10/swap/doc/cwm.html)**
|
|
32
|
+
> (W3C / HP Labs, 2007) : un raisonneur à chaînage avant pour le RDF/N3,
|
|
33
|
+
> corrigé et modernisé pour Python 3.
|
|
34
|
+
>
|
|
35
|
+
> Dépôt : <https://gitlab.univ-nantes.fr/desmontils-e/cwm>
|
|
36
|
+
>
|
|
37
|
+
> Rénovation réalisée par Emmanuel Desmontils (Nantes Université), assisté d'un agent IA (Open Code Version 2.3.2, avec qwen-3.8-27b servi par [ILaaS](https://www.ilaas.fr/)).
|
|
38
|
+
|
|
39
|
+
CWM est un processeur généraliste de données pour le web sémantique —
|
|
40
|
+
« sed/awk/XSLT du RDF » : il permet de **requêter, vérifier, transformer
|
|
41
|
+
et filtrer** des informations, avec le RDF étendu aux règles comme
|
|
42
|
+
langage de base et les sérialisations RDF/XML, N3 (Notation 3) ou
|
|
43
|
+
Turtle comme formats d'échange.
|
|
44
|
+
|
|
45
|
+
## Fonctionnalités
|
|
46
|
+
|
|
47
|
+
- Raisonneur à chaînage avant (moteur `llyn`) : règles, `--think`, `--apply`,
|
|
48
|
+
`--filter`, `--patch` ;
|
|
49
|
+
- Requêtes **N3QL** (`--query`) et **SPARQL 1.0** (`--sparql`)
|
|
50
|
+
(couverture par rapport à la 1.1 ci-dessous) ;
|
|
51
|
+
- Génération de **preuves** des conclusions (`--why`) ;
|
|
52
|
+
- Validation de conclusions (`check`), diff/patch de graphes
|
|
53
|
+
(`delta`, `cant`) ;
|
|
54
|
+
- Sérialisations N3, RDF/XML, NTriples, Turtle ;
|
|
55
|
+
- Fonctions intégrées : math, listes, chaînes, temps, ensembles, OS,
|
|
56
|
+
crypto, SPARQL.
|
|
57
|
+
|
|
58
|
+
## Statut du projet
|
|
59
|
+
|
|
60
|
+
**CWM 2.0 est livré** (étapes 0-6 terminées, tag `v2.0.0`), et
|
|
61
|
+
l'**étape 7** (refactoring structurel non cassant) est terminée —
|
|
62
|
+
**objectif O8 atteint** :
|
|
63
|
+
|
|
64
|
+
- phases A/B en tags **`v2.1.0`** / **`v2.2.0`** : l'arborescence
|
|
65
|
+
`swap/` est structurée par responsabilité (`core/`, `parser/`,
|
|
66
|
+
`reasoner/`, `serialize/`, `query/`, `rete/`, `cli/`, `io/`,
|
|
67
|
+
`util/`, `builtins/`) ;
|
|
68
|
+
- **`v2.3.0`** : retrait des shims de compatibilité (cassant, politique
|
|
69
|
+
2.x) ;
|
|
70
|
+
- **`v2.4.0`** / **`v2.5.0`** / **`v2.6.0`** : découpage des trois
|
|
71
|
+
monolithes `llyn.py`, `notation3.py`, `query.py` en packages
|
|
72
|
+
(namespace public inchangé, re-export intégral).
|
|
73
|
+
|
|
74
|
+
Voir la feuille de route et l'analyse de l'état des lieux :
|
|
75
|
+
[doc/CWM-2.0.md](doc/CWM-2.0.md).
|
|
76
|
+
|
|
77
|
+
- L'état d'origine CWM 1.2.1 est conservé à l'identique (tag git
|
|
78
|
+
`v1.2.1`) et sert de base ;
|
|
79
|
+
- Le portage Python 3 est terminé (le code 1.2.1 d'origine ne fonctionne
|
|
80
|
+
que sous Python 2) ;
|
|
81
|
+
- La suite de 178 tests hors ligne (`test/regression.n3` +
|
|
82
|
+
`test/*/detailed.tests`) est exécutée par `make test` ; 165 tests
|
|
83
|
+
passent, les 13 échecs résiduels sont documentés dans
|
|
84
|
+
[doc/TESTS.md](doc/TESTS.md) (références 2005 obsolètes, crashes
|
|
85
|
+
hérités de 1.2.1 — aucun bug de portage, plus aucun test dépendant du
|
|
86
|
+
réseau) ;
|
|
87
|
+
- Le pipeline GitLab CI (`.gitlab-ci.yml`) rejoue `make check` et
|
|
88
|
+
`make test` sur Python 3.9 / 3.11 / 3.12, plus un job de packaging
|
|
89
|
+
(build, installation vierge, test de fumée du binaire installé) ;
|
|
90
|
+
- Les contraintes du projet (licence, Python 3, emballage, tests) sont
|
|
91
|
+
vérifiées automatiquement par `make check`
|
|
92
|
+
([doc/CONTRAINTES.md](doc/CONTRAINTES.md)) ; le changelog est dans
|
|
93
|
+
[doc/changes.md](doc/changes.md).
|
|
94
|
+
|
|
95
|
+
## Installation
|
|
96
|
+
|
|
97
|
+
### CWM 1.2.1 (état d'origine, Python 2 requis)
|
|
98
|
+
|
|
99
|
+
L'état d'origine n'est plus installé depuis ce dépôt (le harness
|
|
100
|
+
`test/Makefile` a été remplacé par `make test`) ; le restaurer :
|
|
101
|
+
`git checkout v1.2.1`, puis `./setup.py install`.
|
|
102
|
+
|
|
103
|
+
### CWM 2.0 (Python ≥ 3.9)
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
pip install .
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Ce qui installera les commandes `cwm`, `delta`, `cant` et `check`
|
|
110
|
+
(entry points `[project.scripts]` de `pyproject.toml`). Le paquet peut
|
|
111
|
+
aussi s'utiliser directement depuis le dépôt, sans installation :
|
|
112
|
+
`python3 -m swap.cwm`, `python3 -m swap.delta`, `python3 -m swap.cant`,
|
|
113
|
+
`python3 -m swap.check`.
|
|
114
|
+
|
|
115
|
+
## Usage
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
# Charger un fichier N3 et afficher la closure (application des règles)
|
|
119
|
+
cwm fichier.n3 --think
|
|
120
|
+
|
|
121
|
+
# Requêter en SPARQL
|
|
122
|
+
cwm fichier.n3 --sparql=requete.sparql
|
|
123
|
+
|
|
124
|
+
# Sérialiser en RDF/XML
|
|
125
|
+
cwm fichier.n3 --rdf > sortie.rdf
|
|
126
|
+
|
|
127
|
+
# Générer la preuve d'une conclusion
|
|
128
|
+
cwm fichier.n3 --why
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Pour aller plus loin** :
|
|
132
|
+
|
|
133
|
+
- [doc/TUTORIEL.md](doc/TUTORIEL.md) — tutoriel progressif en 10 chapitres,
|
|
134
|
+
du premier graphe N3 aux preuves vérifiées, avec des exemples testés
|
|
135
|
+
(`doc/examples/`) ;
|
|
136
|
+
- [doc/CLI.md](doc/CLI.md) — mode d'emploi complet des quatre commandes
|
|
137
|
+
(`cwm`, `delta`, `cant`, `check`) : toutes les options, drapeaux de
|
|
138
|
+
format et codes de sortie.
|
|
139
|
+
|
|
140
|
+
Référence des options en ligne : `cwm --help`, `delta --help`,
|
|
141
|
+
`cant --help`, `check --help`.
|
|
142
|
+
|
|
143
|
+
## SPARQL 1.1 : couverture
|
|
144
|
+
|
|
145
|
+
CWM lit les requêtes **SPARQL 1.0** : la syntaxe ne comprend pas les
|
|
146
|
+
extensions de la 1.1, mais la sémantique des `FILTER` suit la
|
|
147
|
+
tri-valuation de la spécification (SPARQL 1.1 § 18 : une erreur de
|
|
148
|
+
type écarte la solution au lieu de la conserver), et le comportement
|
|
149
|
+
est vérifié par croisé avec Jena ARQ (`make crosscheck`).
|
|
150
|
+
|
|
151
|
+
**Ce que CWM fait (syntaxe 1.0)** :
|
|
152
|
+
|
|
153
|
+
- `SELECT` (avec `DISTINCT`), `ASK`, `CONSTRUCT`, `DESCRIBE` — le
|
|
154
|
+
laboratoire `lab/` n'évalue que `SELECT`/`ASK` ;
|
|
155
|
+
- `WHERE` : triplets, `OPTIONAL`, `UNION`, `MINUS`, `FILTER` (dont
|
|
156
|
+
`EXISTS` / `NOT EXISTS`), `FROM` / `NAMED` ;
|
|
157
|
+
- `ORDER BY`, `LIMIT`, `OFFSET` ;
|
|
158
|
+
- builtins utilisables dans `FILTER` : comparaisons, tests de type
|
|
159
|
+
(`log:isURI`, `log:isInteger`, `log:isNumeric`), chaînes
|
|
160
|
+
(`string:length`, `string:substring`, `string:replace`,
|
|
161
|
+
`string:trim`, …), mathématiques (`math:sqrt`, `math:min`,
|
|
162
|
+
`math:max`, `math:avg`, …), `time:now` ;
|
|
163
|
+
- sortie `--sparqlResults` au format `sparql-results+xml`.
|
|
164
|
+
|
|
165
|
+
**Ce que CWM ne fait pas (extensions 1.1)** :
|
|
166
|
+
|
|
167
|
+
- pas de `GROUP BY`, `HAVING` ni fonctions d'agrégation
|
|
168
|
+
(`COUNT`, `SUM`, `AVG`, …) ;
|
|
169
|
+
- pas de `BIND`, `VALUES`, sous-requêtes ni fenêtres
|
|
170
|
+
(`WINDOW` / `SUBWINDOW`) ;
|
|
171
|
+
- pas de SPARQL Update (`INSERT DATA`, `DELETE ... WHERE`, `LOAD`,
|
|
172
|
+
…) — CWM ne modifie jamais le graphe via une requête ;
|
|
173
|
+
- pas de `SERVICE` (requêtes fédérées).
|
|
174
|
+
|
|
175
|
+
## Licence
|
|
176
|
+
|
|
177
|
+
CWM 2.0 est une **rénovation** de CWM 1.2.1. Deux licences coexistent :
|
|
178
|
+
|
|
179
|
+
| Code | Licence |
|
|
180
|
+
|---|---|
|
|
181
|
+
| Code d'origine CWM 1.2.1 (inchangé) | **W3C Software License (2002)** — [LICENSE-W3C-2002](LICENSE-W3C-2002) |
|
|
182
|
+
| Modifications et ajouts de CWM 2.0 | **Apache License 2.0** — [LICENSE-APACHE-2.0](LICENSE-APACHE-2.0) |
|
|
183
|
+
|
|
184
|
+
Le [NOTICE](NOTICE) reprend les mentions d'attribution obligatoires.
|
|
185
|
+
Voir aussi [LICENSE](LICENSE) pour la notice de licence complète.
|
|
186
|
+
|
|
187
|
+
## Documentation
|
|
188
|
+
|
|
189
|
+
- [doc/TUTORIEL.md](doc/TUTORIEL.md) — tutoriel progressif avec exemples
|
|
190
|
+
testés ;
|
|
191
|
+
- [doc/CLI.md](doc/CLI.md) — mode d'emploi des outils en ligne de
|
|
192
|
+
commande ;
|
|
193
|
+
- [doc/CWM-2.0.md](doc/CWM-2.0.md) — objectifs, analyse, feuille de route ;
|
|
194
|
+
- [doc/changes.md](doc/changes.md) — changelog CWM 2.0 (modifications et
|
|
195
|
+
limitations connues) ;
|
|
196
|
+
- [doc/CONTRAINTES.md](doc/CONTRAINTES.md) — contraintes du projet et
|
|
197
|
+
leur vérification automatique (`make check`) ;
|
|
198
|
+
- [doc/TESTS.md](doc/TESTS.md) — état de la suite de tests et triage des
|
|
199
|
+
échecs résiduels ;
|
|
200
|
+
- [lab/](lab/README.md) — outil TP Web sémantique (tableau de bord
|
|
201
|
+
cohérence / validité / règles sur CWM 2.0) ;
|
|
202
|
+
- [doc/changes.html](doc/changes.html) — journal des changements
|
|
203
|
+
historique de CWM 1.2.1 (jusqu'à 1.2.0) ;
|
|
204
|
+
- [README](README) — README original de CWM 1.2.1 (conservé pour
|
|
205
|
+
référence).
|