Haskell API for the DIG protocol
(This is a reprint of the original post)
This summer, I wrote an API for Haskell that allows programmers to query a DL reasoner using the DIG protocol.
"Sure, Diego, that's pretty cool but... what does it mean?". Well, DL stands for Description Logics, a set of formalisms that are used to represent knowledge (for example, they can reflect facts such as "men are humans", "Diego is a man", "humans have friends"...). In particular, they are used in (some variants of) OWL, the W3C recommended language for ontology creation.
Using a formal language to write an ontology (i.e., a particular piece of knowledge) has some advantages. One of them is that new knowledge can be automatically inferred (for example, "Diego has friends"). It is also possible to check the consistency of the ontology. The piece of software that computes that sort of things is the reasoner.
There are some DL reasoners available. Fortunately, most of them have agreed in a common communication protocol, namely DIG. By using this protocol, an application can interface with any of these reasoners.
The Haskell programming language has basic support for OWL, built by Labra and some of his students. I simply wrote some Haskell code implementing the client side of the DIG protocol, so you can take an OWL ontology in Haskell and feed it to any reasoner supporting that protocol. I contributed this code to the WESO project. It is usable, but it is not complete. In particular, responses from the reasoner are (still) not parsed. This and another features will be hopefully added on next releases (maybe with someone's help? any volunteers?).