Patterns with multiple mappings to templates in FOL
Posted: Mon Jun 23, 2014 1:22 am
One important question about the concept of patterns is – are they indeed only complex templates built as a next layer over the specialized template layer built in turn over RDL templates expandable into the proto-templates and thus into the Part 2 entities? Or not?
Here I'll demonstrate one important feature of patterns proposed in JORD TSP spec (http://www.15926.org/viewtopic.php?f=4&t=223) and supported by my .15926 Editor. It is a possibility of multiple mappings to templates for a single pattern.
This feature was not yet required for the set of IIP TIPs, but looks like it will become useful very soon. From the beginning TIPs were mapped to IIP template set (former iRING set). But just recently we have witnessed an appearance of TIPs mapped to the discussed MMT template set (Hans Teijgeler proposal). There are already patterns with the same structure using templates from two different sets. To support smooth transition from IIP to MMT templates multiple mappings for the same pattern certainly will be a benefit.
Other applications for multiple mappings of a single pattern include:
a. Possibility to represent both template and template axiom in reference data library in a simple RDF (like the one proposed in http://www.15926.org/viewtopic.php?f=3&t=222). This is the task we were never able to accomplish before without a suitable rule language to record FOL axioms.
b. Possibility to have a single pattern for classes and for individuals. Patterns can represent a domain engineering language and hide under the hood all special data modeling concepts (class of class, class of class of class, cardinalities, and the like).Useful examples of this can be found in JORD TSP spec referenced above.
c. Possibility to record mappings of patterns directly to RDF predicates, allowing to hide existing and planned non-P7 and non-P8 implementations of ISO 15926 under the same hood.
I will illustrate two first possible uses below, in a simple extension of Part 7 FOL (the last option – mapping to predicates – is more difficult to illustrate in FOL). Patterns below are defined as logical predicates with FOL formulas. Each mapping option is defined as a usual ∧-∃-formula (template axiom) and different options are connected by ∨.Rewriting such FOL statements in RDF proposed in http://www.15926.org/viewtopic.php?f=3&t=222 is a simple technical task.
1. Classification pattern:
ClassificationPattern(x,y) ↔
(∃u Classification(u) ∧hasClassified(u; x) ∧ hasClassifier(u;y))
∨
(ClassificationTemplate(x,y))
This is a simplest example demonstrating a possibility to record both a template and its axiom as two mapping options for a single pattern – one option using P7 proto-templates (P2 level), and the second using only the template itself. With such patterns recorded in the RDL it will be possible to expand (lift) template instance data to P2 level or do an inverse operation.
2. HydroTestPressure pattern:
This pattern definition closely follows an example introduced by Hans Teijgeler in e-mail correspondence. Specialized templates in the formula are shown with RDL names occupying corresponding roles.
HydroTestPressurePattern(x, y, z) ↔
(∃u ∃w ∃v ∃f
ClassOfInanimatePhysicalObject(x) ∧
ExpressReal(y) ∧
Scale(z) ∧
SpecializationTemplate(u, "HYDROSTATIC TESTING")∧
SpecializationTemplate(w, "UNION OF COMMONLY USED TEST LIQUIDS")∧
ClassOfParticipationDefinition(u, x, "TESTED OBJECT", v, "1:*", "1:1")∧
ClassOfParticipationDefinition(u, w, "TEST FLUID", f, "1:*", "1:1") ∧
ClassOfIndividualHasIndirectPropertyWithValue(w, "HYDROSTATIC TEST PRESSURE", y, z))
∨
(∃u ∃w ∃v ∃f
PhysicalObject(x) ∧
ExpressReal(y) ∧
Scale(z) ∧
ClassificationTemplate(u, "HYDROSTATIC TESTING")∧
ClassificationTemplate(w, "UNION OF COMMONLY USED TEST LIQUIDS")∧
ParticipationOf PossibleIndividualInActivity (u, x, v)∧
ParticipationOf PossibleIndividualInActivity (u, w, f) ∧
IndividualHasIndirectPropertyWithValue(w, "HYDROSTATIC TEST PRESSURE", y, z))
Two options in the pattern connected with disjunction represent realizations of the same pattern for classes and for individuals.
Here I'll demonstrate one important feature of patterns proposed in JORD TSP spec (http://www.15926.org/viewtopic.php?f=4&t=223) and supported by my .15926 Editor. It is a possibility of multiple mappings to templates for a single pattern.
This feature was not yet required for the set of IIP TIPs, but looks like it will become useful very soon. From the beginning TIPs were mapped to IIP template set (former iRING set). But just recently we have witnessed an appearance of TIPs mapped to the discussed MMT template set (Hans Teijgeler proposal). There are already patterns with the same structure using templates from two different sets. To support smooth transition from IIP to MMT templates multiple mappings for the same pattern certainly will be a benefit.
Other applications for multiple mappings of a single pattern include:
a. Possibility to represent both template and template axiom in reference data library in a simple RDF (like the one proposed in http://www.15926.org/viewtopic.php?f=3&t=222). This is the task we were never able to accomplish before without a suitable rule language to record FOL axioms.
b. Possibility to have a single pattern for classes and for individuals. Patterns can represent a domain engineering language and hide under the hood all special data modeling concepts (class of class, class of class of class, cardinalities, and the like).Useful examples of this can be found in JORD TSP spec referenced above.
c. Possibility to record mappings of patterns directly to RDF predicates, allowing to hide existing and planned non-P7 and non-P8 implementations of ISO 15926 under the same hood.
I will illustrate two first possible uses below, in a simple extension of Part 7 FOL (the last option – mapping to predicates – is more difficult to illustrate in FOL). Patterns below are defined as logical predicates with FOL formulas. Each mapping option is defined as a usual ∧-∃-formula (template axiom) and different options are connected by ∨.Rewriting such FOL statements in RDF proposed in http://www.15926.org/viewtopic.php?f=3&t=222 is a simple technical task.
1. Classification pattern:
ClassificationPattern(x,y) ↔
(∃u Classification(u) ∧hasClassified(u; x) ∧ hasClassifier(u;y))
∨
(ClassificationTemplate(x,y))
This is a simplest example demonstrating a possibility to record both a template and its axiom as two mapping options for a single pattern – one option using P7 proto-templates (P2 level), and the second using only the template itself. With such patterns recorded in the RDL it will be possible to expand (lift) template instance data to P2 level or do an inverse operation.
2. HydroTestPressure pattern:
This pattern definition closely follows an example introduced by Hans Teijgeler in e-mail correspondence. Specialized templates in the formula are shown with RDL names occupying corresponding roles.
HydroTestPressurePattern(x, y, z) ↔
(∃u ∃w ∃v ∃f
ClassOfInanimatePhysicalObject(x) ∧
ExpressReal(y) ∧
Scale(z) ∧
SpecializationTemplate(u, "HYDROSTATIC TESTING")∧
SpecializationTemplate(w, "UNION OF COMMONLY USED TEST LIQUIDS")∧
ClassOfParticipationDefinition(u, x, "TESTED OBJECT", v, "1:*", "1:1")∧
ClassOfParticipationDefinition(u, w, "TEST FLUID", f, "1:*", "1:1") ∧
ClassOfIndividualHasIndirectPropertyWithValue(w, "HYDROSTATIC TEST PRESSURE", y, z))
∨
(∃u ∃w ∃v ∃f
PhysicalObject(x) ∧
ExpressReal(y) ∧
Scale(z) ∧
ClassificationTemplate(u, "HYDROSTATIC TESTING")∧
ClassificationTemplate(w, "UNION OF COMMONLY USED TEST LIQUIDS")∧
ParticipationOf PossibleIndividualInActivity (u, x, v)∧
ParticipationOf PossibleIndividualInActivity (u, w, f) ∧
IndividualHasIndirectPropertyWithValue(w, "HYDROSTATIC TEST PRESSURE", y, z))
Two options in the pattern connected with disjunction represent realizations of the same pattern for classes and for individuals.