swish / swish.cabal

  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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
Name:               swish
Version:            0.6.1.1
Stability:          experimental
License:            LGPL
License-file:       LICENSE 
Author:             Graham Klyne - GK@ninebynine.org
Copyright:          (c) 2003, 2004 G. Klyne; 2009 Vasili I Galchin; 2011 Doug Burke; All rights reserved.
Maintainer:         dburke@cfa.harvard.edu
Category:           Semantic Web
Synopsis:           A semantic web toolkit. 

Tested-With:        GHC==6.12.3
Cabal-Version:      >= 1.6
Homepage:           https://bitbucket.org/doug_burke/swish/wiki/Home
Bug-reports:        https://bitbucket.org/doug_burke/swish/issues

Description:        
  Swish is a framework, written in the purely functional 
  programming language Haskell, for performing deductions in 
  RDF data using a variety of techniques. Swish is conceived 
  as a toolkit for experimenting with RDF inference, and for 
  implementing stand-alone RDF file processors (usable in 
  similar style to CWM, but with a view to being extensible 
  in declarative style through added Haskell function and data
  value declarations). It explores Haskell as \"a scripting 
  language for the Semantic Web\".
  .
  Swish is a work-in-progress, and currently incorporates:
  .
  * Turtle, Notation3 and NTriples input and output. The N3 support is
    incomplete (no handling of @\@forAll@).
  .
  * RDF graph isomorphism testing and merging.
  .
  * Display of differences between RDF graphs.
  .
  * Inference operations in forward chaining, backward chaining and proof-checking modes.
  .
  * Simple Horn-style rule implementations, extendable through variable binding modifiers and filters.
  .
  * Class restriction rule implementation, primarily for datatype inferences.
  .
  * RDF formal semantics entailment rule implementation.
  .
  * Complete, ready-to-run, command-line and script-driven programs.
  .
  Changes:
  .
  [Version 0.6.1.1] Minor improvement to the error message produced by the
  Turtle, Ntriples, and N3 parsers: a fragment of the remaining text is
  included to provide some context (still lacking compared to the information
  provided in version 0.3.2.1).
  .
  [Version 0.6.1.0] Added support for Turtle format (added the
  Swish.RDF.TurtleFormatter and Swish.RDF.TurtleParser modules).
  .
  [Version 0.6.0.2] Minor internal changes.
  .
  [Version 0.6.0.1] Moved to using hashing routine using the Data.Hashable
  interface rather than Swish.Utils.MiscHelpers which is deprecated.
  .
  [Version 0.6.0.0] Add Data.Interned.URI and use it to speed up the QName
  equality check.
  .
  [Version 0.5.0.3] Didn't get all the required @FlexibleInstances@.
  .
  [Version 0.5.0.2] HUnit constraint is only added when the @tests@ flag
  is used. Removed random and bytestring constraints. Add @FlexibleInstances@
  pragma for ghc 7.2 compatability.
  .
  [Version 0.5.0.1] Update bounds on package constraints to try and get a
  successful build on ghc 7.2; removed parallel constraint as not used.
  .
  [Version 0.5.0.0] The constructors for @ScopedName@ and @QName@ have been
  removed to hide some experimental optimisations (partly added in 0.4.0.0);
  @Namespace@ has seen a similar change but no optimisation. Output speed
  should be improved but no systematic analysis has been performed.
  .
  [Version 0.4.0.0] Moving to using polyparse for parsing and @Text@ rather than
  @String@ where appropriate. Use of @URI@ and @Maybe Text@ rather than @String@ in the @Namespace@
  type. Removed the Swish.Utils.DateTime and Swish.Utils.TraceHelpers
  modules. Symbols have been removed from the export lists of the following modules:
  Swish.Utils.LookupMap, Swish.Utils.ListHelpers, Swish.Utils.MiscHelpers,
  Swish.Utils.ShowM. Some significant improvements to parsing speed, but no
  concerted effort or checks made yet.
  .
  [Version 0.3.2.1] Marked a number of routines from the Swish.Utils modules
  as deprecated. Use foldl' rather than foldl.
  .
  [Version 0.3.2.0] The N3 parser no longer assumes a set of pre-defined namespaces.
  There is no API change worthy of a bump to the minor version number, but it
  is a large-enough change in behaviour that I felt the need for the update.
  .
  [Version 0.3.1.2] 'Swish.RDF.RDFGraph.toRDFGraph' now sets up the
  namespace map of the graph based on the input labels (previously it
  left the map empty).
  .
  [Version 0.3.1.1] Bug fixes for N3 format: strings ending in a 
  double quote character are now written out correctly and
  @xsd:double@ values are not written using XSD canonical form/capital
  @E@ but with a lower-case @e@. On input of N3,
  literals that match @xsd:double@ are converted to XSD canonical form
  (as stored in 'RDFLabel'), which can make simple textual comparison
  of literals fail. The 'Eq' instance of 'RDFLabel' now ignores the
  case of the language tag for literals and the 'Show' instance 
  uses XSD canonical form for @xsd:boolean@, @xsd:integer@,
  @xsd:decimal@ and @xsd:double@ literals. 
  Noted that the 'ToRDFLable' and 'FromRDFLabel' classes replicate
  existing functionality in the "Swish.RDF.RDFDatatype" module.
  .
  [Version 0.3.1.0] Added the `Swish.RDF.RDFGraph.ToRDFLabel` and
  `Swish.RDF.RDFGraph.FromRDFLabel` classes and the 
  `Swish.RDF.RDFGraph.toRDFTriple` and `Swish.RDF.RDFGraph.fromRDFTriple`
  functions.
  Added instances: @IsString RDFLabel@, @IsString QName@, @IsString ScopedName@
  and @Monoid NSGraph@.
  The modules "Swish" and "Swish.RDF" have been introduced to provide
  documentation. The module "Swish.Utils.DateTime" is deprecated and
  will be removed in a later release.
  The N3 formatter now writes out literals with @xsd:boolean@, @xsd:integer@, 
  @xsd:decimal@ and @xsd:double@ types as literals rather than as a typed string.
  .
  [Version 0.3.0.3] Changed @scripts/SwishExample.ss@ script so that the
  proof succeeds. Some documentation improvements, including a discussion
  of the Swish script format (see "Swish.RDF.SwishScript"). Very minor
  changes to behavior of Swish in several edge cases.
  .
  [Version 0.3.0.2] Bugfix: stop losing triples with a bnode subject when
  using the N3Formatter; this also makes the @scripts/SwishTest.ss@ test
  pass again. Several commands in Swish scripts now create screen
  output (mainly to check what it is doing). Added the @developer@
  flag for building.
  .
  [Version 0.3.0.1] updates the Swish script parser to work with the
  changes in 0.3.0.0 (reported by Rick Murphy).
  Several example scripts are installed in the
  @scripts/@ directory, although only @VehicleCapacity.ss@ works
  with this release.
  .
  [Version 0.3.0.0] is an attempt to update 
  version 0.2.1 (<http://hackage.haskell.org/package/swish-0.2.1/>)
  to build against
  a recent ghc install, with some clean ups - including support for
  the current N3 specification - and the addition of the
  NTriples format. It has not been tested against ghc7.
  .
  References:
  .
    - <http://www.ninebynine.org/RDFNotes/Swish/Intro.html>
  .
    - <http://www.ninebynine.org/Software/swish-0.2.1.html>
  .
    - CWM: <http://www.w3.org/2000/10/swap/doc/cwm.html>
  .

Build-Type:         Simple
Data-Files:         README
                    scripts/*.ss

Source-repository head
  type:     mercurial
  location: https://bitbucket.org/doug_burke/swish

Flag  developer
  Description: Turn on developer flags
  Default:     False

Flag  tests
  Description: Build the test programs.
  Default:     False

Flag  hpc
  Description: Use Hpc for the tests
  Default:     False

Library
   Build-Depends:
      base >=3 && < 5,
      text == 0.11.*,
      -- text-format == 0.2.*,
      -- split == 0.1.*,
      binary == 0.5.*,
      containers >= 0.3 && < 0.5,
      array == 0.3.*,
      polyparse >= 1.6 && < 1.8,
      old-locale == 1.0.*, 
      time >= 1.1 && < 1.4,
      mtl >= 1 && < 3,
      network >= 2.2 && < 2.4,
      directory >= 1.0 && < 1.2,
      filepath >= 1.1 && < 1.3,
      hashable == 1.1.*,
      intern == 0.8.*

   Exposed-Modules:
      Swish
      Swish.RDF
      Swish.RDF.BuiltInDatatypes
      Swish.RDF.BuiltInMap
      Swish.RDF.BuiltInRules
      Swish.RDF.ClassRestrictionRule
      Swish.RDF.Datatype
      Swish.RDF.GraphClass
      Swish.RDF.GraphMatch
      Swish.RDF.GraphMem
      Swish.RDF.GraphPartition
      Swish.RDF.MapXsdInteger
      Swish.RDF.NTFormatter
      Swish.RDF.NTParser
      Swish.RDF.N3Formatter
      Swish.RDF.N3Parser
      Swish.RDF.Proof
      Swish.RDF.RDFDatatype
      Swish.RDF.RDFDatatypeXsdInteger
      Swish.RDF.RDFDatatypeXsdString
      Swish.RDF.RDFGraph
      Swish.RDF.RDFGraphShowM
      Swish.RDF.RDFParser
      Swish.RDF.RDFProof
      Swish.RDF.RDFProofContext
      Swish.RDF.RDFQuery
      Swish.RDF.RDFRuleset
      Swish.RDF.RDFVarBinding
      Swish.RDF.Rule
      Swish.RDF.Ruleset
      Swish.RDF.SwishCommands
      Swish.RDF.SwishMain
      Swish.RDF.SwishMonad
      Swish.RDF.SwishScript
      Swish.RDF.TurtleFormatter
      Swish.RDF.TurtleParser
      Swish.RDF.VarBinding
      Swish.RDF.Vocabulary
      Swish.Utils.ListHelpers
      Swish.Utils.LookupMap
      Swish.Utils.MiscHelpers
      Swish.Utils.Namespace
      Swish.Utils.PartOrderedCollection
      Swish.Utils.QName
      Swish.Utils.ShowM
      Data.Interned.URI

   other-modules:
      -- Paths_swish

   ghc-options:
      -Wall -fno-warn-orphans

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

Executable         BuiltInMapTest
   Main-Is:        tests/BuiltInMapTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         GraphPartitionTest
   Main-Is:        tests/GraphPartitionTest.hs

   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         GraphTest
   Main-Is:        tests/GraphTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         NTTest
   Main-Is:        tests/NTTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         N3ParserTest
   Main-Is:        tests/N3ParserTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         N3FormatterTest
   Main-Is:        tests/N3FormatterTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFDatatypeXsdIntegerTest
   Main-Is:        tests/RDFDatatypeXsdIntegerTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFGraphTest
   Main-Is:        tests/RDFGraphTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFProofContextTest
   Main-Is:        tests/RDFProofContextTest.hs
   if !flag(tests)
      buildable: False
                    
   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFProofTest
   Main-Is:        tests/RDFProofTest.hs
   if !flag(tests)
      buildable: False
                     
   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFQueryTest
   Main-Is:        tests/RDFQueryTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         RDFRulesetTest
   Main-Is:        tests/RDFRulesetTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         VarBindingTest
   Main-Is:        tests/VarBindingTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         LookupMapTest
   Main-Is:        tests/LookupMapTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

Executable         QNameTest
   Main-Is:        tests/QNameTest.hs
   if !flag(tests)
      buildable: False

   if flag(tests)
      Build-Depends: 
          HUnit == 1.2.*

   if flag(hpc)
      ghc-options: -fhpc

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all

   ghc-options:
      -Wall -fno-warn-orphans

 -- we do not have the data files to run this test
 Executable         SwishTest
   Main-Is:        tests/SwishTest.hs

Executable         Swish
   Main-Is:        src/Swish.hs
   Other-Modules:  Paths_swish

   ghc-options:
      -Wall -fno-warn-orphans

   if flag(developer)
      ghc-options: -Werror
      ghc-prof-options: -auto-all
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.