【正文】
AKNOWLDGMENT We would like to express gratitude to the “StiAung RheinlandPfalz fir Innovation” for sponsoring our work under project number 616. VIII. REFERENCES 1. L. Baresi, M. Mauri, A. Monti, and M. Pezze, “PLCTools: Design, Formal Validation, and Code Generation for Programmable Controllers”, in. IEEE Conference on Systems, Man, and Cybernefics (SMCZOOO), Nashville, USA, Oct. 2022, pp. 2437 2442. 2. G. Frey and L. Litz, “Formal methods in PLC programming”, in IEEE Con on Systems, Man and Cyberics (SMC’ZOOO), Nashville, USA, Oct. 2022, pp. 24312436. 3. M. Bani Younis and G. Frey, “Formalization of Existing PLC Programs: A Survey.“, in CESA 2022, Lille (France), Paper No. S2R000239, July 2022. 4. International Electrotechnical Commission, IEC International Standard 11313, Programmable Controllers, Part 3, Programming Languages, 1993. 5. World Wide Web Consortium: htfp。s syntax as a table where the child elements of the ILRow are the columns of this table. The XML after the instruction identification is transformed using the XSL, where the instruction and the instruction Id, obtained after extracting the XML according to the type of operations are visualized in a table containing two columns (Instruction, Instruction Id) in HTML. The HTML structures suggested here are not the only possibilities, with which the XML can be visualized, but they give a very easy practical option for the user39。MAST 0005 :U ABFRAGE OB EMPFANG MOEGLICH 0006 0007 :SPB= MOOl 0008 0009 :A DB140 EMPFANGSFACH IST DB 140 OOOA :L KF+20 LAENGE DES DATENPAKETS oooc :T DLO OOOD :L KF+O ZIELNUMMER O=MASTER OOOF :T DRO 0010 0011 : FANGEN WIEDER ERLAUBEN 0012 :S 0013 MOOl :NOP 0 0014 0015 :BE BAUSTEIN ENDE Fig. 6 A PLC program written in Siemens S5 Instruction List B. Conversion of a PLC Program inio a wellformed XML Given a PLC program in ASCII format and in a tabular structure with separate columns for addresses, labels, instructions, operands and descriptions delimited by whitespaces, XSLT can convert it into a wellformed XML document. The XML document obtained through this transformation is a hierarchically structured document. Fig. 7 shows the XML document obtained through the transformation of the PLC code of Fig. 6. The XML document is structured in a hierarchy in which the root element is the IL Code Block representing the whole PLC code. Each of the rows of the PLC code is contained within a corresponding ILRow element which is M e r smtctured into child elements. Note: The structure chosen for the XML representation of ILCode is oriented at the working proposal of the PLCopen. C. XML Validation against the XML Schema The XML obtained as a result of the previous processing can be validated using a validating parser that confirms that the XML document in addition to being wellformed conforms to the set of syntactic rules defined in context of the PLC programming language. D. rdenhpcation of instructions This step in the process of visualization of PLC programs using XML ensures that the XML document to be used for visualization contains only valid can be used to transform the wellformed and valid Xh4L to another XML which as a result of identification on instructions has an additional attribute appended to the instruction tags. This attribute notifies whether the instruction is a valid instruction of the concerned instruction set. This transformation procedure is also capable of attaching attributes to the instruction tags that declares a classification of the instructions into predefined classes. The instruction identification of the transformed XML proofs the semantic of the XML in accordance with the operation types of the PLC programming language. In the example of this section, (cf. Fig. 8), the new XML contains additional attributes which classify the instructions according to the type of operation it represents. The STEPS instructions are categorized into eleven different types of operations . logical, jump, load or transfer operation assignment, etc. ?xml version= encOding=ISO88591 ? ILCodeBlock ILRow (Instruction instructionId=39。 therefore the wellformedness is independent from the respective individual application. Hence, an XMLParser also can transfer wellshaped XML documents in an abstract representation called Document Object Model (DOM) without using a grammar. DOM is an application programming interface (APII) for valid HTML and wellformed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated. In the DOM specification, the term document is used in a broad sense increasingly. XML is used as a way of representing many different kind of information that may be stored in diverse systems, and much of this would traditionally be seen as data rather than as documents. Nevertheless, XML presents this data as documents, and the DOM can be used to manage this data[ 5] . XSLT, the transformation language for XML is capable of transforming XML not only to another XML or HTML but to many other userfriendly formats. Before the advent of XSLT, the transformation of XML to any other format was only possible through custom applications developed in a procedural language such as C++, Visual Basic or, Java. This procedure lacked the generality with respect to the structural variation of XML documents. Capitalizing on the concept that the custom applications for the transformations are all very similar, XSLT evolved as a highlevel declarative language [9]. XSLT functions in two steps. In the first step, it performs a structural transformation so as to convert the XML into a structure that reflects the desired output. The second stage is formatting the new structure into th