The Semantic Application Design Language (SADL) is a language for building semantic models and expressing rules that capture additional domain knowledge. The SADL-IDE (integrated development environment) is a set of Eclipse plug-ins that support the editing and testing of semantic models using the SADL language. This document provides a brief description of SADL and the SADL-IDE to facilitate approval of their release to Open Source. A simple semantic model of geometric shapes is used through out the main body of this document in an attempt to make the concepts embodied in SADL and the SADL-IDE more understandable.
A semantic model is a formal declaration of what can (or does) exist in a domain of interest. As a language, SADL captures a subset of the expressive capability of the Web Ontology Language (OWL). Appendix A provides a complete mapping of current SADL constructs to their OWL equivalents, although additional future mappings are expected both to more completely support construction of OWL models and because OWL is itself evolving as a W3C recommendation.
Semantic models expressed in SADL (and OWL) are modular in nature. This allows large, complex models to be broken down into more maintainable pieces. It also allows portions of models to be shared between different applications. Each piece of a model is given a unique name in the form of a URI. The connection between pieces of a model is established by the "import" statement. One model, usually a more specific or detailed model, can import another, usually a more general, model.
Below are two very simple SADL models; the second imports (extends) the first.
"http://ctp.geae.ge.com/iws/shapes_top".uri
Shape
is a top-level class."http://ctp.geae.ge.com/iws/shapes_specific".uri
import
"file://shapes-top.sadl" as shapes-top.Circle
is a type of Shape.Note that the alias given to the imported model specifies a prefix. The name given to a SADL file in the "uri ..." statement defines an XML namespace. It is possible that a term such as "Circle" might be defined in two are more namespaces, possibly with different definitions. (This is sometimes unavoidable if one is importing models from different sources.) The prefix can be used to disambiguate the concept being used. For example, the third line in the second file above might be rewritten as:
Circle is a type of shapes-top:Shape.
Of course this is not necessary here, since we are not importing multiple models with different definitions of "Shape".
Support for rules in SADL is informed by the Semantic Web Rule Language (SWRL). Hence SADL rules are written in terms of the concepts defined in the semantic model. The SADL-IDE currently supports conversion of the rules either to SWRL or to the Jena Rule Language.
Below is a model containing two rules. Note that by importing "shapes-specific.sadl", "shapes-top.sadl" is also included since the former imports the latter.
"http://ctp.geae.ge.com/iws/shape_rules".uri
import
"file://shapes-specific.sadl" as shapes-specific.Rule
AreaOfCircle then
area
of
x = (radius
of
x *
radius
of
x) * 3.14159 .
Rule
AreaOfRectangleNote that the "if" or the "given" sections may be empty. When converted to SWRL or Jena Rules, both "if" and "given" statements become part of the rule body while the "then" statements become the rule head.
Semantic models can include instance data--information about specific instances of the concepts defined for the domain. For example, the file below defines two specific instances of subclasses of the Shape concept:
"http://ctp.geae.ge.com/iws/shapes_test".uri
import
"file://shape-rules.sadl" as shape-rules.MyCircle
is a Circle, has radius 3.5.An integrated development environment (IDE) provides comprehensive facilities for helping someone to say useful things in a particular language, in this case SADL. The SADL-IDE is built using the IDE Meta-Tooling Platform (IMP) from IBM Watson Research. IMP is an Open Source project available from SourceForge under the Eclipse Public License. (It is being moved to an Eclipse incubator project at http://www.eclipse.org/imp/.) Much of the functionality of the SADL-IDE, implemented or pending implementation, uses IMP. This functionality includes:
IMP supports additional IDE functionality that may be useful and could be relatively easily added to the SADL-IDE, and future functionality of IMP will likely be useful as well.
Reasoning over a set of SADL documents takes two basic forms. Validation of a model involves checking the model for contradictions or inconsistencies. Rule processing involves examining the rules in the model inlight of the current instance data to see if any of the rules can "fire" to infer additional information. Two reasoners are integrated with the SADL-IDE. If the rules are converted to SWRL, then Pellet may be used to perform both kinds of reasoning. If the rules are converted to Jena Rules, then the Jena Rules Engine can be used for both kinds of reasoning.
SADL supports one construct which goes beyond the expressivity of OWL--the concept of a test. A test in SADL consists of the keyword "Test:" followed by a statement about a named instance (see Instance Data above). If the reasoner can verify that the statement is true the test passes, otherwise it fails. The screenshot below illustrates a set of tests to validate the calculation of the areas of the two Shape instances, along with inherited type (Shape) and the specified width of MyRect. The Console window shows the results of running these tests along with abbreviated derivation information for those items that are set by rules. The level of derivation information displayed may be set in the SADL preferences dialog.
Rule management may be difficult in projects with many rules and multiple rule files. The SADL-IDE offers a dynamic "slice and dice" rules view through the use of rule filters. In the top pane of the screenshot below, we have constructed a filter to select all rules that have a pre-condition that something is a Circle. The results are shown in the bottom pane. Filters can contain multiple expressions in any part of the rule.
The following table defines the current syntax and semantics of SADL with respect to standard OWL constructs. Note that snippets of models other than the shapes example used above are introduced because the shapes example is not sufficiently complex to exemplify all of the constructs. These additional examples are drawn from familiar domains to the end that they might be more easily understood.
Example SADL Statement | OWL Equivalent (in RDF/XML-ABBREV) | Meaning/Comments |
uri "http://resaerch.ge.com.shapes". | xmlns="http://research.ge.com.shapes#" xml:base="http://research.ge.com.shapes"> |
The namespace of this ontology. |
import "file://shapes-top.sadl" as shapes-top. | xmlns:shapes-top="http://research.ge.com.hapes_top#" <owl:Ontology rdf:about="http://research.ge.com.shapes_specific"> <owl:imports> <owl:Ontology rdf:about="http://research.ge.com.shapes_top"/> </owl:imports> </owl:Ontology> |
This ontology imports the ontology in the file "shapes-top.sadl", which is, as identified by it's "uri" statement, "http://research.ge.com.shapes_top". |
Shape is a top-level class. | <owl:Class rdf:ID=”Shape”> | Shape is a subclass of owl:Thing; the model defines no other superclass of Shape. |
Gender
is
a
top-level
class
must
be
one
of {Male,
Female}. or Gender is a top-level class, must be one of {Male, Female}. |
<owl:Class
rdf:ID="Gender"> |
Gender is a class that is defined by explicit enumeration of its members, i.e., Male and Female. |
Circle is a type of Shape. | <owl:Class
rdf:ID="Circle"> <rdfs:subClassOf rdf:resource="http://research.ge.com.shapes#Shape"/> </owl:Class> |
Every instance of Circle is also an instance of Shape. |
Woman is a type of {Person, Female}. | <owl:Class
rdf:ID="Woman"> <rdfs:subClassOf rdf:resource="#Female"/> <rdfs:subClassOf rdf:resource="#Person"/> </owl:Class> |
Every instance of Woman is an instance of Person and is also an instance of Female. (Note: translation of this construct not yet implemented.) |
area describes Shape has values of type float. | <owl:DatatypeProperty
rdf:ID="area"> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/> <rdfs:domain rdf:resource="http://ctp.geae.ge.com/iws/shapes#Shape"/> </owl:DatatypeProperty> |
"area" is a property with domain Shape and range xsd:float. |
teaches
describes
Professor
has
values
of
type
Student. or relationship of Professor to Student is teaches. |
<owl:ObjectProperty
rdf:ID="teaches"> <rdfs:range rdf:resource="http://ctp.geae.ge.com/iws/this_model_name#Student"/> <rdfs:domain rdf:resource="http://ctp.geae.ge.com/iws/this_model_name#Professor"/> </owl:ObjectProperty> |
"teaches" is a property with domain Professor and range Student. |
surfaceArea describes Shape-3D is a type of area. | <owl:DatatypeProperty
rdf:ID="surfaceArea"> <rdfs:domain rdf:resource="#Shape-3D"/> <rdfs:subPropertyOf> <owl:DatatypeProperty rdf:ID="area"/> </rdfs:subPropertyOf> </owl:DatatypeProperty> |
"surfaceArea" is a sub-property of "area" with domain Shape-3D. |
teaches of Professor has at least one value of type College_Student. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class rdf:about="#College_Student"/> </owl:someValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor must have at least one value for the property "teaches" from the class College_Student. |
teaches of Professor has at least one value of type {Fulltime_Student, Parttime_Student}. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Class rdf:ID="Fulltime_Student"/> <owl:Class rdf:ID="Partime_Student"/> </owl:oneOf> </owl:Class> </owl:someValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor must have at least one value for the property "teaches" that is either a Fulltime_Student or a Parttime_Student. (Note: translation of this construct not yet implemented.) |
teaches of Professor has at least one value each of types {Fulltime_Student, Parttime_Student}. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class rdf:about="#Fulltime_Student"/> </owl:someValuesFrom> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class rdf:about="#Parttime_Student"/> </owl:someValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor must have at least one value for the property "teaches" that is an instance of Fulltime_Student and another value that is an instance of Parttime_Student. (Note: translation of this construct not yet implemented.) |
teaches of Professor only has values of type College_Student. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:allValuesFrom> <owl:Class rdf:about="#College_Student"/> </owl:allValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor can only have values for the property "teaches" that are instances of College_Student, although it can have no values. |
teaches of Professor has at least one value of type College_Student,only has values of type College_Student. |
<owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:someValuesFrom> <owl:Class rdf:about="#College_Student"/> </owl:someValuesFrom> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:allValuesFrom> <owl:Class rdf:about="#College_Student"/> </owl:allValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
SADL allows restrictions to be combined into a list. This means that an instance of Professor must have one or more values for the property "teaches" that are instances of College_Student. |
teaches of Professor has at least 1 values. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1 </owl:minCardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor must have at least one value for the property "teaches". |
teaches of Professor has at most 500 values. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">500 </owl:maxCardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor may have at most 500 values for the property "teaches". |
teaches of Professor has exactly 30 values. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">30 </owl:cardinality> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
An instance of Professor must have exactly 30 values for the property "teaches". |
rating of Professor must be one of {Excellent, Good, Average, Poor}. | <owl:Class
rdf:about="#Professor"> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#rating"/> </owl:onProperty> <owl:allValuesFrom> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <Rating rdf:about="#Excellent"/> <Rating rdf:about="#Good"/> <Rating rdf:about="#Average"/> <Rating rdf:about="#Poor"/> </owl:oneOf> </owl:Class> </owl:allValuesFrom> </owl:Restriction> </rdfs:subClassOf> </owl:Class> |
Values of the property "rating" for an instance of Professor must come from the set of instances (of Rating) {Excellent, Good, Average, Poor}. (Note: translation of this construct not yet implemented.) |
if teaches has value College_Student then type is College_Professor. | <owl:Class
rdf:about="#College_Professor"> <rdfs:subClassOf> <owl:Class rdf:about="#Professor"/> </rdfs:subClassOf> <owl:equivalentClass> <owl:Restriction> <owl:onProperty> <owl:ObjectProperty rdf:about="#teaches"/> </owl:onProperty> <owl:allValuesFrom> <owl:Class rdf:about="#College_Student"/> </owl:allValuesFrom> </owl:Restriction> </owl:equivalentClass> </rdfs:subClassOf> </owl:Class> </rdfs:subClassOf> </owl:Class> |
If an instance of something has a value for the "teaches" property which is an instance of College_Student then the instance belongs to the class College_Professor. (Note: translation of this construct not yet implemented.) |
Jane is a Student. | <Student rdf:ID="Jane"/> | Jane is an instance of Student. |
Jane is a Student, has age 19 . | <Student
rdf:ID="Jane"> <age rdf:datatype="http://www.w3.org/2001/XMLSchema#int">19</age> </Student> |
Jane is an instance of Student, has value of the "age" property of 19. |
Jane is a Student, has age 19, has gender Female. | <Student
rdf:ID="Jane"> <age rdf:datatype="http://www.w3.org/2001/XMLSchema#int">19</age> <gender rdf:resource="http://ctp.geae.ge.com/iws/this_model_name#Female"/> </Student> |
Jane is an instance of Student, has value of the "age" property of 19, has Female as the value of the "gender" property. |
The SADL-IDE uses a number of Open Source projects. These projects are:
The Eclipse IDE Meta-tooling Platform (IMP, from IBM's Watson Research Center, see http://eclipse-imp.sourceforge.net/imp.html)
The Jena Semantic Web Framework (HP Labs, see http://jena.sourceforge.net/)
The OWL API, which is similar to Jena but supports SWRL (University of Manchester, see http://owlapi.sourceforge.net/)
The Pellet OWL DL reasoner (Clark & Parsia, see http://pellet.owldl.com/).