OAA/DAML Bridge Agent
User's Manual
Contents:
Introduction
The OAA/DAML Bridge agent allows for selected elements declared
in DAML documents, such as classes and properties, to be accessed via the
Open Agent Architecture. This means that the selected elements are
registered as "solvables" with an OAA facilitator, and thus may be queried,
by OAA agents, using goal expressions in OAA's Interagent Communication
Language (ICL).
Usage Synopsis
Under UNIX:
- oaadaml.csh [-create_synonyms] [-print_triples] URI
Under Windows (in a DOS shell):
- oaadaml.bat [-create_synonyms] [-print_triples] URI
Examples
The command
-
oaadaml.csh http://www.daml.org/2001/03/daml+oil-ex.daml
causes the Bridge agent to load the contents of the given URI, connect
to a facilitator, and register (with that facilitator) solvables corresponding
to four types of DAML elements: fixed meta-classes, fixed meta-properties,
"user-defined" classes, and "user-defined" properties.
Solvables
The fixed meta-classes and meta-properties are always the same (regardless
of the DAML content), and are listed here.
For example, for the user-defined class Person (in http://www.daml.org/2001/03/daml+oil-ex.daml),
the
solvable
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Person'(Id)
is registered. In addition, if the command line argument "-create_synonyms"
is
present, the solvable
is also registered. For the user-defined property hasParent,
the
solvables
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#hasParent'(Id1, Id2)
and, when "-create_synonyms" is present,
are created.
Queries
As documented elsewhere, agents can query registered solvables by calling
the library procedure oaa_Solve.
A query of a meta-class returns the (un-abbreviated) DAML identifiers
of user-defined classes. For example,
-
'Class'(X) returns with X bound to
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Animal'
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Person'
and so on.
A query of a meta-property also returns the (un-abbreviated) DAML identifiers
of user-defined classes. For example,
-
'SameClassAs'(X, Y) returns with
-
X = 'http://www.daml.org/2001/03/daml+oil-ex.daml#Person'
Y = 'http://www.daml.org/2001/03/daml+oil-ex.daml#HumanBeing'
and so on.
A query of a user-defined class returns the DAML identifiers of user-defined
instances. For example,
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Person'(X) returns
with X bound to
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Adam'
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#Ian'
and so on.
A query of a user-defined property also returns the DAML identifiers of
user-defined instances. For example,
-
'http://www.daml.org/2001/03/daml+oil-ex.daml#age'(X, Y) returns
with
-
X = 'http://www.daml.org/2001/03/daml+oil-ex.daml#Adam'
Y = 37
-
X = 'http://www.daml.org/2001/03/daml+oil-ex.daml#Peter'
Y = 46
and so on.
Source Code Organization
The OAA/DAML Bridge agent is a set of three classes grouped into a
package called oaadaml.
The three classes of the package are:
This class is the starting point of the OAA/DAML Bridge runtime.
As it creates a jena model from the DAML input specified by the command
line loading all the triples in that daml text, it creates
solvables for the classes and properties defined in that ontology. After
that it register these solvables into the facilitator.
This class extends LibOaa and provides our daml agent with the ability
to connecting to the facilitator. It defines the appropriate
actions to perform once a query matches with a registered solvable.
This code is given in the corresponding callback method.
This class defines the doOAAEvent method to be performed once a query
matches with a defined solvable.
Future Work
Some enhancements under consideration are:
-
Allow a single instance of the Bridge agent to load in multiple DAML
sites, rather than just one.
-
Automatically load in ontologies that are referenced by
import statements.
-
Employ reasoning to provide more complete responses to queries involving
meta-predicates such as
sameClassAs (e.g., check transitivity) and
uniqueProperty (check for unit cardinality on any property, not just
those explicitly declared as uniqueProperty).
-
When a query returns a construct such as
<xsd.decimal rdf:value="9.5">, the
Bridge agent should perhaps return just the value, rather than an anonymous
object.
-
In addition to the short forms of meta-classes and meta-properties
(such as
'Class'(X) and range(Id1,Id1)),
solvables should also be created using the fully qualified functors
(such as 'http://www.w3.org/2000/01/rdf-schema#Class'(X)).
OAA/DAML
Bridge Agent Overview Page
Copyright (c) 2001-2002 by SRI International