The modelling of the spread of a disease is a very important yet complex task, since each different disease spreads in a unique manner, depending on factors such as its spread rate (R-factor). The spread of disease could also be affected by conditions such as whether two persons in close proximity would be vaccinated or not. Modelling would entail simulating these parameters and variables for various social settings, rendering the modelling process a major challenge.
The simulation task also carries the undesired issue of having to mix together code driving the system and the code controlling the spread. Monitoring-oriented programming (MOP) has previously been applied to obtain this separation of concerns. This technique allows for the injection of new behaviour in specified parts of program execution through the use of monitors. These monitors could observe the system and be programmed to interrupt the system to execute certain actions when particular program traces are observed. A downside to this approach is that the use of monitors would add overheads to the system. Therefore, to investigate this, a simulator was built using Java to act as a system that would monitor the system through the Larva tool [1]. Thus, it would be possible to determine whether MOP could effectively simulate transmission, and whether the approach would scale up when increasing the number of rules and blobs (persons and objects) in the simulation.
Three different scenarios were implemented in the project, with increasing complexity: one where the people moved at random; a care home for elderly persons with four wards; and a restaurant. For the simulation of the spread of disease, the SEIR compartmental method was used. This refers to each of 5 states: Susceptible, Exposed, Infected, Recovered or Removed (i.e., dead) and each person in the simulation would be considered to be in one state at a particular point in the simulation.. Larva works by defining a rule through a notation known as a DATE, which is similar to an automaton.
Each person would be given a DATE having all of the above-mentioned five statuses, thus enabling the person to shift from Susceptible to Exposed, depending on the duration of contact with the disease. This process was based on three models. The first accumulates exposure time, based only on the presence of an infected blob, while the second accumulates depending on the number of exposures. The third does not accumulate and considers only whether two blobs would have been in constant contact for the set amount of time. After exposure, whether a person becomes infected and whether they would then recover, is based on a probabilistic approach, rendering the automaton into a Markov chain.
A total of nine Larva scripts were implemented, since each method was implemented in three different ways, namely: polling; keeping note of arrival and departure times; and by setting a Larva dynamic clock on initial contact to check if two blobs were still in contact after the set amount of time.
Through this project, it was proven that it would be possible to mimic the spread of disease through MOP. Furthermore, the results obtained when evaluating the monitored system showed that it scaled up well, making MOP a viable solution for disease modelling.
[1] C. Colombo, G. J. Pace, and G. Schneider, “Larva — Safer Monitoring of Real-time Java Programs (Tool Paper),” in Seventh IEEE International Conference on Software Engineering and Formal Methods, SEFM 2009, Hanoi, Vietnam, 23-27 November 2009, D. V. Hung and P. Krishnan, Eds. IEEE Computer Society, 2009, pp. 33–37.
Course: B.Sc. (Hons.) Computing Science
Supervisor: Prof. Gordon Pace