This paper discusses the issues related to the correctness of agile manufacturing systems with distributed architectures. The corresponding development of software engineering methods targets the goal of easy-re-configurable software self-organized similar to that of the hardware. However, the existing methods of software validation (manual testing or computer-aided simulation) are too slow to keep up with a pace of reconfigurations. In this paper we present an approach and a software tools to incorporate the formal verification to the practice of control engineering. The software package "Verification Environment for Distributed Applications" (VEDA) has been developed for model-based simulation and verification united by a homogeneous graphical user interface. Net Condition Event Systems (NCES) are used for modeling. VEDA deals with distributed controllers as defined in IEC61499 and automatically generates the formal model of the controller given its source code.