## 1 Introduction
[18] presented a survey on reliability that can be used to support different types of strategic decisions in the context of Industry 4.0. [PERSON] et al. [8] reported a detailed review on risk assessment as support of maintenance decision making, with a particular focus on dependability modelling methods. By analyzing both the literature and industrial practice, the different dependability assessment methodologies available, spanning from qualitative to quantitative models, have the purpose of investigating the functioning of systems and related processes. Concerning the quantitative models, Reliability Block Diagrams (RBD) and Fault Tree Analysis (FTA), have played a central role in the industrial field since they are based on a high-level formalism that favors the construction and the understanding of a model. Moreover, the main hypotheses about the failure/repair independence of the systems' components from each other and the system working conditions allow a quick model resolution. In recent years, driven by the need to increase the accuracy of the dependability assessment and overcome the limitation of the previous hypotheses, researchers have started focusing on hybrid models that capture both the stochastic and the deterministic nature of a system so as to consider the physical evolution of a process. The branch of the dependability engineering that has met this challenge is nowadays known as Dynamic Probabilistic Risk Assessment (DPRA) or Dynamic Reliability [19]. The literature offers several methodologies for the modelling of a DPRA problem, such as Stochastic Partial Differential Equations (SPDEs), Piecewise Deterministic Markov Process (PDMP), Markov Regime Switching Models (MRSM) and Stochastic Hybrid Automaton (SHA). In particular, SHA consists of a combination of discrete and continuous states that express in each state a specific way of working of the system, through a set of characterizing mathematical equations. Transitions among these states are governed by probability distributions [20]. One advantage of this method over the previous types of formalism is that the variety of behaviors that can be captured is greater, and this facilitatesthe characterization of multistate systems; moreover, as the model complexity increases and an analytical closed solution is not available, Monte Carlo simulation can be used. Repairable systems are a special subset of multistate systems. In fact, restorations can trigger complex relationships among the system components, like changes of spare priority policies, load sharing, degradation, redundancy mechanisms and so forth. Moreover, in the modelling of a repairable system, one of the main concepts to consider is the type of maintenance policy used to restore or retain a system within an acceptable boundary of operating conditions. Generally, maintenance can be based on unplanned or planned actions with the aim to provide optimum system reliability, availability and safety performance at the lowest possible maintenance costs [21]. In the first case, a component is restored (or replaced) as soon it presents evidence of a malfunction which could affect the system operations. In the latter case, maintenance is performed periodically to avoid the failure of a component. Therefore, the dependability analysis of such systems is a complex task as it requires tools able to consider all these modelling features [22]. In a previous work, a DPRA-oriented software library (SHyFTOO) for the analysis of Stochastic Hybrid Fault Tree Automatons (SHyFTA) was presented [23]. The SHyFTOO library offers several features to aid with the dependability analysis of a complex repairable system, including a recent upgrade that allows the coupling with the Matlab-Simulink toolbox [24]. This simplifies the design of a dynamic system and, on the other hand, favors the implementation of complementary software libraries that support the analysis of other system characteristics. In this manuscript, the authors focus on the modelling of maintenance in order to extend the SHyFTOO library.