You are on page 1of 116

E-ROCK

Enriching Robots with Ontological-Cognitive Knowledge

Stefano Borgo
Laboratory for Applied Ontology
ISTC-CNR, Trento (IT) Tutorial at RO-MAN 2017
Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 2
Scenario: Robot + Worker

http://www.all-electronics.de

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 3


Scenario: Robot + Human

http://www.riken.jp

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 4


Scenario: Robot + Environment

https://i.ytimg.com/vi/jC-AmPfInwU/maxresdefault.jpg

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 5


Scenario: Robot + Controlled
environment

M6

M5 M7

M1
M6

M4 M5

S1
M4
M2

S2
M3 M2

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 6


environment /2

NOITARUGIFNOC CONFIGURATION
2 CONFIGURATION
CONFIGURATION
2 2 CONFIGURATION 1 1 1 1
2CONFIGURATION
NOCONFIGURATION
ITARCONFIGURATION
UGICONFIGURATION
FNOC 2
F
F
F
F

F
F
F
F

F
Scenario: Robot + Controlled

CR 1CL 1LC1 LC1RC1


CR LC1 LC1LC11CL RC1RC1 RC1 LC1 LC1LC1 RC1RC1 RC1RC1

2CLC2
R LC2 LC2LC2
2CL RC2RC2 RC2RC2
B
B

B
B
B
B

B
B

B
!
!
!
!
!

S. Borgo, Ro-Man Tutorial 28 Aug. 2017


7
Physical robot, Knowledge module, Execution module

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 8


Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 9
Applied ontology: about 30 years ago...
I Late 1980s (AI community):
the term ontology is used (along with others like “semantic
domain”, “knowledge view”) but it still conflates the world
representation and the knowledge system component.
I 1993: 1st Intern. workshop on Formal Ontology &
Information Systems
I mid 90s: “ontology” in the topic list of conferences and
international meetings
I mid 90s: IEEE SUO Working Group
I 1998: 1st event of the FOIS series
I 2002: Ontolog forum (virtual community of practice)
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 10
...untill today
I 2005:
- Applied Ontology Journal (IOS Press)
- ECOR, NCOR, JCOR...
- the FOMI series starts (Formal ontology meets industry)
I 2006: First public discussion on an ontology association at
FOIS (Baltimore)
I 2009: the International Association for Ontology and its
Applications (IAOA) is established
I TODAY: regular conferences and workshops on ontology
(e.g. JOWO Setp. 21-23, Bolzano IT; FOIS at Cape Town, Sept. 2018)

In parallel:
- ontology standardization initiatives (W3C, OMG, IEEE, ISO)
- ontology shapes various domains (Snomed, FMA, DB)
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 11
- ontology tool development (Protege, CommonKAD,OntoUML)
Ontology is a philosophical notion

In philosophy, ontology is a branch of metaphysics.


It studies the being (as such) independently from our
knowledge.
More specifically, it deals with the things that can possibly
exist in the world.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 12


Why ontology in applications?

“Trying to engage with too many partners too fast is one


of the main reasons that so many online market makers
have foundered. The transactions they had viewed as
simple and routine actually involved many subtle
distinctions in terminology and meaning”

Harvard Business Review, October 2001

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 13


When meaning is an issue

One problem is data interpretation: the understanding of


the data collected by the agent(s) and the correct
inferences that have to be made in general and in the
given circumstances.

Another problem is interoperability: the capacity of two or


more agents (people, organizations, information systems)
to exchange and correctly interpret each other’s data.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 14


When meaning is an issue

A challenging problem is understanding information itself


“The piece is at 50 C”
(piece? 50 C? ... so what?)

Another problem is to combine/integrate information

“The piece is at 50 C”
“The piece is hot”
Are these consistent?
Can these be integrated?
Under which conditions?
one claim is objective – the other claim is relative and/or
contextual S. Borgo, Ro-Man Tutorial 28 Aug. 2017 15
From ontology to applied ontology

To face these problems we need to study the content of


data.

– Ontology studies the being (as such) independently


from knowledge.
– Applied ontology studies the content (as such)
independently from representation issues.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 16


Ontology and meaning heterogeneity

Sources of heterogeneity:

I system heterogeneity
I syntactic heterogeneity
I structural heterogeneity
I semantic heterogeneity

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 17


Is it really needed?

Any agent, organization, information system

I has an (implicit or explicit) underlying ontology, and


possibly more than one, which depends on its
conceptualization(s)
I uses a language which adopts/relies on a certain
semantics

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 18


Problem 1: why caring about the conceptualization of the
world?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 19


What is this?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 20


What is this?

Artefact
Physical object(s)
Piece(s) of matter
Shape(s)
Outline(s)
Pattern(s) of colors
Shades
Holes
Bumps
...

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 21


Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 22
Ontology in an information system
The ontology
I constrains the interpretation of the language
I constrains the possible situations that we can describe
with the language.
I gives a design rationale for knowledge:
– necessary vs possible vs impossible situations
– managing knowledge
– scaling up knowledge
– coherent and consistent knowledge accumulation

Ontologies are conceptual artefacts providing a collection of


primitive terms, properties, relations and derived notions
(definitions), a class structure and a set of principled
constraints across them. S. Borgo, Ro-Man Tutorial 28 Aug. 2017 23
How to classify ontologies (I)

Now consider an ontology as an artifact for knowledge


representation and organization.
Since such artifacts are notoriously complex systems, we
can analyze them from different perspectives.

I Language (natural, controlled, CL, OWL, F-logic,...)


I Formalism (taxonomy, graph, frame, axiomatic,...)
I Structural complexity (tangledness, splitting, modularity,
depth...)
I Construction methodology (top-down, bottom-up, core
expansion, merging, formalization enriching, pruning...)
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 24
How to classify ontologies (II)

I Domain granularity (application, domain, core,


foundational)
I Content (management, learning, medicine...)
I Ideal use (general, local, process-oriented,...)
I Purpose (retrieval, annotation, question-answering, data
sharing, knowledge discovery...)
I Entity types
I Precision (and Accuracy)

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 25


Example 1: formalism
Classification based on formalism

I Linguistic/Terminological (weakest semantics)


I Glossary
I Controlled vocabulary
I Taxonomy
I Thesaurus
I Implementation driven
I Conceptual Schema
I Knowledge Base
I Formal (strongest semantics)
I (depending on language expressivity)

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 26


Example 2: entity types
Classification based on entity types
(inspired by the “problem solving” perspective)
I Ontologies of ‘general’ entities (foundational ontology)
I event, time, space, function, behavior
I Ontologies of domain entities (domain ontology)
I pen, car, planet, biological cell
I Ontologies of task entities (task ontology)
I Roles (played by domain entities in the task)
I Actions (occurring in the task)
I States (of the entities)
I Specific elements (proper of the task): constraint,
attribute
I Integration (application ontology) S. Borgo, Ro-Man Tutorial 28 Aug. 2017 27
Ontologies in practice

There is a classical distinction between


lightweight and heavyweight types of ontology.

Lightweight ontologies are simple systems (mainly


terminological ontologies) which allow limited yet fast
reasoning services.
Heavyweight ontologies are rich systems (mainly formal
ontologies) which provide deep reasoning services but
are usually computationally demanding.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 28


Building ontologies: an example

The choice of the categories and the structural relationships


among them is crucial in any ontology.
Ontological relationships are sophisticated tools.

- Malfunctioning of parts are malfunctioning of the whole.


- Operations on parts are operations on the whole.
- Surfaces of parts might not be surfaces of the whole.
- Replacements of parts are not replacements of the whole.

(adapted from [A. Rector ’98])

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 29


Building ontologies: an example
Consider this taxonomy:

I Application
Application for production of X
Task in production of X
Drilling of X
Tip centering for drilling in X

Problem 2: Do you see something wrong?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 30


Building ontologies: an example
Consider this taxonomy:

I Application
Application for production of X
Task in production of X
Drilling of X
Tip centering for drilling in X

Problem 2: Do you see something wrong?


I Application
Application for production of X (a kind of production)
Task in production of X (a part of an application)
Drilling of X (a kind of task)
Tip centering for drilling of X (a part of drilling)
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 31
Building ontologies: an example (3)

Yet, the following is perfectly fine

Change in application
Change in application for production of X
Change in task in production of X
Change in drilling of X
Change in tip centering for drilling of X

To build a good ontology we need: domain experts (to


understand what one is modeling) and a solid methodology or
an ontologist (to know how to model).

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 32


Organizational relations

Any ontology provides a classification taxonomy which is


sometimes called the “backbone” of the whole system.

The taxonomy is a set of slots (categories, classes, concepts),


connected by organizational relationships:
Is_A (subclass) and Part_Of.
Usually categories are identified by predicates, e.g., the
category Person is identified by the predicate being human.

Another relationship, Instance_Of, is needed to populate the


ontology.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 33


The Is_A relation (subsumption)

Is_A: the set-theoretical notion of subset.


It relates two categories.

∀x(Screwdriver(x) → Tool(x))

“every member of category Screwdriver is also member of


Tool”

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 34


The Instance_Of relation

Instance_Of: the set-theoretical notion of membership.


It relates an individual and a category.

Tool(Tester_A123)
“The individual Tester_A123 is a member of category Tool”

Note: multiple inheritance is a possibility but needs to be


managed with care!

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 35


The Part_Of relation

Part_Of: this relation is not set-theoretical.


It relates two individuals.

Let’s model: The slot is part of the screwdriver.


Part(Slot, Screwdriver)

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 36


The Part_Of relation

Part_Of: this relation is not set-theoretical.


It relates two individuals.

Let’s model: The slot is part of the screwdriver.


Part(Slot, Screwdriver) [parthood is ambiguous]

Spatial parthood

Part(Loc(Slot), Loc(Screwdriver))

“the location of the Slot is part of the location of


Screwdriver”

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 37


The Part_Of relation
Parthood is not necessarily about space.
It can be used to model
I space
I time
I objects (temporalised)
I events
I functionality
I environment

Problem 3: Distinguish the meaning of expression


Part(Slot, Screwdriver) based on the different parthood
relations.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 38
Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 39
Types of entities
We always talk of ontologies (plural) because different
ontological assumptions lead to different systems which
are motivated by different cognitive/conceptual systems.
These systems may differ even on the types of entities
they assume to exist.

Important ontological choices:


I object vs event
I abstract vs physical
I role vs property
I co-location vs extensionality
I time-point vs time-interval
I ... S. Borgo, Ro-Man Tutorial 28 Aug. 2017 40
Entity stacking

What to ask when you model something?


Let’s see a common entity in our everyday life: a table
I the table vs the material (wood/metal)

Is there just one entity that encompasses both


- the table and the material (a table-shaped bulk of
atoms),
or do we recognize several entities that are co-located
and interconnected?

Guideline: identify what is essential in general, not just for


the specific goal in a scenario!
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 41
Entity stacking

Some alternatives for modeling our “table”:


- only matter (holes, corners etc. are features of the
shape)
- only objects (may include immaterial parts)
- matter vs object
- matter vs object vs artifact

Q.: which ontological relationships link co-located


entities?
I constitution
I dependence S. Borgo, Ro-Man Tutorial 28 Aug. 2017 42
Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 43
The DOLCE-core ontology

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 44


What is there?
Problem 4: what is shown here?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 45


Objects, qualities and spaces in DOLCE

Object Quality Quality space

Physical
Location-Quality Location-Space
Object

Is-part-of

Inheres Indiv. Loc.-quality Has-quale


Gripper_73 Location_421
of Gripper_73

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 46


An object, its qualities (yellow), and their quality-spaces (gray)

Gripper_73
(the concrete object)

Individual Weight-quality Individual Location-quality Individual Shape-quality ....


of Gripper_73 of Gripper_73 of Gripper_73 of Gripper_73

Positions: Light, Heavy Positions: sets Positions: Spherical, Non-spherical ....


[A space with 2 positions] [A topological space] [A space with 2 positions]

Positions: a,b,c,... Positions: Euclidean loci Positions: 0D, 1D, 2D, 3D, Other ....
[A space with infinite positions] [A geometric space] [A space with 5 positions]

Positions: 0,1,2,... Positions: mereological regions Positions: # of angles


[A space with ordered positions] [A mereological space] [A space with infinite positions]

.... .... Positions: any geometrical shape


[A space with infinite positions]

....

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 47


Being Present in DOLCE
The primitive predicate ‘being present at’ (PRE) identifies
at which times entities exist.
No commitment to a specific notion of time is taken.
PRE is dissective and additive. It applies to times only.
I PRE(x, t) → T(t)
I PRE(x, t) ∧ P(t0 , t) → PRE(x, t0 ) (dissectivity)
I PRE(x, t0 ) ∧ PRE(x, t00 ) ∧ SUM(t, t0 , t00 ) → PRE(x, t)
(additivity)
I PT (x) → ∃t(PRE(x, t))

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 48


Temporary Parthood in Dolce /1

DOLCE adopts a temporary extensional mereology, also


denoted by P, which is based on the axioms of
extensional mereology adapted to the extra temporal
parameter.
Expression P(x, y, t) stands for ‘x is part of y at time t’,
analogously for, say, O(x, y, t).
I O(x, y, t) , ∃z(P(z, x, t) ∧ P(z, y, t))
(Temporary Overlap)

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 49


Temporary Parthood in Dolce /2

I P(x, y, t) → PRE(x, t) ∧ PRE(y, t)


(parthood implies being present)
I PRE(x, t) → P(x, x, t) (temporary reflexivity)
I P(x, y, t) ∧ P(y, z, t) → P(x, z, t) (temporary transitivity)
I PRE(x, t) ∧ PRE(y, t) ∧ ¬P(x, y, t) →
∃z(P(z, x, t) ∧ ¬O(z, y, t))
(temporary extensionality)
I If φ is O, E, QTi , Sjk or C:
φ(y) ∧ P(x, y, t) → φ(x)
(temporary dissectivity )

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 50


The location relation

The location relation (L) provides the link between


qualities and spaces.

L(x, y, t) ≡ “at time t, region x is the location of the


individual quality y”

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 51


Location: axioms (1)
I R (x)∧PRE(x, t)∧PRE(x, t0 ) → ∀y(P(y, x, t) ↔ P(y, x, t0 ))
Regions (and in particular spaces) do not change
during their existence.
I S ij (x) ∧ S ij (y) ∧ PRE(x, t) → PRE(y, t)
I L(x, y, t) → R(x) ∧ QT(y)
I L(x, y, t) → PRE(y, t)
I L(x, y, t) ∧ P(t0 , t) ∧ L(x0 , y, t0 ) ∧ Sij (x) ∧ Sij (x0 ) →
∀t00 (PRE(x, t00 ) → P(x0 , x, t00 ))
I L(x0 , y, t0 ) ∧ L(x00 , y, t00 ) ∧ SUM(t, t0 , t00 ) ∧ SUM(x, x0 , x00 )∧
S ij (x0 ) ∧ S ij (x00 ) → L(x, y, t)
the location of an individual quality at t is the
mereological sum of all the locations the quality has
during t S. Borgo, Ro-Man Tutorial 28 Aug. 2017 52
Location: axioms (2)
W
I L(x, y, t) ∧ QTi (y) → j Sij (x)
I QT(y) ∧ PRE(y, t) → ∃x(L(x, y, t))
Each individual quality in QTi must be located at least
in one of the associated spaces Sij
I L(x, y, t) ∧ L(x0 , y, t) ∧ Sjk (x) ∧ Sjk (x0 ) → x = x0
[The location in a single space is unique]
I L(x, y, t) ∧ PRE(y, t0 ) ∧ Sjk (x) → ∃x0 (L(x0 , y, t0 ) ∧ Sjk (x0 ))
A quality that has a location in a space needs to have
some location in that space during its whole life
I L(x, y, t) ∧ CC(x0 , x, t) ∧ CC(y0 , y, t) → L(x0 , y0 , t)
(L-substitutivity )
Two qualities coincident at t are also indistinguishable
with respect to their locations (thus the bearers are
indistinguishable with respect to those qualities)
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 53
Beyond Ontology
Problem 5: List the information in the figure and separate
what goes into the ontology and what does not.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 54


Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 55
Artifacts

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 56


Artifacts /1
- Something created by humans usually for a practical purpose.
- Something [...] resulting from a particular human institution,
period, trend, or individual.
[Merriam-Webster]
- An object produced [...] by human craft, especially a tool,
weapon, or ornament of archaeological or historical interest.
- Something viewed as a product of human conception or
agency rather than an inherent element.
[The American Heritage Dictionary]
Artifact is a term used in the social sciences, particularly
anthropology, ethnology, and sociology for anything created by
humans which gives information about the culture of its creator
and users. [Wikipedia]

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 57


Artifacts /2
Definition (Engineering Artifact)
A technical artifact a is a physical object created by an
intentionally performed production process. The process is
intentionally performed by one or more agents with the goal of
producing the object a which is expected to realize intended
behavior in some given generic technical situation, and the
object a can realize to some extent that intended behavior
and/or has a property which supports that behavior.

Definition (Technological Artifact)


A technical artifact a is a physical object which is, firstly, created
by the carrying out by an agent (or group of agents) of a make
plan for a physical object with a physical description id, and for
which, secondly, a use plan exists.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 58
Artifacts /3
Definition (Engineering Artifact)
A technical artifact a is a physical object created by an
intentionally performed production process. The process is
intentionally performed by one or more agents with the goal of
producing the object a which is expected to realize intended
behavior in some given generic technical situation, and the
object a can realize to some extent that intended behavior
and/or has a property which supports that behavior.

Definition (Technological Artifact)


A technical artifact a is a physical object which is, firstly, created
by the carrying out by an agent (or group of agents) of a make
plan for a physical object with a physical description id, and for
which, secondly, a use plan exists.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 59
Artifacts 4/

Definition (Ontological Artifact)


A technical artifact a is a physical object which an agent (or
group of agents) creates by two, possibly concurrent,
intentional acts: the selection of a material entity (as the only
constituent of a) and the attribution to a of a technical quality.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 60


Artifacts /5
Ontological
artifact - OA
(Def. 1)

Selection Constituted
(generic) entity

Attribution

Attributed
physical
property Agent Action

Technological Intentional Selection Engineering


artifact - TA physical (mental) artifact - EA
(Def. 3) production (Def. 2)
Physical Physical
property entity
Physical Behavior
description
Use plan
Selected
Make plan behavior
Selected
Selection physical
(via checking) property

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 61


The DOLCE-core ontology

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 62


Engineering Functions

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 63


A view: Functional Modeling /1
Universal common language for archiving, comparison,
communication of functional description.
I product functions are described in form of a verb-object
and represented by input/output flows of materials,
energies and signals. Graphically they are shown as a
black-box operation on flows. The idea is to decompose
product functions into sets of connected elementary
sub-functions.
I Sub-functions are well-defined basic operations on
well-defined basic flows of materials, energies and signals.
From the implementation viewpoint, they are elementary.
I Basic operations and basic flows are limited in number
and stored in shared libraries, which cover the mechanical
design space. S. Borgo, Ro-Man Tutorial 28 Aug. 2017 64
A view: Functional Modeling /2

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 65


A view: Functional Modeling /3

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 66


Device-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 67


Device-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 68


Device-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 69


Device-centric functions

Definition
A device-centric function of a device for an agent is a set
of behavioral constraints that are
(1) satisfied by the device
(2) intended by the agent.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 70


Environment-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 71


Environment-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 72


Environment-centric functions - first look

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 73


Environment-centric functions

Definition
A environment-centric function of a device in an
environment is a set of behavioral constraints that are
(1) caused by the device
(2) intended by an agent.
This presupposes that the device is deployed in the
environment as specified by a mode of deployment.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 74


Mode of deployment

Definition
A mode of deployment of a device in an environment is a
specification of all causal interactions between the device
and the environment.
Those interactions may include:
(1) structural relations between the device and the
objects in the environment
(2) actions such that
I they impact on the device
I the environment’s objects participate in them.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 75


Ontological functions

FUNCTION
(as effect)

TEST ACTION COMMUNICATION

SENSE CONVERT CHANNEL SEND

CHANGE STABILIZE
BRANCH MAGNITUDE RECEIVE

JOIN STORE INCREASE

RECLASSIFY COLLECT DECREASE

CHANGE
OVER RELEASE
information change of change on change on information
collection operand(s) qualities relations sharing

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 76


The DOLCE-core ontology

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 77


Classifying manipulation tasks /1
Problem 6a: Classify ontologically some tasks.

FUNCTION
(as effect)

TEST ACTION COM

SENSE CONVERT CHANNEL

CHANGE STABILIZE
BRANCH MAGNITUDE

JOIN STORE INCREASE

RECLASSIFY COLLECT DECREASE

CHANGE
OVER RELEASE
information change of change on change on
collection operand(s) qualities relations
From “Classifying Compliant Manipulation Tasks for Automated
Planning in Robotics”,D. Leidner et al., IROS 2015
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 78
Classifying manipulation tasks /2
Problem 6b: Classify ontologically some tasks.

FUNCTION
(as effect)

TEST ACTION CO

SENSE CONVERT CHANNEL

CHANGE STABILIZE
BRANCH MAGNITUDE

JOIN STORE INCREASE

RECLASSIFY COLLECT DECREASE

CHANGE
OVER RELEASE
information change of change on change on
collection operand(s) qualities relations
From “Classifying Compliant Manipulation Tasks for Automated
Planning in Robotics”, D. Leidner et al., IROS 2015

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 79


Agent

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 80


Briefs on agents /1
Our interest is on the notion of embodied agent.
(1) anything that is seen as “perceiving its environment
through sensors and acting upon that environment through
effectors.” (Russell and Norvig, 2010, p. 33)
(2) “a system that tries to fulfill a set of goals in a complex,
dynamic environment” (Maes, 1994, p. 136)
(3) “any embodied system [that pursues] internal or external
goals by its own actions while in continuous long-term
interaction with the environment in which it is situated”
(Beer, 1995, p. 173)
(4) (autonomous agent) “a system situated within and apart of
an environment that senses that environment and acts on
it, over time, in pursuit of its own agenda and so as to
effect what it senses in the future.” (Franklin and Graesser,
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 81
1996, p. 25).
Briefs on agents /2
Our interest is on the notion of embodied agent.

(5) “entities which engage in normatively constrained,


goal-directed, interaction with their environment”
(Christensen and Hooker, 2000, p. 133)

(6) “a system doing something by itself according to certain


goals or norms within a specific environment.” Conditions:
(i) the system is an individual; (ii) the system is the active
source of interaction; and (iii) the interaction norm is
generated by the system (Barandiaran, Di Paolo and
Rohde, 2009, p. 374)

Commonalities: there is a system, distinguishable from the


environment, able to sense and/or perceive that environment,
able to act in pursuit of a goal.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 82
The definitions do not refer to intentionality.
Problem 7: how would you define a robotic agent?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 83


Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 84
Environment

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 85


Robot’s environments /1

http://www.wirecrafters.com/

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 86


Robot’s environments /2

http://www.wirecrafters.com/

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 87


Robot’s environments /3

https://www.thesun.co.uk/

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 88


Environment

In robotics there are three ways to understand


‘environment’: fixed, object-centric, task-centric.

Generally speaking, the environment amounts to an area


(location) and the elements in it possibly with their
constraints/relationships.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 89


Environment

Speaking of agents, this is the area of interest in which


the agent acts or could act.
NOTE: regarding artificial agents, it might also include
requirements and specifications about the software
components and their development.

Here we define the robot’s environment as the location


where the robot is (it’s area of movement/action) including
the elements it contains plus the entities that, even though
not in the location, can interact (positively or negatively)
with the robot’s goals and planned activities.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 90


Environment
In ontological terms, the environment is a
located physical object, whose extension and properties
are relative to the agent, obtained by the mereological
sum of all the physical objects that are within the
interaction range (workspace) of the robot.
The location of the environment corresponds to the
location of the objects in the environment plus the
locations ‘reachable’ by the robot itself.
NOTE: in this view the environment extension and parts
can change for several reasons:
change in the goals and planned activities, entities moving
closer or farther, robot moving, robot starting/ending
interaction channels, change in the robot’s capabilities...
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 91
Context

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 92


Context (general)
Here are some general uses of the term ‘context’
I a context is the result of picking a viewpoint
(education, economics, tourism, personal
relationship...), and
– use it to discriminate what is relevant and what is
not in a given system/situation,
– use it to reinterpret the components and
relationships of/in the system/situation
I a context is the result of selecting a part of ‘reality’
and isolate it as a full-fledge system in itself.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 93


Understanding Context
Computer science: the notion of context was introduced
in operating systems to mean a state of the processes like
waiting, running and blocked.
In artificial intelligence, software engineering, database,
machine learning, and knowledge representation context
is a collection of things and constraints associated to
some specific condition.
More specifically, in artificial intelligent context is a logical
construct that facilitates reasoning activities by
partitioning knowledge into manageable sets.
In knowledge representation, context is an abstraction
mechanism for partitioning a knowledge base.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 94


Understanding Context
In sociology context is a network of interacting entities
(people, agents, artefacts) created and continually
updated by the interactions among them.
In cognitive science, context is the set of all entities that
influence human (or system’s) behaviour on a particular
occasion.
In linguistics context has (at least) two meanings.
– The verbal context refers to the text or speech
surrounding an expression (word, sentence, or speech
act).
– The social context is given by the social identity
construed and displayed in text and talk by the language
users.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 95
Context and environment

I believe it is important to keep context and environment


(and situation) apart:
environment (situation) implies a localization, often
spatial/temporal: the subject of study is part of the
environment (situation).
Context is more general, the subject does not need to be
part of the context.
In the literature context, environment and situation are often
used interchangeably as we are going to see.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 96


Defining context /1

Design science:
“Context knowledge identifies the exogenous variables for a
design situation and specifies that values for these variables
must come from outside the design prototype, that is, from the
context (C).”
“The context is defined by the available design prototypes. [....]
This move [outside the available design prototypes] can be
seen as the designer changing the context in which s/he is
working.” [J. Gero, 1990]

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 97


Defining context /2

Context-aware systems:
“A real world entity to be represented is always related to a
context. A semantically consistent body of information in which
the entity makes sense.
The need of contexts? In mobile applications, where the
environment suffer dynamic reconfigurations.” [Cafezeiro et al.,
2008]

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 98


Defining context /3

“By [context] we refer here to any space in our surroundings.


Although some people may also consider virtual environments
here we mostly refer to Physical spaces, in all its diversity, e.g.,
house, building, street, a field, an area in the sea or space, etc.
[Augusto et al. 2013]

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 99


Defining context /4

A widely used definition:


a context is “that which constrains something without
intervening in it explicitly” [P. Brézilon, J. Pomerol, 1999]

“[S]omething is context because of the way it is used in


interpretation”, [Winograd, T., 2001]
⇒ A context is not such for its inherent properties.

Note that use in interpretation leads to think of context as


something related to a descriptive and semantic value.

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 100


Context and context-awareness
Probably the most used notion today:
“Context is any information that can be used to
characterize the situation of an entity. An entity is a
person, place, or object that is considered relevant to the
interaction between a user and an application, including
the user and applications themselves.”

“A system is context-aware if it uses context to provide


relevant information and/or services to the user, where
relevancy depends on the user’s task.”
[Dey, 2001]

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 101


Sub-contexts: the manufacturing domain

Often three types of contexts for an agent are enough.

The global context is about information the agent cannot


control nor modify, e.g., the shared language of the system, the
agents present in the system, the factory’s performance
parameters.
The local context provides information on the relationship
between the agent and its neighbours (typically the agents
connected to it), thus providing a centralised view.
The internal context collects the information the agent has
about itself as well as its capacities toward itself (change-over)
and toward the environment (communication and manipulation).

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 102


Exploiting ontology and context
Problem 8 (revision of 5): List the information in the
figure and separate what goes into the ontology and what
in the context and (sub-contexts).

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 103


Table of Contents

Guiding scenarios
Why ontology?
Managing information with an Ontology
Entities and their connections
An ontology: DOLCE
Artefacts, Functions and Agents
Environment and Context
Rules and Reasoning
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 104
Recall the Robot in the controlled environment scenario

M6

M5 M7

M1
M6

M4 M5

S1
M4
M2

S2
M3 M2

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 105


1 NOITARUGIFNOC CONFIGURATION
2 CONFIGURATION
CONFIGURATION
2 2 CONFIGURATION 1 1 1 1
2CONFIGURATION
NOCONFIGURATION
ITARCONFIGURATION
UGICONFIGURATION
FNOC 2
Scenario: Robot + Controlled environment

F
F
F
F

F
F
F
F

1CR 1CL 1LC1 LC1RC1


CR LC1 LC1LC11CL RC1RC1 RC1 LC1 LC1LC1 RC1RC1 RC1RC1

2CLC2
R LC2 LC2LC2
2CL RC2RC2 RC2RC2
B
B

B
B
B
B

B
B

B
!
!
!
!
!

S. Borgo, Ro-Man Tutorial 28 Aug. 2017


106
Physical robot, Knowledge module, Execution module

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 107


Knowledge module

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 108


Knowledge mechanism

Knowledge)Processing)Mechanism)

Classifica.on(Rules( Capability((
Inference(Rules(
kb0

Taxonomy((
Contexts( of(Func.ons(
Low9level)Reasoning) High9level)Reasoning)

d: sensor Diagnosis)Module) kb: agent's


data knowledge

Mechatronic)
Module/Controller)

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 109


Leveraging on the ontology and contexts
The local context provides:
I list of ports/interfaces

I list of internal states

I list of engines/actuators

The ontology and the global context provide general


information, e.g.:
I ports are locations

I conveyors are connectors of locations

I connection is transitive for the Channel


(transportation) function
This suffices to generate all the possible ways for a
trasportation agent to execute a Channel function.
S. Borgo, Ro-Man Tutorial 28 Aug. 2017 110
Received knowledge (internal, local, general)

GLOBAL CONTEXT
module-t2 module-t4
module-t3 hasLoc
connection
connection module-t7
hasLoc hasLoc
connection LOCAL CONTEXT connection

connection

hasLoc hasLoc connection connection


port-f

hasPart
conveyor hasLoc
hasPart
hasPart port-b
module-t1
INTERNAL CONTEXT

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 111


Building internal and local knowledge
hasOpStat active
robot-3
hasOpStat
robot-1
hasOpStat
hasLoc
robot-2
hasLoc
connection
hasLoc
connection connection

hasLoc
port-f port-b hasLoc

hasComp
hasComp
hasCollab
hasCollab
module-t1

ROBOT(r) ∧ PORT(p) ∧ hasLoc(p, lp , t) ∧ ROBOTPART(p, r, t) ∧


hasOpStat(p, active, t) ∧ ROBOT(c) ∧ hasLoc(c, lc , t) ∧
connection(lp, lc , t) → hasCollab(r, c, t) S. Borgo, Ro-Man Tutorial 28 Aug. 2017 112
Using a model of agent

Channel-­‐F-­‐B  
Neighbor-­‐F   TM Channel Channel-­‐F-­‐L1  
F   Channel-­‐L1-­‐F  
Idle  
Channel-­‐B-­‐F  
Neighbor-­‐L1  

 
SEMANTIC FUNCTIONAL
TU1  
MAPPING
R1  
L1  

Transportation Unit 1 Transportation


Moving   Unit 2
Down   Up  
Transportation
 
SETUP   Moving   Up  
Unit 3
Down  
 TU2  
R2  

Cross Engine 1
L2  

Main
Conveyor Forward  
Cross Engine 3
SAll   Backward   Cross Engine 2
 
PRIMITIVE
 TU3  
RECONF  
R3  
L3  

Online   Neighbor-L1
Neighbor-F

Offline   Failure  
B   MalfuncAoning  
Neighbor-B
Neighbor-­‐B   EXTERNAL

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 113


What have we seen?
Guiding scenarios

Why ontology?

Managing information with an Ontology

Entities and their connections

An ontology: DOLCE

Artefacts, Functions and Agents

Environment and Context

Rules and Reasoning


S. Borgo, Ro-Man Tutorial 28 Aug. 2017 114
Some references mostly on my work
I Borgo “How Formal Ontology can help Civil Engineers.” Ontologies for Urban Develop. 2007
I Borgo and Masolo “Foundational Choices in DOLCE.” Handbook on Ontologies 2009
I P. Vermaas et al. ”The design stance and its artefacts” Synthese 2013
I Borgo and Vieu. “Artifacts in Formal Ontology.” Handbook of the Phil. of the Tech. Sciences 2009
I Borgo et al. “Technical artifacts: An integrated perspective.” Applied Ontology 2014
I Chandrasekaran & Josephson “Function in device representation.” Eng. with Comp. 2000
I Aunger and Curtis “Kinds of behaviour.” Biology & Phil. 2008
I Borgo et al. “A formal ontological perspective on the behaviors and functions of technical artifacts.” AI
EDAM 2009
I Hirtz et al. “A functional basis for engineering design: Reconciling and evolving
previous efforts.” Research in engineering Design 2002
I Borgo et al. “A formalization of functions as operations on flows.” J. of Comp. & Inf. Science in Eng. 2011
I Garbacz et al. “Two ontology-driven formalisations of functions and their comparison.” J. of Eng. Design
2011
I Mizoguchi et al. “A unifying definition for artifact and biological functions.” App. Ont. 2016
I Borgo et al. “A planning-based architecture for a reconfigurable manufacturing system.” ICAPS 2016
I Leidner et al. “Classifying Compliant Manipulation Tasks for Automated Planning in Robotics”, IROS 2015

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 115


That’s enough for this class.
Thank you.

More questions?

S. Borgo, Ro-Man Tutorial 28 Aug. 2017 116

You might also like