by David Huynh, August 24, 2003
HOWL is a language designed for authoring ontologies that are then compiled into metadata following the schema of (a subset of) the Web Ontology Language (OWL), as well as a few extensions specific to Haystack.
If you can think of a better name, please suggest.
Ontologies in Haystack have been thus far written mostly in Adenine, which is an extension of N3. Both Adenine and N3 follow the RDF triple format closely in their syntaxes. That is, ontology data is expressed as triples, as shown in the following examples written in Adenine:
rdfs:isDefinedBy | :TransportationOntology ; |
rdf:type | rdfs:Class ; |
rdf:type | daml:Class ; |
rdfs:subClassOf | :Vehicle ; |
rdfs:label | "Car" |
rdfs:isDefinedBy | :TransportationOntology ; |
rdf:type | daml:DatatypeProperty ; |
rdf:type | daml:UniqueProperty ; |
rdfs:label | "Licence Number" ; |
rdfs:domain | :Car ; |
rdfs:range | xsd:string |
Furthermore, now that ontologies are separate from (imperative) code, it is much easier to make an Eclipse plugin that parses all HOWL files before other code files (Adenine, Mystique) and informs programmers of predicates and classes that are used but have not been declared.
HOWL files can also be processed for publishing Haystack ontologies to the world. In Adenine, ontologies and imperative code are intermingled and it is hard to separate the publishable metadata from the non-publishable (e.g. an on-click event handler).
I will not be specifying the syntax of HOWL formally, but I will instead use examples to illustrate its syntax below. HOWL is just like Adenine in how you can define prefixes and in how you write full and prefixed URIs and literals. HOWL is very different from Adenine in other aspects.
A HOWL file is hierarchical in organization, always starting from an ontology element, under which there are zero or more class elements and zero or more relation elements:
A class element can have zero or more property elements underneath it. The domain of these properties are the class, and their ranges are declared using one of the keywords as, asUnique, asOne, and asMany. The keyword asUnique indicates a maximum cardinality of 1; and the keyword asOne indicates a (fixed) cardinality of 1. The keyword asMany places no restriction on cardinality while the keyword as allows a fixed cardinality to be specified. These keywords can be followed by a URI (e.g. :Wheel) or by a type keyword (e.g. boolean).
The keyword label can be used to specify the rdfs:label attribute of a class.
Relational properties (as opposed to proprietal properties) can be specified using the relation element. A relational property's domains are specified using the keyword from, and its ranges using one of the keywords to, toOne, toUnique, and toMany.
Consecutive elements of the same type can be grouped together for convenience. For example, we can group the three property elements in the code fragment above into one properties element as follows:
A literal can be marked as being specific to a particular locale using the @ operator:
In case you don't find any keyword of HOWL that can encode a particular attribute for your ontology, you can use the attribute keyword to specify a custom attribute:
HOWL supports the 2 Java-style comments (to-end-of-line with // and in-line with /* */). Different from Java, HOWL in-line comments can be nested.