Commit graph

178 commits

Author SHA1 Message Date
kortschak
b17334ea36 Remove terminal newline from quad.Quad stringer
This is the conventional implementation of a fmt.Stringer.

Also went through and fixed up some lint.
2014-07-31 11:43:20 +09:30
a81005ba21 Merge pull request #88 from kortschak/benchmarks
Add basic integration benchmarks
2014-07-30 20:17:50 -04:00
kortschak
d48d133cf1 Only run short tests on travis
Long tests are potentially very long, and may timeout internally. So
don't run them.
2014-07-31 09:42:56 +09:30
kortschak
09943c3eb6 Move sexp into query 2014-07-31 09:36:43 +09:30
kortschak
a6cf432313 Move query interface definitions into query 2014-07-31 08:52:24 +09:30
kortschak
38f7b79761 Allow short tests 2014-07-31 08:45:45 +09:30
kortschak
b4887e3c30 Update tests to use cquads parsed data 2014-07-31 08:38:31 +09:30
kortschak
1a0dd13735 Merge branch 'master' into benchmarks 2014-07-31 08:35:34 +09:30
kortschak
c4e4abbffc Add result validation 2014-07-31 08:33:18 +09:30
2673911c0f Merge pull request #89 from barakmich/build_versioning
Add automatic linker build versioning
2014-07-30 18:10:42 -04:00
8136f2abe9 fix usage to make more sense 2014-07-30 18:02:40 -04:00
kortschak
02672da9ad Fix typos 2014-07-31 07:32:38 +09:30
d2b1d64de3 Add version numbers and ARM build 2014-07-30 17:47:10 -04:00
kortschak
24253cd054 Add basic integration benchmarks
Currently only memstore is benchmarked and only with gremlin. No
checking of validity of results is performed.
2014-07-30 23:08:25 +09:30
kortschak
2dbbd17fe1 Merge branch 'declassify' into tip
Conflicts:
	graph/iterator/hasa_iterator.go
	graph/iterator/linksto_iterator.go
	graph/iterator/query_shape_test.go
	graph/leveldb/all_iterator.go
	graph/leveldb/iterator.go
	graph/leveldb/leveldb_test.go
	graph/memstore/triplestore_test.go
	graph/mongo/iterator.go
2014-07-30 16:40:37 +09:30
kortschak
d6f94be514 Base nexting on interface satisfaction
This is done unsubtlely at the moment and there is plenty of room for
optimisation of assertion location to prevent repeated reasserting as is
done now.
2014-07-30 16:06:46 +09:30
kortschak
b498a06a7b Intermediate step in removal of Base
We are marking types that will be Nexters and ResultNexters (I want a
better name for this one).
2014-07-30 15:21:48 +09:30
kortschak
375d953d93 Move current result handling out of Base
Delete majority of Base functionality.
2014-07-30 15:03:06 +09:30
kortschak
ee6d4c8db7 Move Size handling out of Base 2014-07-30 12:14:46 +09:30
kortschak
525230206a Move SubIterator handling out of Base 2014-07-30 12:11:14 +09:30
kortschak
189910c4b8 Remove Base dependency from Null 2014-07-30 12:08:44 +09:30
kortschak
01b7278c3a Move UID handling from Base
Also clean up some of the value creation code.
2014-07-30 11:44:58 +09:30
kortschak
1604dca737 Move tag handling out into graph.Tagger 2014-07-30 10:25:32 +09:30
kortschak
274d9ef57e Rename Provenance -> Label
's/Provenance/Label/g' 's/provenance/label/g' with human vetting.
2014-07-29 08:44:39 +09:30
kortschak
410202f3e0 Strip quoting angle in lone IRIRef terms 2014-07-29 08:33:35 +09:30
kortschak
7ce3a10d57 Evade quad.Quad String method 2014-07-29 08:32:49 +09:30
kortschak
79c1ba6c52 Properly check errors 2014-07-29 08:32:15 +09:30
0238332ca3 Merge pull request #85 from pbnjay/global_uids
fix non-pointer uintptr -> uint64, export NextUID
2014-07-28 11:50:12 -04:00
Jeremy Jay
a83b7ea367 fix non-pointer uintptr -> uint64, export NextUID
Allows other iterator implementations to use global UID namespace.
2014-07-28 11:26:33 -04:00
kortschak
41f6d3fd84 Temporarily use cquads only
I intend to make this configurable, but there is tight connection
between db.Load and db.Open that is getting in the way of that.

Testing on data set 30kmoviedata.cq.gz created by doing:

zcat 30kmoviedata.nq.gz | sed 's/[<>]//g' | gzip -c > 30kmoviedata.cq.gz

The following query is successful:

[{
  "type": "/film/film",
  "name": null,
  "/film/film/directed_by": {
    "name": "David Fincher"
  },
  "/film/film/starring": [{
    "/film/performance/actor": {
      "name": null
    }
  }]
}]

TODO: fix up naming for quads and make strict parsing an option.
2014-07-28 21:56:32 +09:30
kortschak
401c58426f Create quads hierarchy
* Move nquads into quad.
* Create cquads simplified parser in quad.
* Move Triple (renamed Quad) to quad.

Also made sure mongo actually implements BulkLoader.
2014-07-28 21:36:22 +09:30
kortschak
01bc63810b Specify the limitations of quad/triple parsing 2014-07-26 17:45:56 +09:30
kortschak
64d79ee4d5 Actually perform the N-Quads test 2014-07-26 15:55:53 +09:30
kortschak
b276d117b1 Fix documentation error 2014-07-26 12:03:34 +09:30
kortschak
f1a7710c82 Generate parser code
ragel -Z -G2 parse.rl

ragel version 6.8 (as previously)
2014-07-26 12:00:29 +09:30
kortschak
5953a8dfa0 Add RDF test suite testing and fix grammar errors 2014-07-26 11:58:56 +09:30
kortschak
9ff97602f0 Fix missed case in quadfix... and re-run
Checked with MQL query successfully:

[{
  "<type>": "</film/film>",
  "<name>": null,
  "</film/film/directed_by>": {
    "<name>": "\"David Fincher\""
  },
  "</film/film/starring>": [{
    "</film/performance/actor>": {
      "<name>": null
    }
  }]
}]
2014-07-25 23:10:04 +09:30
kortschak
bf185b7702 Add doc comments for nquads 2014-07-25 15:05:57 +09:30
kortschak
fae860f08e Replace nt with nq in various places throughout
Manually change testdata.nt to testdata.nq.
2014-07-25 14:56:08 +09:30
kortschak
3995d3dd57 Run quadfix on 30kmovies.nt.gz and replace 2014-07-25 11:38:23 +09:30
kortschak
c75cef60d1 Generate parser code
ragel -Z -G2 parse.rl

ragel version 6.8 (as previously)
2014-07-25 11:37:04 +09:30
kortschak
92baa2ecee Cleanup unused vars, move unEscape and add tests 2014-07-25 11:35:48 +09:30
kortschak
d76213fb2d Handle comments in N-Quad documents and REPL
The parser rejects an N-Quad with a comment, so we filter those out
ahead of time. This simplifies the grammar and code generated by the
parser.
2014-07-25 11:22:24 +09:30
kortschak
dc17ccae80 Fix unicode handling and add tests
We now also return an incomplete triple to aid in debugging - non-nil
error means that this is not usable except for manual examination.
2014-07-25 10:48:06 +09:30
kortschak
59e3d620a5 Use more sane quadfix rules 2014-07-25 09:19:26 +09:30
kortschak
22bad1701f Generate code for parser
G2 code generation used after benchmarking.

style	benchmark           old ns/op     new ns/op     delta
T0		BenchmarkParser     672           5631          +737.95%
T1		BenchmarkParser     672           5579          +730.21%
G0		BenchmarkParser     672           4049          +502.53%
G1		BenchmarkParser     672           3868          +475.60%
G2		BenchmarkParser     672           3543          +427.23%

F0 and F1 create massive Go source (6.0M) and so were not tested.

Invalid tests removed, additional tests for invalid input to be added
later.
2014-07-24 21:31:04 +09:30
kortschak
92d50bb9f7 Add parser generation definition 2014-07-24 20:57:19 +09:30
kortschak
f1c606dc19 Provide standalone converter for 30kmoviesdata.nt 2014-07-24 20:08:05 +09:30
31211696a8 Merge pull request #77 from kortschak/appengine
Use build constraints for appengine
2014-07-22 20:39:13 -04:00
kortschak
592ea81687 Use build constraints for appengine 2014-07-23 10:02:11 +09:30