## 1 Introduction
To describe communication interfaces, the principle of service-oriented architecture was used. Hybrid top-down and bottom-up approaches were presented using Petri net models. In [33], object-oriented Petri nets (ORPNs) and \(\pi\)-calculus were used as two complementary formalisms. Initial RMSs structure and system behavior were modeled by ORPN while the \(\pi\)-calculus was used to describe RMSs' reconfiguration. To evaluate, check, and validate RMSs, Petri nets and \(\pi\)-calculus supporting tools were used. The reconfigurability mechanism and consistency of RMSs could be analyzed by \(\pi\)-calculus. In [7], a new model is proposed, namely the intelligent colored token Petri net (ICTPN), which simulated dynamic configurations of systems such as adding new machines, processing failures and rework, machine failures, processing routes changes, removing old machines, and adding new products. The primary idea is that smart colored tokens were part types which represented real-time knowledge of system status and configurations. This allowed for the effective modeling of dynamic system configurations. The proposed ICTPN could modularly model dynamic system changes to generate a very compact model. Moreover, when configurations appear, only the colored token of the part type, which is changed from the current model was changed. The resulting ICTPN model ensures that the behavioral properties such as deadlock-free, conservative, and reversible were guaranteed. All of the above methods with PNs attempted to deal with dynamic configuration issues in manufacturing systems. However, most of them do not include an algorithm or mechanism for reconfiguration, could not guarantee the properties of behavioral Petri net (i.e., boundedness (or safeness), liveness, and reversibility), or could not ensure that the results of the reconfiguration are correct, accurate or valid. In addition, few techniques for rapid and valid reconfiguration of literature deadlock control supervisors were presented. The objective of this article is to develop a novel two-step solution for quick and accurate reconfiguration of supervisory controllers for deadlock control in RMSs with dynamic changes. In the first step, the net rewriting system used in [34; 39] was adapted to design a reconfigurable Petri net model under dynamic configurations. The obtained model guarantees boundedness behavioral property but may lose the other properties of a Petri net model (i.e., liveness and reversibility). This means that the reconfigured Petri net model has finite states, deadlocks, and does not behave cyclically. For this issue, the second step develops an automatic deadlock prevention policy for reconfigurable Petri net using the siphon control method based on place invariant to solve the deadlock problem with dynamic structure changes in RMSs and achieve liveness and reversibility behavioral properties for the system. Thus, the developed approach has the ability of adapting to RMS configuration changes. The major applications of the developed approach are as follows:1. Mass customization manufacturing can use the proposed approach to address its difficulties. For example, by trying to make products available rapidly to consumers, a high quality production of a wide variety of products can be maintained and achieve low costs in line with standard products. 2. Lean productivity concept can also use the proposed approach to enable a company to implement an RMS in order to improve the exploitation of the part of the resources for various family products and to minimize waste from the idle resource of an RMS. 3. Agile manufacturing can use the proposed approach to facilitate rapid products changeovers, rapid introduction of new products and unattended operation. 4. Flexible manufacturing systems can use the proposed approach to increase response to a variety of customers and markets. Moreover, scalability to the desired volume of products and convertibility to current systems, machines, robots, and controls are increased in accordance with the new production requirements.