<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1531743</article-id>
<article-id pub-id-type="doi">10.3389/frobt.2025.1531743</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>ROSA: a knowledge-based solution for robot self-adaptation</article-title>
<alt-title alt-title-type="left-running-head">Rezende Silva et al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/frobt.2025.1531743">10.3389/frobt.2025.1531743</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Rezende Silva</surname>
<given-names>Gustavo</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2901169/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/investigation/"/>
<role content-type="https://credit.niso.org/contributor-roles/methodology/"/>
<role content-type="https://credit.niso.org/contributor-roles/software/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<role content-type="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>P&#xe4;&#xdf;ler</surname>
<given-names>Juliane</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2960912/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Tapia Tarifa</surname>
<given-names>S. Lizeth</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2960870/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Johnsen</surname>
<given-names>Einar Broch</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/256263/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Hern&#xe1;ndez Corbato</surname>
<given-names>Carlos</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2528790/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/"/>
</contrib>
</contrib-group>
<aff id="aff1">
<sup>1</sup>
<institution>Cognitive Robotics Department</institution>, <institution>Mechanical Engineering Faculty</institution>, <institution>TU Delft</institution>, <addr-line>Delft</addr-line>, <country>Netherlands</country>
</aff>
<aff id="aff2">
<sup>2</sup>
<institution>Department of Informatics</institution>, <institution>University of Oslo</institution>, <addr-line>Oslo</addr-line>, <country>Norway</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1843434/overview">Federico Ciccozzi</ext-link>, M&#xe4;lardalen University, Sweden</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/300220/overview">Nico Hochgeschwender</ext-link>, University of Bremen, Germany</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2902153/overview">Davide Di Ruscio</ext-link>, University of L&#x2019;Aquila, Italy</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Gustavo Rezende Silva&#x2009;, <email>g.rezendesilva@tudelft.nl</email>
</corresp>
</author-notes>
<pub-date pub-type="epub">
<day>20</day>
<month>05</month>
<year>2025</year>
</pub-date>
<pub-date pub-type="collection">
<year>2025</year>
</pub-date>
<volume>12</volume>
<elocation-id>1531743</elocation-id>
<history>
<date date-type="received">
<day>20</day>
<month>11</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>04</day>
<month>04</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2025 Rezende Silva, P&#xe4;&#xdf;ler, Tapia Tarifa, Johnsen and Hern&#xe1;ndez Corbato.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Rezende Silva, P&#xe4;&#xdf;ler, Tapia Tarifa, Johnsen and Hern&#xe1;ndez Corbato</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>Autonomous robots must operate in diverse environments and handle multiple tasks despite uncertainties. This creates challenges in designing software architectures and task decision-making algorithms, as different contexts may require distinct task logic and architectural configurations. To address this, robotic systems can be designed as self-adaptive systems capable of adapting their task execution and software architecture at runtime based on their context. This paper introduces ROSA, a novel knowledge-based framework for RObot Self-Adaptation, which enables task-and-architecture co-adaptation (TACA) in robotic systems. ROSA achieves this by providing a knowledge model that captures all application-specific knowledge required for adaptation and by reasoning over this knowledge at runtime to determine when and how adaptation should occur. In addition to a conceptual framework, this work provides an open-source ROS 2-based reference implementation of ROSA and evaluates its feasibility and performance in an underwater robotics application. Experimental results highlight ROSA&#x2019;s advantages in reusability and development effort for designing self-adaptive robotic systems.</p>
</abstract>
<kwd-group>
<kwd>self-adaptation</kwd>
<kwd>knowledge representation</kwd>
<kwd>underwater vehicle</kwd>
<kwd>robotics</kwd>
<kwd>self-adaptive robotic system</kwd>
</kwd-group>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Computational Intelligence in Robotics</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>A current challenge in robotics is designing software architectures and task decision-making algorithms that enable robots to autonomously perform multiple tasks in diverse environments while handling internal and environmental uncertainties. This challenge arises because different contexts may demand distinct task logic and architectural configurations. At runtime, certain actions may become unfeasible, requiring the robot to adapt its task execution to ensure mission completion. For example, a robot navigating through an environment might run out of battery during its operation, requiring it to adapt its task execution to include a recharge action. Additionally, actions may require different architectural configurations depending on the context. For example, a navigation action that relies on vision-based localization cannot be executed in environments without lights but could potentially be executed with an alternative architectural configuration that employs a localization strategy based on lidar. This becomes even more challenging when both the robot&#x2019;s task execution and its architectural configuration need to be adapted. For instance, when a robot runs out of battery while navigating, it must simultaneously adapt its architecture to a configuration that consumes less energy and its task execution to include a recharge action and to navigate along paths that are better suited to the new configuration. To address this challenge, robots can be designed as self-adaptive systems (SASs) with the ability to perform <italic>task-and-architecture co-adaptation</italic> (TACA) (<xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>), i.e., simultaneously adapt their task execution and software architecture dependently during runtime. This work focuses on proposing a systematic solution for enabling TACA that can be reused with different robotic systems.</p>
<p>A common approach to enable self-adaptation in software systems is to design them as two-layered systems containing a managing and managed subsystem (<xref ref-type="bibr" rid="B40">Weyns, 2020</xref>), where the managing subsystem monitors and reconfigures the managed subsystem, and the managed subsystem is responsible for the domain logic. This design facilitates the development and maintenance of the system by creating a clear separation between the adaptation and the domain logic. While several solutions have been proposed for solving either architectural (<xref ref-type="bibr" rid="B2">Alberts et al., 2025</xref>) or task adaptation in robotic systems (<xref ref-type="bibr" rid="B11">Carreno et al., 2021</xref>; <xref ref-type="bibr" rid="B19">Hamilton et al., 2022</xref>), there are some works that partially address TACA (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>; <xref ref-type="bibr" rid="B27">Lotz et al., 2013</xref>; <xref ref-type="bibr" rid="B18">Gherardi and Hochgeschwender, 2015</xref>; <xref ref-type="bibr" rid="B39">Valner et al., 2022</xref>), and there are few works that fully address TACA (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>; <xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>). More critically, to the best of our knowledge, the existing solutions for TACA require a significant and complex re-programming of the adaptation logic for each different use case, including the creation of multiple modelsbased on different domain-specific languages (DSLs) (<xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>) or implementing the managing subsystem itself (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>), hindering the adoption of SAS methods in robotics.</p>
<p>To address the limitations of SAS methods for TACA, this paper proposes to extend traditional robotics architectures with a novel knowledge-based managing subsystem for RObot Self-Adaptation (ROSA) that promotes reusability, composability, and extensibility. The main novelty of ROSA is its knowledge base (KB) which captures knowledge about the actions the robot can perform, the robot&#x2019;s architecture, the relationship between both, and their requirements to answer questions such as &#x201c;What actions can the robot perform in situation X?&#x201d; and &#x201c;What is the best configuration available for each action in situation Y?&#x201d;, for example, &#x201c;Can the robot perform an inspection action when the battery level is lower than 50%?&#x201d; or &#x201c;What is the best software configuration for the inspection action when the visibility is low?&#x201d; This results in a reusable solution for TACA in which all application-specific aspects of the adaptation logic are captured in its KB.</p>
<p>In addition to a conceptual framework, this work provides a reference implementation of ROSA as an open-source framework that can be reused for research on self-adaptive robotic systems. ROSA is implemented as a ROS 2-based system (<xref ref-type="bibr" rid="B28">Macenski et al., 2022</xref>), leveraging <italic>TypeDB</italic> (<xref ref-type="bibr" rid="B14">Dorn and Pribadi, 2023</xref>; <xref ref-type="bibr" rid="B15">2024</xref>) for knowledge representation and reasoning, and <italic>behavior trees</italic> (BT) (<xref ref-type="bibr" rid="B13">Colledanchise and &#xd6;gren, 2018</xref>) as well as <italic>PDDL-based planners</italic> (<xref ref-type="bibr" rid="B17">Ghallab et al., 1998</xref>) for task decision-making.</p>
<p>The <italic>feasibility</italic> of using ROSA for runtime self-adaptation in robotic systems is demonstrated by applying it to the SUAVE exemplar (<xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>), and its adaptation <italic>performance</italic> is evaluated in comparison to other approaches available in the exemplar. <inline-formula id="inf1">
<mml:math id="m1">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s <italic>reusability</italic> is demonstrated by using it to model the TACA scenarios described by <xref ref-type="bibr" rid="B9">Braberman et al. (2017)</xref> and <xref ref-type="bibr" rid="B10">C&#xe1;mara et al. (2020)</xref>. The <italic>development effort</italic> for using ROSA is evaluated by analyzing the number of elements contained in the knowledge models created to solve the aforementioned use cases and comparing it with the size of a BT-based approach used to solve SUAVE. <inline-formula id="inf2">
<mml:math id="m2">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s <italic>development effort scalability</italic> is demonstrated by showing how <inline-formula id="inf3">
<mml:math id="m3">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model grows with the addition of extra adaptations in a hypothetical scenario.</p>
<p>In summary, the main contributions of this paper are:<list list-type="simple">
<list-item>
<p>1. a <italic>modular architecture</italic> for self-adaptive robotic systems that extends robotics architectures with a managing subsystem and supports reusability, composability, and extensibility;</p>
</list-item>
<list-item>
<p>2. a <italic>reusable knowledge model</italic> to capture all application-specific aspects of the adaptation logic required for TACA in self-adaptive robotic systems;</p>
</list-item>
<list-item>
<p>3. a reference <italic>open-source implementation</italic> of the framework that can be reused for self-adaptive systems research; and</p>
</list-item>
<list-item>
<p>4. an <italic>experimental evaluation</italic> of ROSA based on simulated robotic self-adaptation scenarios.</p>
</list-item>
</list>
</p>
<p>The remainder of this paper is organized as follows. <xref ref-type="sec" rid="s2">Section 2</xref> describes the TACA use case used to exemplify and evaluate this work. <xref ref-type="sec" rid="s3">Section 3</xref> presents related works. <xref ref-type="sec" rid="s4">Section 4</xref> describes how this work proposes to extend robotics architectures with ROSA. <xref ref-type="sec" rid="s5">Section 5</xref> details <inline-formula id="inf4">
<mml:math id="m4">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s KB. <xref ref-type="sec" rid="s6">Section 6</xref> describes the proposed reference implementation of ROSA. <xref ref-type="sec" rid="s7">Section 7</xref> showcases <inline-formula id="inf5">
<mml:math id="m5">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s evaluation. <xref ref-type="sec" rid="s8">Section 8</xref> concludes this work and presents future research directions.</p>
</sec>
<sec id="s2">
<title>2 Running example</title>
<p>Throughout this paper, the SUAVE exemplar (<xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>) is used as an example to ease the understanding of the proposed solution, and later, it is used to evaluate ROSA.</p>
<p>SUAVE consists of an Autonomous Underwater Vehicle (AUV) used for underwater pipeline inspection. The AUV&#x2019;s mission consists of performing the following actions in sequence: <italic>(A1) searching for the pipeline</italic> and <italic>(A2) simultaneously following and inspecting the pipeline</italic>. When performing its mission, the AUV is subject to two uncertainties: <italic>(U1) thruster failures</italic>, and <italic>(U2) changes in water visibility</italic>. These uncertainties are triggers for parameter and structural adaptation. When <italic>U1</italic> occurs while performing <italic>A1</italic> or <italic>A2</italic>, the AUV activates a functionality to recover its thrusters. When <italic>U2</italic> happens while performing <italic>A1</italic>, the AUV adapts its search altitude.</p>
<p>To demonstrate TACA, this work extends SUAVE with an <italic>(A3) recharge battery</italic> action and a <italic>(U3) battery level</italic> uncertainty. With these extensions, the AUV&#x2019;s battery level can suddenly drop to a critical level, requiring the AUV to abort the action it is performing <italic>(A1 or A2)</italic> and perform <italic>A3</italic>. In this situation, the AUV needs to perform TACA by adapting its task execution and architecture to perform <italic>A3</italic>. To better evaluate ROSA by serving as a baseline for comparison, this work extends the SUAVE exemplar with a managing subsystem where the adaptation logic is implemented with BTs, and the AUV&#x2019;s architectural variants as well as the architectural adaptation execution are realized with System Modes (<xref ref-type="bibr" rid="B32">Nordmann et al., 2021</xref>)<xref ref-type="fn" rid="fn1">
<sup>1</sup>
</xref>. Furthermore, this work introduces a new <italic>reaction time</italic> metric that represents the time a managing system takes to react to uncertainties and adapt the managed subsystem.</p>
</sec>
<sec id="s3">
<title>3 Related work</title>
<p>This work combines principles from self-adaptive systems and knowledge representation and reasoning to design a reusable framework for developing adaptive robotics architectures. <xref ref-type="sec" rid="s3-1">Section 3.1</xref> analyzes existing robotics architectures and describes the architectural patterns from robotics architectures adopted in this work. <xref ref-type="sec" rid="s3-2">Section 3.2</xref> reviews related research on self-adaptive robotic systems that leverage knowledge representation techniques to promote reusability, as well as studies that consider the relationship between task execution and architectural adaptation. Additionally, it discusses how these works influenced the design of the proposed framework and highlights its distinctions from existing approaches.</p>
<sec id="s3-1">
<title>3.1 Robotics architectures</title>
<p>Numerous approaches have been proposed for programming and designing autonomous robot architectures (<xref ref-type="bibr" rid="B25">Kortenkamp et al., 2016</xref>). In recent years, two main trends have emerged: component-based frameworks and middlewares&#x2013;among which ROS (<xref ref-type="bibr" rid="B28">Macenski et al., 2022</xref>) stands out due to its widespread adoption in academia and industry&#x2013;and layered architectures (<xref ref-type="bibr" rid="B4">Barnett et al., 2022</xref>). <xref ref-type="bibr" rid="B4">Barnett et al. (2022)</xref> reviewed 21 robotics architectures and concluded that most architectures follow a layered pattern, and even those that do not can still have their elements mapped onto a layered architectural structure. Furthermore, they found that all architectures include a bottom functional layer responsible for interacting with the robot&#x2019;s hardware, an upper task decision layer&#x2013;whose responsibilities vary across architectures&#x2013;and an arbitrary number of intermediate layers. This work aims to design a reusable solution for TACA that can be integrated into robotics architectures adhering to these architectural patterns. To achieve this, the proposed solution establishes a clear separation between architectural management and task logic, organizing them into distinct layers, or subsystems, as commonly referred to in the self-adaptive systems community.</p>
<p>The LAAS architecture (<xref ref-type="bibr" rid="B1">Alami et al., 1998</xref>) is an example of a three-layered architecture consisting of a functional layer, an executive, and a decision layer. The functional layer contains the robot&#x2019;s control and perception algorithms. The executive layer receives a task plan from the decision layer and selects functions from the functional layer to realize each action in the task plan. The decision layer includes a planner that generates task plans and a supervisor responsible for monitoring plan execution and triggering replanning when necessary. More recent examples of layered robot architectures include AEROSTACK (<xref ref-type="bibr" rid="B35">Sanchez-Lopez et al., 2016</xref>), designed for aerial drone swarms, and SERA (<xref ref-type="bibr" rid="B16">Garcia et al., 2018</xref>), which is tailored for decentralized and collaborative robots. These architectures build on the layered model but focus on providing domain-specific solutions.</p>
<p>Cognitive architectures (<xref ref-type="bibr" rid="B26">Kotseruba and Tsotsos, 2018</xref>), such as CRAM (<xref ref-type="bibr" rid="B5">Beetz et al., 2010</xref>; <xref ref-type="bibr" rid="B23">Kazhoyan et al., 2021</xref>), focus on generating intelligent and flexible behavior by integrating cognitive capabilities such as planning, perception, or reasoning. However, being integral solutions, these works provide a blueprint for the complete robot control system and are not intended for reuse and integration with other methods, thus making it difficult to adapt and customize for specific applications.</p>
</sec>
<sec id="s3-2">
<title>3.2 Self-adaptive robotic systems</title>
<p>Despite advances in self-adaptive robotic systems, fully addressing task and architectural co-adaptation (TACA) with reusable and scalable solutions remains an open challenge (see <xref ref-type="table" rid="T1">Table 1</xref>). While some studies explore the relationship between task execution and architectural adaptation, only a few explicitly address TACA&#x2014;and those that do face limitations in reusability and practical applicability in robotics. This work aims to bridge this gap by introducing a knowledge-based framework that can capture the necessary knowledge to solve TACA across different use cases, can be directly applied to robotic systems, and supports modular modifications for incorporating different adaptation strategies.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>Related frameworks for robot self-adaptation.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="center">Approach</th>
<th colspan="2" align="center">Architectural adaptation</th>
<th colspan="2" align="center">TACA</th>
<th colspan="2" align="center">Reusability</th>
<th rowspan="2" align="left">Robotics Middleware</th>
<th rowspan="2" align="left">Applied to robot</th>
</tr>
<tr>
<th align="left">Parameter</th>
<th align="left">Structural</th>
<th align="left">A-t-T</th>
<th align="left">T-t-A</th>
<th align="left">Conceptual</th>
<th align="left">Software Available</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">ICE (<xref ref-type="bibr" rid="B31">Niemczyk et al. 2017</xref>)</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">None</td>
<td align="center">No</td>
</tr>
<tr>
<td align="center">
<xref ref-type="bibr" rid="B21">Hochgeschwender et al. (2016)</xref>
</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">None</td>
<td align="center">Real robot</td>
</tr>
<tr>
<td align="center">Metacontrol (<xref ref-type="bibr" rid="B7">Bozhinoski et al., 2022</xref>)</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">ROS 1 and 2</td>
<td align="center">Real robot</td>
</tr>
<tr>
<td align="center">SHAGE (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>)</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">Partially</td>
<td align="center">No</td>
<td align="center">None</td>
<td align="center">No</td>
</tr>
<tr>
<td align="center">
<xref ref-type="bibr" rid="B27">Lotz et al. (2013)</xref>
</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">None</td>
<td align="center">No</td>
</tr>
<tr>
<td align="center">RRA (<xref ref-type="bibr" rid="B18">Gherardi and Hochgeschwender, 2015</xref>)</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">Partially</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">ROS 1</td>
<td align="center">Simulated</td>
</tr>
<tr>
<td align="center">TeMoto (<xref ref-type="bibr" rid="B39">Valner et al., 2022</xref>)</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">Yes</td>
<td align="center">Partially</td>
<td align="center">Yes</td>
<td align="center">ROS 1</td>
<td align="center">Real robot</td>
</tr>
<tr>
<td align="center">MORPH (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>)</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">No</td>
<td align="center">No</td>
<td align="center">None</td>
<td align="center">No</td>
</tr>
<tr>
<td align="center">
<xref ref-type="bibr" rid="B10">C&#xe1;mara et al. (2020)</xref>
</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">Yes</td>
<td align="center">Partially</td>
<td align="center">No</td>
<td align="center">ROS 1</td>
<td align="center">Simulated</td>
</tr>
<tr>
<td align="center">
<bold>ROSA</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>Yes</bold>
</td>
<td align="center">
<bold>ROS 2</bold>
</td>
<td align="center">
<bold>Simulated</bold>
</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Where A-t-T means &#x201c;Architectural state triggers task adaptation&#x201d;, and T-t-A means &#x201c;Task triggers architectural adaptation&#x201d;.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>
<xref ref-type="bibr" rid="B2">Alberts et al. (2025)</xref> recently conducted a systematic mapping study<xref ref-type="fn" rid="fn2">
<sup>2</sup>
</xref> on &#x201c;robotics software architecture-based self-adaptive systems&#x201d; (RSASSs), identifying 37 primary studies on RSASSs published since 2011. Among these, <xref ref-type="bibr" rid="B2">Alberts et al. (2025)</xref> identified that four studies (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>; <xref ref-type="bibr" rid="B27">Lotz et al., 2013</xref>; <xref ref-type="bibr" rid="B18">Gherardi and Hochgeschwender, 2015</xref>; <xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>) consider, to varying degrees, the relationship between the tasks a robot performs and architectural adaptation. A non-systematic snowballing of the primary studies identified by <xref ref-type="bibr" rid="B2">Alberts et al. (2025)</xref> revealed two additional studies (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>; <xref ref-type="bibr" rid="B39">Valner et al., 2022</xref>) that also explore this relationship.</p>
<p>In the context of knowledge-based methods, <xref ref-type="bibr" rid="B2">Alberts et al. (2025)</xref> identified six studies (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>; <xref ref-type="bibr" rid="B30">Niemczyk and Geihs, 2015</xref>; <xref ref-type="bibr" rid="B21">Hochgeschwender et al., 2016</xref>; <xref ref-type="bibr" rid="B31">Niemczyk et al., 2017</xref>; <xref ref-type="bibr" rid="B8">Bozhinoski and Wijkhuizen, 2021</xref>; <xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>) that use knowledge representation techniques to capture knowledge required for the adaptation logic. Among these (<xref ref-type="bibr" rid="B8">Bozhinoski and Wijkhuizen, 2021</xref>; <xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>), do not propose solutions for RSASSs but instead demonstrate the application of Metacontrol (<xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al., 2018</xref>; <xref ref-type="bibr" rid="B7">Bozhinoski et al., 2022</xref>) in different robotics use cases. While these methods do not address TACA, they provide valuable insights for designing knowledge-based approaches to self-adaptation.</p>
<p>
<xref ref-type="bibr" rid="B34">Park et al. (2012)</xref> introduced the SHAGE framework for task-based and resource-aware architecture adaptation in robotic systems. SHAGE partially solves TACA, as it can adapt the robot&#x2019;s architecture at runtime to specifically realize each action in its task plan when it needs to be performed. However, SHAGE does not support task execution adaptation based on the robot&#x2019;s architectural state. SHAGE promotes reusability by leveraging architectural models and knowledge captured with an ontology to reason about adaptation at runtime. However, to the best of our knowledge, there is no implementation of the SHAGE framework that works with common robotic frameworks. Thus, it is not possible to directly reuse SHAGE.</p>
<p>
<xref ref-type="bibr" rid="B27">Lotz et al. (2013)</xref> proposed a method to model operational and quality variability using two distinct (DSLs) models. Their work provides a high-level discussion on how these models could be used at runtime to enable architectural adaptation based on the actions executed by the robot. An interesting aspect of their approach is the clear separation between functional and non-functional requirements: one model captures the task deliberation logic, functional requirements, and their variation points, while the other focuses on non-functional requirements and their possible variations. While this separation of concerns simplifies the modeling process, combining task deliberation with functional requirements reduces reusability. Any change in the task deliberation logic directly impacts the modeling of functional requirements, making the approach less flexible. Additionally, they do not provide sufficient details on how these models are used at runtime, nor do they present an evaluation to demonstrate the feasibility of their approach.</p>
<p>
<xref ref-type="bibr" rid="B18">Gherardi and Hochgeschwender (2015)</xref> proposed RRA as a model-based approach for structural, parameter, and connection adaptation in robotic systems. Their method employs six distinct models to capture all the knowledge required for adaptation. These models represent the robot&#x2019;s architecture and its variability, its functionalities and their variability, the mapping between functions and architecture, the required interfaces (i.e., inputs, outputs, and data types) for the adaptation logic, and the adaptation logic itself. RRA models the dependencies between the tasks a robot can perform and the architectural configurations needed to accomplish them. This is achieved by decomposing each task into multiple functionalities and capturing the available architectural variants for realizing each function. At deployment time, the robot&#x2019;s operator selects a task, and RRA manages only the functionalities required for that task. Although RRA considers the relationship between tasks and architecture to some extent, it cannot be classified as TACA, as this dependence is only accounted for at deployment time. Architectural adaptation occurs based on the selected task rather than dynamically at runtime in response to the individual actions the robot needs to perform. Moreover, RRA does not adapt the task execution based on the robot&#x2019;s architectural state.</p>
<p>
<xref ref-type="bibr" rid="B39">Valner et al. (2022)</xref> proposed the TeMoto as a general solution for robotic systems&#x2019; dynamic task and resource management. TeMoto partially solves TACA, as it can adapt the robot&#x2019;s architecture to realize the actions being performed by the robot. TeMoto does not completely fulfill TACA as it cannot adapt the task execution given the robot&#x2019;s architectural state. TeMoto provides reusable mechanisms for resource management, but reusability is limited since the adaptation logic must be implemented for all managed resources, and the knowledge about the dependencies between actions and architecture are programmatically included in the actions&#x2019; code.</p>
<p>
<xref ref-type="bibr" rid="B9">Braberman et al. (2017)</xref> proposed MORPH as a reference architecture to enable TACA. They showcased on a conceptual level how MORPH can be applied to enable TACA in an unmanned aerial vehicle (UAV) use case. However, since MORPH is only demonstrated at a conceptual level, it is hard to evaluate the feasibility of applying MORPH to robotic systems at runtime. To the best of our knowledge, there is no framework implementing the complete MORPH architecture. Therefore, it is not possible to directly reuse MORPH.</p>
<p>In the context of TACA, <xref ref-type="bibr" rid="B10">C&#xe1;mara et al. (2020)</xref> developed a method for finding <italic>optimal</italic> task and reconfiguration plans for an autonomous ground vehicle (AGV) navigating in a graph-like environment. To enable optimal planning within reasonable time limits, their method first reduces the search space by finding all possible reconfiguration plans and then computing the shortest N paths the robot can take to reach its goal. Then, it uses this information along with task-specific models that capture mission quality attributes (e.g., energy consumption, collision probabilities) and a preferred utility to apply model checking and determine an optimal reconfiguration plan for each path. Finally, an optimization function selects the best plan based on a predefined utility function (e.g., minimizing energy consumption, time, or collision probability). Although their approach reduces the planning search space to improve planning time, their experiments show that solving the navigation use case still takes an average of 15.1 s, an impractical duration for robots that frequently need to replan at runtime to handle uncertainties. Additionally, while the approach is model-based, it relies on task-specific model transformations (e.g., converting the map or battery model into PRISM model snippets), which require dedicated implementations for different tasks. This limits the reusability of their approach for different types of tasks, as it requires a considerable amount of development effort.</p>
<p>
<xref ref-type="bibr" rid="B21">Hochgeschwender et al. (2016)</xref> argue that robots should have access to and exploit software-related knowledge about how they were engineered to support runtime adaptation. They demonstrate how labeled property graphs (LPGs) can be used to persistently store and compose different domain models specified with (DSL) to enable runtime architectural adaptation. Although their approach is interesting, its reusability is limited as it does not define a knowledge model that can be reused for other applications: for each different use case and DSL the roboticist is responsible for creating a translation from the DSL to the corresponding LPG.</p>
<p>
<xref ref-type="bibr" rid="B30">Niemczyk and Geihs (2015)</xref>; <xref ref-type="bibr" rid="B31">Niemczyk et al. (2017)</xref> propose ICE as a method for adapting the information processing subsystem in multi-robot systems, specifically by adapting the connections between system components. Their approach uses an ontology to define each component&#x2019;s required inputs and outputs, along with quality-of-service information for each connection. This ontology is then translated into answer set programming (ASP), and an ASP solver determines an optimal configuration. While they conceptually demonstrate how their method could be applied to robots, they do not demonstrate it with a robotic system. Moreover, their approach focuses solely on structural and connection adaptation to maintain the functionality of the information processing subsystem, without considering other subsystems of the robotic system.</p>
<p>
<xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al. (2018)</xref>; <xref ref-type="bibr" rid="B7">Bozhinoski et al. (2022)</xref> proposed Metacontrol as a knowledge-based solution for parameter and structural adaptation. Metacontrol leverages the TOMASys (<xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al., 2018</xref>) ontology to capture the knowledge required for the adaptation logic and to reason at runtime to decide when and how the system should adapt. Similar to RRA, Metacontrol decomposes the system into functionalities, using TOMASys to represent the robot&#x2019;s functionalities, the architectural variants that implement each functionality, and the non-functional requirements associated with these variants. However, Metacontrol cannot perform TACA as TOMASys does not capture the relationship between the system functionalities and the robot&#x2019;s actions.</p>
<p>In conclusion, existing works that fully address TACA (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>; <xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>) face limitations in reusability and practical applicability in robotics. The authors of MORPH (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>) note that no complete system has been developed, and they have not demonstrated its feasibility. While the approach proposed by <xref ref-type="bibr" rid="B10">C&#xe1;mara et al. (2020)</xref> provides the most complete solution to TACA in the literature, it also faces reusability limitations by relying on multiple distinct (DSL) models and requiring task-specific implementations for model transformations. To address these limitations, this work proposes capturing all the knowledge required for adaptation logic in a single knowledge model. This approach requires only one model&#x2013;conforming to the proposed knowledge model&#x2013;to be designed for each application. Additionally, an open-source reference implementation of ROSA is provided, enabling researchers to reuse, extend, and build upon the proposed solution.</p>
<p>On the other hand, previous knowledge-based methods for RSASS (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>; <xref ref-type="bibr" rid="B30">Niemczyk and Geihs, 2015</xref>; <xref ref-type="bibr" rid="B31">Niemczyk et al., 2017</xref>; <xref ref-type="bibr" rid="B21">Hochgeschwender et al., 2016</xref>; <xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al., 2018</xref>; <xref ref-type="bibr" rid="B7">Bozhinoski et al., 2022</xref>) do not capture all knowledge required to enable TACA. They either lack the ability to capture the relationship between the robot&#x2019;s actions and architecture (<xref ref-type="bibr" rid="B21">Hochgeschwender et al., 2016</xref>; <xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al., 2018</xref>; <xref ref-type="bibr" rid="B7">Bozhinoski et al., 2022</xref>), or the knowledge required to decide when and how the robotic system should adapt (<xref ref-type="bibr" rid="B34">Park et al., 2012</xref>). Although these works do not capture all the knowledge required for TACA, they are able to capture, to varying degrees, knowledge that supports RSASSs. Thus, this work takes inspiration from them to design ROSA&#x2019;s knowledge model while addressing their limitations. More concretely, ROSA&#x2019;s knowledge model is designed to capture the relationship between the robot&#x2019;s actions and architecture and the knowledge required to decide when and how TACA should be performed.</p>
</sec>
</sec>
<sec id="s4">
<title>4 Architecture</title>
<p>To enable TACA, this paper proposes to extend traditional robotics architectures with ROSA, using it as a managing subsystem for the robotic subsystem (see <xref ref-type="fig" rid="F1">Figure 1</xref>). This section first describes the assumptions made about the robotics architecture and the requirements to use it alongside ROSA, and then it details <inline-formula id="inf6">
<mml:math id="m6">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s architecture.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>The upper layer depicts <inline-formula id="inf7">
<mml:math id="m7">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s architecture and the bottom layer depicts the robotic system.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g001.tif"/>
</fig>
<sec id="s4-1">
<title>4.1 Robotics architecture</title>
<p>This work assumes that the robotics architecture is layered, containing a bottom functional layer, an upper task decision layer, and an arbitrary number of layers in between, as common in robotics architectures (<xref ref-type="bibr" rid="B4">Barnett et al., 2022</xref>). The functional layer is responsible for interacting with the robots&#x2019; sensors and actuators, and the task decision layer is responsible for task planning and execution<xref ref-type="fn" rid="fn3">
<sup>3</sup>
</xref>. To enable TACA with ROSA, the task decision layer shall use the knowledge contained in <inline-formula id="inf8">
<mml:math id="m8">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s KB to decide which actions to perform, and it must update the KB with the actions selected to be performed to enable ROSA to configure the robot&#x2019;s architecture accordingly. To enable architectural adaptation, the robotic architecture must be component-based, its components must be able to be activated and deactivated at runtime, and its components&#x2019; parameters must be able to be adapted at runtime.</p>
</sec>
<sec id="s4-2">
<title>4.2 ROSA architecture</title>
<p>
<inline-formula id="inf9">
<mml:math id="m9">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s architecture adheres to the MAPE-K loop (<xref ref-type="bibr" rid="B24">Kephart and Chess, 2003</xref>). It <italic>monitors</italic> the managed subsystem, <italic>analyzes</italic> whether adaptation is required, when needed, <italic>plans</italic> how the managed subsystem should be reconfigured, and <italic>executes</italic> the selected reconfigurations. All these steps interact with a central <italic>KB</italic>.</p>
<p>To promote reusability, composability, and extensibility, the architecture is designed with the following premises: <italic>(1) all</italic> knowledge required for the adaptation logic is captured in the central KB, <italic>(2)</italic> there is no inter-component communication between the MAPE components (<xref ref-type="bibr" rid="B41">Weyns et al., 2013</xref>), <italic>(3)</italic> the MAPE components insert and read data from or to the KB via standardized interfaces, and <italic>(4)</italic> there is no explicit coordination between the MAPE-K components. Premise <italic>1</italic> promotes reusability by only requiring the modeling of the relevant knowledge for applying ROSA to different applications in a single model. Premises <italic>1</italic> to <italic>4</italic> promote composability and extensibility by allowing the MAPE components to be stateless and self-contained.</p>
</sec>
</sec>
<sec id="s5">
<title>5 Knowledge base</title>
<p>To fulfill the architectural premise that all knowledge required for the adaption logic should be captured in a central KB, this work proposes a KB component composed of the knowledge model depicted in <xref ref-type="fig" rid="F2">Figure 2</xref> and the set of rules depicted in <xref ref-type="fig" rid="F3">Figure 3</xref>, described in <xref ref-type="sec" rid="s5-1">Section 5.1</xref> and <xref ref-type="sec" rid="s5-2">Section 5.2</xref> respectively.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>
<inline-formula id="inf10">
<mml:math id="m10">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model. Architectural knowledge is on the left. Adaptation heuristic knowledge in the center. Reconfiguration Plan knowledge on the right. The labels on the arrows represent which role an entity or relationship plays in a relationship. Instances of the entities, relationships, and attributes with <inline-formula id="inf851">
<mml:math id="m851">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>purple font</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> are created at runtime. Instances of the other entities, relationships, and attributes are defined at design time. <bold>(a)</bold> Architectural. <bold>(b)</bold> Adaptation heuristic. <bold>(c)</bold> Reconfiguration plan.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g002.tif"/>
</fig>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Rules used to infer the status of the elements in the knowledge model, presented as decision diagrams. <bold>(a)</bold> Constraint status. <bold>(b)</bold> Component configuration status. <bold>(c)</bold> Component status. <bold>(d)</bold> Function design status. <bold>(e)</bold> Function status. <bold>(f)</bold> Action status.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g003.tif"/>
</fig>
<p>The knowledge model is presented as a conceptual data model (CDM) conforming to a particular case of the enhanced entity-relationship (EER) (<xref ref-type="bibr" rid="B37">Thalheim, 1993</xref>; <xref ref-type="bibr" rid="B38">Thalheim, 2000</xref>) model, an extension of the entity-relationship model (<xref ref-type="bibr" rid="B12">Chen, 1976</xref>) that accounts for subclassing and higher-order relationships, i.e., relations between relationships. The EER model captures information as entities, relationships, and attributes. An entity is a &#x201c;thing&#x2019; which can be distinctly identified&#x201d; (<xref ref-type="bibr" rid="B12">Chen, 1976</xref>), a relationship is an association among entities or relationships, and an attribute represents a property of an entity or relationship (<xref ref-type="bibr" rid="B37">Thalheim, 1993</xref>; <xref ref-type="bibr" rid="B38">Thalheim, 2000</xref>). In addition, entities and relationships play a role in the relationships they are part of, which is identified by the label on the arrows in <xref ref-type="fig" rid="F2">Figure 2</xref>. This CDM was selected since it supports n-ary relationships, many-to-many relationships, higher-order relationships, and attributes for both entities and relationships. <xref ref-type="sec" rid="s6-1">Section 6.1</xref> details why these representation capabilities are relevant to the proposed model. The rules are also described at a conceptual level as decision diagrams. <xref ref-type="sec" rid="s6-2">Section 6.2</xref> presents the details on how the knowledge model and rules can be implemented and executed and runtime.</p>
<sec id="s5-1">
<title>5.1 Knowledge model</title>
<p>To enable adaptation, the knowledge model captures <italic>what</italic> can be adapted with the architectural knowledge depicted in <xref ref-type="fig" rid="F2">Figure 2a</xref>; <italic>why</italic> to adapt and <italic>how</italic> to select an adaptation with the adaptation heuristics knowledge depicted in <xref ref-type="fig" rid="F2">Figure 2b</xref>; and <italic>how</italic> to execute an adaptation with the reconfiguration plan knowledge depicted in <xref ref-type="fig" rid="F2">Figure 2c</xref>. <xref ref-type="table" rid="T2">Tables 2</xref>&#x2013;<xref ref-type="table" rid="T4">4</xref> define each element in the model alongside examples based on SUAVE to ease its understanding.</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>The elements of the architectural knowledge.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left"/>
<th align="left">Name</th>
<th align="left">Definition</th>
<th align="left">Example</th>
<th align="left">Attributes</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="4" align="left">E</td>
<td align="left">Action</td>
<td align="left">&#x201c;Action is defined as an operation applied by an agent or team to affect a change in or maintain either an agent&#x2019;s state(s), the environment, or both&#x201d; (<xref ref-type="bibr" rid="B22">IEEE Approved Draft Standard for Robot Task Representation, 2024</xref>). Where in the context of this paper the agent is the robot</td>
<td align="left">An AUV can perform the <monospace>Action</monospace> <italic>search pipeline</italic>, and <italic>inspect pipeline</italic>
</td>
<td align="left">
<monospace>name:String @key</monospace> <monospace>
<inline-formula id="inf861">
<mml:math id="m861">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String is-required:Bool</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
<tr>
<td align="left">Function</td>
<td align="left">&#x201c;A function is defined by the transformation of input flows to output flows&#x201d; (<xref ref-type="bibr" rid="B6">Board, 2023</xref>), i.e., a function represents what the system can do</td>
<td align="left">An AUV can have several <monospace>Functions</monospace>, like <italic>generate search path</italic> and <italic>generate path to follow pipeline</italic>. The <italic>generate search path</italic> function can be considered a transformation of the AUV&#x2019;s current position (input) to a goal waypoint (output)</td>
<td align="left">
<monospace>name:String @key always-improve:Bool</monospace> <monospace>
<inline-formula id="inf862">
<mml:math id="m862">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String is-required:Bool</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
<tr>
<td align="left">Component</td>
<td align="left">Hardware and software parts that compose the system</td>
<td align="left">A <italic>thruster</italic> is a hardware component, and a <italic>generate spiral search path node</italic> is a software component</td>
<td align="left">
<monospace>name:String @key always-improve:Bool</monospace> <monospace>
<inline-formula id="inf863">
<mml:math id="m863">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String is-required:Bool is-active:Bool</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace> <monospace>
<inline-formula id="inf1163">
<mml:math id="m1163">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>pid:Integer</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
<tr>
<td align="left">Component Parameter</td>
<td align="left">A specific parameter configuration of a Component</td>
<td align="left">The <italic>generate spiral search path node</italic> component can be configured with different search altitudes. Each search altitude is represented as a distinct <monospace>Component Parameter</monospace>
</td>
<td align="left">
<monospace>key:String</monospace> <monospace>value:String</monospace>
</td>
</tr>
<tr>
<td rowspan="3" align="left">
<bold>R</bold>
</td>
<td align="left">funcional requirement</td>
<td align="left">Represents which <monospace>Function</monospace>s a certain <monospace>Action</monospace> requires to be performed</td>
<td align="left">The <italic>search pipeline</italic> action requires the <italic>control motion</italic>, <italic>maintain motion</italic>, <italic>localization</italic>, <italic>detect pipeline</italic>, <italic>generate search path</italic>, and <italic>coordinate mission</italic> functions</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="left">function design</td>
<td align="left">Represents a solution for a <monospace>Function</monospace> as a set of <monospace>Components</monospace> (<xref ref-type="bibr" rid="B20">Hern&#xe1;ndez et al., 2018</xref>)</td>
<td align="left">The <italic>generate search path</italic> function can have multiple <monospace>function designs</monospace>, e.g., one using the <italic>generate spiral search path node</italic> component, and another one using the <italic>generate lawnmower search path node</italic> component</td>
<td align="left">
<monospace>name:String @key priority:Integer</monospace> <monospace>
<inline-formula id="inf860">
<mml:math id="m860">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String is-selected:Bool</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
<tr>
<td align="left">component configuration</td>
<td align="left">Represents a possible configuration of a <monospace>Component</monospace> as a set of <monospace>Component Parameters</monospace>
</td>
<td align="left">The <italic>generate spiral search path node</italic> component can be configured in different ways by combining different values of its search altitude and speed parameters. Each combination is represented as an instance of a <monospace>component configuration</monospace>
</td>
<td align="left">
<monospace>name:String @key priority:Integer</monospace> <monospace>
<inline-formula id="inf859">
<mml:math id="m859">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Instances of the elements with <inline-formula id="inf854">
<mml:math id="m854">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>purple font</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> are created at runtime. Instances of the other elements are defined at design time. The &#x201c;@key&#x201d; expression after an attribute indicates that the attribute is used as a unique identifier. E stands for entity and R stands for relationship.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>The elements of the adaptation heuristic knowledge.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left"/>
<th align="left">Name</th>
<th align="left">Definition</th>
<th align="left">Example</th>
<th align="left">Attributes</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="3" align="left">E</td>
<td align="left">Measure</td>
<td align="left">&#x201c;Measure is defined as a function over observations, state variables, and parameters&#x201d;. (<xref ref-type="bibr" rid="B22">IEEE Approved Draft Standard for Robot Task Representation, 2024</xref>)</td>
<td align="left">An AUV can have the <monospace>Measures</monospace> <italic>battery level</italic> or <italic>water visibility</italic>
</td>
<td align="left">
<monospace>name:String @key</monospace>
</td>
</tr>
<tr>
<td align="left">Quality Attribute</td>
<td align="left">Quality Attribute is defined as a function over the system&#x2019;s state variables. Which, according to the Software Engineering Body of Knowledge (<xref ref-type="bibr" rid="B6">Board, 2023</xref>), can be considered as &#x201c;System functional and non-functional requirements used to evaluate the system performance&#x201d;</td>
<td align="left">An AUV can have the <monospace>Quality Attributes</monospace> <italic>battery level</italic>, <italic>battery consumption</italic>, and <italic>safety level</italic>
</td>
<td align="left">
<monospace>name:String @key</monospace>
</td>
</tr>
<tr>
<td align="left">Environmental Attribute</td>
<td align="left">Environmental Attribute is defined as a function over observations of the environment. That is, it represents a metric of the environment with respect to a certain attribute</td>
<td align="left">An underwater environment can have <italic>water visibility</italic> as an <monospace>Environmental Attribute</monospace>
</td>
<td align="left">
<monospace>name:String @key</monospace>
</td>
</tr>
<tr>
<td rowspan="4" align="left">
<bold>R</bold>
</td>
<td align="center" style="color:#800080">required action</td>
<td align="left">Represents the Actions required at runtime</td>
<td align="left">The <italic>inspect pipeline</italic> <monospace>Action</monospace> can be required to be performed at runtime, leading ROSA to configure the AUV appropriately to carry out the inspection action</td>
<td align="left" style="color:#800080">
<monospace>start-time:Datetime end-time:Datetime result:String</monospace>
</td>
</tr>
<tr>
<td align="center" style="color:#800080">measurement</td>
<td align="left">&#x201c;Measurement is defined as the act of evaluating the measures&#x201d; (<xref ref-type="bibr" rid="B22">IEEE Approved Draft Standard for Robot Task Representation, 2024</xref>)</td>
<td align="left">The <italic>battery level</italic> <monospace>Quality Attributes</monospace> can have a measurement of 0.5</td>
<td align="left" style="color:#800080">
<monospace>value:Double time:Datetime</monospace>
</td>
</tr>
<tr>
<td align="left">constraint</td>
<td align="left">Represents <monospace>Measure</monospace> constraints for performing a <monospace>Action</monospace> or for selecting a <monospace>function design, Component,</monospace> or <monospace>component configuration</monospace>
</td>
<td align="left">If the <italic>water visibility</italic> environmental attribute is low, the <italic>high altitude</italic> configuration for the <italic>generate spiral search path node</italic> cannot be selected</td>
<td align="left">
<monospace>operator:String value:Double</monospace> <monospace>
<inline-formula id="inf866">
<mml:math id="m866">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>status:String</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</monospace>
</td>
</tr>
<tr>
<td align="left">estimation</td>
<td align="left">Represents the estimated impact of a <monospace>function design, Component,</monospace> or <monospace>component configuration</monospace> on a <monospace>Measure</monospace>
</td>
<td align="left">A lamp <monospace>Component</monospace> is expected to positively impact the <italic>water visibility</italic> when turned on</td>
<td align="left">
<monospace>value:Double</monospace> <monospace>type:String</monospace>
</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Instances of the elements with <inline-formula id="inf853">
<mml:math id="m853">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>purple font</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> are created at runtime. Instances of the other elements are defined at design time. The &#x201c;@key&#x201d; expression after an attribute indicates that the attribute is used as a unique identifier. E stands for entity and R stands for relationship.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<table-wrap id="T4" position="float">
<label>TABLE 4</label>
<caption>
<p>The elements of the reconfiguration plan knowledge.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left"/>
<th align="left">Name</th>
<th align="left">Definition</th>
<th align="left">Example</th>
<th align="left">Attributes</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="4" align="left">R</td>
<td align="center" style="color:#800080">reconfiguration plan</td>
<td align="left">Represents the reconfiguration plan generated in the plan step</td>
<td align="left">When the AUV completes the <italic>search pipeline</italic> action and starts the <italic>inspect pipeline</italic> action, the <monospace>reconfiguration plan</monospace> consists of deactivating the <italic>generate spiral search path node</italic> and activating the <italic>follow pipeline node</italic>
</td>
<td align="left" style="color:#800080">
<monospace>start-time:Datetime end-time:Datetime result:String</monospace>
</td>
</tr>
<tr>
<td align="center" style="color:#800080">component activation</td>
<td align="left">Represents the components that should be activated</td>
<td align="left">When the AUV starts the <italic>inspect pipeline</italic> action, the <monospace>component activation</monospace> relates to the <italic>follow pipeline node</italic>
</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="center" style="color:#800080">component deactivation</td>
<td align="left">Represents the components that should be deactivated</td>
<td align="left">When the AUV completes the <italic>search pipeline</italic> action, the <monospace>component deactivation</monospace> relates to the <italic>generate spiral search path node</italic>
</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="center" style="color:#800080">parameter adaptation</td>
<td align="left">Represents the component parameters that should be updated</td>
<td align="left">When the water visibility changes, the <monospace>parameter adaptation</monospace> consists of a parameter adaptation of the component configuration of the <italic>generate spiral search path node</italic>
</td>
<td align="left">N/A</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn>
<p>Instances of the elements with <inline-formula id="inf852">
<mml:math id="m852">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#800080">
<mml:mtext>purple font</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> are created at runtime. Instances of the other elements are defined at design time. R stands for relationship.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<sec id="s5-1-1">
<title>5.1.1 Architectural knowledge</title>
<p>The architectural knowledge (see <xref ref-type="table" rid="T2">Table 2</xref>) captures what actions the robot can accomplish, the set of functionalities the robot needs to realize an action, the set of components required to realize a functionality, and the possible parameters for a component.</p>
<p>The architectural knowledge enables parameter adaptation by capturing each parameter configuration of a component with a distinct <monospace>component configuration</monospace> relationship, relating one <monospace>Component</monospace> to a set of <monospace>Component Parameters</monospace>. It enables structural adaptation by capturing the different possibilities for solving a system functionality as distinct <monospace>function design</monospace> relationships which relate a <monospace>Function</monospace> to a set of <monospace>Components</monospace>. It enables TACA by indirectly capturing the dependencies between the robot&#x2019;s actions and architecture with the <monospace>functional requirement</monospace> relationship which relates an <monospace>Action</monospace> to the <monospace>Functions</monospace> it requires.</p>
<p>At runtime, ROSA performs parameter adaptation by switching the selected <monospace>component configurations</monospace>. It performs structural adaptation by changing the selected <monospace>function designs</monospace> and consequently the active <monospace>Components</monospace>. The task decision layer in combination with ROSA performs TACA by selecting suitable <monospace>function designs</monospace> and <monospace>component configurations</monospace> for each <monospace>Action</monospace> the robot needs to perform, and with the task decision layer selecting different <monospace>Actions</monospace> to perform according to the feasible configurations.</p>
</sec>
<sec id="s5-1-2">
<title>5.1.2 Adaptation heuristic knowledge</title>
<p>This work considers that the robotic system might need to adapt due to changes in the environment, changes in the system&#x2019;s quality attributes (QAs) (<xref ref-type="bibr" rid="B6">Board, 2023</xref>), component failures, and changes in the robot&#x2019;s selected actions.</p>
<p>The adaptation heuristic knowledge enables adaptation due to changes in the environment or the system&#x2019;s QAs with the <monospace>constraint</monospace> relationship by capturing constraints on the selection of <monospace>Actions</monospace>, <monospace>Components, function designs</monospace>, or <monospace>component configurations</monospace> in terms of measured values of <monospace>Measures</monospace>. It enables adaptation due to component failures by capturing a <monospace>Component&#x2019;s</monospace> status as an attribute and adaptation due to changes in the robot&#x2019;s task execution by capturing what <monospace>Actions</monospace> need to be performed with the <monospace>required action</monospace> relationship. At runtime, adaptation is triggered when a measurement violates a constraint, when a component has a failure status, or when required actions change.</p>
<p>To capture the decision criteria on how to select an adaptation, the <monospace>priority</monospace> attribute can be used to express the order of priority for selecting each <monospace>function design</monospace> or <monospace>component configuration</monospace>. For more complex criteria, the <monospace>estimation</monospace> relationship can be used to capture the estimated impact of selecting a <monospace>function design</monospace>, <monospace>Component</monospace>, or <monospace>component configuration</monospace> on the measured values of <monospace>Measures</monospace>. Furthermore, a <monospace>required action</monospace> can relate to a <monospace>Measure</monospace> to indicate the preferred <monospace>estimation</monospace> when selecting a configuration for that action. At runtime, the configuration planner component exploits this knowledge to decide which configuration to select.</p>
</sec>
<sec id="s5-1-3">
<title>5.1.3 Reconfiguration plan knowledge</title>
<p>The reconfiguration plan knowledge represents which component parameters must be updated (i.e., how to execute parameter adaptation) and which components must be activated and deactivated (i.e., how to execute structural adaptation). The execute component exploits this knowledge at runtime to reconfigure the managed subsystem.</p>
</sec>
</sec>
<sec id="s5-2">
<title>5.2 Rules</title>
<p>To enable ROSA to reason about when the managed subsystem should be adapted and what type of adaptation is needed, the KB contains a set of generic rules that define how the status of the system can be inferred based on monitored information, e.g., how to infer if a constraint is violated and how to propagate a constraint violation. A change in status only occurs when measurements are updated or when a component fails. The complete status inference rules are depicted as decision diagrams in <xref ref-type="fig" rid="F3">Figure 3</xref>.</p>
<p>The status of the required <monospace>Components, Functions</monospace>, and <monospace>Actions</monospace> indicate when and what type of adaptation is needed. When a <monospace>Component</monospace> is &#x201c;unsolved&#x201d; or in &#x201c;configuration error&#x201d; (see <xref ref-type="fig" rid="F3">Figure 3c</xref>), parameter adaptation is required, i.e., a new <monospace>component configuration</monospace> needs to be selected. When a required <monospace>Function</monospace> is &#x201c;unsolved&#x201d; or in &#x201c;configuration error&#x201d; (see <xref ref-type="fig" rid="F3">Figure 3e</xref>), structural adaptation is required, i.e., a new <monospace>function design</monospace> needs to be selected. When a required <monospace>Action</monospace> is &#x201c;unfeasible&#x201d; (see <xref ref-type="fig" rid="F3">Figure 3f</xref>), TACA is needed, i.e., the task decision layer must choose a new action to perform, consequently triggering architectural adaptation.</p>
</sec>
</sec>
<sec id="s6">
<title>6 Architecture realization</title>
<p>This section details the proposed reference implementation for ROSA. First, the representation requirements imposed by the proposed knowledge model are analyzed to select a suitable knowledge representation technique. Afterward, the proposed implementation is explained.</p>
<sec id="s6-1">
<title>6.1 Representation requirements</title>
<p>The proposed knowledge model was presented as a conceptual data model (CDM) in a non-machine-readable format. To transform the knowledge model into a machine-readable format while maintaining its semantics and structure, its representation requirements must be identified and used to select a suitable technology to implement it. The representation requirements imposed by the proposed knowledge model are:<list list-type="simple">
<list-item>
<p>1. n-ary relationships: the knowledge model contains relationships with different arity<xref ref-type="fn" rid="fn4">
<sup>4</sup>
</xref>, e.g., the <monospace>constraint</monospace> relationship has arity 5, and the <monospace>measurement</monospace> relationship has arity 1;</p>
</list-item>
<list-item>
<p>2. many-to-many relationships: the knowledge model contains relationships with different cardinalities<xref ref-type="fn" rid="fn5">
<sup>5</sup>
</xref>, e.g., <monospace>function design</monospace> is a 1 <monospace>Function</monospace>-to-many <monospace>Components</monospace> relationship;</p>
</list-item>
<list-item>
<p>3. higher-order relationships: some relationships relate relationships to relationships, e.g., the <monospace>constraint</monospace> relationship;</p>
</list-item>
<list-item>
<p>4. attributes for entities and relationships: both entities and relationships have attributes, e.g., the <monospace>Action</monospace> entity and the <monospace>constraint</monospace> relationship.</p>
</list-item>
</list>
</p>
<p>These requirements limit which technology can be used. For example, technologies using graph-based or descriptive logic-based knowledge representation techniques (e.g., OWL (<xref ref-type="bibr" rid="B3">Antoniou and van Harmelen, 2004</xref>)) do not satisfy the representation requirements above apart from allowing attributes for entities (part of Requirement 4). Although it is possible to transform the proposed knowledge model into one that can be represented with graph-based or description logic-based approaches by reifying the model (<xref ref-type="bibr" rid="B33">Oliv&#xe9;, 2007</xref>), each reification applied to the original model can be considered as an introduction of a semantic disparity between the CDM and the machine-readable model, making it harder to understand and reuse it. Thus, this work does not consider applying reification.</p>
<p>A technology that satisfies all representation requirements is TypeDB (<xref ref-type="bibr" rid="B14">Dorn and Pribadi, 2023</xref>; <xref ref-type="bibr" rid="B15">2024</xref>). TypeDB is a polymorphic database based on type theory that implements the polymorphic entity-relation-attribute (PERA) (<xref ref-type="bibr" rid="B15">Dorn and Pribadi, 2024</xref>) data model. The PERA model subsumes the CDM used as the meta-model for the proposed ROSA model, allowing it to be implemented without modifications. Furthermore, TypeDB has a reasoning system that is able to reason over rules of the form <monospace>antecedent</monospace> <inline-formula id="inf11">
<mml:math id="m11">
<mml:mrow>
<mml:mo>&#x21d2;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <monospace>consequent</monospace> to infer new facts at query time. Where <monospace>antecedent</monospace> represents a precondition for inferring the <monospace>consequent</monospace> and is expressed as a first-order logic expression combining elements from the model (i.e., entities, relationships, and individuals), and the <monospace>consequent</monospace> is a single new fact inferred when the <monospace>antecedent</monospace> holds true. The ROSA model rules presented in <xref ref-type="fig" rid="F3">Figure 3</xref> can be implemented with TypeDB without modifications. For these reasons, this work uses TypeDB to implement the proposed knowledge model and rules.</p>
</sec>
<sec id="s6-2">
<title>6.2 Implementation</title>
<p>ROSA is implemented as a ROS 2-based system, where the MAPE-K components (depicted in <xref ref-type="fig" rid="F1">Figure 1</xref>) are realized as ROS nodes, and interfaces are implemented using ROS services or topics. The proposed ROSA implementation uses ROS (Robot Operating System) as its robotics framework since ROS is the current <italic>de facto</italic> standard robotics framework, and it has been designed, among other things, to promote software reusability in the robotics ecosystem (<xref ref-type="bibr" rid="B28">Macenski et al., 2022</xref>). In this implementation, ROS handles the communication between system components, schedules callbacks for incoming messages and events, and manages the lifecycle of ROS nodes. The full ROSA implementation is available at <ext-link ext-link-type="uri" xlink:href="https://github.com/kas-lab/rosa">https://github.com/kas-lab/rosa</ext-link>
<xref ref-type="fn" rid="fn6">
<sup>6</sup>
</xref>.</p>
<sec id="s6-2-1">
<title>6.2.1 Knowledge base and analyze</title>
<p>The KB component consists of the TypeDB implementation of the proposed knowledge model and inference rules, the ROS interfaces for communicating with the MAPE components, and the logic to manage <inline-formula id="inf16">
<mml:math id="m16">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge which is stored in a TypeDB database. In this reference ROSA implementation, TypeDB&#x2019;s reasoner fulfills the role of the analyze component, executing <inline-formula id="inf17">
<mml:math id="m17">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s inference rules (<xref ref-type="fig" rid="F3">Figure 3</xref>) to infer new data when the KB is queried. Thus, since TypeDB&#x2019;s reasoner is part of TypeDB, there is no separate analyze component.</p>
<sec id="s6-2-1-1">
<title>6.2.1.1 Knowledge model and rules</title>
<p>To exemplify how the knowledge model is implemented, <xref ref-type="statement" rid="Listing_1">Listing 1</xref> depicts how the <monospace>functional-requirement</monospace> relationship and the <monospace>Action</monospace> entity are defined with TypeQL (TypeDB&#x2019;s query language). Line 1 defines the <monospace>functional-requirement</monospace> relationship, and lines 2-3 define that it can relate elements that play the role of actions and required-functions. Lines 4-6 define the <monospace>Action</monospace> entity and that it has the attributes &#x201c;action-name&#x201d; (its unique identifier) and &#x201c;action-status&#x201d;. Lines 7-8 define that it can play the action role in a <monospace>functional-requirement</monospace> relationship and the constrained role in a <monospace>constraint</monospace> relationship.</p>
<p> <statement content-type="listing" id="Listing_1">
<label>Listing 1</label>
<p>TypeQL query to define functional-requirement and Action.</p>
<p>
<list list-type="simple">
<list-item>
<p>functional&#x2212;requirement <inline-formula id="inf70">
<mml:math id="m70">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>sub</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf71">
<mml:math id="m71">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>relation</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf72">
<mml:math id="m72">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>relates</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> action,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf73">
<mml:math id="m73">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>relates</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> required&#x2212;function;</p>
</list-item>
<list-item>
<p>Action <inline-formula id="inf74">
<mml:math id="m74">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>sub</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf75">
<mml:math id="m75">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>entity</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf76">
<mml:math id="m76">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>owns</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> action&#x2212;name <inline-formula id="inf77">
<mml:math id="m77">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#F79646">
<mml:mtext>@key</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf78">
<mml:math id="m78">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>owns</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> action&#x2212;status,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf79">
<mml:math id="m79">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>plays</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> functional&#x2212;requirement:action,</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf80">
<mml:math id="m80">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>plays</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> constraint:constrained;</p>
</list-item>
</list>
</p>
</statement>
</p>
<p>
<xref ref-type="statement" rid="Listing_2">Listing 2</xref> exemplifies how the inference rules are implemented with TypeQL. The component-status-configuration-error rule defines that a Component has a &#x201c;configuration error&#x201d; status when it is required, it does not have an &#x201c;unfeasible&#x201d; or &#x201c;failure&#x201d; status, and it is in a component-configuration relationship that is selected and has an &#x201c;unfeasible&#x201d; status (see <xref ref-type="fig" rid="F3">Figure 3c</xref>).</p>
<p>
<statement content-type="listing" id="Listing_2">
<label>Listing 2</label>
<p>TypeQL rule to infer whether a component is in &#x201c;configuration error&#x201d;.</p>
<p>
<list list-type="simple">
<list-item>
<p>
<inline-formula id="inf81">
<mml:math id="m81">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>rule</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2003;component&#x2212;status&#x2212;configuration&#x2212;error:</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf82">
<mml:math id="m82">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>when {</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf83">
<mml:math id="m83">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf84">
<mml:math id="m84">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2003;Component, <inline-formula id="inf85">
<mml:math id="m85">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2003;is&#x2212;required true;</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf86">
<mml:math id="m86">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>not {</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf87">
<mml:math id="m87">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf157">
<mml:math id="m157">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>status <inline-formula id="inf88">
<mml:math id="m88">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c_status</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf89">
<mml:math id="m89">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c_status</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> like <inline-formula id="inf90">
<mml:math id="m90">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mo>&#x201c;</mml:mo>
<mml:mtext>unfeasible&#x7c;failure</mml:mtext>
<mml:mo>&#x201d;</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf91">
<mml:math id="m91">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mo>}</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(component: <inline-formula id="inf92">
<mml:math id="m92">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>) <inline-formula id="inf93">
<mml:math id="m93">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>component&#x2212;configuration,</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf94">
<mml:math id="m94">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>is&#x2212;selected true,</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf95">
<mml:math id="m95">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>status <inline-formula id="inf96">
<mml:math id="m96">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mo>&#x201c;</mml:mo>
<mml:mtext>unfeasible</mml:mtext>
<mml:mo>&#x201d;</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf97">
<mml:math id="m97">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>} then {</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;<inline-formula id="inf98">
<mml:math id="m98">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$c</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf99">
<mml:math id="m99">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>status <inline-formula id="inf100">
<mml:math id="m100">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mo>&#x201c;</mml:mo>
<mml:mtext>configuration error</mml:mtext>
<mml:mo>&#x201d;</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf101">
<mml:math id="m101">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>}</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
</list>
</p>
</statement>
</p>
</sec>
<sec id="s6-2-1-2">
<title>6.2.1.2 Interfaces</title>
<p>The KB component abstracts the details of interacting with TypeDB with the ROS interfaces it implements, enabling the MAPE components to read and write knowledge via the interfaces described in <xref ref-type="table" rid="T5">Table 5</xref>. When the MAPE components request or send data to the KB component via these interfaces, the KB component queries the TypeDB database to retrieve or write knowledge. For example, when the task decision layer calls the selectable service <italic>/action/selectable</italic> to retrieve the name of the selectable <monospace>Actions</monospace> (i.e., actions that do not have an &#x201c;unfeasible&#x201d; status), the KB component performs the TypeQL query depicted in <xref ref-type="statement" rid="Listing_3">Listing 3</xref> to retrieve the name (unique identifiers) of the selectable <monospace>Actions</monospace>. When data is written in the KB, the KB component publishes a message in the <italic>/events</italic> topic specifying which type of data was written, i.e., &#x201c;monitoring data&#x201d;, &#x201c;action update&#x201d;, &#x201c;reconfiguration plan&#x201d;. Additionally, the KB component provides the <italic>/query</italic> service, which can be used to perform <italic>any</italic> TypeDB query to the database. It is not used in ROSA&#x2019;s runtime workflow, but it enables users to perform custom queries, for example, to retrieve all reconfiguration plans that were executed.</p>
<table-wrap id="T5" position="float">
<label>TABLE 5</label>
<caption>
<p>ROS interfaces.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th colspan="3" align="left">Topics</th>
</tr>
<tr>
<th align="left">Publisher</th>
<th align="left">Subscriber</th>
<th align="left">Name</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="3" align="left">KB</td>
<td align="left">Configuration planner</td>
<td rowspan="3" align="left">
<inline-formula id="inf18">
<mml:math id="m18">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/events</td>
</tr>
<tr>
<td align="left">Execute</td>
</tr>
<tr>
<td align="left">Task decision layer</td>
</tr>
<tr>
<td align="left">Monitor nodes</td>
<td align="left">KB</td>
<td align="left">/diagnostics</td>
</tr>
</tbody>
</table>
<table>
<thead valign="top">
<tr>
<th colspan="3" align="left">Services</th>
</tr>
<tr>
<th align="left">Server</th>
<th align="left">Client</th>
<th align="left">Name</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="14" align="left">KB</td>
<td rowspan="7" align="left">Configuration planner</td>
<td align="left">
<inline-formula id="inf19">
<mml:math id="m19">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/function/adaptable</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf20">
<mml:math id="m20">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/function_designs/selectable</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf21">
<mml:math id="m21">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/function_designs/priority</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf22">
<mml:math id="m22">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/component/adaptable</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf23">
<mml:math id="m23">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/component_configuration/selectable</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf24">
<mml:math id="m24">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/component_configuration/priority</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf25">
<mml:math id="m25">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/select_configuration</td>
</tr>
<tr>
<td rowspan="4" align="left">Execute</td>
<td align="left">
<inline-formula id="inf26">
<mml:math id="m26">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/reconfiguration_plan/get_latest</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf27">
<mml:math id="m27">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/reconfiguration_plan/result/set</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf28">
<mml:math id="m28">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/component/active/set</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf29">
<mml:math id="m29">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/component_parameters/get</td>
</tr>
<tr>
<td rowspan="2" align="left">Task decision layer</td>
<td align="left">
<inline-formula id="inf30">
<mml:math id="m30">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/action/selectable</td>
</tr>
<tr>
<td align="left">
<inline-formula id="inf31">
<mml:math id="m31">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/action/request</td>
</tr>
<tr>
<td align="left">User</td>
<td align="left">
<inline-formula id="inf32">
<mml:math id="m32">
<mml:mrow>
<mml:mo>&#x223c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>/query</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>
<statement content-type="listing" id="Listing_3">
<label>Listing 3</label>
<p>TypeDB query to fetch selectable actions&#x2019; names.</p>
<p>
<list list-type="simple">
<list-item>
<p>
<inline-formula id="inf102">
<mml:math id="m102">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>match</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf103">
<mml:math id="m103">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf104">
<mml:math id="m104">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>Action, <inline-formula id="inf105">
<mml:math id="m105">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>name <inline-formula id="inf106">
<mml:math id="m106">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$name</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf107">
<mml:math id="m107">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>not {</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
<inline-formula id="inf108">
<mml:math id="m108">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf109">
<mml:math id="m109">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>status <inline-formula id="inf110">
<mml:math id="m110">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mo>&#x201c;</mml:mo>
<mml:mtext>unfeasible</mml:mtext>
<mml:mo>&#x201d;</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;<inline-formula id="inf111">
<mml:math id="m111">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mo>}</mml:mo>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf112">
<mml:math id="m112">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>fetch</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf113">
<mml:math id="m113">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$name</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>;</p>
</list-item>
</list>
</p>
</statement>
</p>
</sec>
</sec>
<sec id="s6-2-2">
<title>6.2.2 Monitor</title>
<p>
<inline-formula id="inf33">
<mml:math id="m33">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s implementation does not provide generic monitor nodes. They should be implemented as needed for each application with the requirement that they publish the monitored information in the <italic>/diagnostics</italic> topic<xref ref-type="fn" rid="fn7">
<sup>7</sup>
</xref> with the standard ROS <italic>DiagnosticArray</italic> message format. When a monitor node sends measurement updates to the KB, the message field in the <italic>DiagnosticStatus</italic> message needs to be set to &#x201c;QA measurement&#x201d; or &#x201c;EA measurement&#x201d;, and when sending component status updates (e.g., that the component is in failure), the message field must be set to &#x201c;Component status&#x201d;. When the KB receives monitoring data, it sends an event message in the &#x201c;/events&#x201d; topic to inform that monitoring data was written in the KB.</p>
</sec>
<sec id="s6-2-3">
<title>6.2.3 Configuration planner</title>
<p>The configuration planner component selects the configurations (i.e., <monospace>function designs</monospace> or <monospace>component configuration</monospace>) with the highest priority. When the configuration planner receives an event message indicating that monitoring data was written in the KB or that there was an update in the required actions, it calls the services &#x201c;/function/adaptable&#x201d; and &#x201c;/component/adaptable&#x201d; to check which <monospace>Functions</monospace> and <monospace>Components</monospace> must be adapted. Then, it calls the services &#x201c;/function/selectable&#x201d; and &#x201c;/component/selectable&#x201d; to check which <monospace>function designs</monospace> and <monospace>component configurations</monospace> are available for the <monospace>Functions</monospace> and <monospace>Components</monospace> that need to be adapted. Finally, the configuration planner selects the <monospace>function designs</monospace> and <monospace>component configurations</monospace> with the highest priority and informs the KB about the newly selected configuration by calling the service &#x201c;/select_configuration&#x201d;. When this service is called, the KB component checks the current state of the robot, creates a <monospace>reconfiguration plan</monospace> to bring the robot to the goal configuration, and sends an event message in the &#x201c;/events&#x201d; topic to inform that there is a new reconfiguration plan available.</p>
</sec>
<sec id="s6-2-4">
<title>6.2.4 Execute</title>
<p>In ROS-based systems, software components are realized either as ROS nodes or as a particular type of ROS nodes called <italic>lifecycle</italic> nodes. The difference between both is that the latter can be set to different states at runtime, such as <italic>active</italic> and <italic>inactive</italic>, and the former cannot. To enable ROSA to leverage ROS 2 mechanisms to adapt the system, the knowledge model was extended to capture knowledge about ROS 2 components as depicted in <xref ref-type="fig" rid="F4">Figure 4</xref>. The execute component performs structural adaptation by starting or killing ROS nodes or switching the state of lifecycle nodes to active or inactive, and it performs parameter adaptation by calling the ROS&#x2019;s parameter API to change the ROS nodes&#x2019; parameters at runtime.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>ROS specific knowledge.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g004.tif"/>
</fig>
<p>When the execute component receives an event message indicating that a new reconfiguration plan was added to the KB, it calls the service &#x201c;/reconfiguration_plan/get_latest&#x201d; to get the latest <monospace>reconfiguration plan</monospace>. Then, it adapts the robot&#x2019;s architecture according to the reconfiguration plan. Finally, it calls the services &#x201c;/reconfiguration_plan/result/set&#x201d; and &#x201c;/component/active/set&#x201d; to update the KB with the result of the reconfiguration plan and which components are active.</p>
</sec>
<sec id="s6-2-5">
<title>6.2.5 Task decision layer</title>
<p>
<inline-formula id="inf34">
<mml:math id="m34">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s implementation provides an integration for the task decision layer for both PDDL-based planners and BTs, which are implemented leveraging the PlanSys2 (<xref ref-type="bibr" rid="B29">Mart&#xed;n et al., 2021</xref>) and the BehaviorTree.CPP<xref ref-type="fn" rid="fn8">
<sup>8</sup>
</xref> packages, respectively.</p>
<sec id="s6-2-5-1">
<title>6.2.5.1 Planning</title>
<p>To enable task decision-making and execution with PDDL-based planners in combination with ROSA, the planner and plan executor must consider the runtime feasibility of performing the robot&#x2019;s actions as inferred by the KB component. This work maps the action status from <inline-formula id="inf35">
<mml:math id="m35">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model to PDDL by capturing whether the action&#x2019;s status is feasible as a PDDL predicate of the form &#x201c;<italic>action_feasible ?action</italic>&#x201d; and using it as a precondition to select the respective action. An example can be seen in <xref ref-type="statement" rid="Listing_4">Listing 4</xref> where the action <italic>my_action</italic> can only be selected when it does not have an &#x201c;unfeasible&#x201d; status in the KB. At runtime, if an action becomes unfeasible during execution, the plan executor triggers re-planning to generate a new action plan. This results in task execution adaptation and, if the newly selected actions require a different architectural configuration, also in architectural adaptation, i.e., TACA.</p>
<p>
<statement content-type="listing" id="Listing_4">
<label>Listing 4</label>
<p>PDDL formulation example for ROSA.</p>
<p>
<list list-type="simple">
<list-item>
<p>(<inline-formula id="inf114">
<mml:math id="m114">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:durative&#x2212;action</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>my_action</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf115">
<mml:math id="m115">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:parameters</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf116">
<mml:math id="m116">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2212; action...)</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf117">
<mml:math id="m117">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:duration</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(...)</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf118">
<mml:math id="m118">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:condition</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf119">
<mml:math id="m119">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>and</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf120">
<mml:math id="m120">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>over all</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(my_action_action <inline-formula id="inf121">
<mml:math id="m121">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf1290">
<mml:math id="m1290">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>over all</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(action feasible <inline-formula id="inf123">
<mml:math id="m123">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;...</p>
</list-item>
<list-item>
<p>&#x2003;)</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf124">
<mml:math id="m124">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:effect</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf125">
<mml:math id="m125">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>and</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>...)</p>
</list-item>
<list-item>
<p>)</p>
</list-item>
</list>
</p>
</statement>
</p>
<p>To handle the interaction between PlanSys2 and <inline-formula id="inf36">
<mml:math id="m36">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s KB, this work provides a custom ROS 2 node called <italic>RosaPlanner</italic> and a custom PlanSys2 action called <italic>RosaAction</italic>. The <italic>RosaPlanner</italic> is responsible for querying the KB and updating the PDDL problem formulation with information on whether the ROSA actions are feasible or not using the aforementioned &#x201c;<italic>action_feasible ?action</italic>&#x201d; PDDL predicate. The <italic>RosaAction</italic> action is responsible for querying the KB to request or cancel an <monospace>Action</monospace> when the execution of an action starts or finishes. Each PlanSys2 action that should be managed by ROSA should derive from <italic>RosaAction</italic>, and it should implement the logic for the specific action execution.</p>
</sec>
<sec id="s6-2-5-2">
<title>6.2.5.2 Behavior trees</title>
<p>To enable task decision-making and execution with BTs in combination with ROSA, the BTs must consider the runtime feasibility of performing the robot&#x2019;s actions as inferred by the KB component. This work proposes adding before action nodes a condition node that queries the KB to ask whether the following action is feasible. The proposed pattern is depicted in <xref ref-type="fig" rid="F5">Figure 5</xref>, where the action <italic>MyAction</italic> would only be executed when its status in the KB is not &#x201c;unfeasible&#x201d;.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>BT pattern for TACA with ROSA. The <italic>IsActionFeasible</italic> condition node takes the action name as a parameter. The <italic>MyAction</italic> node derives from the proposed <italic>RosaAction</italic> node and implements the action execution. The action names in the BT must match the names defined in the KB.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g005.tif"/>
</fig>
<p>To enable the use of the BehaviorTree.CPP package to implement BTs for ROSA and abstract away the interactions with the KB, this work implements a reusable custom condition node called <italic>IsActionFeasible</italic> and a custom action node called <italic>RosaAction</italic>. The condition node queries the KB to check whether an <monospace>Action</monospace> is feasible before selecting it to be executed, and the action node queries the KB to request or cancel an <monospace>Action</monospace> when the execution of an action starts or finishes, respectively.</p>
</sec>
</sec>
</sec>
</sec>
<sec id="s7">
<title>7 Evaluation</title>
<p>This section evaluates ROSA to answer the following questions:<list list-type="simple">
<list-item>
<p>
<inline-formula id="inf37">
<mml:math id="m37">
<mml:mrow>
<mml:mo>&#x2022;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>Feasibility</italic>: Is it feasible to use ROSA to enable runtime TACA in ROS 2-based robotic systems?</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf38">
<mml:math id="m38">
<mml:mrow>
<mml:mo>&#x2022;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>Performance</italic>: How does ROSA perform compared to other managing subsystems for ROS 2-based systems?</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf39">
<mml:math id="m39">
<mml:mrow>
<mml:mo>&#x2022;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>Reusability</italic>: To what extent can <inline-formula id="inf40">
<mml:math id="m40">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model capture the knowledge required for TACA?</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf41">
<mml:math id="m41">
<mml:mrow>
<mml:mo>&#x2022;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>Development effort</italic>: What is the development effort of using ROSA for adding adaptation to different robotic systems and how does it compare to other approaches?</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf42">
<mml:math id="m42">
<mml:mrow>
<mml:mo>&#x2022;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> <italic>Development effort scalability</italic>: How does the development effort of using ROSA for adding adaptation to robotic systems scale for more complex systems?</p>
</list-item>
</list>
</p>
<sec id="s7-1">
<title>7.1 Experimental design</title>
<sec id="s7-1-1">
<title>7.1.1 Feasibility</title>
<p>To evaluate the feasibility of applying ROSA at runtime to enable TACA in ROS 2-based robotic systems, it was applied to the SUAVE exemplar described in <xref ref-type="sec" rid="s2">Section 2</xref>. SUAVE was selected since, to the best of our knowledge, it is the only ROS 2-based open-source exemplar for self-adaptive robotic systems.</p>
</sec>
<sec id="s7-1-2">
<title>7.1.2 Performance</title>
<p>To evaluate <inline-formula id="inf43">
<mml:math id="m43">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s performance, metrics were collected with the SUAVE exemplar. The metrics collected were the ones available in SUAVE, <italic>search time</italic> and <italic>distance of the pipeline inspected</italic>, in addition to the <italic>reaction time</italic> metric introduced in this paper. For the original use case, the experiments were performed with no managing subsystem, with a BT managing system, with Metacontrol<xref ref-type="fn" rid="fn9">
<sup>9</sup>
</xref>, and with ROSA. For the extended use case, the experiments were performed with a BT managing system and with ROSA.</p>
</sec>
<sec id="s7-1-3">
<title>7.1.3 Reusability</title>
<p>To evaluate to what extent ROSA&#x2019;s knowledge model can capture the knowledge required for TACA, it was used to model the TACA scenarios presented by <xref ref-type="bibr" rid="B10">C&#xe1;mara et al. (2020)</xref> and <xref ref-type="bibr" rid="B9">Braberman et al. (2017)</xref>
<xref ref-type="fn" rid="fn10">
<sup>10</sup>
</xref>, and we showcase how the captured knowledge can be exploited to enable TACA. The experimental setup for both scenarios is not publicly available. Thus, it was not possible to apply ROSA at runtime to the simulated environments they used.</p>
</sec>
<sec id="s7-1-4">
<title>7.1.4 Development effort</title>
<p>To evaluate the development effort of using ROSA to enable adaptation in robotic systems, we analyze the number of elements contained in the ROSA model created to solve the use cases described in this paper. Furthermore, we compare it to the number of elements modeled with the BT approach to solve the SUAVE use case.</p>
</sec>
<sec id="s7-1-5">
<title>7.1.5 Development effort scalability</title>
<p>To analyze how <inline-formula id="inf44">
<mml:math id="m44">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s development effort scales for more complex use cases, we showcase how many elements must be modeled in <inline-formula id="inf45">
<mml:math id="m45">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s model to include structural and parameter adaptation in a hypothetical adaptation scenario.</p>
<p>The experimental setup for the <italic>Feasibility</italic> and <italic>Performance</italic> evaluation is open source and reproducible, it can be found at <ext-link ext-link-type="uri" xlink:href="https://github.com/kas-lab/suave_rosa">https://github.com/kas-lab/suave_rosa</ext-link>. The models designed to evaluate <italic>Reusability</italic> can be found at <ext-link ext-link-type="uri" xlink:href="https://github.com/kas-lab/rosa_examples">https://github.com/kas-lab/rosa_examples</ext-link>.</p>
</sec>
</sec>
<sec id="s7-2">
<title>7.2 Feasibility</title>
<sec id="s7-2-1">
<title>7.2.1 Experimental setup</title>
<p>To solve the adaptation scenarios of the SUAVE exemplar with ROSA, the model depicted in <xref ref-type="fig" rid="F6">Figure 6</xref> was created.</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>ROSA model for SUAVE.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g006.tif"/>
</fig>
<p>
<italic>Thruster failure</italic> <inline-formula id="inf46">
<mml:math id="m46">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> was solved with structural adaptation by including two possible <monospace>function designs</monospace> of the <italic>maintain motion</italic> function. <italic>Runtime behavior:</italic> when a thruster fails, the <italic>maintain</italic> function design status is set to unfeasible (see <xref ref-type="fig" rid="F3">Figure 3d</xref>), and it cannot be selected anymore. Then, the <italic>recover</italic> function design is selected, and the <italic>recover thruster node</italic> component is activated. If all thrusters are recovered, the <italic>maintain</italic> function design status becomes feasible and is selected again.</p>
<p>
<italic>Changing water visibility</italic> <inline-formula id="inf47">
<mml:math id="m47">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> was addressed with parameter adaptation by including three <monospace>component configurations</monospace> for the <italic>generate spiral node</italic>, each representing a different altitude for searching for the pipeline. Furthermore, a <italic>water visibility</italic> <monospace>constraint</monospace> was added to each configuration, representing the minimum water visibility in which the configuration can be used. <italic>Runtime behavior:</italic> if the measured water visibility is higher than 3.25, the component configuration <italic>High</italic> is selected since it has priority number one. If the water visibility drops below 3.25, its constraint status is set to violated (see <xref ref-type="fig" rid="F3">Figure 3a</xref>), and, consequently, its status is set to unfeasible (see <xref ref-type="fig" rid="F3">Figure 3b</xref>). Depending on the water visibility, the component configuration <italic>Medium</italic> or <italic>Low</italic> is then selected. If the water visibility increases again above 3.25, the <italic>High</italic> component configuration status becomes feasible and is selected.</p>
<p>
<italic>Critical battery level</italic> <inline-formula id="inf48">
<mml:math id="m48">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, occurring only in the extended SUAVE use case, was solved with TACA by extending the knowledge model with a <italic>recharge</italic> action, and a <italic>battery level</italic> <monospace>constraint</monospace> to the <italic>search pipeline</italic> and <italic>inspect pipeline</italic> actions, representing the minimum battery level at which they can be selected. <italic>Runtime behavior:</italic> when the battery level drops below 0.25, the status of both the <italic>search pipeline</italic> and <italic>inspect pipeline</italic> actions is set to unfeasible, and the task decision layer cannot select them anymore. Therefore, the task decision layer selects the <italic>recharge</italic> action which also triggers structural adaptation.</p>
<p>Note that extending the solution to solve SUAVE&#x2019;s extended version only required the inclusion of additional knowledge of the <italic>recharge</italic> action and the <monospace>constraint</monospace> to the <italic>search pipeline</italic> and <italic>inspect pipeline</italic> actions. This demonstrates that an existing application modeled with ROSA can easily be extended to solve additional adaptation scenarios.</p>
<p>To apply ROSA in simulation to the SUAVE exemplar, the knowledge model depicted in <xref ref-type="fig" rid="F6">Figure 6</xref> was implemented with TypeDB (see an example in <xref ref-type="statement" rid="Listing_5">Listing 5</xref>), and the AUV&#x2019;s mission was implemented with the BT depicted in <xref ref-type="fig" rid="F7">Figure 7</xref> as well with the PDDL formulation partially shown in <xref ref-type="statement" rid="Listing_6">Listing 6</xref>.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption>
<p>Behavior tree for the extended SUAVE use case.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g007.tif"/>
</fig>
<p>
<statement content-type="listing" id="Listing_5">
<label>Listing 5</label>
<p>Snippet of SUAVE&#x2019;s use case implementation in TypeDB.</p>
<p>
<list list-type="simple">
<list-item>
<p>
<italic>
<inline-formula id="inf126">
<mml:math id="m126">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#0341BD">
<mml:mtext>&#x23; Action search pipeline</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</italic>
</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf127">
<mml:math id="m127">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$a_search_pipeline</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf128">
<mml:math id="m128">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>Action, <inline-formula id="inf129">
<mml:math id="m129">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>action&#x2212;name</p>
</list-item>
<list-item>
<p>&#x2003;&#x201c;<inline-formula id="inf130">
<mml:math id="m130">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mtext>search_pipeline</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x201d;;</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf131">
<mml:math id="m131">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$f_generate_search_path</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> <inline-formula id="inf132">
<mml:math id="m132">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>Function, <inline-formula id="inf133">
<mml:math id="m133">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>has</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>function&#x2212;name</p>
</list-item>
<list-item>
<p>&#x2003;<italic>&#x201c;<inline-formula id="inf134">
<mml:math id="m134">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#C8CC16">
<mml:mtext>generate_search_path</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x201d;</italic>;</p>
</list-item>
<list-item>
<p>
<italic>
<inline-formula id="inf135">
<mml:math id="m135">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#0341BD">
<mml:mtext>&#x23; functional&#x2212;requirement relationship</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</italic>
</p>
</list-item>
<list-item>
<p>(action: <inline-formula id="inf136">
<mml:math id="m136">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$a_search_pipeline</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>required&#x2212;function: <inline-formula id="inf137">
<mml:math id="m137">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$f_generate_search_path</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>required&#x2212;function: <inline-formula id="inf138">
<mml:math id="m138">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>$f_maintain_motion</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>)</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf139">
<mml:math id="m139">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>isa</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> functional&#x2212;requirement;</p>
</list-item>
</list>
</p>
</statement>
</p>
</sec>
<sec id="s7-2-2">
<title>7.2.2 Result</title>
<p>During the mission execution, the AUV was able to overcome all uncertainties: adapting to thruster failures <inline-formula id="inf49">
<mml:math id="m49">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> with structural adaptation, to changing water visibility <inline-formula id="inf50">
<mml:math id="m50">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> with parameter adaptation, and to an unexpected drop in the battery level <inline-formula id="inf51">
<mml:math id="m51">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> with TACA, demonstrating the feasibility of using ROSA to enable runtime TACA in ROS 2-based robotic systems.</p>
<p>
<statement content-type="listing" id="Listing_6">
<label>Listing 6</label>
<p>Snippet of the PDDL domain formulation for SUAVE containing the search pipeline action definition.</p>
<p>
<list list-type="simple">
<list-item>
<p>(<inline-formula id="inf140">
<mml:math id="m140">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:durative&#x2212;action</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>search_pipeline</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf141">
<mml:math id="m141">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:parameters</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf142">
<mml:math id="m142">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2212; action <inline-formula id="inf143">
<mml:math id="m143">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?p</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>&#x2212; pipeline <inline-formula id="inf144">
<mml:math id="m144">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?r</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula> &#x2212; robot)</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf145">
<mml:math id="m145">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:condition</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf146">
<mml:math id="m146">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>and</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf147">
<mml:math id="m147">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>over all</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(robot_started <inline-formula id="inf148">
<mml:math id="m148">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?r</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf149">
<mml:math id="m149">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>over all</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(search_pipeline_action <inline-formula id="inf150">
<mml:math id="m150">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf151">
<mml:math id="m151">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>over all</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(action_feasible <inline-formula id="inf152">
<mml:math id="m152">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?a</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;)</p>
</list-item>
<list-item>
<p>&#x2003;<inline-formula id="inf153">
<mml:math id="m153">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>:effect</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf154">
<mml:math id="m154">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>and</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>&#x2003;&#x2003;(<inline-formula id="inf155">
<mml:math id="m155">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="#31849B">
<mml:mtext>at end</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>(pipeline_found <inline-formula id="inf156">
<mml:math id="m156">
<mml:mrow>
<mml:mstyle displaystyle="false" mathcolor="red">
<mml:mtext>?p</mml:mtext>
</mml:mstyle>
</mml:mrow>
</mml:math>
</inline-formula>))</p>
</list-item>
<list-item>
<p>&#x2003;)</p>
</list-item>
<list-item>
<p>)</p>
</list-item>
<list-item>
<p>...</p>
</list-item>
</list>
</p>
</statement>
</p>
</sec>
</sec>
<sec id="s7-3">
<title>7.3 Performance</title>
<sec id="s7-3-1">
<title>7.3.1 Experimental setup</title>
<p>To evaluate <inline-formula id="inf52">
<mml:math id="m52">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s performance, the SUAVE exemplar was configured with the same parameters as described in the SUAVE paper (<xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>). In addition, for the extended use case, the battery was set to discharge within 200 s, and the <italic>search pipeline</italic> and <italic>inspect pipeline</italic> actions were set to require at least 25% of battery to be performed.</p>
</sec>
<sec id="s7-3-2">
<title>7.3.2 Results</title>
<p>The results obtained are shown in <xref ref-type="table" rid="T6">Table 6</xref>. The different managed subsystems had similar performance despite the difference in their reaction time. Furthermore, since the performance with ROSA was better than without a managing subsystem and close to the other managing subsystems, it can be considered as additional evidence of the feasibility of applying it at runtime to enable self-adaptation in robotic systems.</p>
<table-wrap id="T6" position="float">
<label>TABLE 6</label>
<caption>
<p>Mission results.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left">Managing system</th>
<th rowspan="2" align="left">Number of runs</th>
<th colspan="2" align="left">Search time (s)</th>
<th colspan="2" align="left">Distance inspected (s)</th>
<th colspan="3" align="left">Mean reaction time (s)</th>
</tr>
<tr>
<th align="left">Mean</th>
<th align="left">Std dev</th>
<th align="left">Mean</th>
<th align="left">Std dev</th>
<th align="left">U1</th>
<th align="left">U2</th>
<th align="left">U3</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td colspan="9" align="left">SUAVE</td>
</tr>
<tr>
<td align="left">&#x2003;None</td>
<td align="left">100</td>
<td align="left">174.75</td>
<td align="left">36.00</td>
<td align="left">33.20</td>
<td align="left">13.49</td>
<td align="left">N/A</td>
<td align="left">N/A</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="left">&#x2003;BT</td>
<td align="left">100</td>
<td align="left">84.09</td>
<td align="left">26.41</td>
<td align="left">62.70</td>
<td align="left">7.78</td>
<td align="left">0.08</td>
<td align="left">0.10</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="left">&#x2003;Metacontrol</td>
<td align="left">100</td>
<td align="left">89.24</td>
<td align="left">35.57</td>
<td align="left">60.57</td>
<td align="left">11.17</td>
<td align="left">1.55</td>
<td align="left">0.82</td>
<td align="left">N/A</td>
</tr>
<tr>
<td align="left">&#x2003;<bold>ROSA</bold>
</td>
<td align="left">
<bold>100</bold>
</td>
<td align="left">
<bold>85.11</bold>
</td>
<td align="left">
<bold>32.48</bold>
</td>
<td align="left">
<bold>60.76</bold>
</td>
<td align="left">
<bold>10.29</bold>
</td>
<td align="left">
<bold>1.24</bold>
</td>
<td align="left">
<bold>1.57</bold>
</td>
<td align="left">
<bold>N/A</bold>
</td>
</tr>
<tr>
<td colspan="9" align="left">SUAVE extended</td>
</tr>
<tr>
<td align="left">&#x2003;BT</td>
<td align="left">100</td>
<td align="left">94.37</td>
<td align="left">34.92</td>
<td align="left">20.88</td>
<td align="left">3.81</td>
<td align="left">0.07</td>
<td align="left">0.10</td>
<td align="left">1.09</td>
</tr>
<tr>
<td align="left">&#x2003;<bold>ROSA</bold>
</td>
<td align="left">
<bold>100</bold>
</td>
<td align="left">
<bold>92.75</bold>
</td>
<td align="left">
<bold>35.92</bold>
</td>
<td align="left">
<bold>18.97</bold>
</td>
<td align="left">
<bold>3.38</bold>
</td>
<td align="left">
<bold>1.39</bold>
</td>
<td align="left">
<bold>1.67</bold>
</td>
<td align="left">
<bold>2.50</bold>
</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s7-4">
<title>7.4 Reusability</title>
<sec id="s7-4-1">
<title>7.4.1 Autonomous ground vehicle use case</title>
<p>In this scenario, an AGV has to navigate from an initial to a goal position in a graph-like environment while facing uncertainties such as component failures, corridors with obstacles, and changing light conditions (<xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>).</p>
<p>The AGV has distinct architectural variants available to solve navigation. It has three localization algorithms (AMCL, MRPT, or aruco) and three sensing components (camera, lidar, or Kinect). However, there are some restrictions on how they can be combined. The AMCL and MRPT algorithms can only be combined with lidar or Kinect, and the aruco algorithm can only be combined with a camera. In low-light conditions, the camera can only be used with a lamp. Furthermore, the robot can move at three different speeds. Each configuration has a different energy cost, safety, and accuracy level. This scenario can be solved with ROSA with the knowledge model depicted in <xref ref-type="fig" rid="F8">Figure 8</xref>
<xref ref-type="fn" rid="fn11">
<sup>11</sup>
</xref>.</p>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption>
<p>ROSA model for the AGV use case (<xref ref-type="bibr" rid="B10">C&#xe1;mara et al., 2020</xref>).</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g008.tif"/>
</fig>
<p>When navigating, the robot performs adaptation by selecting which corridors it needs to go through given its feasible configurations, and by selecting a suitable architecture configuration for each corridor it goes through. For example, to go from point <inline-formula id="inf53">
<mml:math id="m53">
<mml:mrow>
<mml:mi>A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> to <inline-formula id="inf54">
<mml:math id="m54">
<mml:mrow>
<mml:mi>B</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, the AGV can go directly through a corridor with obstacles <inline-formula id="inf55">
<mml:math id="m55">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> or through corridors <inline-formula id="inf56">
<mml:math id="m56">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mn>4</mml:mn>
<mml:mo>&#x2192;</mml:mo>
<mml:mi>C</mml:mi>
<mml:mn>3</mml:mn>
<mml:mo>&#x2192;</mml:mo>
<mml:mi>C</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> without obstacles. Ideally, the AGV should go through <inline-formula id="inf57">
<mml:math id="m57">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> as it is the shortest path. Considering that the Kinect and AMCL combination is the only one with enough accuracy to go through a corridor with obstacles, in the case that the Kinect fails, the robot needs to perform TACA by adapting its task plan to go through <inline-formula id="inf58">
<mml:math id="m58">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mn>4</mml:mn>
<mml:mo>&#x2192;</mml:mo>
<mml:mi>C</mml:mi>
<mml:mn>3</mml:mn>
<mml:mo>&#x2192;</mml:mo>
<mml:mi>C</mml:mi>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> while simultaneously adapting its architecture, e.g., to use the lidar as its sensing component.</p>
</sec>
<sec id="s7-4-2">
<title>7.4.2 Unmanned aerial vehicle use case</title>
<p>In this scenario, a UAV has to search for samples in a predefined area and analyze them (<xref ref-type="bibr" rid="B9">Braberman et al., 2017</xref>). To accomplish this mission, the UAV can perform the actions <italic>(A1) search for samples</italic>, <italic>(A2) pick up and analyze samples</italic>, <italic>(A3) analyze samples on site</italic>, <italic>(A4) return to base and recharge</italic>, and <italic>(A5) land and fold gripper</italic>. The analyze action <italic>A2</italic> performs a better analysis than <italic>A3</italic>, however, it consumes more battery. Furthermore, action <italic>A2</italic> requires a <italic>gripper</italic>, while <italic>A3</italic> requires an <italic>infra-red camera</italic>. When operating, the UAV might run out of battery, and its gripper might fail.</p>
<p>There are three adaptation scenarios in this use case: <italic>(1)</italic> if the battery level is insufficient to perform <italic>A1</italic>, the UAV must perform <italic>A4</italic>; <italic>(2)</italic> if the battery level is insufficient to perform <italic>A2</italic> but it is still sufficient to perform <italic>A3</italic>, the UAV must perform <italic>A3</italic>; <italic>(3)</italic> if the <italic>gripper</italic> fails while performing <italic>A2</italic>, the UAV must perform <italic>A3</italic>. Before transitioning from <italic>A2</italic> to <italic>A3</italic>, the UAV must first perform <italic>A5</italic>.</p>
<p>Adaptation scenarios <italic>1</italic> and <italic>2</italic> can be solved with <inline-formula id="inf59">
<mml:math id="m59">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model by capturing the battery level as a <monospace>Quality Attribute</monospace> and using it as a <monospace>constraint</monospace> for actions <italic>A1</italic> and <italic>A2</italic>. Adaptation scenario <italic>3</italic> can be solved by capturing that the <monospace>Function</monospace> required by <italic>A2</italic> requires a <italic>gripper</italic> component. Furthermore, the task decision layer is responsible for guaranteeing that <italic>A3</italic> is only performed when <italic>A5</italic> is finished.</p>
</sec>
<sec id="s7-4-3">
<title>7.4.3 Results</title>
<p>This evaluation demonstrates that in addition to SUAVE, the knowledge required for the adaptation logic to solve the AGV and UAV use cases can be captured with <inline-formula id="inf60">
<mml:math id="m60">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model. This indicates that <inline-formula id="inf61">
<mml:math id="m61">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s knowledge model can be used to capture the knowledge required for TACA in adaptation scenarios similar to the ones presented. Furthermore, it shows that all entities and relationships contained in the proposed knowledge model had to be used to model the aforementioned adaptation scenarios, supporting their inclusion in the knowledge model.</p>
</sec>
</sec>
<sec id="s7-5">
<title>7.5 Development effort</title>
<sec id="s7-5-1">
<title>7.5.1 Experimental setup</title>
<p>To measure <inline-formula id="inf62">
<mml:math id="m62">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s development effort for each use case, we count the number of entities and relationships contained in the models created for the use cases presented. To measure the BT managing system development effort for SUAVE, we count the number of nodes contained in the BTs created to solve it, and the number of modes and parameters included in the System Modes&#x2019; configuration file already packaged in SUAVE. In the remainder of this paper, we denote the elements modeled in both approaches as <italic>overhead</italic>.</p>
</sec>
<sec id="s7-5-2">
<title>7.5.2 Results</title>
<p>The overhead for both approaches can be seen in <xref ref-type="table" rid="T7">Table 7</xref>. Although it is not possible to make a straightforward comparison between the development efforts of both approaches using the observed overheads since the difficulty of modeling an element using the different modeling techniques is subjective, analyzing the reason for the observed overheads provides insights for comparing the development efforts of both approaches.</p>
<table-wrap id="T7" position="float">
<label>TABLE 7</label>
<caption>
<p>Development effort of using ROSA and BTs as managing subsystems.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th colspan="4" align="left">ROSA</th>
</tr>
<tr>
<th align="left">Use case</th>
<th align="left">Entities</th>
<th align="left">Relations</th>
<th align="left">Total</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">SUAVE</td>
<td align="left">18</td>
<td align="left">12</td>
<td align="left">30</td>
</tr>
<tr>
<td align="left">SUAVE extended</td>
<td align="left">22</td>
<td align="left">16</td>
<td align="left">38</td>
</tr>
<tr>
<td align="left">AGV</td>
<td align="left">18</td>
<td align="left">36</td>
<td align="left">54</td>
</tr>
<tr>
<td align="left">UAV</td>
<td align="left">24</td>
<td align="left">16</td>
<td align="left">40</td>
</tr>
</tbody>
</table>
<table>
<thead valign="top">
<tr>
<th colspan="4" align="left">Behavior tree</th>
</tr>
<tr>
<th align="left">Use case</th>
<th align="left">BT</th>
<th align="left">System modes</th>
<th align="left">Total</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">SUAVE</td>
<td align="left">27</td>
<td align="left">30</td>
<td align="left">57</td>
</tr>
<tr>
<td align="left">SUAVE extended</td>
<td align="left">34</td>
<td align="left">38</td>
<td align="left">72</td>
</tr>
</tbody>
</table>
</table-wrap>
<sec id="s7-5-2-1">
<title>7.5.2.1 ROSA</title>
<p>In TypeDB, each entity and relationship is inserted in the KB with TypeQL queries such as the ones presented in <xref ref-type="statement" rid="Listing_5">Listing 5</xref>. Thus, the total number of queries that the roboticist must define to solve an adaptation scenario is equal to the sum of the number of entities and relationships contained in the model, with a clear separation between the task and adaptation logic.</p>
</sec>
<sec id="s7-5-2-2">
<title>7.5.2.2 BT managing system</title>
<p>The BT used to model SUAVE&#x2019;s task logic without adaptation contains 10 nodes, and the BT used for the extended use case contains 16 nodes. These values were deducted from the development effort metric for the BT managing system since they are independent of the adaptation problem.</p>
<p>
<xref ref-type="fig" rid="F9">Figure 9</xref> depicts the pattern used to model SUAVE&#x2019;s <italic>search pipeline</italic> action and its related adaptations<xref ref-type="fn" rid="fn12">
<sup>12</sup>
</xref>. As can be seen, there is no separation between the task and adaptation logic, which is the main limitation of using BTs in comparison to using ROSA to model the adaptation logic. The coupling of both logics hinders the reusability of the approach as another system with the same task logic but different adaptation logic, or vice-versa, cannot reuse the existing BTs. In addition, when any changes are made to the task or adaptation problems, it will most likely require changes to parts of the BT that are not necessarily related to the changes introduced. Furthermore, it makes the modeling process more difficult as the roboticist needs to consider both problems simultaneously when modeling the BTs.</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption>
<p>Snippet of the BT used to capture SUAVE&#x2019;s task and adaption logic. <italic>WV</italic> and <italic>BL</italic> represent the measured water visibility and battery level, respectively. <italic>GSP</italic>, <italic>MM</italic>, and <italic>FP</italic> represent SUAVE&#x2019;s <italic>generate search path node</italic>, <italic>maintain motion node</italic>, and <italic>follow pipeline node</italic>, respectively. The <italic>set</italic> action changes the system&#x2019;s modes.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g009.tif"/>
</fig>
</sec>
</sec>
</sec>
<sec id="s7-6">
<title>7.6 Development effort scalability</title>
<sec id="s7-6-1">
<title>7.6.1 Experimental setup</title>
<p>To evaluate how <inline-formula id="inf63">
<mml:math id="m63">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s development effort scales for more complex use cases, we analyze how the development effort of a base scenario grows with the addition of new actions and adaptations. The growth for adding actions and adaptations depends on the specific application. Thus, we make the following assumptions to generalize and simplify the analysis of adding adaptation.</p>
<p>
<statement content-type="assumption" id="Assumption_1">
<label>Assumption 1</label>
<p>
<italic>Every action requires one function that has only one configuration available consisting of a single component with no parameters</italic>.</p>
</statement>
</p>
<p>
<statement content-type="assumption" id="Assumption_2">
<label>Assumption 2</label>
<p>
<italic>Every</italic> <monospace>Component</monospace> <italic>is a</italic> <monospace>ROSNode</monospace> <italic>containing one</italic> <monospace>package</monospace> <italic>and one</italic> <monospace>executable</monospace> <italic>attribute; every</italic> <monospace>ROSNode</monospace> <italic>has one</italic> <monospace>component configuration</monospace> <italic>with one</italic> <monospace>Component Parameter</monospace>
<italic>; every</italic> <monospace>function design</monospace> <italic>and</italic> <monospace>component configuration</monospace> <italic>must be related to a</italic> <monospace>constraint</monospace> <italic>and contain a</italic> <monospace>priority</monospace> <italic>attribute; and a single</italic> <monospace>Quality Attribute</monospace> <italic>is defined for the whole system</italic>.</p>
</statement>
</p>
</sec>
<sec id="s7-6-2">
<title>7.6.2 Results</title>
<p>Consider a base scenario where the robot has only one action and complies with <xref ref-type="statement" rid="Assumption_1">Assumption 1</xref> and <xref ref-type="statement" rid="Assumption_2">Assumption 2</xref>. The ROSA model to solve it contains 10 elements and is depicted in <xref ref-type="fig" rid="F10">Figure 10a</xref>.</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption>
<p>Minimum knowledge required to model adaptation given <xref ref-type="statement" rid="Assumption_1">Assumption 1</xref> and <xref ref-type="statement" rid="Assumption_2">Assumption 2</xref>. The name attribute is depicted as <italic>name: Entity</italic> or <italic>name: Relationship</italic> inside each diamond and rectangle shape, respectively. <bold>(a)</bold> Base model. <bold>(b)</bold> Structural adaptation. <bold>(c)</bold> Parameter adaptation.</p>
</caption>
<graphic xlink:href="frobt-12-1531743-g010.tif"/>
</fig>
<p>To add structural adaptation to the base scenario (given <xref ref-type="statement" rid="Assumption_2">Assumption 2</xref>), it is necessary to add the elements depicted in <xref ref-type="fig" rid="F10">Figure 10b</xref> to the model. This results in a minimum overhead of 6 elements for each structural adaptation. To add parameter adaptation to the base scenario (given <xref ref-type="statement" rid="Assumption_2">Assumption 2</xref>), it is necessary to add the elements depicted in <xref ref-type="fig" rid="F10">Figure 10c</xref> to the model. This results in a minimum overhead of 3 elements for each parameter adaptation.</p>
<p>In conclusion, given <xref ref-type="statement" rid="Assumption_1">Assumption 1</xref> and <xref ref-type="statement" rid="Assumption_2">Assumption 2</xref>, the total overhead per action can be defined as <inline-formula id="inf64">
<mml:math id="m64">
<mml:mrow>
<mml:mn>10</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>6</mml:mn>
<mml:mo>&#x2217;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>3</mml:mn>
<mml:mo>&#x2217;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, where <inline-formula id="inf65">
<mml:math id="m65">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf66">
<mml:math id="m66">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> represent the number of structural and parameter adaptations for the action, respectively. This indicates that the ROSA model grows linearly with the number of actions and adaptations, which is made possible by the clear separation of the task and adaptation logic.</p>
</sec>
</sec>
</sec>
<sec id="s8">
<title>8 Conclusions and future work</title>
<p>This work proposed ROSA, a knowledge-based solution for task-and-architecture co-adaptation in robotic systems that promotes reusability, extensibility, and composability. Reusability was achieved by proposing a knowledge model that can capture the knowledge required for TACA and using it at runtime to reason about adaptation. Extensibility and composability were achieved with an architectural design that allows ROSA&#x2019;s components to be stateless and self-contained. The feasibility of using ROSA in robotic systems at runtime was demonstrated by applying it in simulation to the SUAVE exemplar. <inline-formula id="inf67">
<mml:math id="m67">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s reusability was demonstrated by using it to model different self-adaptive robotic systems and showing that it can capture all relevant knowledge for adaptation necessary for these use cases. Furthermore, <inline-formula id="inf68">
<mml:math id="m68">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s development effort and its scalability were demonstrated for the use cases presented in this paper and for a hypothetical scenario.</p>
<p>ROSA modular architecture has been designed to provide reuse and extensibility of the framework by future works applying self-adaptation principles in robotics architectures. For example, the current ROSA implementation supports integration with robotics architectures using planning or behavior tree solutions for the task deliberation layer, but it would be interesting to extend it to support other decision-making methods, such as state machines or Markov decision processes.</p>
<p>As a future work, we intend to integrate learning in ROSA. For example, machine learning methods could be explored to update at runtime the <monospace>Quality Attribute</monospace> and <monospace>Environmental Attribute</monospace> estimations and constraints <monospace>values</monospace>. Another possibility is learning that constraints and estimations exist without prior knowledge, i.e., learning that the relationship itself should be modeled. <inline-formula id="inf69">
<mml:math id="m69">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mi mathvariant="normal">O</mml:mi>
<mml:mi mathvariant="normal">S</mml:mi>
<mml:mi mathvariant="normal">A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>&#x2019;s interfaces to manipulate the KB at runtime could be exploited for this end.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s9">
<title>Data availability statement</title>
<p>The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.</p>
</sec>
<sec sec-type="author-contributions" id="s10">
<title>Author contributions</title>
<p>GR: Conceptualization, Investigation, Methodology, Software, Writing &#x2013; original draft, Writing &#x2013; review and editing. JP: Conceptualization, Writing &#x2013; review and editing. ST: Conceptualization, Writing &#x2013; review and editing. EJ: Conceptualization, Writing &#x2013; review and editing. CH: Conceptualization, Writing &#x2013; review and editing.</p>
</sec>
<sec sec-type="funding-information" id="s11">
<title>Funding</title>
<p>The author(s) declare that financial support was received for the research and/or publication of this article. This work was supported by the European Union&#x2019;s Horizon 2020 Framework Programme through the MSCA network REMARO (Grant Agreement No 956200).</p>
</sec>
<sec sec-type="COI-statement" id="s12">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="ai-statement" id="s13">
<title>Generative AI statement</title>
<p>The author(s) declare that no Generative AI was used in the creation of this manuscript.</p>
</sec>
<sec sec-type="disclaimer" id="s14">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<fn-group>
<fn id="fn1">
<label>1</label>
<p>The SUAVE exemplar is already configured to use System Modes.</p>
</fn>
<fn id="fn2">
<label>2</label>
<p>
<xref ref-type="bibr" rid="B2">Alberts et al. (2025)</xref> do not claim that the mapping study is a complete overview of the literature but rather a characterization of the field.</p>
</fn>
<fn id="fn3">
<label>3</label>
<p>Some architecture have distinct layers for handling task planning and execution, in the context of this work, they can be considered as sub-layers of the task decision layer.</p>
</fn>
<fn id="fn4">
<label>4</label>
<p>The number of distinct elements that can be part of a relationship.</p>
</fn>
<fn id="fn5">
<label>5</label>
<p>The number of element instances that can be part of a relationship.</p>
</fn>
<fn id="fn6">
<label>6</label>
<p>In addition to ROSA, this work provides a generic ROS package to integrate ROS 2 with TypeDB: <ext-link ext-link-type="uri" xlink:href="https://github.com/kas-lab/ros_typedb">https://github.com/kas-lab/ros_typedb</ext-link>.</p>
</fn>
<fn id="fn7">
<label>7</label>
<p>The <italic>/diagnostics</italic> topic is a standard topic for publishing system diagnosis information within the ROS ecosystem. See ROS REP 107 for more information.</p>
</fn>
<fn id="fn8">
<label>8</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://www.behaviortree.dev/">https://www.behaviortree.dev/</ext-link>
</p>
</fn>
<fn id="fn9">
<label>9</label>
<p>Metacontrol is the only managing subsystem packaged with SUAVE. The Metacontrol implementation for this use case is described in detail in the SUAVE paper (<xref ref-type="bibr" rid="B36">Silva et al., 2023</xref>).</p>
</fn>
<fn id="fn10">
<label>10</label>
<p>To the best of our knowledge, these are the only two scenarios in the literature in which the authors explicitly claim the need for TACA.</p>
</fn>
<fn id="fn11">
<label>11</label>
<p>The accuracy estimation for <italic>fd1</italic> and <italic>fd2</italic> and all energy estimations are omitted from the figure to improve readability.</p>
</fn>
<fn id="fn12">
<label>12</label>
<p>The full BT can be found in the SUAVE repository.</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Alami</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Chatila</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Fleury</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Ghallab</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ingrand</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>An architecture for autonomy</article-title>. <source>Int. J. Robotics Res.</source> <volume>17</volume>, <fpage>315</fpage>&#x2013;<lpage>337</lpage>. <pub-id pub-id-type="doi">10.1177/.027836499801700402</pub-id>
</citation>
</ref>
<ref id="B2">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Alberts</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Gerostathopoulos</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Malavolta</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Hern&#xe1;ndez Corbato</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Lago</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2025</year>). <article-title>Software architecture-based self-adaptation in robotics</article-title>. <source>J. Syst. Softw.</source> <volume>219</volume>, <fpage>112258</fpage>. <pub-id pub-id-type="doi">10.1016/j.jss.2024.112258</pub-id>
</citation>
</ref>
<ref id="B3">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Antoniou</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>van Harmelen</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>2004</year>). &#x201c;<article-title>Web ontology language: OWL</article-title>,&#x201d; in <source>Handbook on ontologies. International handbooks on information systems</source>. Editors <person-group person-group-type="editor">
<name>
<surname>Staab</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Studer</surname>
<given-names>R.</given-names>
</name>
</person-group> (<publisher-name>Springer</publisher-name>), <fpage>67</fpage>&#x2013;<lpage>92</lpage>. <pub-id pub-id-type="doi">10.1007/.978-3-540-24750-0_4</pub-id>
</citation>
</ref>
<ref id="B4">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Barnett</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Cavalcanti</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Miyazawa</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Architectural modelling for robotics: RoboArch and the CorteX example</article-title>. <source>Front. Robot. AI</source> <volume>9</volume>, <fpage>991637</fpage>. <pub-id pub-id-type="doi">10.3389/frobt.2022.991637</pub-id>
</citation>
</ref>
<ref id="B5">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Beetz</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>M&#xf6;senlechner</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Tenorth</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2010</year>). &#x201c;<article-title>CRAM &#x2014; a Cognitive Robot Abstract Machine for everyday manipulation in human environments</article-title>,&#x201d; in <conf-name>IEEE/RSJ International Conference on Intelligent Robots and Systems</conf-name>, <fpage>1012</fpage>&#x2013;<lpage>1017</lpage>. <pub-id pub-id-type="doi">10.1109/IROS.2010.5650146</pub-id>
</citation>
</ref>
<ref id="B6">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Board</surname>
<given-names>S. E.</given-names>
</name>
</person-group> (<year>2023</year>). &#x201c;<article-title>The guide to the systems engineering body of knowledge (SEBoK), v. 2.8</article-title>,&#x201d; in <conf-name>BKCASE is managed and maintained by the Stevens Institute of Technology Systems Engineering Research Center, the International Council on Systems Engineering, and the Institute of Electrical and Electronics Engineers Systems Council</conf-name>. Editor <person-group person-group-type="editor">
<name>
<surname>Cloutier</surname>
<given-names>R. J.</given-names>
</name>
</person-group> (<publisher-loc>Hoboken, NJ</publisher-loc>: <publisher-name>The Trustees of the Stevens Institute of Technology</publisher-name>).</citation>
</ref>
<ref id="B7">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bozhinoski</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Oviedo</surname>
<given-names>M. G.</given-names>
</name>
<name>
<surname>Garcia</surname>
<given-names>N. H.</given-names>
</name>
<name>
<surname>Deshpande</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>van der Hoorn</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Tjerngren</surname>
<given-names>J.</given-names>
</name>
<etal/>
</person-group> (<year>2022</year>). <article-title>MROS: runtime adaptation for robot control architectures</article-title>. <source>Adv. Robot.</source> <volume>36</volume>, <fpage>502</fpage>&#x2013;<lpage>518</lpage>. <pub-id pub-id-type="doi">10.1080/01691864.2022.2039761</pub-id>
</citation>
</ref>
<ref id="B8">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Bozhinoski</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Wijkhuizen</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2021</year>). &#x201c;<article-title>Context-based navigation for ground mobile robot in semi-structured indoor environment</article-title>,&#x201d; in <source>2021 fifth IEEE international conference on robotic computing (IRC)</source>, <fpage>82</fpage>&#x2013;<lpage>86</lpage>. <pub-id pub-id-type="doi">10.1109/IRC52146.2021.00019</pub-id>
</citation>
</ref>
<ref id="B9">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Braberman</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>D&#x2019;Ippolito</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Kramer</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Sykes</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Uchitel</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2017</year>). &#x201c;<article-title>An Extended Description of MORPH: A Reference Architecture for Configuration and Behaviour Self-Adaptation</article-title>,&#x201d; in <source>Software engineering for self-adaptive systems III. Assurances</source>. Editors <person-group person-group-type="editor">
<name>
<surname>de Lemos</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Garlan</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Ghezzi</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Giese</surname>
<given-names>H.</given-names>
</name>
</person-group> (<publisher-loc>Cham</publisher-loc>: <publisher-name>Springer International Publishing, Lecture Notes in Computer Science</publisher-name>), <fpage>377</fpage>&#x2013;<lpage>408</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-319-74183-3_13</pub-id>
</citation>
</ref>
<ref id="B10">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>C&#xe1;mara</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Schmerl</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Garlan</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2020</year>). &#x201c;<article-title>Software architecture and task plan co-adaptation for mobile service robots</article-title>,&#x201d; in <conf-name>Proceedings 15th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (SEAMS &#x2019;20)</conf-name> (<publisher-loc>New York, NY</publisher-loc>: <publisher-name>Association for computing Machinery</publisher-name>), <volume>20</volume>, <fpage>125</fpage>&#x2013;<lpage>136</lpage>. <pub-id pub-id-type="doi">10.1145/.3387939.3391591</pub-id>
</citation>
</ref>
<ref id="B11">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Carreno</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Scharff Willners</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Petillot</surname>
<given-names>Y. R.</given-names>
</name>
<name>
<surname>Petrick</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2021</year>). &#x201c;<article-title>Situation-aware task planning for robust AUV exploration in extreme environments</article-title>,&#x201d; in <conf-name>Proceedings IJCAI Workshop on Robust and Reliable Autonomy in the Wild</conf-name>.</citation>
</ref>
<ref id="B12">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Chen</surname>
<given-names>P. P.</given-names>
</name>
</person-group> (<year>1976</year>). <article-title>The entity-relationship model - toward a unified view of data</article-title>. <source>ACM Trans. Database Syst.</source> <volume>1</volume>, <fpage>9</fpage>&#x2013;<lpage>36</lpage>. <pub-id pub-id-type="doi">10.1145/320434.320440</pub-id>
</citation>
</ref>
<ref id="B13">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Colledanchise</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>&#xd6;gren</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2018</year>). <source>Behavior trees in robotics and AI: an introduction</source>. (<publisher-loc>Boca Raton</publisher-loc>: <publisher-name>CRC Press</publisher-name>). <pub-id pub-id-type="doi">10.1201/9780429489105</pub-id>
</citation>
</ref>
<ref id="B14">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Dorn</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Pribadi</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2023</year>). &#x201c;<article-title>Type theory as a unifying paradigm for modern databases</article-title>,&#x201d; in <conf-name>Proceedings 32nd International Conference on Information and Knowledge Management (CIKM 2023)</conf-name>. Editors <person-group person-group-type="editor">
<name>
<surname>Frommholz</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Hopfgartner</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Oakes</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Lalmas</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Zhang</surname>
<given-names>M.</given-names>
</name>
<etal/>
</person-group> (<publisher-name>New York, NY: Association for Computing Machinery</publisher-name>), <fpage>5238</fpage>&#x2013;<lpage>5239</lpage>. <pub-id pub-id-type="doi">10.1145/3583780.3615999</pub-id>
</citation>
</ref>
<ref id="B15">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Dorn</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Pribadi</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2024</year>). <article-title>TypeQL: A Type-Theoretic &#x0026; Polymorphic Query Language</article-title>. <source> Proc. ACM Manag.</source> <lpage>27</lpage>. <pub-id pub-id-type="doi">10.1145/3651611</pub-id>
</citation>
</ref>
<ref id="B16">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Garcia</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Menghi</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Pelliccione</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Berger</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Wohlrab</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2018</year>). &#x201c;<article-title>An architecture for decentralized, collaborative, and autonomous robots</article-title>,&#x201d; in <conf-name>2018 IEEE International Conference on Software Architecture (ICSA)</conf-name>, <fpage>75</fpage>&#x2013;<lpage>7509</lpage>. <pub-id pub-id-type="doi">10.1109/ICSA.2018.00017</pub-id>
</citation>
</ref>
<ref id="B17">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ghallab</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Howe</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Knoblock</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Mcdermott</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Ram</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Veloso</surname>
<given-names>M.</given-names>
</name>
<etal/>
</person-group> (<year>1998</year>). <article-title>PDDL&#x2014;the planning domain definition language</article-title>. <comment>[Dataset]</comment>.</citation>
</ref>
<ref id="B18">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Gherardi</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Hochgeschwender</surname>
<given-names>N.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>RRA: Models and tools for robotics run-time adaptation</article-title>. <conf-name>IEEE/RSJ International Conference on Intelligent Robots and Systems IROS</conf-name>, <fpage>1777</fpage>&#x2013;<lpage>1784</lpage>. <pub-id pub-id-type="doi">10.1109/IROS.2015.7353608</pub-id>
</citation>
</ref>
<ref id="B19">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Hamilton</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Stefanakos</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Calinescu</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>C&#xe1;mara</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2022</year>). &#x201c;<article-title>Towards adaptive planning of assistive-care robot tasks</article-title>,&#x201d; <conf-name>Proceedings 4th International Workshop on Formal Methods for Autonomous Systems (FMAS 2022), 371 of EPTCS</conf-name>, <fpage>175</fpage>&#x2013;<lpage>183</lpage>. <comment>M. Luckcuck and M. Farrell</comment>. <pub-id pub-id-type="doi">10.4204/.EPTCS.371.12</pub-id>
</citation>
</ref>
<ref id="B20">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hern&#xe1;ndez</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Bermejo-Alonso</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Sanz</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>A self-adaptation framework based on functional knowledge for augmented autonomy in robots</article-title>. <source>Integr. Computer-Aided Eng.</source> <volume>25</volume>, <fpage>157</fpage>&#x2013;<lpage>172</lpage>. <pub-id pub-id-type="doi">10.3233/ica-180565</pub-id>
</citation>
</ref>
<ref id="B21">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Hochgeschwender</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Schneider</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Voos</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Bruyninckx</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Kraetzschmar</surname>
<given-names>G. K.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>Graph-based software knowledge: storage and semantic querying of domain models for run-time adaptation</article-title>,&#x201d; in <conf-name>Proc. Intl. Conf. On simulation, modeling, and programming for autonomous robots (SIMPAR 2016) (IEEE)</conf-name>, <fpage>83</fpage>&#x2013;<lpage>90</lpage>. <pub-id pub-id-type="doi">10.1109/SIMPAR.2016.7862379</pub-id>
</citation>
</ref>
<ref id="B22">
<citation citation-type="book">
<collab>IEEE Approved Draft Standard for Robot Task Representation</collab> (<year>2024</year>). <source>P1872.1/D5</source>. <publisher-name>IEEE</publisher-name>, <fpage>1</fpage>&#x2013;<lpage>35</lpage>.</citation>
</ref>
<ref id="B23">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Kazhoyan</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Stelter</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Kenfack</surname>
<given-names>F. K.</given-names>
</name>
<name>
<surname>Koralewski</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Beetz</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2021</year>). &#x201c;<article-title>The robot household marathon experiment</article-title>,&#x201d; in <conf-name>2021 IEEE International Conference on Robotics and Automation (ICRA)</conf-name>, <fpage>9382</fpage>&#x2013;<lpage>9388</lpage>. <pub-id pub-id-type="doi">10.1109/.ICRA48506.2021.9560774</pub-id>
</citation>
</ref>
<ref id="B24">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kephart</surname>
<given-names>J. O.</given-names>
</name>
<name>
<surname>Chess</surname>
<given-names>D. M.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>The vision of autonomic computing</article-title>. <source>Computer</source> <volume>36</volume>, <fpage>41</fpage>&#x2013;<lpage>50</lpage>. <pub-id pub-id-type="doi">10.1109/mc.2003.1160055</pub-id>
</citation>
</ref>
<ref id="B25">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Kortenkamp</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Simmons</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Brugali</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2016</year>). <source>Robotic systems architectures and programming</source>. <publisher-loc>Cham</publisher-loc>: <publisher-name>Springer International Publishing</publisher-name>, <fpage>283</fpage>&#x2013;<lpage>306</lpage>. <pub-id pub-id-type="doi">10.1007/.978-3-319-32552-1_12</pub-id>
</citation>
</ref>
<ref id="B26">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kotseruba</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Tsotsos</surname>
<given-names>K. J.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>40 years of cognitive architectures: core cognitive abilities and practical applications</article-title>. <source>Artif. Intell. Rev.</source> <volume>53</volume>, <fpage>17</fpage>&#x2013;<lpage>94</lpage>. <pub-id pub-id-type="doi">10.1007/s10462-018-9646-y</pub-id>
</citation>
</ref>
<ref id="B27">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Lotz</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Ingl&#xe9;s-Romero</surname>
<given-names>J. F.</given-names>
</name>
<name>
<surname>Vicente-Chicote</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Schlegel</surname>
<given-names>C.</given-names>
</name>
</person-group> (<year>2013</year>). &#x201c;<article-title>Managing run-time variability in robotics software by modeling functional and non-functional behavior</article-title>,&#x201d; in <source>Enterprise, business-process and information systems modeling</source>. Editors <person-group person-group-type="editor">
<name>
<surname>Nurcan</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Proper</surname>
<given-names>H. A.</given-names>
</name>
<name>
<surname>Soffer</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Krogstie</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Schmidt</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Halpin</surname>
<given-names>T.</given-names>
</name>
<etal/>
</person-group> (<publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer Berlin Heidelberg</publisher-name>), <fpage>441</fpage>&#x2013;<lpage>455</lpage>.</citation>
</ref>
<ref id="B28">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Macenski</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Foote</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Gerkey</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Lalancette</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Woodall</surname>
<given-names>W.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Robot operating system 2: design, architecture, and uses in the wild</article-title>. <source>Sci. Robotics</source> <volume>7</volume>, <fpage>eabm6074</fpage>. <pub-id pub-id-type="doi">10.1126/scirobotics.abm6074</pub-id>
</citation>
</ref>
<ref id="B29">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Mart&#xed;n</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Clavero</surname>
<given-names>J. G.</given-names>
</name>
<name>
<surname>Matell&#xe1;n</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Rodr&#xed;guez</surname>
<given-names>F. J.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>PlanSys2: A planning system framework for ROS2</article-title>. <conf-name>IEEE/RSJ International Conference on Intelligent Robots and Systems IROS</conf-name>, <fpage>9742</fpage>&#x2013;<lpage>9749</lpage>. <pub-id pub-id-type="doi">10.1109/IROS51168.2021.9636544</pub-id>
</citation>
</ref>
<ref id="B30">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Niemczyk</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Geihs</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2015</year>). &#x201c;<article-title>Adaptive run-time models for groups of autonomous robots</article-title>,&#x201d; in <conf-name>2015 IEEE/ACM 10th International Symposium on Software Engineering for Adaptive and Self-Managing Systems</conf-name>, <fpage>127</fpage>&#x2013;<lpage>133</lpage>. <pub-id pub-id-type="doi">10.1109/.SEAMS.2015.21</pub-id>
</citation>
</ref>
<ref id="B31">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Niemczyk</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Opfer</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Fredivianus</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Geihs</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2017</year>). &#x201c;<article-title>Ice: self-configuration of information processing in heterogeneous agent teams</article-title>,&#x201d; in <conf-name>Proceedings of the Symposium on Applied Computing</conf-name> (<publisher-loc>New York, NY, USA</publisher-loc>: <publisher-name>Association for Computing Machinery, SAC &#x2019;17</publisher-name>), <fpage>417</fpage>&#x2013;<lpage>423</lpage>. <pub-id pub-id-type="doi">10.1145/.3019612.3019653</pub-id>
</citation>
</ref>
<ref id="B32">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Nordmann</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Lange</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Rico</surname>
<given-names>F. M.</given-names>
</name>
</person-group> (<year>2021</year>). &#x201c;<article-title>System modes - digestible system (re-)configuration for robotics</article-title>,&#x201d; in <conf-name>2021 IEEE/ACM 3rd international Workshop on Robotics Software Engineering (RoSE)</conf-name>, <fpage>19</fpage>&#x2013;<lpage>24</lpage>. <pub-id pub-id-type="doi">10.1109/.RoSE52553.2021.00010</pub-id>
</citation>
</ref>
<ref id="B33">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Oliv&#xe9;</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2007</year>). <source>Conceptual modeling of information systems</source>. <publisher-name>Springer</publisher-name>. <pub-id pub-id-type="doi">10.1007/978-3-540-39390-0</pub-id>
</citation>
</ref>
<ref id="B34">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Park</surname>
<given-names>Y.-S.</given-names>
</name>
<name>
<surname>Koo</surname>
<given-names>H.-M.</given-names>
</name>
<name>
<surname>Ko</surname>
<given-names>I.-Y.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>A task-based and resource-aware approach to dynamically generate optimal software architecture for intelligent service robots</article-title>. <source>Softw. Pract. Exp.</source> <volume>42</volume>, <fpage>519</fpage>&#x2013;<lpage>541</lpage>. <pub-id pub-id-type="doi">10.1002/spe.1074</pub-id>
</citation>
</ref>
<ref id="B35">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Sanchez-Lopez</surname>
<given-names>J. L.</given-names>
</name>
<name>
<surname>Su&#xe1;rez Fern&#xe1;ndez</surname>
<given-names>R. A.</given-names>
</name>
<name>
<surname>Bavle</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Sampedro</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Molina</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Pestana</surname>
<given-names>J.</given-names>
</name>
<etal/>
</person-group> (<year>2016</year>). &#x201c;<article-title>Aerostack: an architecture and open-source software framework for aerial robotics</article-title>,&#x201d; in <conf-name>2016 International Conference on Unmanned Aircraft Systems (ICUAS)</conf-name>, <fpage>332</fpage>&#x2013;<lpage>341</lpage>. <pub-id pub-id-type="doi">10.1109/ICUAS.2016.7502591</pub-id>
</citation>
</ref>
<ref id="B36">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Silva</surname>
<given-names>G. R.</given-names>
</name>
<name>
<surname>P&#xe4;&#xdf;ler</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Zwanepol</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Alberts</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Tapia Tarifa</surname>
<given-names>S. L.</given-names>
</name>
<name>
<surname>Gerostathopoulos</surname>
<given-names>I.</given-names>
</name>
<etal/>
</person-group> (<year>2023</year>). &#x201c;<article-title>SUAVE: an exemplar for self-adaptive underwater vehicles</article-title>,&#x201d; in <conf-name>Proc. 18th IEEE/ACM symposium on software engineering for adaptive and self-managing systems SEAMS 2023</conf-name> (<publisher-name>IEEE</publisher-name>), <fpage>181</fpage>&#x2013;<lpage>187</lpage>.</citation>
</ref>
<ref id="B37">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Thalheim</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>1993</year>). <article-title>Foundations of entity - relationship modeling</article-title>. <source>Ann. Math. Artif. Intell.</source> <volume>7</volume>, <fpage>197</fpage>&#x2013;<lpage>256</lpage>. <pub-id pub-id-type="doi">10.1007/BF01556354</pub-id>
</citation>
</ref>
<ref id="B38">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Thalheim</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2000</year>). <source>Entity-relationship modeling - foundations of database technology</source>. <publisher-name>Springer</publisher-name>.</citation>
</ref>
<ref id="B39">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Valner</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Vunder</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Aabloo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Pryor</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Kruusam&#xe4;e</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>TeMoto: a software framework for adaptive and dependable robotic autonomy with dynamic resource management</article-title>. <source>IEEE Access</source> <volume>10</volume>, <fpage>51889</fpage>&#x2013;<lpage>51907</lpage>. <pub-id pub-id-type="doi">10.1109/access.2022.3173647</pub-id>
</citation>
</ref>
<ref id="B40">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Weyns</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2020</year>). <source>An introduction to self-adaptive systems: a contemporary software engineering perspective</source>. <publisher-name>John Wiley and Sons</publisher-name>.</citation>
</ref>
<ref id="B41">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Weyns</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Schmerl</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Grassi</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Malek</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Mirandola</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Prehofer</surname>
<given-names>C.</given-names>
</name>
<etal/>
</person-group> (<year>2013</year>). &#x201c;<article-title>On patterns for decentralized control in self-adaptive systems</article-title>,&#x201d; in <source>Software engineering for self-adaptive systems II: international seminar, dagstuhl castle, Germany, october 24-29, 2010 revised selected and invited papers</source>. Editors <person-group person-group-type="editor">
<name>
<surname>de Lemos</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Giese</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>M&#xfc;ller</surname>
<given-names>H. A.</given-names>
</name>
<name>
<surname>Shaw</surname>
<given-names>M.</given-names>
</name>
</person-group> (<publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer</publisher-name>), <fpage>76</fpage>&#x2013;<lpage>107</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-642-35813-5_4</pub-id>
</citation>
</ref>
</ref-list>
</back>
</article>