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. A simple semantic model of geometric shapes is used through out the main body of this document to illustrate the concepts embodied in SADL and the SADL-IDE in a concrete way.
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.
Note that the SADL-IDE uses the Eclipse Resource perspective. As an Eclipse plug-in, tight integration with source control systems such as CVS or SVN is available. Unlike many representations of OWL, SADL files are nicely ordered and easily compared using normal Eclipse file comparison facilities.
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.
There is another use of the "Test" keyword in SADL--a Test Suite specified in a Test file (.test extension). In this case, each "Test:" use of the keyword is followed by the name of a file containing test cases as described above. All of the tests in all of the files are executed and the results rolled up into a total passed and failed. The contents of a test suite file looks like this:
A Test Suite is executed by right-clicking on the test file in the Navigator window and selecting SADL Actions -> Execute Test Suite.