Connie is a Ruby library that implements [SPARQL](http://www.w3.org/TR/rdf-sparql-query/) given a parse tree of a SPARQL query and a set of RDF triples. Implements SPARQL properties as a set of constraints. The constraints are executed by [Gecode/R](http://gecoder.rubyforge.org/), a Ruby bridge to Gecode, an open source library for constraint programming written in C++.
While Connie can certainly be used to service SPARQL queries written by hand in Connie's parse tree syntax, the intended use is as a component that receives a parse tree from a SPARQL parser.
1. **Connie can handle simple, univariate triple patterns**: When finished, this library will have a full test suite and can serve as a maintainable reference implementation of a SPARQL engine in Ruby. Currently, only very basic queries are supported. Please see the spec suite for the latest usage examples or check out the documentation for more details.
1. **Make Sure You've Got the Dependencies installed**
Connie depends on Gecode/R (http://gecode.rubyforge.org).
> sudo gem install gecoder-with-gecode
2. **Clone the Repository and Install the Connie Gem from Source**
> git clone git://github.com/pius/connie.git
> cd connie
> gem build connie.gemspec
> sudo gem install connie
3. **Require the gem in your code, play with it**
For usage, the best thing is to click through the [documentation](http://pius.github.com/connie). If you need more guidance, check out the specs, which demonstrate precisely how to feed Connie a SPARQL query parse tree and run the engine.
I'm still bringing the documentation up to where I'd like it to be; please do feel free to contact me if you've got any questions.
Fork my [repository](http://github.com/pius/sparql), make some changes, and send along a pull request!
The best way to contribute is to add a unit test for a specific SPARQL parse tree and then tweak the code such that your new test case plus all the others pass.
Connie was created in 2009 by Pius Uzamere (pius -AT- alum -DOT- mit -DOT- edu) and is