Do constant propagation of configuration/resource variables, taking into account scope of variables.
IEC 61131-3 Annex F Examples (informative)
This directory contains example code take from:
Annex F of Draft 2nd edition of the IEC 61131-3 standard (1998)
"PROGRAMMABLE CONTROLLERS - PROGRAMMING LANGUAGES"