rdf-n3 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +0 -1
- data/History.md +6 -1
- data/README.md +15 -1
- data/Rakefile +1 -28
- data/VERSION +1 -1
- data/lib/rdf/n3/format.rb +6 -2
- data/lib/rdf/n3/reader/bnf-rules.n3 +134 -0
- data/lib/rdf/n3/reader/n3-selectors.n3 +0 -0
- data/lib/rdf/n3/reader/n3.n3 +261 -0
- data/lib/rdf/n3/reader/parser.rb +1 -1
- data/rdf-n3.gemspec +411 -603
- data/script/build_meta +20 -13
- data/script/parse +2 -2
- data/script/yard-to-rubyforge +2 -0
- data/spec/.gitignore +1 -0
- data/spec/cwm_spec.rb +8 -13
- data/spec/cwm_test.rb +76 -0
- data/spec/format_spec.rb +4 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/swap_spec.rb +35 -31
- data/spec/swap_test.rb +79 -0
- data/spec/turtle_spec.rb +13 -19
- data/spec/turtle_test.rb +98 -0
- data/spec/writer_spec.rb +7 -10
- metadata +38 -228
- data/.gitignore +0 -5
- data/spec/rdf_helper.rb +0 -226
- data/spec/swap_test/animal.rdf +0 -17
- data/spec/swap_test/anon-prop.n3 +0 -14
- data/spec/swap_test/anonymous_loop.n3 +0 -2
- data/spec/swap_test/contexts.n3 +0 -16
- data/spec/swap_test/daml-pref.n3 +0 -10
- data/spec/swap_test/i18n/hiragana.n3 +0 -22
- data/spec/swap_test/i18n/n3string.n3 +0 -4
- data/spec/swap_test/list/itemType.rdf +0 -12
- data/spec/swap_test/lists-simple.n3 +0 -40
- data/spec/swap_test/lists.n3 +0 -35
- data/spec/swap_test/n3/n3parser.tests_n3_10001.nt +0 -3
- data/spec/swap_test/n3/n3parser.tests_n3_10002.nt +0 -7
- data/spec/swap_test/n3/n3parser.tests_n3_10003.nt +0 -3
- data/spec/swap_test/n3/n3parser.tests_n3_10004.nt +0 -119
- data/spec/swap_test/n3/n3parser.tests_n3_10005.nt +0 -3
- data/spec/swap_test/n3/n3parser.tests_n3_10006.nt +0 -225
- data/spec/swap_test/n3/n3parser.tests_n3_10007.nt +0 -79
- data/spec/swap_test/n3/n3parser.tests_n3_10008.nt +0 -5
- data/spec/swap_test/n3/n3parser.tests_n3_10009.nt +0 -13
- data/spec/swap_test/n3/n3parser.tests_n3_10010.nt +0 -21
- data/spec/swap_test/n3/n3parser.tests_n3_10011.nt +0 -9
- data/spec/swap_test/n3/n3parser.tests_n3_10012.nt +0 -53
- data/spec/swap_test/n3/n3parser.tests_n3_10013.nt +0 -19
- data/spec/swap_test/n3/n3parser.tests_n3_10014.nt +0 -103
- data/spec/swap_test/n3/n3parser.tests_n3_10015.nt +0 -103
- data/spec/swap_test/n3/n3parser.tests_n3_10016.nt +0 -3
- data/spec/swap_test/n3/n3parser.tests_n3_10017.nt +0 -151
- data/spec/swap_test/n3/n3parser.tests_n3_10018.nt +0 -9
- data/spec/swap_test/n3/n3parser.tests_n3_10019.nt +0 -3
- data/spec/swap_test/n3/n3parser.tests_n3_10020.nt +0 -13
- data/spec/swap_test/n3parser.tests +0 -160
- data/spec/swap_test/n3parser.yml +0 -174
- data/spec/swap_test/nodeID/classes.n3 +0 -9
- data/spec/swap_test/nodeID/classes.ref.rdf +0 -15
- data/spec/swap_test/nodeID/ex1.rdf +0 -15
- data/spec/swap_test/norm/fix.rdf +0 -33
- data/spec/swap_test/owl-ex.rdf +0 -150
- data/spec/swap_test/ref/animal.n3 +0 -11
- data/spec/swap_test/ref/anon-prop-1.n3 +0 -8
- data/spec/swap_test/ref/anonymous_loop.ref +0 -7
- data/spec/swap_test/ref/bnode.n3 +0 -6
- data/spec/swap_test/ref/bnode.rdf +0 -16
- data/spec/swap_test/ref/colon-in-uri.n3 +0 -15
- data/spec/swap_test/ref/contexts-1.n3 +0 -12
- data/spec/swap_test/ref/daml-ex.n3 +0 -103
- data/spec/swap_test/ref/daml-ont.n3 +0 -289
- data/spec/swap_test/ref/djb1a-out.n3 +0 -4
- data/spec/swap_test/ref/dot-dash.n3 +0 -8
- data/spec/swap_test/ref/in-xml-t.n3 +0 -4
- data/spec/swap_test/ref/itemType.n3 +0 -9
- data/spec/swap_test/ref/keywords1.n3 +0 -11
- data/spec/swap_test/ref/keywords2.n3 +0 -11
- data/spec/swap_test/ref/lists-simple-1.rdf +0 -108
- data/spec/swap_test/ref/lists.n3 +0 -43
- data/spec/swap_test/ref/lstring-out.n3 +0 -20
- data/spec/swap_test/ref/n3string.n3 +0 -13
- data/spec/swap_test/ref/no-last-nl.n3 +0 -3
- data/spec/swap_test/ref/numbers.n3 +0 -18
- data/spec/swap_test/ref/path1.n3 +0 -8
- data/spec/swap_test/ref/path2.n3 +0 -39
- data/spec/swap_test/ref/prefix1.rdf +0 -31
- data/spec/swap_test/ref/prefix2.rdf +0 -33
- data/spec/swap_test/ref/prefix3.rdf +0 -31
- data/spec/swap_test/ref/rdf-redefine.rdf +0 -11
- data/spec/swap_test/ref/reluri-1.rdf +0 -18
- data/spec/swap_test/ref/strquot.n3 +0 -22
- data/spec/swap_test/ref/strquot_a.n3 +0 -23
- data/spec/swap_test/ref/xml-base3.n3 +0 -5
- data/spec/swap_test/ref/xml-redefine.rdf +0 -20
- data/spec/swap_test/ref/xml-redefine2.rdf +0 -23
- data/spec/swap_test/ref/xml-syntax-basic-serialization.rdf +0 -10
- data/spec/swap_test/ref/xmllit.nt +0 -3
- data/spec/swap_test/regression.n3 +0 -231
- data/spec/swap_test/regression.yml +0 -256
- data/spec/swap_test/reluri-1.n3 +0 -10
- data/spec/swap_test/strquot.n3 +0 -23
- data/spec/swap_test/syntax/colon-in-uri.rdf +0 -27
- data/spec/swap_test/syntax/djb1a.n3 +0 -3
- data/spec/swap_test/syntax/dot-dash.n3 +0 -15
- data/spec/swap_test/syntax/equals1.n3 +0 -1
- data/spec/swap_test/syntax/equals2.n3 +0 -1
- data/spec/swap_test/syntax/keywords1.n3 +0 -17
- data/spec/swap_test/syntax/keywords2.n3 +0 -18
- data/spec/swap_test/syntax/lstring.n3 +0 -26
- data/spec/swap_test/syntax/neg-formula-predicate.n3 +0 -1
- data/spec/swap_test/syntax/neg-keywords3.n3 +0 -1
- data/spec/swap_test/syntax/neg-literal-predicate.n3 +0 -1
- data/spec/swap_test/syntax/neg-single-quote.n3 +0 -1
- data/spec/swap_test/syntax/neg-thisadoc.n3 +0 -1
- data/spec/swap_test/syntax/no-last-nl.n3 +0 -2
- data/spec/swap_test/syntax/numbers.n3 +0 -26
- data/spec/swap_test/syntax/path1.n3 +0 -23
- data/spec/swap_test/syntax/path2.n3 +0 -31
- data/spec/swap_test/syntax/qvars1.n3 +0 -19
- data/spec/swap_test/syntax/qvars2.n3 +0 -19
- data/spec/swap_test/syntax/this-quantifiers.n3 +0 -164
- data/spec/swap_test/syntax/this-rules.n3 +0 -43
- data/spec/swap_test/syntax/too-nested.n3 +0 -25
- data/spec/swap_test/syntax/trailing-semicolon.n3 +0 -12
- data/spec/swap_test/syntax/zero-objects.n3 +0 -1
- data/spec/swap_test/syntax/zero-predicates.n3 +0 -3
- data/spec/swap_test/tests-work.txt +0 -25
- data/spec/swap_test/xml-syntax/basic-serialization.n3 +0 -8
- data/spec/swap_test/xml-syntax/in-xml.xml +0 -13
- data/spec/swap_test/xml-syntax/non-ascii-pred.rdf +0 -14
- data/spec/swap_test/xml-syntax/rdf_prefix.n3 +0 -2
- data/spec/swap_test/xml-syntax/xml_prefix.n3 +0 -7
- data/spec/swap_test/xml-syntax/xml_prefix2.n3 +0 -9
- data/spec/swap_test/xml-syntax/xmlbase3.rdf +0 -10
- data/spec/swap_test/xml-syntax/xmllit.rdf +0 -33
- data/spec/turtle/README.txt +0 -20
- data/spec/turtle/bad-00.ttl +0 -2
- data/spec/turtle/bad-01.ttl +0 -3
- data/spec/turtle/bad-02.ttl +0 -3
- data/spec/turtle/bad-03.ttl +0 -3
- data/spec/turtle/bad-04.ttl +0 -3
- data/spec/turtle/bad-05.ttl +0 -4
- data/spec/turtle/bad-06.ttl +0 -3
- data/spec/turtle/bad-07.ttl +0 -4
- data/spec/turtle/bad-08.ttl +0 -2
- data/spec/turtle/bad-09.ttl +0 -3
- data/spec/turtle/bad-10.ttl +0 -3
- data/spec/turtle/bad-11.ttl +0 -3
- data/spec/turtle/bad-12.ttl +0 -3
- data/spec/turtle/bad-13.ttl +0 -3
- data/spec/turtle/bad-14.ttl +0 -6
- data/spec/turtle/manifest-bad.ttl +0 -88
- data/spec/turtle/manifest-bad.yml +0 -91
- data/spec/turtle/manifest.ttl +0 -215
- data/spec/turtle/manifest.yml +0 -187
- data/spec/turtle/rdf-schema.out +0 -126
- data/spec/turtle/rdf-schema.ttl +0 -156
- data/spec/turtle/rdfq-results.out +0 -36
- data/spec/turtle/rdfq-results.ttl +0 -39
- data/spec/turtle/rdfs-namespace.out +0 -131
- data/spec/turtle/rdfs-namespace.ttl +0 -160
- data/spec/turtle/test-00.out +0 -1
- data/spec/turtle/test-00.ttl +0 -2
- data/spec/turtle/test-01.out +0 -3
- data/spec/turtle/test-01.ttl +0 -7
- data/spec/turtle/test-02.out +0 -3
- data/spec/turtle/test-02.ttl +0 -5
- data/spec/turtle/test-03.out +0 -3
- data/spec/turtle/test-03.ttl +0 -5
- data/spec/turtle/test-04.out +0 -2
- data/spec/turtle/test-04.ttl +0 -4
- data/spec/turtle/test-05.out +0 -4
- data/spec/turtle/test-05.ttl +0 -4
- data/spec/turtle/test-06.out +0 -1
- data/spec/turtle/test-06.ttl +0 -3
- data/spec/turtle/test-07.out +0 -5
- data/spec/turtle/test-07.ttl +0 -3
- data/spec/turtle/test-08.out +0 -1
- data/spec/turtle/test-08.ttl +0 -3
- data/spec/turtle/test-09.out +0 -4
- data/spec/turtle/test-09.ttl +0 -10
- data/spec/turtle/test-10.out +0 -5
- data/spec/turtle/test-10.ttl +0 -5
- data/spec/turtle/test-11.out +0 -4
- data/spec/turtle/test-11.ttl +0 -10
- data/spec/turtle/test-12.out +0 -4
- data/spec/turtle/test-12.ttl +0 -9
- data/spec/turtle/test-13.out +0 -2
- data/spec/turtle/test-13.ttl +0 -7
- data/spec/turtle/test-14.out +0 -10000
- data/spec/turtle/test-14.ttl +0 -10002
- data/spec/turtle/test-15.out +0 -10000
- data/spec/turtle/test-15.ttl +0 -3
- data/spec/turtle/test-16.out +0 -10000
- data/spec/turtle/test-16.ttl +0 -10002
- data/spec/turtle/test-17.out +0 -1
- data/spec/turtle/test-17.ttl +0 -6
- data/spec/turtle/test-18.out +0 -2
- data/spec/turtle/test-18.ttl +0 -9
- data/spec/turtle/test-19.out +0 -1
- data/spec/turtle/test-19.ttl +0 -4
- data/spec/turtle/test-20.out +0 -2
- data/spec/turtle/test-20.ttl +0 -6
- data/spec/turtle/test-21.out +0 -3
- data/spec/turtle/test-21.ttl +0 -4
- data/spec/turtle/test-22.out +0 -3
- data/spec/turtle/test-22.ttl +0 -4
- data/spec/turtle/test-23.out +0 -1
- data/spec/turtle/test-23.ttl +0 -3
- data/spec/turtle/test-24.out +0 -2
- data/spec/turtle/test-24.ttl +0 -3
- data/spec/turtle/test-25.out +0 -7
- data/spec/turtle/test-25.ttl +0 -14
- data/spec/turtle/test-26.out +0 -1
- data/spec/turtle/test-26.ttl +0 -4
- data/spec/turtle/test-27.out +0 -1
- data/spec/turtle/test-27.ttl +0 -5
- data/spec/turtle/test-28-out.ttl +0 -6
- data/spec/turtle/test-28.out +0 -22
- data/spec/turtle/test-28.ttl +0 -22
- data/spec/turtle/test-29.out +0 -1
- data/spec/turtle/test-29.ttl +0 -1
- data/spec/turtle/test-30.out +0 -5
- data/spec/turtle/test-30.ttl +0 -12
data/spec/swap_test/reluri-1.n3
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
@prefix p: <file://www.example.org/personal_details#> .
|
2
|
-
@prefix m: <file://www.example.org/meeting_organization#> .
|
3
|
-
|
4
|
-
<file://www.example.org/people#fred>
|
5
|
-
p:GivenName "Fred";
|
6
|
-
p:hasEmail <mailto:fred@example.com>;
|
7
|
-
m:attending <file://meetings.example.com/cal#m1> .
|
8
|
-
|
9
|
-
<file://meetings.example.com/cal#m1>
|
10
|
-
m:homePage <file://meetings.example.com/m1/hp> .
|
data/spec/swap_test/strquot.n3
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
@prefix dc: <http://purl.org/dc/elements/1.1/>.
|
2
|
-
|
3
|
-
<#x> <#prop> "simple string".
|
4
|
-
|
5
|
-
<#y> <#prop> """triple quoted
|
6
|
-
string with newlines in it.""".
|
7
|
-
|
8
|
-
<#z> <#prop> "string with \" escaped quote marks".
|
9
|
-
|
10
|
-
<#zz> <#escapes> "\\\"\a\b\f\r\t\v".
|
11
|
-
|
12
|
-
<#martin> <#surname> "D\u00fcrst".
|
13
|
-
|
14
|
-
<> dc:description """testing string parsing in N3.
|
15
|
-
Hmm... how much of this is in the primer?
|
16
|
-
How much should be there?
|
17
|
-
@@ Holding off on unicode until support
|
18
|
-
in python is sufficiently deployed
|
19
|
-
(e.g. python on tux doesn't grok,
|
20
|
-
nor does pythonwin on TimBL's laptop).
|
21
|
-
""".
|
22
|
-
# $Id: strquot.n3,v 1.4 2006-06-07 20:24:46 syosi Exp $
|
23
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<rdf:RDF
|
3
|
-
xmlns:xp="http://au.com.Langdale/2000/Xpetal"
|
4
|
-
|
5
|
-
xmlns:cims="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#"
|
6
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
7
|
-
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
|
8
|
-
|
9
|
-
<rdf:Property
|
10
|
-
rdf:about="http://iec.ch/TC57/2003/CIM-schema-cim10#AirCompressor.DrivenBy_C
|
11
|
-
ombustionTurbine">
|
12
|
-
<rdfs:label xml:lang="en">DrivenBy_CombustionTurbine</rdfs:label>
|
13
|
-
<rdfs:comment>A CAES air compressor is driven by combustion
|
14
|
-
turbine</rdfs:comment>
|
15
|
-
<cims:profile>Nerc</cims:profile>
|
16
|
-
<rdfs:domain
|
17
|
-
rdf:resource="http://iec.ch/TC57/2003/CIM-schema-cim10#AirCompressor"/>
|
18
|
-
<rdfs:range
|
19
|
-
rdf:resource="http://iec.ch/TC57/2003/CIM-schema-cim10#CombustionTurbine"/>
|
20
|
-
<cims:multiplicity
|
21
|
-
rdf:resource="http://iec.ch/TC57/1999/rdf-schema-extensions-19990926#M:1"/>
|
22
|
-
<cims:inverseRoleName
|
23
|
-
rdf:resource="http://iec.ch/TC57/2003/CIM-schema-cim10#CombustionTurbine.Dri
|
24
|
-
ves_AirCompressor"/>
|
25
|
-
</rdf:Property>
|
26
|
-
|
27
|
-
</rdf:RDF>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# test: make sure that the prefix isn't used when it can't be
|
2
|
-
@prefix : <http://example.com/foo#>.
|
3
|
-
|
4
|
-
|
5
|
-
<http://example.com/foo#hyphen-ated> <http://example.com/foo#dot.ted>
|
6
|
-
<http://example.com/foo#hyphen-and.dot> .
|
7
|
-
|
8
|
-
<http://example.com/foo#minus-_underscore> <http://example.com/foo#under_score>
|
9
|
-
<http://example.com/foo#underscore_-minus> .
|
10
|
-
|
11
|
-
<http://example.com/foo#a> <http://example.com/foo#b> <http://example.com/foo#c>.
|
12
|
-
|
13
|
-
|
14
|
-
#end
|
15
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
:a = :b .
|
@@ -1 +0,0 @@
|
|
1
|
-
:a = "hello" .
|
@@ -1,17 +0,0 @@
|
|
1
|
-
|
2
|
-
# Test the cwm quick variable declarations
|
3
|
-
|
4
|
-
|
5
|
-
@prefix : <foo.n3#>. # Local stuff
|
6
|
-
@keywords . # Use no keywards
|
7
|
-
|
8
|
-
|
9
|
-
@forAll :x, :y, :z.
|
10
|
-
@forSome :a, :b, :c.
|
11
|
-
|
12
|
-
b a c. # Should simply use a as a local symbol, NOT as rdf:type.
|
13
|
-
|
14
|
-
|
15
|
-
#{ :x <#mother> :y. :y <#sister> :z } => { :x <#aunt> :z }.
|
16
|
-
|
17
|
-
#ends
|
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
# Test the cwm quick variable declarations
|
3
|
-
|
4
|
-
|
5
|
-
@keywords. # Use no keywards
|
6
|
-
|
7
|
-
|
8
|
-
@prefix : <foo.n3#>. # Local stuff
|
9
|
-
|
10
|
-
@forAll x, y, z.
|
11
|
-
@forSome a, b, c.
|
12
|
-
|
13
|
-
b a c. # Should simply use a as a local symbol, NOT as rdf:type.
|
14
|
-
|
15
|
-
|
16
|
-
# {x mother y. y sister z} => {x aunt z}. Comented out 7/7/7 - separate formula testing elsewhere
|
17
|
-
|
18
|
-
#ends
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# Just see whether this can be input and re-output
|
2
|
-
#
|
3
|
-
# usage: cwm lstring.n3 | cwm
|
4
|
-
#
|
5
|
-
@prefix : <#>.
|
6
|
-
|
7
|
-
|
8
|
-
""" @prefix : <http://www.w3.org/2000/10/swap/test/crypto/acc.n3#> .
|
9
|
-
@prefix crypto: <http://www.w3.org/2000/10/swap/crypto#> .
|
10
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
11
|
-
@prefix os: <http://www.w3.org/2000/10/swap/os#> .
|
12
|
-
@prefix string: <http://www.w3.org/2000/10/swap/string#> .
|
13
|
-
|
14
|
-
\"\"\"
|
15
|
-
MzE5MDcKCjM2ODkyMzAyMDE1MzgwMjY2NTU5MzgzNjMyMDQyOTM1Mjc4MDk3MzAwNzE4ODMzOTY3
|
16
|
-
NTY3NTk1Njg5MjE2Mjk0NzkyMzUyNTQ3OTQzMjI4MjM2MDEwNjQwMTAyMjcxODk0OTY2MzgzNjQ1
|
17
|
-
NDQyODQ5Njg3MzUzOTM2NzAyMTI5NDgxNDg4MzIxMzUyODEyMTc1NjIxNjE0NjE5Mzk2MDY4MjE2
|
18
|
-
Nzk1MzY0NjAxNjE0MzM5NDYzOTIyMDMwMDE4NTEyODMyMTg0NDIyMzI3MzcxNzE5MjcxMzY0ODY1
|
19
|
-
MjEzMzU1OTc4Nzk0OTIyMzQ4NDU5NTUxMTQ2MTcyNjE0MTk3ODI2NTg0NDA2Mzg2OTQwMTcwNTE4
|
20
|
-
OTY0MDQzNzMxNzEyODc1OTk3NjAyNjE4ODUzNDQ1Mw=3D=3D
|
21
|
-
\"\"\" a :RequestKey;
|
22
|
-
:authorityName <Tiina>;
|
23
|
-
:junk "327462sjsdfjsakdhfkjsafd32164321" .
|
24
|
-
""" a :test_string.
|
25
|
-
|
26
|
-
#ends
|
@@ -1 +0,0 @@
|
|
1
|
-
:a {:b :c :d} :e .
|
@@ -1 +0,0 @@
|
|
1
|
-
@keywords prefix. :e prefix :f .
|
@@ -1 +0,0 @@
|
|
1
|
-
:a "hello" :c .
|
@@ -1 +0,0 @@
|
|
1
|
-
<#a> <#b> 'A single quoted string' .
|
@@ -1 +0,0 @@
|
|
1
|
-
@keywords this . @prefix : <#> . this :a :Doc .
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# Test number literals and some datatypes
|
2
|
-
|
3
|
-
2 <#is> "The integer 2".
|
4
|
-
|
5
|
-
00002 <#is> "The integer 2 expressed with leading zeroes".
|
6
|
-
|
7
|
-
-2 <#is> "The integer -2".
|
8
|
-
|
9
|
-
0 <#is> "Zero".
|
10
|
-
|
11
|
-
2.0 <#is> "The number 2.0".
|
12
|
-
|
13
|
-
2.0000 <#is> "The number 2.0 expressed with extra trailing zeroes".
|
14
|
-
|
15
|
-
# 2/3 <#is> "The raional number 2/3".
|
16
|
-
|
17
|
-
2.0e3 <#is> "The double precision floating point 2.0e3".
|
18
|
-
|
19
|
-
|
20
|
-
"Le chat"@fr <#is> "The french phrase 'Le chat'".
|
21
|
-
|
22
|
-
"800/600"^^<http://example.com/types#rational>
|
23
|
-
<#is> "800/600 with datatype http://example.com/types#rational".
|
24
|
-
|
25
|
-
#ends
|
26
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Test the cwm builtins
|
2
|
-
|
3
|
-
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
4
|
-
#@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
|
5
|
-
#@prefix daml: <http://www.daml.org/2000/10/daml-ont#> .
|
6
|
-
@prefix fam: <http://www.daml.example.org/2001/03/fam#> .
|
7
|
-
#@prefix ex: <http://www.daml.org/2000/10/daml-ex#> .
|
8
|
-
#@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
9
|
-
|
10
|
-
@prefix : <foo.n3#>. # Local stuff
|
11
|
-
@prefix foo: <foo.n3#>. # Local stuff
|
12
|
-
|
13
|
-
# Usage: See t10.n3
|
14
|
-
#
|
15
|
-
# Output should conclude all test* a :success and no failures.
|
16
|
-
#
|
17
|
-
|
18
|
-
|
19
|
-
:albert!fam:mother fam:sister :auntieAnne .
|
20
|
-
|
21
|
-
:albert^fam:father fam:sister :nieceBertha .
|
22
|
-
|
23
|
-
#ends
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Test the cwm path expressions
|
2
|
-
|
3
|
-
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
4
|
-
@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
|
5
|
-
#@prefix daml: <http://www.daml.org/2000/10/daml-ont#> .
|
6
|
-
@prefix fam: <http://www.daml.example.org/2001/03/fam#> .
|
7
|
-
@prefix lang: <http://www.daml.example.org/2000/10/lang#> .
|
8
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
9
|
-
@prefix math: <http://www.w3.org/2000/10/swap/math#> .
|
10
|
-
#@prefix lang: <http://www.w3.example.org/2000/10/swap/lang#> .
|
11
|
-
|
12
|
-
@prefix : <foo.n3#>. # Local stuff
|
13
|
-
@prefix foo: <foo.n3#>. # Local stuff
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
:albert!fam:mother :mentor!:inverse :auntieAnne .
|
18
|
-
|
19
|
-
:albert :admires!:converse :grumpy.
|
20
|
-
|
21
|
-
("1" "2")!math:sum a :THREE.
|
22
|
-
|
23
|
-
:x s:label "Help!"^lang:eng, "foo"^lang:fr . # "Au seccours!"^lang:fr.
|
24
|
-
|
25
|
-
# Can one put paths inside lists?
|
26
|
-
# yup.
|
27
|
-
|
28
|
-
( <a>!<b> <c>^<d> ) <#relatedTo> ( <e>!<f>!<g> ) .
|
29
|
-
|
30
|
-
|
31
|
-
#ends
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# Test the cwm quick variable expressions
|
2
|
-
|
3
|
-
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
4
|
-
#@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
|
5
|
-
#@prefix daml: <http://www.daml.org/2000/10/daml-ont#> .
|
6
|
-
#@prefix fam: <http://www.daml.example.org/2001/03/fam#> .
|
7
|
-
#@prefix lang: <http://www.daml.example.org/2000/10/lang#> .
|
8
|
-
#@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
9
|
-
#@prefix math: <http://www.w3.org/2000/10/swap/math#> .
|
10
|
-
#@prefix lang: <http://www.w3.example.org/2000/10/swap/lang#> .
|
11
|
-
|
12
|
-
#@prefix : <foo.n3#>. # Local stuff
|
13
|
-
#@prefix foo: <foo.n3#>. # Local stuff
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
{ ?a <#mother> ?b; <#sister> ?c } => { ?b <#aunt> ?c }.
|
18
|
-
|
19
|
-
#ends
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# Test the cwm quick variable expressions
|
2
|
-
|
3
|
-
#@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
4
|
-
#@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
|
5
|
-
#@prefix daml: <http://www.daml.org/2000/10/daml-ont#> .
|
6
|
-
#@prefix fam: <http://www.daml.example.org/2001/03/fam#> .
|
7
|
-
#@prefix lang: <http://www.daml.example.org/2000/10/lang#> .
|
8
|
-
#@prefix log: <http://www.w3.org/2000/10/swap/log#> .
|
9
|
-
#@prefix math: <http://www.w3.org/2000/10/swap/math#> .
|
10
|
-
#@prefix lang: <http://www.w3.example.org/2000/10/swap/lang#> .
|
11
|
-
|
12
|
-
#@prefix : <foo.n3#>. # Local stuff
|
13
|
-
#@prefix foo: <foo.n3#>. # Local stuff
|
14
|
-
|
15
|
-
|
16
|
-
{ ?b <#aunt> ?c } <=
|
17
|
-
{ [] <#parent> ?b; <#sister> ?c }.
|
18
|
-
|
19
|
-
#ends
|
@@ -1,164 +0,0 @@
|
|
1
|
-
# Test of interactions of qualifiers with log:includes
|
2
|
-
#
|
3
|
-
# $Id: this-quantifiers.n3,v 1.1 2004-06-25 01:27:00 timbl Exp $
|
4
|
-
#
|
5
|
-
# Usage: cwm quantifiers.n3 -think -purge
|
6
|
-
# Should give 18 successes and no failures.
|
7
|
-
#
|
8
|
-
|
9
|
-
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
|
10
|
-
|
11
|
-
@prefix : <#>.
|
12
|
-
@prefix qu: <#>.
|
13
|
-
|
14
|
-
|
15
|
-
#
|
16
|
-
# Basically, forall x G(x) implies G(x) which implies forSome X G(x).
|
17
|
-
# log:includes should allow the stronger statement to "include" the weaker one.
|
18
|
-
#
|
19
|
-
{{ :foo :bar :baz } log:includes { this log:forSome :foo. :foo :bar :baz }}
|
20
|
-
log:implies { :testa2 a :success }. # Originally failed
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:includes {this log:forSome :foo. :foo :bar :baz }}
|
25
|
-
log:implies { :testb2 a :success }.
|
26
|
-
|
27
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:includes {this log:forSome :foo. :foo :bar :baz }}
|
28
|
-
log:implies { :testc2 a :success }. # Originally failed
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
{{ :foo :bar :baz } log:includes { :foo :bar :baz }}
|
33
|
-
log:implies { :testa1 a :success }.
|
34
|
-
|
35
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:includes { :foo :bar :baz }}
|
36
|
-
log:implies { :testb1 a :FAILURE }. # Originally failed, STILL FAILS.
|
37
|
-
|
38
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:includes { :foo :bar :baz }}
|
39
|
-
log:implies { :testc1 a :success }.
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
{{ :foo :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
44
|
-
log:implies { :testa3 a :FAILURE }.
|
45
|
-
|
46
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
47
|
-
log:implies { :testb3 a :FAILURE }.
|
48
|
-
|
49
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
50
|
-
log:implies { :testc3 a :success }.
|
51
|
-
|
52
|
-
|
53
|
-
# Negative tests:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
{{ :foo :bar :baz } log:notIncludes { this log:forSome :foo. :foo :bar :baz }}
|
58
|
-
log:implies { :testa2n a :FAILURE }.# Originally failed
|
59
|
-
|
60
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:notIncludes {this log:forSome :foo. :foo :bar :baz }}
|
61
|
-
log:implies { :testb2n a :FAILURE }.
|
62
|
-
|
63
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:notIncludes {this log:forSome :foo. :foo :bar :baz }}
|
64
|
-
log:implies { :testc2n a :FAILURE }. # Originally failed
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
{{ :foo :bar :baz } log:notIncludes { :foo :bar :baz }}
|
69
|
-
log:implies { :testa1n a :FAILURE }.
|
70
|
-
|
71
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:notIncludes { :foo :bar :baz }}
|
72
|
-
log:implies { :testb1n a :success }.
|
73
|
-
|
74
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:notIncludes { :foo :bar :baz }}
|
75
|
-
log:implies { :testc1n a :FAILURE }.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
{{ :foo :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
80
|
-
log:implies { :testa3n a :success }.
|
81
|
-
|
82
|
-
{{ this log:forSome :foo. :foo :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
83
|
-
log:implies { :testb3n a :success }.
|
84
|
-
|
85
|
-
{{ this log:forAll :foo. :foo :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
86
|
-
log:implies { :testc3n a :FAILURE }.
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
######################## Versions with different identifiers:
|
91
|
-
|
92
|
-
|
93
|
-
{{ :fee :bar :baz } log:includes { this log:forSome :foo. :foo :bar :baz }}
|
94
|
-
log:implies { :testa2d a :success }. # Originally failed
|
95
|
-
|
96
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:includes {this log:forSome :foo. :foo :bar :baz }}
|
97
|
-
log:implies { :testb2d a :success }.
|
98
|
-
|
99
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:includes {this log:forSome :foo. :foo :bar :baz }}
|
100
|
-
log:implies { :testc2d a :success }. # Originally failed
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
{{ :fee :bar :baz } log:includes { :foo :bar :baz }}
|
105
|
-
log:implies { :testa1d a :FAILURE }.
|
106
|
-
|
107
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:includes { :foo :bar :baz }}
|
108
|
-
log:implies { :testb1d a :FAILURE }. # Originally failed
|
109
|
-
|
110
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:includes { :foo :bar :baz }}
|
111
|
-
log:implies { :testc1d a :success }.
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
{{ :fee :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
116
|
-
log:implies { :testa3d a :FAILURE }.
|
117
|
-
|
118
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
119
|
-
log:implies { :testb3d a :FAILURE }.
|
120
|
-
|
121
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:includes {this log:forAll :foo. :foo :bar :baz }}
|
122
|
-
log:implies { :testc3d a :success }.
|
123
|
-
|
124
|
-
|
125
|
-
# Negative tests:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
{{ :fee :bar :baz } log:notIncludes { this log:forSome :foo. :foo :bar :baz }}
|
130
|
-
log:implies { :testa2nd a :FAILURE }. # Originally failed
|
131
|
-
|
132
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:notIncludes {this log:forSome :foo. :foo :bar :baz }}
|
133
|
-
log:implies { :testb2nd a :FAILURE }.
|
134
|
-
|
135
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:notIncludes {this log:forSome :foo. :foo :bar :baz }}
|
136
|
-
log:implies { :testc2nd a :FAILURE }. # Originally failed
|
137
|
-
|
138
|
-
|
139
|
-
{{ :fee :bar :baz } log:notIncludes { :foo :bar :baz }}
|
140
|
-
log:implies { :testa1nd a :success }.
|
141
|
-
|
142
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:notIncludes { :foo :bar :baz }}
|
143
|
-
log:implies { :testb1nd a :success }.
|
144
|
-
|
145
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:notIncludes { :foo :bar :baz }}
|
146
|
-
log:implies { :testc1nd a :FAILURE }. # Originally failed, STILL FAILS
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
{{ :fee :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
151
|
-
log:implies { :testa3nd a :success }.
|
152
|
-
|
153
|
-
{{ this log:forSome :fee. :fee :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
154
|
-
log:implies { :testb3nd a :success }.
|
155
|
-
|
156
|
-
{{ this log:forAll :fee. :fee :bar :baz } log:notIncludes {this log:forAll :foo. :foo :bar :baz }}
|
157
|
-
log:implies { :testc3nd a :FAILURE }.
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
log:implies a log:Chaff. # Purge input rules
|
162
|
-
|
163
|
-
# ENDS
|
164
|
-
|