View unanswered posts | View active topics It is currently Fri Jan 24, 2020 5:05 am

Reply to topic  [ 4 posts ] 
 Patterns with multiple mappings to templates in FOL 
Author Message

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
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 ( 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 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 is a simple technical task.

1. Classification pattern:

ClassificationPattern(x,y) ↔
(∃u Classification(u) ∧hasClassified(u; x) ∧ hasClassifier(u;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.

Last edited by vvagr on Mon Jun 23, 2014 10:09 pm, edited 1 time in total.

Mon Jun 23, 2014 1:22 am
Profile WWW

Joined: Sun Jan 22, 2012 10:02 pm
Posts: 283
@Victor - I can't judge whether or not that is legal FOL, but at least it was quite incomplete.
Let me try an improvement:

ClassOfHydroTestPressurePattern(x, y, z) ↔
ClassOfInanimatePhysicalObject(x) ∧
ExpressReal(y) ∧
Scale(z) ∧
SpecializationTemplate(x, "PRESSURE RATED ARTEFACT") ∧
∃a ∃b ∃c ∃d ∃e ∃f ∃g ∃h ∃i ∃j(
SpecializationTemplate(a, "HYDROSTATIC TESTING")∧
SpecializationTemplate(b, "UNION OF COMMONLY USED TEST LIQUIDS")∧
ClassOfHydrotestingAnObject(c, a, x, "TESTED OBJECT", "1:*", "1:1")∧
ClassOfHydrotestingWithFluid(d, a, b, "TEST FLUID", "1:*", "1:1") ∧
ClassOfHydrotestFluidPressure(e, b, "HYDROSTATIC TEST PRESSURE", y, z)

HydroTestPressurePattern(w, y, z) ↔
PhysicalObject(w) ∧
ClassificationTemplate(w, x) ∧
ClassificationTemplate(f, a)∧
ClassificationTemplate(g, b)∧
HydrotestingAnObject(h, w, "TESTED OBJECT")∧
HydrotestingWithFluid(i, g, "TEST FLUID") ∧
HydrotestFluidPressure(j, g, "HYDROSTATIC TEST PRESSURE", y, z)) .

In some way the two patterns are to be interlinked, but whether or not this is legal FOL remains to be seen. I doubt it.

Mon Jun 23, 2014 8:34 am

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia

Thank you, I've indeed omitted typing of pattern roles. Definitions are improved.

As for the general structure - my FOL is very straightforward, following P7. Our intent is to define a ternary logical predicate as a logical formula with 3 free variables. This is what I'm doing:

PatternPredicate(x,y,x) is equivalent to the logical disjunction of FormulaA(x,y,x) and FormulaB(x,y,z). Three values to satisfy PatternPredicate have to satisfy FormulaA or FormulaB. This is what we need to define two mappings - one for classes and one for individuals.

In your suggestion you define two distinct predicates-patterns (ClassOfHydroTestPressurePattern and HydroTestPressurePattern). But is is not a correct FOL definition of a meaningful predicate. Each half is almost OK, they are just separate. The sign ↔ is used to formulate equivalence of predicate and following formula, so there is no logical sense in uniting your two definitions with ∨ . And you can not use y and z in the second definition. Try to put brackets in your code.

We can write the following correct FOL statement, using your two patterns as building blocks for a more generic one:

HydroTestPressurePattern(x, y, z) ↔ ClassOfHydroTestPressurePattern(x, y, z) ∨ HydroTestPressureOfIndividualPattern(x, y, z)

Mon Jun 23, 2014 10:26 pm
Profile WWW

Joined: Mon Feb 27, 2012 11:01 pm
Posts: 282
Location: Moscow, Russia
After some thought – it is not difficult to define in FOL patterns realized by individual RDF.

We can represent RDF triples in FOL in an obvious way:

<Subject, Predicate, Object> is equivalent to FOL statement Predicate(Subject, Object).

Following this we can add a third mapping option to the ClassificationPattern:

ClassificationPattern(x,y) ↔
(∃u Classification(u) ∧hasClassified(u; x) ∧ hasClassifier(u;y))



This patern can be represented in RDF using tsp ontology introduced in the viewtopic.php?f=3&t=222 . To represent the third option we have to state that classified entity is really the one used in the mapping.

@prefix rdl: <>.
@prefix tpl: <>.
@prefix rdfs: <>.
@prefix owl: <>.
@prefix xsd: <>.
@prefix ptrn: <>.
@prefix dm: <>.
@prefix rdf: <>.
@prefix tsp: <>.

ptrn:hasClassified a tsp:TSPRole.

ptrn:hasClassifier a tsp:TSPRole.

ptrn:ClassificationPattern a tsp:TemplateSignaturePattern;
   tsp:hasRole (ptrn: hasClassified, ptrn:hasClassifier).

ptrn:ClassificationPattern_classified a tsp:TSPVariable;
   a dm:Thing.

ptrn:ClassificationPattern_classifier a tsp:TSPVariable;
   a dm:Class.

ptrn:ClassificationPattern_mapping1 a tsp:TSPMapping;
   tsp:hasPattern ptrn: ClassificationPattern;
   ptrn:hasClassified ptrn:ClassificationPattern_classified;
   ptrn:hasClassifier ptrn:ClassificationPattern_classifier;
   tsp:hasPart ptrn:ClassificationPattern_entity1.

ptrn:ClassificationPattern_entity1 a tsp:TSPPart;
   a dm:Classification;
   dm:hasClassifier ptrn:ClassificationPattern_classifier;
   dm:hasClassified ptrn:ClassificationPattern_classified.

ptrn:ClassificationPattern_mapping2 a tsp:TSPMapping;
   tsp:hasPattern ptrn: ClassificationPattern;
   ptrn:hasClassified ptrn:ClassificationPattern_classified;
   ptrn:hasClassifier ptrn:ClassificationPattern_classifier;
   tsp:hasPart ptrn:ClassificationPattern_entity2.

ptrn:ClassificationPattern_entity2 a tsp:TSPPart;
   a tpl:ClassificationTemplate;
   tpl:hasClassifier ptrn:ClassificationPattern_classifier;
   tpl:hasClassified ptrn:ClassificationPattern_classified.
ptrn:ClassificationPattern_mapping3 a tsp:TSPMapping;
   tsp:hasPattern ptrn: ClassificationPattern;
   ptrn:hasClassified ptrn:ClassificationPattern_classified;
   ptrn:hasClassifier ptrn:ClassificationPattern_classifier;
   tsp:hasPart ptrn:ClassificationPattern_entity3.

ptrn:ClassificationPattern_entity3 a tsp:TSPPart;
   owl:sameAs ptrn:ClassificationPattern_classified;
   rdf:type ptrn:ClassificationPattern_classifier.

Mon Jun 23, 2014 10:57 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
eXTReMe Tracker
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.