Typed Canonical Pattern Dictionary for Static Comparison of Structured Text PLC Programs
PDF (Russian)

How to Cite

1.
Shchigal S.E., Soloviev V.I. Typed Canonical Pattern Dictionary for Static Comparison of Structured Text PLC Programs // Russian Journal of Cybernetics. 2026. Vol. 7, № 3. P. 133-138.

Abstract

we investigated a method for comparing numerical-control (NC) programs that reduces the sensitivity of literal comparison to variable names while retaining syntactic and semantic information relevant to program structure. We formalized a dictionary of typed canonical Structured Text patterns and evaluated its use for static program comparison. An industrial ventilation project comprising 189 program units was used to construct the dictionary. Statements were converted into signatures that retained statement types, selected expression structures, variable roles and data types, and literal classes. Frequent signatures were included as individual patterns, whereas rare signatures were grouped into generic categories. After correcting syntactic analysis errors, the dataset contained 7,794 statement occurrences. At a pattern depth of one and a minimum frequency of five, the dictionary contained 238 patterns covering 54.0% of all occurrences. Replacing lexical identifiers in 188 modified program units did not change either the full or thresholded pattern sequences. Across six procedures, comparison distances were zero for renamed variants and ranged from one to three for controlled modifications. In an external archive containing 110 program variants, full representations differed from the modal reference in 65 cases at depth one and 75 cases at depth two. The method does not establish functional correctness. Its limitations include loss of variable identity, coarse representation of literals, incomplete syntax coverage, and the absence of independent expert validation of the generated programs.

PDF (Russian)
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 International License.

Downloads

Download data is not yet available.