POSC-Caesar FIATECH IDS-ADI Projects

Intelligent Data Sets Accelerating Deployment of ISO15926

Realizing Open Information Interoperability

Defining templates using ISO 15926-7 Template Expander and Prover9

This page provides a walkthrough of how to develop axioms (interpretation rules) for ISO 15926 templates, aided by software tools. The aim is for this page to eventually provide a useful introduction and tutorial.

Basic

Template signatures

Example: IsCustodianOf

Order

Role name

Role type

1

Custodian

Adult person

2

Child

Person

3

Type

CustodyRelation

Example: ClassificationOfIndividual

Order

Role name

Role type

1

Individual

PossibleIndividual

2

Class

ClassOfIndividual

Template axioms

For IsCustodianOf an axiom could say, the Parent stands in a parenthood relationship of type CustodyRelation to the Child.

Java library

Copyright (c) 2009, DNV Information Risk Management
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of DNV Information Risk Management nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
(etc etc)

Java applet

At Template Expander, a Java applet has been provided with a heading, an introduction, and IDS-ADI and DNV logos.

Window "Template Definitions"

For a toy example, consider a two-place template "SiblingOf(x, y)" for
expressing that people are siblings. Intuitively, "SiblingOf(Alfred,
Betty)" should mean that Alfred and Betty are siblings. Template
signature:

Order

Role name

Role type

1

Sibling A

Person

2

Sibling B

Person

Note that the signature doesn't say anything about how role-fillers
are related. For that, we assume our ontology (our reference data
library) defines a relation hasChild, holding between parents and
their children. We use this in the template axiom.

Checkbox "Skolemize result"

This can be easily converted into XML or RDF, for inspection in
various tools; see below ([id:b2f8cdce-0346-430a-a576-cf9ba747f356
ex. 1], [id:47904671-d234-4ffa-946b-c0934b49c5ad ex. 2]). Visualized
in RDF-Gravity,
an RDF file can appear follows.

Prover9: Intro, and the minimal example again

The program

The Prover9 theorem prover, and its companion Mace4 for finding
counterexamples, have a convenient graphical user interface that makes
it more usable than other provers that are available.

NB. Prover9 works for full first-order logic. This is much more
permissive than what is allowed for templates -- we can make more
expressive statements. This means that application of Prover9 can be
used to test many kinds of relationships that can not be expressed in
templates themselves.

Symbol list: Logical operators

Prover9 is quite picky about symbols.

Operator

Symbol

true

$T

false

$F

negation

-

disjunction

\mid

conjunction

&

implication

->

equivalence

<->

universal quantification

all

existential quantification

exists

equality

=

negated equality

!=

Window "Assumptions"

This is where the template axioms go. We can test for well-formedness.
Incidentally, this is also done in the Template Expander, so if you
get expansions there, your definitions should be good for Prover9 too.

We can click the Well Formed? button to check that we haven't made a
syntax error.

Window "Goals"

Proof

With the template definition and our instance, we can prove that Betty
is a sibling of Alfred -- since the order of conjuncts in the template
axiom is insignificant. We click the button Start under "Proof
Search".

SiblingOf(Betty, Alfred) .

We can also show information about the role-fillers Alfred and Betty
that is implied by the template definition.

Person(Betty) .

Disproof

There's also information that doesn't follow from our assumptions.
In many cases, Prover9 can explain that this is so by generating a
counterexample. For the following, click the button Start under
"Model/Counterexample Search". (The proof search should fail since we
haven't entered any assumption to the effect that Alfred has a child.)

During the expansion, the templates IndirectPropertyTriple? and
ClassificationTemplate?, defined in Part 7, were expanded. The result
makes perfectly good sense as an ISO 15926-2 pattern. The fact that
the Expander applies the extension demonstrates that the syntactic
structure is sound.

We can easily see that the expanded results makes no reference to
predicates not defined in ISO 15926-2.

Triples view of example

If we wish to look at the result in a "triples" format, we can check
the Skolemize result box before expansion. The result is as
follows.

With this, we have found a fully explicit expression, in terms of Part
2 and individual terms, of the template statement. We have reduced a
compact template statement to statements in the Part 2 language -- the
basic language of ISO 15926.

XML format

A trivial search/replace macro can convert this into XML, for instance
as follows.

This template applies MagnitudeOfProperty?, one of the "Initial Set"
templates of Part 7. Accordingly, the result is more complex. The
difference is that the quantification of the property is here
represented explicitly -- the property is explicitly stated to refer
by way of the bar scale to the value 60.

Once again, the successful expansion indicates that the template
definition is sound. We can see by manual inspection that no reference
is made to predicates not defined in Part 2. (But for the latter, we
should really have a tool to make that check automatically. This
shouldn't be difficult to write.)