<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Morpheus: A Degradation Framework for Resilient IoT Systems</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Alexander</forename><surname>Heß</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Distributed Systems</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Franz</forename><forename type="middle">J</forename><surname>Hauck</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Distributed Systems</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">David</forename><surname>Mödinger</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Distributed Systems</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Jakob</forename><surname>Pietron</surname></persName>
							<affiliation key="aff1">
								<orgName type="department">Institute of Software Engineering and Programming Languages</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Matthias</forename><surname>Tichy</surname></persName>
							<affiliation key="aff1">
								<orgName type="department">Institute of Software Engineering and Programming Languages</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Jörg</forename><surname>Domaschka</surname></persName>
							<affiliation key="aff2">
								<orgName type="department">Institute of Information Resource Management</orgName>
								<orgName type="institution">Ulm University</orgName>
								<address>
									<country key="DE">Germany</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Morpheus: A Degradation Framework for Resilient IoT Systems</title>
					</analytic>
					<monogr>
						<idno type="ISSN">1613-0073</idno>
					</monogr>
					<idno type="MD5">4511A7E05E46F505316C18697E62BA2B</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-19T16:22+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>Graceful Degradation</term>
					<term>Graceful Upgrade</term>
					<term>Resilience</term>
					<term>Internal DSL</term>
					<term>Framework</term>
					<term>Internet of Things</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Graceful degradation is an established concept to improve the resilience of systems, especially when other resilience mechanisms have failed. Its implementation is often heavily tied to the application code and, thus, cumbersome and error prone. As IoT systems get not only ubiquitous but also critical, reliable graceful degradation would be ideal. In this paper, we present the Morpheus framework that provides a TypeScript-internal DSL to enable a systematic development of degradable IoT systems. The design of the framework is based on the concept of separation of concerns by providing distinct yet linked languages to specify hierarchical components and their connections; the components' operating modes and transfer functions between them; as well as state machines for the specification of the components' behaviour in each operating mode. The operating modes for each component serve as degradation levels. Automatic degradation of a component is triggered in case of failures of connected components. With recovery from underlying failures, the component is automatically upgraded back to a higher level. We illustrate our framework using a simplified prototype of an entrance barrier of a parking garage.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>The Internet of Things (IoT) has made huge progress from a generic vision to concrete realisations. IoT systems are becoming more and more ubiquitous and pervasive. Simultaneously, our daily lives depend even more on them, e.g., smart homes, smart cities as well as smart transportation, delivery, and manufacturing processes. By their nature, IoT systems can directly influence the real world and as a consequence their failures can cause harm and even fatalities. Thus, it is important that they are highly resilient and particularly, never enter undefined states.</p><p>While IoT systems are conceptually close to distributed applications that have been planned, implemented, and operated for decades, significant differences exist: (i) IoT systems span MeSS'21: International workshop on MDE for Smart IoT Systems, June 21-25, 2021, Bergen, Norway Envelope alexander.hess@uni-ulm.de (A. Heß); franz.hauck@uni-ulm.de (F. J. Hauck); david.moedinger@uni-ulm.de (D. Mödinger); jakob.pietron@uni-ulm.de (J. Pietron); matthias.tichy@uni-ulm.de (M. Tichy); joerg.domaschka@uni-ulm.de (J. Domaschka) Orcid 0000-0001-6837-2861 (A. Heß); 0000-0002-7480-9617 (F. J. Hauck); 0000-0002-5917-2419 (D. Mödinger); 0000-0001-8308-6636 (J. Pietron); 0000-0002-9067-3748 (M. Tichy); 0000-0002-5451-3480 (J. Domaschka) large geographical regions; (ii) they consist of a large number of heterogeneous, even batterypowered, devices with different capabilities, network bandwidths, and failure characteristics; (iii) depending on the region, replacing failed devices and patching broken software may be a matter of days and weeks instead of minutes and hours as with Web-like distributed systems.</p><p>Graceful degradation is a known approach to reduce a system's capabilities in a controlled manner <ref type="bibr" target="#b0">[1]</ref>. Degradation thus can step in when classical approaches to fault tolerance are unavailable or can no longer mask failures. While classical approaches to resilience, e.g., replication or checkpointing, can be provided by libraries in an application-agnostic way, degradation has to be interlaced with application code. This makes the design and implementation of a degradable IoT system cumbersome, error prone, time intensive, and hard to test and maintain.</p><p>To overcome these limitations, we propose Morpheus, a degradation framework for IoT systems as extension of our previous work <ref type="bibr" target="#b1">[2]</ref> within the SORRIR project-an internal DSL for IoT systems built in TypeScript, which allows the definition of components, their ports and connections, as well as the behaviour of components using state machines. The contribution of this paper is an extension that supports developers of IoT systems with the integration of graceful degradation into their systems. Morpheus ensures automatic degradation and upgrade of a component, as soon as developer-defined constraints are met. By design, our DSL ensures the principle of separation of concerns, by splitting the definition of a component's behaviour into different operation modes that can serve as degradation levels.</p><p>Section 2 discusses related work, while Section 3 introduces previous work and a running example used throughout the text. Section 4 introduces Morpheus' concepts and illustrates their use via the running example. Section 5 concludes and presents future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Related Work</head><p>With graceful degradation, an IoT system is able to sustain some functionality when faults can no longer be tolerated by other resilience mechanisms <ref type="bibr" target="#b2">[3]</ref>: the application copes with partial failures and adapts. Examples include to retain reduced functionality at the edge in case of loss of connectivity between cloud and edge. The degraded service could even abstain from executing certain tasks. Thus, the degradation can affect function, quality and performance.</p><p>Graceful degradation approaches are well known for design and operation of distributed embedded systems <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b5">5,</ref><ref type="bibr" target="#b0">1]</ref>, but have recently also been introduced for IoT scenarios, e.g., for a video surveillance application <ref type="bibr" target="#b6">[6]</ref>, a smart-office case study <ref type="bibr" target="#b7">[7]</ref>, and a drone application <ref type="bibr" target="#b8">[8]</ref>. Degradation often depends on defining a set of different service levels that determine the graduations of quality-of-service (QoS) a system can operate at. This results in an application specific mechanism, as the levels and their interpretation are specific to their application domain.</p><p>A degraded system may automatically switch back to the originally desired service level, or at least to a better level, if the cause of the degradation has disappeared or changed. This graceful upgrade is addressed in only few related works <ref type="bibr" target="#b9">[9,</ref><ref type="bibr" target="#b3">4]</ref>.</p><p>Degradation is supported by various modelling approaches such as the Architecture Analysis &amp; Design Language (AADL) and its error annex <ref type="bibr" target="#b10">[10,</ref><ref type="bibr" target="#b11">11]</ref>. Bozzano et al. extend AADL to enable the specification of multiple modes for components to define normal and degraded behaviour using event-data automata <ref type="bibr" target="#b12">[12]</ref>. The approach supports formal analysis of such models by model checking as well as safety analyses like generation of fault trees. A similar approach has been presented in the area of self-adaptive systems where Borda and Koutavas <ref type="bibr" target="#b13">[13]</ref> present a formal approach which supports the specification of adaptation transitions between automata. The approach supports the formal verification of safety requirements by a translation to CSP.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Background</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Modelling System</head><p>Morpheus builds upon our previous work-an internal Domain Specific Language <ref type="bibr" target="#b1">[2]</ref> developed in TypeScript <ref type="bibr" target="#b14">[14]</ref>-that covers the two relevant aspects: structure and behaviour. The structure of the IoT system is defined as an architecture covering the most relevant structural elements of an architectural description language based on <ref type="bibr" target="#b15">[15]</ref>. Particularly, it provides atomic and hierarchical components, ports and connections. Components interact with one another by exchanging events over connections which connect two ports.</p><p>Each atomic component contains internal state consisting of a discrete finite state as in automata and local data structures (similar to the state in abstract state machines <ref type="bibr" target="#b16">[16]</ref>) as well as a user-developed TypeScript-function which takes this internal state, the contents of the event queue, and updates state and queue. This basic definition of behaviour is complemented by a framework, which allows the specification of state machines using TypeScript data structures and TypeScript as action language and includes an interpreter for these state machines. Hierarchical components do not have their own behaviour, but aggregate the behaviour of their subcomponents to simplify the design of systems, particularly, the definition of degradation.</p><p>Our experience as presented in our previous paper <ref type="bibr" target="#b1">[2]</ref> has been very positive. The usage of TypeScript as "meta-modelling" and action language streamline the development. Our result fits very nicely into the overall JavaScript/TypeScript ecosystem. For example, we can easily reuse libraries for communication via MQTT and HTTP as well as logging. Another advantage is our ability to use IDEs and all of their features, including debugging facilities.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Running Example</head><p>In order to demonstrate the capabilities of Morpheus, we implemented a physical prototype<ref type="foot" target="#foot_0">1</ref> of a Smart Entrance Barrier (SEB) that could be deployed in a parking garage. Customers of the garage reserve a parking spot through an online reservation system using credit card details and license plate number. The SEB automatically recognises customers on entrance and exit. Our SEB prototype is composed of multiple dependent sub-components: a barrier unit B U , a barrier sensor B S , a car sensor C S , a card reader C R , and a camera C A M . Further, it uses two external software components: a plate recognition service P R S and a parking management system P M S .</p><p>When a car approaches the S E B , the car sensor detects its presence and the camera scans the license plate. The image is then sent to the P R S , which extracts the license plate number in text format. This information is used to query the P M S , and if a valid reservation is found, the S E B will open. In this seamless authentication process with multiple interacting components, a faulty component shall not prevent a car from passing the barrier. The prototype is equipped with degradation functionality: Morpheus adjusts the S E B 's functionality based on the availability of internal and external components as detailed in Section 4. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Morpheus Degradation</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Operating Mode</head><p>In Morpheus, an operating mode defines a component's functionality. By default, each component implements the operating mode O f f , which specifies that the component is currently unable to provide any reasonable functionality. This operating mode is entered if essential sub-components are unreachable or have failed, or the component itself suffers from internal faults. It is required that each component is equipped with at least one additional non-trivial operating mode, which implements the component's intended feature set. Developers can now define further operating modes that provide a graduated subset of the component's capabilities.</p><p>In order to ensure that the specified functionality can actually be provided, it has to be defined which dependant sub-components have to be available. Our example uses the following operating modes for the S E B :</p><p>• O f f : The S E B does not provide any reasonable functionality.</p><formula xml:id="formula_0">• B l o c k e d :</formula><p>The S E B is locked, no car can enter or leave, e.g., to lock the garage.</p><p>• O p e n : The S E B is open and allows entrance and exit of cars, e.g., for maintenance.</p><p>• M a n u a l : The S E B requires manual authentication with a credit card for every car.</p><p>• A u t o m a t i c : The S E B automatically recognises cars by their licence plates, authenticates the user, and authorises entrance.</p><p>Table <ref type="table">4</ref>.1 presents the pre-conditions for each non-trivial operating mode implemented by the S E B . We assume that all sub-components and external components only implement the two In case either the barrier unit BU or the barrier sensor BS suffer from a mechanical failure, none of the pre-conditions can be fulfilled which leads to the operating mode O f f . In this case only the physical state of the barrier is unknown and has to be inspected by a technician, but the application logic is still in a well-defined state.</p><p>Implementation -Framework: A component can be switched into one of the available operating modes either by human operators, software logic, or Morpheus. To realise these features, we first extend the basic type A b s t r a c t S t a t e <ref type="bibr" target="#b1">[2]</ref> with an o p e r a t i n g M o d e value, as shown in Listing 1. Additionally, the D e g r a d a b l e S t a t e is equipped with a d e g r a d a t i o n H i s t o r y field that can be used to track the component's degradation behaviour. We further introduced a new type called D e p d e n c y F u n c t i o n that is used to define the preconditions for each operating mode. Essentially, this is a boolean function that takes the components current state and the sub-component's operating modes into account. These are called Shadow Modes since it can not be reliably determined wether an external component is unavailable due to a hardware failure or because of an interrupted network connection. We choose to realize this as a generic function, which evaluates declarative conditions like Table <ref type="table">4</ref>.1, while still providing great freedom, e.g., to perform arbitrary calculations.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Degradation DAG</head><p>At any given time, each component 𝐶 has a target operation mode. Under normal circumstances this is the operating mode that provides the full intended feature set (Automatic in our example). Yet, due to external dependencies to other components, 𝐶 may not be able to provide this ideal mode. In this case, Morpheus picks another operation mode for 𝐶 for which all dependencies are met. We refer to this operation mode as 𝐶's degradation level. For enabling Morpheus to select an appropriate degradation level Morpheus requires a developer to specify a directed acyclic graph (DAG) for each degradable component. The graph connects the component's implemented operating modes, such that each of them is directly or indirectly degradable to operating mode O f f . Morpheus selects the next degradation level along the graph that fulfils its preconditions, and executes adjacent transitions. Operating modes that are connected through a path that leads to the operating mode O f f should provide a graduated subset of the component's functionality. Whenever the operating mode of a subcomponent changes, Morpheus first checks if the current operating mode/degradation level can be kept and if not selects a new operation mode to degrade/upgrade to. Further, based on the DAG, it determines the path to reach that state and iteratively degrades/updates along the path from one operation mode to the next until the selected mode has been reached.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Implementation -Framework:</head><p>For each operation mode associated with its own state machine, a mechanism is needed to not only switch between modes, but also to transfer the state of one state-machine to the state of another. This functionality can be implemented using the T r a n s f e r F u n c t i o n whose signature is provided in Listing 4. While the main task of a transfer functions is to take one operating mode as an input and output another one, it can be used to perform additional tasks. First, it is possible to save a component's internal state on a stack, such that it can be restored if the operating mode is reached later again. Second, the component's degradation path can be recorded and analysed in order to make fine-grained adjustments to the component state. Listing 4: The T r a n s f e r F u n c t i o n is used for the state transfer between two operating modes.</p><p>Morpheus now provides the u p d a t e O p e r a t i n g M o d e function, which automatically selects the optimal operating mode for the component based on the defined pre-conditions, the degradation DAG and the availability of the dependent subcomponents. The implementation of this function is provided in Listing 5. Internally, it evaluates the implemented D e p e n d e n c y F u n c t i o n s in descending order. If a function returns true, it is checked whether the degradation level of the assigned operating mode is higher or lower than the degradation level of the current operating mode. If the degradation level is lower, the internal d e g r a d e function is executed, which performs a depth-first search on the degradation DAG, that produces an array of T r a n s f e r F u n c t i o n s . This array of T r a n s f e r F u n c t i o n s is then iteratively processed, and the function finally returns the degraded state. In case no path could be found the state is returned unaltered. The implemen-tation of the u p g r a d e function is quite similar. This function is executed if the degradation level of the new operating mode is higher than the degradation level of the current operating mode. However, it additionally guarantees that an upgrade path is only executed if it leads to the component's target operating mode. This property is especially important if only a partial upgrade can be performed, i.e. if the component can be upgraded, but the target operating mode can not be reached yet.  <ref type="table">4</ref>.1. If the S E B 's current operating mode is A u t o m a t i c and the conditions are no longer true, e.g., the P R S switched to mode O f f , then the next possible mode is considered in the DAG. Concretely, operating mode M a n u a l is the first degradation level for target operating mode A u t o m a t i c . Further, the operating mode O p e n can only be reached through manual reconfiguration, if it is assumed that A u t o m a t i c is the standard target operating mode. Listing 6 provides a snippet that shows how the T r a n s f e r F u n c t i o n can be used to implement the transition from A u t o m a t i c to M a n u a l . Here, we utilise the d e g r a d a t i o n H i s t o r y to record the component's current operating mode and internal state.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusion</head><p>In this paper we presented Morpheus, a framework that aims to assist developers in realising graceful degradation and automatic recovery. Morpheus provides lightweight integration into our previously presented internal DSL based on operating modes of interconnected components.</p><p>In our previous internal DSL <ref type="bibr" target="#b1">[2]</ref> we provided integrated state-space exploration. Currently, this exploration is not realised for Morpheus, as the automatic recovery algorithm and transfer functions complicate the state-transition exploration. Otherwise, Morpheus provides a functional extension of our previous results. Morpheus allows developers to separate their concerns on the levels of functionality and interdependence of components, while providing clear guidance for realising resilience through graceful degradation and upgrade.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Physical prototype of our running example Smart Entrance Barrier. Components and their connections are also shown.</figDesc><graphic coords="4,187.69,127.18,231.66,144.74" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>4 } 5 i 8 } 1 :</head><label>4581</label><figDesc>i n t e r f a c e A b s t r a c t S t a t e &lt; S , E , P &gt; = { 2 r e a d o n l y s t a t e : S , 3 r e a d o n l y e v e n t s : E v e n t &lt; E , P &gt; [ ] n t e r f a c e D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; e x t e n d s A b s t r a c t S t a t e &lt; S , E , P &gt; { 6 r e a d o n l y o p e r a t i n g M o d e : D ; 7 r e a d o n l y d e g r a d a t i o n H i s t o r y : [ D , S ] [ ] ;Listing The datatypes that are used to store a component's state. 1 t y p e D e p e n d e n c y F u n c t i o n &lt; S , E , P , D &gt; = ( 2 s t a t e : D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; , 3 s h a d o w M a p : M a p &lt; s t r i n g , s t r i n g &gt; 4 ) = &gt; b o o l e a n ; Listing 2: The D e p e n d e n c y F u n c t i o n is used to define pre-conditions for an operating mode. Implementation -Running Example: An example usage of the D e p e n d e n c y F u n c t i o n is shown in Listing 3, which provides a snippet of the dependency map implementation for the S E B . In essence, this map stores the pre-conditions for each operating mode. The snippet shows an example implementation for the operating mode A u t o m a t i c . 1 e n u m M o d e s { L 0 = " O F F " , L 1 = " B L O C K E D " , L 2 = " O P E N " , L 3 = " M A N U A L " , L 4 = " A U T O M A T I C " } ; 2 e n u m S h a d o w M o d e s { O F F = " O F F " , O N = " O N " } ; 3 e n u m S u b C o m p { C A M = " C A M " , C S = " C S " , B U = " B U " , B S = " B S " , C R = " C R " , P R S = " P R S " , P M S = " P M S " } ;</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>4 c 5 [ 12 r e t u r n t r u e ; 13 } 14 r e t u r n f a l s e ; 15 }</head><label>4512131415</label><figDesc>o n s t d e p e n d e n c y M a p = n e w M a p &lt; M o d e s , D e p e n d e n c y F u n c t i o n &lt; a n y , E v e n t s , P o r t s , M o d e s » ( [ M o d e s . L 4 , ( s t a t e , s h a d o w M a p ) = &gt; { 6 i f ( s h a d o w M a p . g e t ( S u b C o m p . C A M ) = = = S h a d o w M o d e s . O N &amp; &amp; 7 s h a d o w M a p . g e t ( S u b C o m p . C S ) = = = S h a d o w M o d e s . O N &amp; &amp; 8 s h a d o w M a p . g e t ( S u b C o m p . B U ) = = = S h a d o w M o d e s . O N &amp; &amp; 9 s h a d o w M a p . g e t ( S u b C o m p . C R ) = = = S h a d o w M o d e s . O N &amp; &amp; 10 s h a d o w M a p . g e t ( S u b C o m p . P R S ) = = = S h a d o w M o d e s . O N &amp; &amp; 11 s h a d o w M a p . g e t ( S u b C o m p . P M S ) = = = S h a d o w M o d e s . O N ) { ] , / / f u r t h e r D e p e n d e n c y F u n c t i o n s f o l l o w h e r e ] ) ; Listing 3: Implementation of a D e p e n d e n c y F u n c t i o n for the operating mode A u t o m a t i c .</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>1 t 2 (</head><label>12</label><figDesc>y p e T r a n s f e r F u n c t i o n &lt; S , E , P , D &gt; = c u r r e n t : D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; ) = &gt; D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; ;</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>1 f 3 :}Listing 5 :</head><label>135</label><figDesc>u n c t i o n u p d a t e O p e r a t i n g M o d e &lt; S , E , P , D &gt; ( c o m p o n e n t : C o m p o n e n t &lt; E , P , D &gt; , 2 c u r r e n t S t a t e : D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; , s h a d o w M o d e s : S h a d o w M a p ) D e g r a d a b l e S t a t e &lt; S , E , P , D &gt; { 4 c o n s t d e g r a d a t i o n L e v e l = [ . . . ( c o m p o n e n t . d e p e n d e n c y M a p . k e y s ( ) ] . s o r t ( ) . r e v e r s e ( ) ; 5 f o r ( c o n s t l e v e l o f d e g r a d a t i o n L e v e l ) { 6 c o n s t d e p e n d e n c y = c o m p o n e n t . d e p e n d e n c y M a p . g e t ( l e v e l ) ; 7 i f ( d e p e n d e n c y ( c u r r e n t S t a t e , s h a d o w M o d e s ) ) { 8 i f ( l e v e l &gt; c u r r e n t S t a t e . o p e r a t i n g M o d e ) { 9 c o n s t u p g r a d e d S t a t e = u p g r a d e ( c o m p o n e n t , c u r r e n t S t a t e , l e v e l ) ; 10 i f ( u p g r a d e d S t a t e ! = c u r r e n t S t a t e ) 11 r e t u r n u p g r a d e d S t a t e ; 12 } e l s e i f ( l e v e l &lt; c u r r e n t S t a t e . o p e r a t i n g M o d e ) { 13 c o n s t d e g r a d e d S t a t e = d e g r a d e ( c o m p o n e n t , c u r r e n t S t a t e , l e v e l ) ; 14 i f ( d e g r a d e d S t a t e ! = c u r r e n t S t a t e ) 15 r e t u r n d e g r a d e d S t a t e ; 16 } e l s e { 17 r e t u r n c u r r e n t S t a t e ; u r n c u r r e n t S t a t e ; 22 The implementation of the exported u p d a t e O p e r a t i n g M o d e function Implementation -Running Example: Figure 2 shows an example DAG for the S E B , based on the conditions from Table</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Degradation DAG of the Smart Entrance Barrier.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>1 c 2 T 3 [ 9 e l s e 10 n 13 ] 6 :</head><label>123910136</label><figDesc>o n s t D e g r a d a t i o n D A G : [ [ O p e r a t i n g M o d e s , O p e r a t i n g M o d e s ] , r a n s f e r F u n c t i o n &lt; a n y , E v e n t s , P o r t s , O p e r a t i n g M o d e s &gt; ] [ ] = [ [ O p e r a t i n g M o d e s . L 4 , O p e r a t i n g M o d e s . L 3 ] , ( c u r r e n t ) = &gt; { 4 l e t n e w S t a t e = { . . . c u r r e n t } ; 5 n e w S t a t e . d e g r a d a t i o n H i s t o r y . p u s h ( [ c u r r e n t . o p e r a t i n g M o d e , c u r r e n t . s t a t e ] ) ; 6 n e w S t a t e . o p e r a t i n g M o d e = O p e r a t i n g M o d e s . L 3 ; 7 i f ( c u r r e n t . s t a t e . f s m = = = S t a t e s . O P E N ) 8 n e w S t a t e . s t a t e . f s m = S t a t e s . O P E N ; e w S t a t e . s t a t e . f s m = S t a t e s . C L O S E D ; 11 r e t u r n n e w S t a t e ; 12 } ] , / / F u r t h e r T r a n s f e r f u n c t i o n s f o l l o w h e r e Listing Snippet of the S E B 's degradation DAG implementation.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1</head><label>1</label><figDesc>Pre-conditions for the SEB's implemented operating modes. modes O n and O f f , which means that they are either fully functional or not available at all. Further, D C (don't care) entries indicate that the operating mode of the given component is irrelevant. A u t o m a t i c requires all other components to be O n except the card reader, as it is not used. In case the camera C A M , the car sensor C S or the plate recognition service P R S are faulty, the automatic authentication procedure is unavailable and therefore the SEB should be operated in M a n u a l . If further the card reader C S is also unavailable, the S E B can not provide reasonable service and should be operated in B l o c k e d , which effectively closes the gate to the garage. If the parking garage utilises multiple entrance barriers, the garage could proceed to operate with degraded performance. The operating mode O p e n is intended for maintenance or free parking campaigns, because the barrier will remain open until it is manually reconfigured.</figDesc><table><row><cell>Level</cell><cell>C A M</cell><cell>C S</cell><cell>B U</cell><cell>B S</cell><cell>C R</cell><cell>P R S</cell><cell>P M S</cell></row><row><cell cols="8">L4 -Automatic On On On On DC On On</cell></row><row><cell>L3 -Manual</cell><cell cols="7">Off DC On On On DC On DC Off On On On DC On</cell></row><row><cell></cell><cell cols="7">DC DC On On On Off On</cell></row><row><cell>L2 -Open</cell><cell cols="7">DC DC On On DC DC DC</cell></row><row><cell></cell><cell cols="7">Off DC On On DC DC DC</cell></row><row><cell></cell><cell cols="7">DC Off On On DC DC DC</cell></row><row><cell>L1 -Blocked</cell><cell cols="7">DC DC On On Off DC DC</cell></row><row><cell></cell><cell cols="7">DC DC On On DC Off DC</cell></row><row><cell></cell><cell cols="7">DC DC On On DC DC Off</cell></row><row><cell>L0 -Off</cell><cell cols="7">DC DC DC DC DC DC DC</cell></row></table><note>operation</note></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">The prototype uses an ESP8266-based microcontroller and a Raspberry Pi Zero-based camera OctoCam.</note>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgments</head><p>The authors acknowledge the financial support by the Federal Ministry of Education and Research of Germany (BMBF grant nr. 01IS18068, SORRIR). Further, this work was partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) -435878599 ; 453895475.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Incorporating graceful degradation into embedded system design</title>
		<author>
			<persName><forename type="first">M</forename><surname>Glass</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Lukasiewycz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Haubelt</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Teich</surname></persName>
		</author>
		<idno type="DOI">10.1109/DATE.2009.5090681</idno>
	</analytic>
	<monogr>
		<title level="m">Des. Autom. Test in Eur. Conf. &amp; Exh</title>
				<meeting><address><addrLine>DATE</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2009">2009</date>
			<biblScope unit="page" from="320" to="323" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Experiences with an internal DSL in the iot domain</title>
		<author>
			<persName><forename type="first">M</forename><surname>Tichy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Pietron</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Mödinger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Juhnke</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">J</forename><surname>Hauck</surname></persName>
		</author>
		<ptr target="http://ceur-ws.org/Vol-2707/mde4iotpaper1.pdf" />
	</analytic>
	<monogr>
		<title level="m">STAF Worksh. Proc: 4th Worksh. on Model-Driv. Eng. for the Intern. of Things (MDE4IoT)</title>
				<imprint>
			<date type="published" when="2020">2020</date>
			<biblScope unit="volume">2707</biblScope>
		</imprint>
	</monogr>
	<note>CEUR Workshop Proceedings</note>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">A survey on resilience in the IoT: Taxonomy, classification and discussion of resilience mechanisms</title>
		<author>
			<persName><forename type="first">C</forename><surname>Berger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Eichhammer</surname></persName>
		</author>
		<author>
			<persName><forename type="first">H</forename><forename type="middle">P</forename><surname>Reiser</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Domaschka</surname></persName>
		</author>
		<author>
			<persName><forename type="first">F</forename><forename type="middle">J</forename><surname>Hauck</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Habiger</surname></persName>
		</author>
		<idno type="DOI">10.1145/3462513</idno>
	</analytic>
	<monogr>
		<title level="j">ACM Comp. Surv</title>
		<imprint>
			<date type="published" when="2021">2021</date>
		</imprint>
	</monogr>
	<note>accepted for publication</note>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">A product family approach to graceful degradation</title>
		<author>
			<persName><forename type="first">W</forename><surname>Nace</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Koopman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Architecture and Design of Distributed Embedded Systems: IFIP WG10.3/WG10.4/WG10</title>
				<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<idno type="DOI">10.1007/978-0-387-35409-5_13</idno>
		<title level="m">Int. Worksh. on Distr. and Par. Emb. Sys. (DIPES)</title>
				<imprint>
			<publisher>Springer US</publisher>
			<date type="published" when="2001">2001</date>
			<biblScope unit="page" from="131" to="140" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Achieving critical system survivability through software architectures</title>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">C</forename><surname>Knight</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><forename type="middle">A</forename><surname>Strunk</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-540-25939-8_3</idno>
	</analytic>
	<monogr>
		<title level="m">Architecting Dependable Systems II</title>
				<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2004">2004</date>
			<biblScope unit="volume">3069</biblScope>
			<biblScope unit="page" from="51" to="78" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Bringing the cloud to the edge</title>
		<author>
			<persName><forename type="first">H</forename><surname>Chang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Hari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Mukherjee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Lakshman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE Conf. on Comp. Comm. Worksh. (INFOCOM WKSHPS), IEEE</title>
				<imprint>
			<date type="published" when="2014">2014</date>
			<biblScope unit="page" from="346" to="351" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">QoS-by-design in reconfigurable IoT ecosystems</title>
		<author>
			<persName><forename type="first">M</forename><surname>Willocx</surname></persName>
		</author>
		<author>
			<persName><forename type="first">I</forename><surname>Bohé</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Naessens</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE 5th World Forum on Internet of Things (WF-IoT)</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2019">2019. 2019</date>
			<biblScope unit="page" from="628" to="632" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">VirtualDrone: Virtual sensing, actuation, and communication for attack-resilient unmanned aerial systems</title>
		<author>
			<persName><forename type="first">M.-K</forename><surname>Yoon</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Liu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Hovakimyan</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Sha</surname></persName>
		</author>
		<idno type="DOI">10.1145/3055004.3055010</idno>
	</analytic>
	<monogr>
		<title level="m">8th Int. Conf. on Cyber-Phys. Sys. (ICCPS)</title>
				<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2017">2017</date>
			<biblScope unit="page" from="143" to="154" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">A graceful degradation framework for distributed embedded systems</title>
		<author>
			<persName><forename type="first">W</forename><surname>Nace</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Koopman</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Worksh. on Rel. in Emb. Sys. (in Conj. with SRDS)</title>
				<imprint>
			<date type="published" when="2001">2001</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<monogr>
		<title level="m">Int. Soc. of Automotive Engineers, Architecture analysis and design language annex (AADL)</title>
				<meeting><address><addrLine>Annex E</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2006">2006</date>
			<biblScope unit="volume">1</biblScope>
		</imprint>
	</monogr>
	<note>Error model annex</note>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Architecture fault modeling with the AADL error-model annex</title>
		<author>
			<persName><forename type="first">J</forename><surname>Delange</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><forename type="middle">H</forename><surname>Feiler</surname></persName>
		</author>
		<idno type="DOI">10.1109/SEAA.2014.20</idno>
	</analytic>
	<monogr>
		<title level="m">40th EUROMICRO Conf. on Softw. Eng. and Adv. App. (EUROMICRO-SEAA), IEEE Comp. Soc</title>
				<imprint>
			<date type="published" when="2014">2014</date>
			<biblScope unit="page" from="361" to="368" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Safety, dependability and performance analysis of extended AADL models</title>
		<author>
			<persName><forename type="first">M</forename><surname>Bozzano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Cimatti</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Katoen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><forename type="middle">Y</forename><surname>Nguyen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Noll</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Roveri</surname></persName>
		</author>
		<idno type="DOI">10.1093/comjnl/bxq024</idno>
	</analytic>
	<monogr>
		<title level="j">Comput. J</title>
		<imprint>
			<biblScope unit="volume">54</biblScope>
			<biblScope unit="page" from="754" to="775" />
			<date type="published" when="2011">2011</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<analytic>
		<title level="a" type="main">Self-adaptive automata</title>
		<author>
			<persName><forename type="first">A</forename><surname>Borda</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Koutavas</surname></persName>
		</author>
		<idno type="DOI">10.1145/3193992.3194001</idno>
	</analytic>
	<monogr>
		<title level="m">6th Conf. on Formal Meth. in Softw. Eng. (FormaliSE), collocated with ICSE</title>
				<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2018">2018</date>
			<biblScope unit="page" from="64" to="73" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<ptr target="http://typescriptlang.org" />
		<title level="m">TypeScript Language Specification</title>
				<imprint>
			<date type="published" when="2016">2016</date>
			<biblScope unit="volume">8</biblScope>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<analytic>
		<title level="a" type="main">A classification and comparison framework for software architecture description languages</title>
		<author>
			<persName><forename type="first">N</forename><surname>Medvidovic</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">N</forename><surname>Taylor</surname></persName>
		</author>
		<idno type="DOI">10.1109/32.825767</idno>
	</analytic>
	<monogr>
		<title level="j">IEEE Trans. Softw. Eng</title>
		<imprint>
			<biblScope unit="volume">26</biblScope>
			<biblScope unit="page" from="70" to="93" />
			<date type="published" when="2000">2000</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b16">
	<monogr>
		<title level="m" type="main">Modeling Companion for Software Practitioners</title>
		<author>
			<persName><forename type="first">E</forename><surname>Börger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Raschke</surname></persName>
		</author>
		<idno type="DOI">10.1007/978-3-662-56641-1</idno>
		<imprint>
			<date type="published" when="2018">2018</date>
			<publisher>Springer</publisher>
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
