axioms.tex 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. \chapter{Axioms}
  2. \label{chap:axioms}
  3. We define a set of requirements for a Modelverse.
  4. These requirements, or axioms, will be used during our formalization to motivate our decisions.
  5. Although implementation-related requirements are not needed for our formalization, they are mentioned as it is something every implementation should conform to.
  6. After an explanation of what each axiom represents, we give an overview of how all these axioms are related to each other.
  7. \section{\axiomForeverRunning}
  8. The Modelverse should always be able to continue running.
  9. As such, no modifications to the behaviour should require a restart, except for changes to the (minimal) kernel (and thus the action language semantics).
  10. An (authorized) user should be able to alter all core concepts, with changes automatically applied for all connected Modelverse Interfaces.
  11. Forever running also implies that the Modelverse runs as a service, separate from the MvI program, which is used by the user, but also on a different machine.
  12. A more drastic interpretation is that it should be parallelized and distributed, as to cope with possible hardware failure.
  13. We do not require this more drastic interpretation, though it is certainly a feature to take into account in an implementation evaluation.
  14. The forever running does not apply to the MvI, of course, as the MvI is a tool ran on the system of the end-user.
  15. It is the whole of MvK and MvS that should run as if it is running forever.
  16. \section{\axiomScalability}
  17. The Modelverse should be scalable in terms of computation, memory, number of users, number of models, and the size of individual models.
  18. Related to the previous axiom, scalability should still be maintained even if the Modelverse is forever running.
  19. Combined with scalability is performance: even if operations are scalable in terms of complexity, the total time taken by execution should also be as low as possible.
  20. Due to our split in multiple components, we can also split up our scalability requirements over these components:
  21. \begin{itemize}
  22. \item The MvI needs to be scalable in performance, of course, though the size of models will be relatively small compared to those processed by the MvK or MvS, because the models being worked on will always be submodels of the \textit{complete} Modelverse model.
  23. More important for the MvI is the scalability in the size of the model for visualization and presentation.
  24. Depending on the domain, an implementation might provide further methods for abstraction of components.
  25. \item The MvK needs to be scalable in performance, again, but mainly in the processing of action code constructs.
  26. An MvK instance should be easily parallelizable up to the ``1 MvK per user'' threshold.
  27. Beyond that limit, multiple MvKs would have to cooperatively work on a single block of action code, which is likely to hamper performance.
  28. An MvK also needs to be scalable in the number of users it is able to handle.
  29. \item The MvS needs to be scalable in performance, mainly in terms of the size of the complete Modelverse state.
  30. It is non-trivial to distribute or parallelise, as operations are small and atomic, and all data needs to be shared between users.
  31. The MvS should therefore be offloaded as much as possible, shifting all computation to the MvK.
  32. This reduces the functionality of the MvS to that of a simple, but high-performance, data structure library.
  33. Again, it should be scalable in the number of, possibly simultaneous, requests made, which differs from the total number of users.
  34. \end{itemize}
  35. \section{\axiomMinimalContent}
  36. A minimal amount of content should be available in the Modelverse by default.
  37. The content consists of the models necessary for bootstrapping, but also some default formalisms, such as \textsf{Petri Nets}, \textsf{Parallel DEVS}, \textsf{Statecharts}, \textsf{FTG+PM}~\cite{FTG+PM},~\ldots
  38. For bootstrapping, the Modelverse contains a model of itself, which can then be compiled to a binary, executable outside of the Modelverse, or interpreted by the currently running MvK.
  39. From this viewpoint, the Modelverse will be similar to Squeak~\cite{Squeak}, which is a Smalltalk interpreter written in Smalltalk.
  40. Apart from formalisms, some models should also be present in the Modelverse.
  41. These include the Formalism Transformation Graph (FTG), and the corresponding Process Model (PM), forming the FTG+PM.
  42. The FTG model can be automatically constructed from the formalisms that are automatically detected in the Modelverse.
  43. Combined with detecting the formalisms, it should also be possible to automatically detect all transformations defined between these formalisms, thus completing the FTG.
  44. The PM model will be the driving force of the MvK and defines which operations to execute.
  45. It can therefore be written in an action language, which defines the behaviour of the MvK, and thus the communication with the user.
  46. \section{\axiomModelEverything}
  47. Every element in the Modelverse needs to be explicitly modelled, using the most appropriate formalism.
  48. This does not only include the typical elements, such as the models and metamodels, but should also go down to the level of the primitives such as Integer and Float.
  49. This will allow for stronger model transformations, as they can transform (and access) literally everything.
  50. Ultimately, a model of the Modelverse should also be present in the Modelverse, which closes the loop.
  51. In the end, a compiled version needs to be used for pragmatic reasons, though this compiled version can be (automatically) compiled from the model that lives in the Modelverse.
  52. Features like debugging, introspection, reflection, and self-modifiability will come from this axiom, as every part of execution is accessible for both reading and writing.
  53. \section{\axiomHumanInteraction}
  54. All interaction with the human user of the Modelverse needs to be explicitly modelled.
  55. This includes timed behaviour of the Modelverse (\textit{e.g.}, time-out of requests), or even the complete communication protocol.
  56. It is actually the MvI which will communicate with the Modelverse, though it will be guided by the user.
  57. It should also be taken into account that the MvK will be (mainly) used by humans, and as such should be usable.
  58. While most of this will be handled by the MvI, which provides the tool to the user, the fact that a human is behind all of it should be taken into account.
  59. Possible applications for this are for performance evaluation: a human user has completely different (and likely slower) access patterns than an automated tool.
  60. The predefined constructs and design of the system should also be usable by humans, specifically those that are non-experts in design of the Modelverse.
  61. Enforcing strict metamodelling is part of the solution, as this offers users (and tools) a limited scope to worry about~\cite{StrictMetamodelling}.
  62. \section{\axiomTestDriven}
  63. Development on the Modelverse should happen using the model of the Modelverse, which can be simulated, and placed in a variety of circumstances which are hard to replicate in real-life situations.
  64. A similar approach was taken by~\cite{DEVSinDEVS}, where a \textsf{DEVS} model was made of a distributed \textsf{DEVS} simulation kernel.
  65. Modelling allowed them to replicate, among others, sudden disconnects, high latency connections, or different network topologies.
  66. Furthermore, detailed, and perfectly deterministic, performance insights can be gained by the simulation of the model.
  67. Certainly for parallel execution, this gives us deterministic thread interleavings, which can be crucial to debugging and performance analysis.
  68. Functionality also needs to be checked as exhaustively as possible.
  69. Certainly for the first axiom, critical bugs should be avoided as much as possible.
  70. Because the Modelverse will have to communicate with a variety of tools, its interface will also have to be tested for conformance with the specifications.
  71. \section{\axiomMultiView}
  72. The Modelverse should support different views on the same model.
  73. Examples include hiding parts of a model, or aggregating different elements into a composite element.
  74. This gives rise to consistency management, as changes in one view will have to be propagated to all other views.
  75. Multi-view should be handled at all components, as each component needs to allow it.
  76. The MvI needs to provide operations to use the different views, the MvK needs to update the views and keep them consistent, and the MvS needs to provide these operations efficiently.
  77. The MvS is least concerned with multi-view, as it sits at a lower level.
  78. \section{\axiomMultiFormalism}
  79. The Modelverse should support models which combine different formalisms.
  80. Models should therefore be able to have a metamodel which is the combination of multiple (meta)models.
  81. Inter-formalism links should also be possible, even if those cannot be typed within the respective formalism.
  82. While the semantics of such a link depends on the domain, and therefore has to be provided by the user, the Modelverse should allow such links to be created and used.
  83. Consequently, links between models should also be possible, which can then act as the type for those inter-formalism links.
  84. Related, a single model should be able to have multiple metamodels.
  85. A model could therefore be typed by a metamodel, but would also have to conform to a bigger metamodel, which contains the original metamodel as one of its elements.
  86. This allows the reuse of models, even if the context surrounding the metamodel has changed.
  87. \section{\axiomMultiAbstraction}
  88. The Modelverse should support systems which are expressed using a set of models, all at a different level of abstraction.
  89. Consistency management will again have to be handled here.
  90. As was the case for multi-view, each component needs to think about multi-abstraction separately.
  91. The exception is again the MvS, as it is at a lower level.
  92. However, it can still (internally) use optimizations, knowing that some requests will be related to multi-abstraction.
  93. \section{\axiomMultiUser}
  94. The Modelverse should be able to serve multiple Modelverse Interfaces simultaneously.
  95. A main concern to this is fairness between users: a user cannot wait for its turn infinitely long.
  96. If a single user therefore uses all computational power, at the expense of other users, the code executed by this user will have to be automatically paused, marked as ``low priority'', or terminated.
  97. User Access Control is related to this, as users should be able to configure the Read/Write/Execute status of their models.
  98. As such, groups of users, with specific privileges, should also be supported.
  99. If their access control allows it, users should also be able to read the state of the execution of other users.
  100. This will allow for debugging with multiple users: user \textit{A} can execute code, with user \textit{B} being an automated debugging bot, which examines the state of user \textit{A}.
  101. \section{\axiomInteroperability}
  102. Different implementations of the Modelverse and its interface should be possible.
  103. These implementations should all be able to communicate with each other, as long as they follow the same specification.
  104. This is one of our main goals for specifying the interfaces between components.
  105. Additionally, because the semantics of action code and its corresponding execution context is defined, different MvK's should be able to continue each other's execution, or interpret the execution context of other tools.
  106. This can come in handy with different tools (\textit{e.g.}, a debugger, a compiler, or an interpreter) which might be developed independently, though are able to understand each other's information.
  107. \section{Interconnections}
  108. All of these axioms are related in some way, as the graph in Figure~\ref{fig:axioms_overview} shows.
  109. We now continue by explaining the links between all concepts, using their label:
  110. \begin{enumerate}
  111. \item As the Modelverse will be forever running, there is a need for garbage collection or periodical maintenance to guarantee a decent performance.
  112. \item Having everything explicitly modelled allows us to create a self-modifiable Modelverse, which helps us with the forever running axiom.
  113. \item In the presence of multiple users, it is necessary to have the Modelverse running as a service, which implies that it should run forever.
  114. \item Using the performance tests, combined with the MvK being modelled explicitly, it becomes possible to assess the scalability of the Modelverse algorithms under specific workloads.
  115. \item Scalability is deeply connected with interoperability, as there is often a trade-off: increasing interoperability will decrease scalability and vice versa.
  116. \item Having everything modelled explicitly requires the presence of at least a few basic formalisms. Ultimately, it also includes having a model of the Modelverse in the minimal content of the Modelverse.
  117. \item By modelling everything, we will inevitably also have to model the interaction with the human.
  118. \item The performance tests will use a performance model of the Modelverse, which is contained in the Modelverse. To that end, the Modelverse will simulate its own performance.
  119. \item Multi-view requires the ability to model everything, as we will have to model all different views separately.
  120. \item By modelling everything explicitly, we also need to model links between different formalisms, which is a requirement for multi-formalism models.
  121. \item Interoperability between different Modelverse components becomes easier if each component is modelled explicitly, as it clearly defines the expected semantics.
  122. \item Interoperability is an essential part of human interaction, as otherwise it would be impossible for both of them to communicate.
  123. \item Multi-view and multi-formalism are related due to a view being possibly expressed in a different formalism.
  124. \item Multi-view and multi-abstraction are related, as different views might be at different levels of abstraction.
  125. \end{enumerate}
  126. \begin{figure}
  127. \center
  128. \includegraphics[width=0.8\textwidth]{images/axioms_overview.eps}
  129. \caption{Overview of relations between all axioms}
  130. \label{fig:axioms_overview}
  131. \end{figure}