=Paper= {{Paper |id=Vol-1660/caos-paper2 |storemode=property |title=Affordances in Representing the Behaviour of Event-Based Systems |pdfUrl=https://ceur-ws.org/Vol-1660/caos-paper2.pdf |volume=Vol-1660 |authors=Fahim T. Imam,Thomas R. Dean |dblpUrl=https://dblp.org/rec/conf/fois/ImamD16 }} ==Affordances in Representing the Behaviour of Event-Based Systems== https://ceur-ws.org/Vol-1660/caos-paper2.pdf
         Affordances in Representing the
        Behaviour of Event-Based Systems
                       Fahim T. IMAM a,1 , Thomas R. DEAN b
                 a School of Computing, Queen’s University, Canada
  b Department of Electrical and Computer Engineering, Queen’s University, Canada



            Abstract. In this paper, we examine affordances within the context of representing
            the functional behaviour of event-based systems. We provide an overview of the
            ontology that supports such representation. We provide an example use of the af-
            fordances that can facilitate us to describe, model, and reason about the behaviour
            of event-based systems in an intuitive, effective manner.

            Keywords. ontologies, affordances, functional reasoning, artificial intelligence




1. Introduction

In this paper, we examine affordances within the context of representing the functional
behavior of event-based systems. The representational facility that we are going to in-
vestigate is called the Event-Based Functional Behavior Ontology (EFBO) [1]. Our pre-
vious work, Imam et al. [2], was dedicated to providing the detailed understanding of
the EFBO, along with a set of use case scenarios of the ontology. The key motivation of
that effort was to develop an effective representational facility that could be utilized to
validate the levels of functional consistencies among a set of cross-platform, event-based
application systems. The focus of this short paper, however, is to discuss the affordances
within the EFBO’s representational facility. We will observe how the EFBO along with
its affordances can facilitate us to model and reason about a system’s behaviour using
a set of simple, intuitive expressions. As will be observed, through the use of its affor-
dances, the EFBO provides a useful mechanism to comprehend, model, and reason about
a system’s functional behaviour in an effective, intuitive manner.
     Affordances and Functionality. Originated in the field of perceptual psychology,
the term affordance refers to an action possibility formed by the relationship between
an agent and its environment [3]. This latter concept of affordance by Gibson [3] was
adapted into the field of AI by Sahin et al. [4] as a design methodology for developing
the AI systems. Affordances within the AI world are typically used to derive the potential
actions that can stem from a set of relationships between the properties of an autonomous
agent and the properties of its environment. An affordance, in its original sense, does not
exist as a direct property of an agent or its environment. Within the context of the EFBO,
  1 Corresponding Author: Fahim T. Imam, School of Computing, Queen’s University, ON K7K 3Z5, Canada;

E-mail: fahim.imam@queensu.ca
the notion of functionality forms the analogous types of relationships as the notion of
affordances do for the AI systems. We define the functional behavior of a system as a set
of relations F that can exist between the agents and the events of that system, where F
must correspond to the notion of affordances. For our purpose, we consider the following
notion of affordances by Stoffregen [5] as adapted from Nye et al. [6]:
                     Wpq = (X p , Zq ) and h = f (p, q); where, h ∈
                                                                  / X p and h ∈
                                                                              / Zq .
     In this formula above, Wpq represents a system that includes the part of its environ-
ment X p and an agent Zq , where p and q respectively represents the properties of X p and
Zq . The potential affordance h exists between p and q through the relationship f . This
formulation suggests that the affordance h exists within the system Wpq where neither
the environment X p nor the agent Zq contain the affordance h.


2. The EFBO Representation

Based on the key notions of action, events, and change in commonsense reasoning [7],
event calculus [8], and functional reasoning [9], the EFBO was developed to represent
the functional behavior of a system in a rigorous, logical manner. The EFBO can be
represented in terms of the following sets of classes and properties [2].
     • Set of classes, C = {E, G, I}, where, E is the set of Event instances, E={e1 , e2 , .., en };
       G is the set of Agent instances, G={g1 , g2 , .., gn }; and, I represents the set of Inter f ace
       instances, I={i1 , i2 , .., in }.
     • Set of properties, P={R(e, g), R(e, i), R(e1 , e2 )}, where, R(e, g) represents the set of rela-
       tions between an instance of an event, Event(e) and an instance of an agent, Agent(g), e.g.,
       isPerformedBy; R(e, i) represents the set of relations between an Event(e) and an Inter-
       face(i), e.g.,hasInterface; and, R(e1 , e2 ) represents the set of relations between two Event
       instances, e1 and e2 ; e.g., hasNextEvent.

     The EFBO facilitates us to describe the instances of the classes in C in terms of their
associated relations in P. The key classes and the classification of the main properties at
the instances level are presented in Figure 1. The core classes of the EFBO are the Event,
Agent, and the Interface classes. Other EFBO entities are logically based on these classes.
The concept of Event within the EFBO essentially correspond to the notion of SPAN
as endorsed by the Basic Formal Ontology (BFO) [10]. An event is understood as an
occurrent at a particular point in time. The concept of time is understood as the continued
progression of events that occur in succession from the past through the present to the
future2 . These latter notions of time and event together forms the Event-Time continuum
as depicted in Figure 2 (right).
     The temporal dimension of the events within the EFBO can be reasoned through
the Event-Event relations as listed in Figure 1. The concept of Agent is understood as an
actor that performs some action within a system environment. An Interface is understood
as a system entity that serves as an interaction point between an event and an agent. We
are only concerned about the temporal aspects of the interfaces through their relations
with Events. Figure 2 (left) is a depiction of the Event-Interface-Agent interaction model
as supported by the EFBO.
  2 We adapted the notion of time from the Oxford Dictionaries.
Figure 1. On the left, we note the key classes of the EFBO and their hierarchy, along with the current metrics
of the ontology. On the right, we have the classification of the key EFBO properties. The classification is
presented based on the four basic types of relations as supported by the EFBO. Some of the properties must
have direct assertions of their instances whereas the other ones must infer their instances through automated
reasoning as indicated in the last column. Essentially, the last five properties in the table can serve alternative
purposes due to the existence of their corresponding inverse properties.




Figure 2. On the left, we have the Event-Interface-Agent interaction model for the EFBO. The hasNextEvent
relation is used to connect an event with its next event. The corresponding interfaces for each of the events are
connected through the hasInterface property. The interactsWith property is used to specify the agents for each
of the interfaces. The dotted arrows indicate the inferred relations within the model. On the right, we have a
depiction of the Event-Time continuum. The green and the blue arrows for each of the events at the red dots
indicate the event’s temporal connections with its past and future events, respectively. [2]

3. Affordances within the EFBO

Based on the formulation of affordances in Section 1, a common approach of implement-
ing affordances is by defining the relationship f in terms of the properties of the agent q
and the environment p [6]. The affordances within the EFBO are defined in terms of the
relations between the properties of the Agent and the properties of the remaining system
entities, i.e., the Event and the Interface. The following affordances are defined using the
powerful notion of the OWL-property chain.
     A. The isPerformedBy Relation. The concept of Action within the EFBO is speci-
fied as an event that is performed by an agent. However, an action cannot be performed
directly without invoking the interface of its corresponding event. We define the rela-
tional property isPerformedBy as the super property of the following chain of properties:
hasInterface o interactsWith, where, the hasInterface is an eventProperty to connect an
event with an interface; and,the interactsWith is an agentProperty that connects an agent
with an interface. The property chain specifies that the affordance isPerformedBy could
exist if an Event(e) has an Interface(i) and that interface i interacts with an Agent(g). The
event e, in this case, would be inferred as an action that is performed by the agent g. The
isInvokedBy relation refers to the super property of the defined relation isPerformedBy.
The former is a relation between an event and agent, and the latter is between an action
and an agent. The instances that hold these two properties can only be inferred and must
not be asserted directly. These relations, therefore, can only be afforded by the chain of
relations between the hasInterface and the interactsWith properties.
     B. The isTriggeredBy Relation. The concept of Activity within the EFBO is un-
derstood to be an Action (i.e., an event performed by an agent) that is followed by a
successive event. In order to activate an event, the event must be triggered by an agent
through the system’s interface. We define the isTriggeredBy relation as the super prop-
erty of the following chain of properties: hasPreviousEvent o isPerformedBy, where,
the hasPreviousEvent is an eventProperty that connects an event with its previous event;
and, isPerformedBy is a defined property that connects an action with an agent as ex-
plained before. The property chain specifies that the affordance isTriggeredby can exist
if an Event(e2 ) has a previous Event(e1 ), and the event e1 is performed by an Agent(g).
The event e2 , in this case, would be inferred as an event that is triggered by the agent g.
The instances that hold the isTriggeredBY properties can only be inferred and must not
be asserted directly. In other words, the isTriggeredBy can only be afforded by the chain
of relation between the hasPreviousEvent and the isPerformedBy properties.
     As we can observe, the affordances within the EFBO facilitates us to have a straight-
forward mechanism to specify different relationships between the properties of an agent
and its system environment. We can also observe that the EFBO allows nesting of af-
fordances, as well as defining affordances in terms of the other affordances. This can be
a powerful mechanism in order to have different levels of abstractions of the potential
actions by an agent within the event-based systems.
     Example Use of the EFBO’s Affordances. As an example, we observe the EFBO-
based modelling of a typical login functionality for a smart phone application [2]. While
the domain of the example is simple enough to follow, a careful observation of the exam-
ple should intuitively indicate most of the necessary aspects of modelling a more com-
plex system. The EFBO-based modelling process involves describing the behavior of a
system on a simple storyboard, as reflected in Figure 3. As should be observed in the fig-
ure, the storyboard allowed us to state whatever is explicitly known about each of the core
functional entities, i.e., the associated relations between the events, relations between the
events and their interfaces, and the relations between the agents and the interfaces of the
desired system.
     Based on a set of functional reasoning categories, e.g., events by triggering agents,
distribution of activities by agents, events within a specific activity, and so forth, a set of
instance-specific classes (the class names prefixed with underscores in Figure 4) were de-
fined under the ‘Entity Classifier Class’ of the EFBO. For example, the class ‘ User Agent
Activity’ was defined as equivalent to any Action that isPerformedBy some userAgent.
Similarly, the class ‘ Event Triggered By Client Agent’ was defined as equivalent to any
Event that isTriggeredBy some clientAgent. Figure 4 presents the inferred classification
results after the automated reasoning on the classifier classes.
Figure 3. The EFBO-based modelling statements on a storyboard. First, the sequence of events of the login
system are declared using the hasNextEvent property (Lines 4-16). After that, the set of interfaces for each
of the events are declared using the hasInterface property; the composition of the UI interfaces are specified
using the hasElement / isElementOf properties (Lines 19-36). Finally, the set of agents with their designated
interfaces are declared using the interactsWith property (Lines 39-48). [2]




      Figure 4. A set of inferred classifications of the Figure 3 entities after automated reasoning. [2]

      It should be observed from the modelling example that the EFBO’s affordance re-
lations allowed the reasoner to infer the set of potential actions between the system’s
agents and its environment. For example, the reasoner perfectly inferred the actions that
could be performed by different agents as part of their activities within the modelled
system; the reasoner could also infer the events that could be triggered by each of the
agents as well (see the first two columns in Figure 4). It should be noted that while we
did not have the EFBO affordances directly asserted between any of the storyboard enti-
ties, the affordance relations were inferred through the automated reasoning as afforded
by the relations between the properties of the events and the properties of the agents
within the modelled environment. This latter strategy is critical in both observing and
modelling the functional behavior of any practical application system. In the practical
sense of affordances, the agents in such system must not be able to invoke the functional
events of the system without the proper interactions with the system’s designated inter-
faces. This design choice also promotes more automation, and, ultimately, reduces the
amount of human-induced errors during the modelling process. As observed in this sec-
tion, the relations of affordances can be a powerful feature for the ontologies that deals
with representing the functional behaviour of event-based systems.


4. Concluding Remarks

Using the EBFO representation along with its affordances, one can effectively model the
functional entities of a system in such a way so that their existence within the system
can be thoroughly reasoned. It should be noted that currently, the temporal aspects of
the EFBO events only supports a subset of Allen’s temporal axioms that are necessary
for our functional reasoning tasks. However, the EFBO is flexible enough to incorporate
the remaining axioms, if necessary in the future. Due to its affordances, the EFBO-based
functional modelling process is quite intuitive and practical, which allows us to describe
and reason about the behavior of a system through a series of simple statements. We have
carefully engineered the EFBO ontology with a minimal set of required classes and prop-
erties in order to achieve the maximum usability of the ontology without compromising
the required logical rigour to achieve an effective functional reasoning mechanism.


Acknowledgement

This work is supported by the Natural Sciences and Engineering Research Council of
Canada (NSERC).


References
 [1]   F. T. Imam. The Event-Based Functional Behavior Ontology (EFBO). Queen’s University, Canada.
       http://cs.queensu.ca/~imam/efbo.html. [Last accessed: 15-June-2016].
 [2]   F. T. Imam and T. R. Dean. Modelling functional behavior of event-based systems: A practical
       knowledge-based approach. In Proc. of the 20th Int’l Conf. on Knowledge Based and Intelligent
       Information and Engineering Systems, York, UK. Procedia Computer Science, Elsevier, 2016. In Press.
 [3]   J. J. Gibson. The ecological approach to the visual perception of pictures. Leonardo, 11(3):227–235,
       1978.
 [4]   E. Şahin, M. Cakmak, M. R. Doğar, E. Uğur, and G. Üçoluk. To afford or not to afford: A new
       formalization of affordances toward affordance-based robot control. Adaptive Behavior,
       15(4):447–472, 2007.
 [5]   T. A. Stoffregen. Affordances as properties of the animal-environment system. Ecological Psychology,
       15(2):115–134, 2003.
 [6]   B. D. Nye and B. G. Silverman. Affordances in AI. In Encyclopedia of the Sciences of Learning, pages
       183–187. Springer, 2012.
 [7]   E. Davis and G. Marcus. Commonsense reasoning and commonsense knowledge in artificial
       intelligence. Communications of the ACM, 58(9):92–103, 2015.
 [8]   M. Shanahan. The event calculus explained. In Artif. intell. today, pages 409–430. Springer, 1999.
 [9]   B. H. Far and A. H. Elamy. Functional reasoning theories: Problems and perspectives. AIE EDAM,
       19(02):75–88, 2005.
[10]   P. Grenon and B. Smith. SNAP and SPAN: Towards dynamic spatial ontology. Spatial cognition and
       computation, 4(1):69–104, 2004.