# A Strategy-Based Formal Approach for Fog Systems Analysis
## 2 Cross-Layer Architecture for Fog Systems  
Recently, a rapid rise in interest in fog computing is widely observed. Some research works have proposed reference architectures for fog computing in order to facilitate its comprehension and development. In this section, we present some of these architectures and introduce our proposition. The OpenFog Consortium group [1] has developed a reference architecture that addresses some issues in cloud computing such as security, latency, and efficiency. Actually, the fog nodes in this architecture are distributed over several layers. The consortium has  
Figure 1: Specification and analysis of fog systems: our approach. published deployment hierarchies in which the combination of fog and the cloud is used to address various domain scenarios. Additionally, the architecture proposed by Cisco [13] describes the role of IoT in the development of fog computing. The fog layer is responsible for assembling data collected by the sensors and the terminal devices, processing this data locally, and then responding with control commands (requests) to the actuators. On the other hand, the fog layer is capable of filtering, aggregating, and then redirecting this data, possibly, to a remote data centre. Moreover, the fog nodes in the architecture proposed by the NIST [14] are context-sensitive and support a common data management and communication system. They can be organized in clusters, either vertically (to support insulation) or horizontally (to support federation), with respect to the latency distance of the fog nodes or with respect to intelligent terminal equipment. Fog computing minimises the response time of requests to supported applications and provides terminal devices with local computing resources and, if necessary, network connectivity to centralised services. Hence, the NIST proposed another type of fog node, the Mist. In parallel, further research works elaborated other architectures for fog systems on the basis of these known ones [15; 16; 17]. In the same thought, we propose a cross-layer architecture, named CLA4 Fog to improve the overall smartness of a fog system. In fact, this architecture extends an IoT architecture found in [18], to deal with the fog system's elements, and we propose to locate all managing agents in a novel-single layer: the fog layer. Along with these agents, the fog nodes responsible for critical data processing are defined. The communication layer is enriched with additional functionalities. The proposed CLA4 Fog architecture, as shown in Figure 2, has four layers (IoT, communication, fog, and cloud) with three essential views (physical, virtual, and interactional). We detail for each layer possible views being addressed. 1. IoT layer: * Physical view: represents the different sensors that capture data from the environment and actuators that have a direct impact on it. * Interactional view: all the devices communicate data with the agents in the layer above. 2. Communication layer: * Physical view: represents external and internal protocols that permit to format and root data from IoT devices to both fog and cloud applications. * Interactional view: protocols embedded in this layer are used by associated agents to format data for either fog or the cloud. 3. Fog layer: * Physical view: depicts fog nodes responsible for critical computing, as a computing and storage. * Virtual view: composed of intelligent agents that are responsible for managing the whole system. Each device type in the IoT layer is precisely managed by one agent, and each protocol type in the communication layer is also managed by one agent. The decisions of those agents orchestrate fog nodes and cloud applications. Each agent may observe, analyse, and interact. On the basis of at least one of these actions, the agent acts on the system elements. * Interactional view: the interaction between agents permits all the agents to communicate between each other. On the other, agents interact with the different system's elements nodes to analyse data and to make a decision if necessary. 4.