Model-Based Reasoning
This is a collection of notes about model-based reasoning, which is an interest I developed during this module.
Glossary
The aim of this glossary was to show the relationship between three closely related terms: model, metamodel and ontology.
Models
A model is a representation of a system. They help people understand, communicate, analyse, and design systems, as a simplification of them. Models have application to science, engineering, strategising, and various other domains concerned with specific systems.
In the domain of software engineering: modelling languages are used to model software systems, such as UML. And, software itself can have application to modelling too. For example; software might provide an interface for modelling, or it might procedurally generate models
Beyond software engineering and into the domain of computer science; notable types of models include data models, machine-learning models, socio-techno-behavioural models, and scientific models.
Metamodels
A metamodel is the specification of a system used to create modelling languages, and essentially formalises the entities and relations that can be used to create modelling languages. Modelling languages use the entities and relations from the metamodel, to provide a tool to model software with.
The additional layer of abstraction that metamodels provide, is intended to produce a more rigorous foundation to the model-driven engineering approach of software development; by facilitating model validation for example.
Ontologies
An ontology is the collection of the entities and relationships that exist within some domain, in the attempt to store information.
An ontology can be considered a type of model, but typically a model is an attempt to make explicit the details of a system, to further understand it and it's relation to other models. The intent of making an ontology is for cataloguing a domain, which may or may not beviewed as a specification, depening on the domain. An example of an ontological language is OWL.
Application Software for Modelling
This section is to showcase a specific type of model, it's implementation, and papers that I wanted to archive, which fit this topic.
Simulations
Deterministic Finite State Machines (DFSMs)
A deterministic finite state machine is a model of any system that has a finite amount of states, and allows transitions between some of those states in a predictable way. The notion of an intitial and final states are normally specified too. DFSMs are able to describe many systems. For example; consider a system describing dice rolls. A dice starts with one of it's faces up; that's one of it's six states. While the dice rolls, it transitions from state to state. The way it rolls is governed by it's geometry. From each face, it rotates to either of the 4 faces that join with it. Eventually it ends up in a final state.
There are five pieces of information needed to model a DFSM:
- A set of states
- A set of options used to evoke transitions
- A function that takes a state and option, and peforms the corresponding transition
- An initial state
- A set of states which may be the final states
For my implementation of a deterministic finite state machine in python click here.
Papers
Papers which related to application software for modelling:
- Knox, S., Meier, P., Harou, J. & Yoon, J. (2018) A python framework for multi-agent simulation of networked resource systems. Environmental Modelling & Software. 103(1): 16-28. DOI. - Knox et al. introduce a python library for building simulation models of networked systems. It provides an environmental-modelling interface for component-based models. The library is available here.
Model-Driven Engineering
This section was to archive some information that I found connected to this topic, while learning about metamodels.
Organisational Standards
- ISO/IEC 19502 - Standards for a meta-metamodel underpinning model-driven engineering, and the creation of Model Object Facility (MOF) metamodels.
- NATO NAFv4 - Standards for NAF version 4, which is the metamodel used by the Ministry of Defence.
- OMG UML/2.5.1 - Standards for UML version 2.5.1 based upon a MOF metamodel. The metamodel is essentially a subset of UML, from which all constructs in UML can be described with.
Papers
Papers which advocate model-driven engineering:
- Fortino, G., Guerrieri, A., Russo, W. & Savaglio, C. (2015) 'Towards a Development Methodology for Smart Object-Oriented IoT Systems: A Metamodel approach'. IEEE International Conference on Systems, Man and Cybernetics. Hong Kong, 2015. New York: IEEE. 1297-1302. DOI. - Fortino et al. develop a metamodel for the internet of things (IoT), that builds upon a Smart Object (SO) metaclass.
- Kent, S. (2002) 'Model Driven Engineering', in: Butler, M., Petre, L., Sere, K. (2002). Integrated Formal Methods. Heidelberg: Springer. 286-298. DOI. - Kent sets out a framework for model driven engineering (MDE). He organises the space of software models, including the different kinds of mappings that exist between types of models, and describes the use of metamodelling languages to define modelling languages.
Peer Discussion
As a collaborative activity with my peers, we discussed 'What are the strengths and weaknesses of designing a metamodel to support object-oriented design of the IoT?'. Each of us made an initial post to answer that question, and then we responded to those with our own development questions. The full discussion can be found here. The following is a summary post that I wrote at the end of the discussion:
"In my initial post, I claimed a benefit of metamodels was that
they simplify domains, and a weakness was that they might eventually need to
be replaced. At the end of the discussion, I've changed my mind on that strength.
I'm not convinced that a metamodel is necessary to facilitate
IoT developments. Instead, I believe an ontology would be much more
advantageous, as it's designed to store information, and there
is a lot of different information related to IoT. The awareness of
ontological entities in a domain is enough for a software
developer to get a grounding in space they are designing within.
Further details can be captured in an ontology too, but not necessarily
in a metamodel.
However a metamodel, might provide validation techniques to a
model, which ensures quality on some level, but I don't think the
validation it provides is enough to dent the complexities in IoT
software design, as it's the complexity of the system that's
difficult to overcome, not how to test the software.
During discussions I asked the following questions:
Is there any reason that UML must be replaced for IoT software modelling?,
Is it worth having a new metamodel, and new modelling language devoted to IoT?, and
Is there some way to speed up the research and adoption of a good enough metamodel for IoT?
Discusson Plenary
I think this discussion was a little bit more rushed than the previous discussion, which is a shame as it was evolving into something more interesting than when it started. The rush I believe, was due to the overlap of this activity with the assessed parts of the module. I would say the main take away for me from this discussion was the void it created that I ended up trying to fill in afterwards. In this discussion I feel like I went from not quite understanding what a metamodel was, to being confident at explaining what a metamodel is and it's relation to similar concepts.
End of Module Reflection
To me, the term model-based reasoning represents a key step in my academic development, connecting the dots between some of the most interesting things that I've learned so far. I view model-based reasoning as an intersection between cognitive science and epistemology. We can only scientifically know things that we can model. I like the fact that model-based reasoning is relevant to a broad range of disciplines too. Due to this new view, I would like to learn more about cognitive anthropology, and explore how models are situated in that discipline.
More specific to this module hwoever, I've found the ability to build models using OOP concepts extremely helpful in designing the behaviour of large programmes that make up software. The segmentation of a programme into circuits of objects with interfaces, makes the customisation of programme designs, to meet specificational requirements, much easier. When human readability is a requirement, OOP is really valuable. Therefore the ability to model with objects is a skill that can benefit software engineers who are parts of teams.
Ontologies are another structure that I would like to get involved with creating. The next thing for me to do would to create a simple ontology for something using an ontology language like Owl. Then I could look for some open source projects to get involved with.