Automatic Generation of Domain-Aware Control Plane Logic for Software Defined Railway Communication Networks Roberto Canonico 1 , Francesco Flammini 2(B) , Stefano Marrone 3 , Roberto Nardone 4 , and Valeria Vittorini 1 1 University of Naples Federico II, Naples, Italy {roberto.canonico,valeria.vittorini}@unina.it 2 M¨alardalen University, Eskilstuna, Sweden francesco.flammini@mdu.se 3 University of Campania “Luigi Vanvitelli”, Caserta, Italy stefano.marrone@unicampania.it 4 University of Naples “Parthenope”, Naples, Italy roberto.nardone@uniparthenope.it Abstract. The emergence of 5G technologies opens up new opportuni- ties for railway communications. One of the foundational aspects of 5G architecture is its control-plane programmability, which can be achieved through Software Defined Networking (SDN). In railway scenarios, this can be used to dynamically reconfigure the network for a more effective and efficient management of communication flows produced by moving trains. The paper presents a framework for integrating modelling and analysis tools into a programmable control plane specifically tailored to railway communications. We introduce the concept of domain-awareness in the network control plane as an SDN-enabled feature that allows achieving application-specific advantages besides those purely expressed in terms of key performance indicators such as the quality of service. We propose a reference architecture in which domain-awareness in the con- trol plane is obtained by considering information gathered by network devices and ad-hoc communication gateways that are able to detect rel- evant signalling events. In the architecture, the actual behaviour of the SDN controller is governed by applications that are able to react to specific triggers and re-configure network devices accordingly. We also provide a methodological framework based on model-driven engineering and formal methods, including dynamic state machines, for the auto- matic generation of SDN control plane logic. Keywords: Railways · ERTMS/ETCS · FRMCS · NG2R · SDN · Control plane · QoS · Formal methods · MDE · DSTM 1 Introduction In many railways, including high-speed lines, in Europe and all over the world, train-to-ground communication is based on the Global System for Mobile c The Author(s) 2022 T. Margaria and B. Steffen (Eds.): ISoLA 2022, LNCS 13704, pp. 308–320, 2022. https://doi.org/10.1007/978-3-031-19762-8_23