<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Modelling Programmable Logic Controllers in Refinement Calculus of Reactive Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Viorel Preoteasa</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Timo Latvala</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kimmo Varpaaniemi</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>We present a translation from languages for programmable logic controllers (PLC) into refinement calculus of reactive systems (RCRS). RCRS is a compositional formal framework for modeling and reasoning about reactive systems. RCRS is based on monotonic property transformers (monotonic functions from sets of infinite output traces to infinite input traces) and is implemented in the Isabelle theorem prover. PLCs are industrial digital computers adapted for controlling manufacturing processes. Our translation provides a formal semantics for these systems, and a framework to formally analyze them.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>In this paper we present a translation from languages for programmable logic
controllers (PLC) into refinement calculus of reactive systems. PLCs are industrial digital
computers designed for controlling manufacturing processes. They provide high
reliability and ease of programming as well as fault diagnosis. Originally PLCs were
developed to replace hard wired relays, timers and sequencers in the automobile
manufacturing industry. Since then PLCs have been adopted as highly reliable automation
controllers suitable for harsh environments.</p>
      <p>
        The PLC programming languages standard IEC 61131-3 [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] specifies the graphical
languages FBD (Function Block Diagram) and LD (Ladder Diagram), the textual
languages IL (Instruction List) and ST (Structured Text), and common elements that
consist of SFC (Sequential Function Chart) elements and various elements for data types,
variables, resources, access paths, tasks, functions, function blocks and programs.
      </p>
      <p>
        Refinement calculus of reactive systems (RCRS) is a compositional framework for
modeling and reasoning about reactive (see [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]) systems. RCRS has been inspired from
interface automata [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and it has its origin in the theory of relational interfaces [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], but
also from classic refinement calculus [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and action systems formalism [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        RCRS allows compositional modeling of input-output non-deterministic (for a given
input, there could be different possible outputs) and non-input-receptive systems (some
inputs may be illegal). Being able to model systems having these characteristics enables
static analysis similar to type checking [
        <xref ref-type="bibr" rid="ref24 ref25">24, 25</xref>
        ].
      </p>
      <p>
        The theory of relational interfaces allows also modeling of non-deterministic and
non-input-receptive systems, but relational interfaces are limited to safety properties.
One of the main motivations of RCRS has been to lift this limitation, and be able to
model both safety and liveness properties. This has been achieved by using the
powerful semantics of the refinement calculus (RC) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. RC is based on monotonic predicate
transformers [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and is a compositional modeling and verification formalism for
sequential programs. RCRS uses monotonic property transformers (monotonic functions
from sets of output traces to sets of input traces), which are suitable for expressing
dynamic behaviors. The theory of RCRS has been introduced in [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] and is thoroughly
described in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
      </p>
      <p>
        RCRS is implemented in the Isabelle/HOL proof assistant [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], and it provides a
tool-set [
        <xref ref-type="bibr" rid="ref10 ref9">10, 9</xref>
        ] for analyzing RCRS models, as well as a translator from Simulink
models into RCRS language. The translator has been formally verified [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] in Isabelle/HOL.
      </p>
      <p>This paper presents an embedding of PLC programming languages into RCRS
framework. As function block diagrams are closely related to hierarchical block
diagrams (HBD) in general, and Simulink diagrams in particular, previous work relating
HBDs and Simulink to RCRS is also applicable to PLCs. However, one important
feature of PLC programming languages is the modeling of error conditions like overflows
and divisions by zero, and the focus of this paper is to show how RCRS combined with
the powerful typing system of Isabelle/HOL can be used to model these aspects.</p>
      <p>Although, PLCs are deterministic systems, having a formalism capable to express
non-determinism is important for modeling the environment and for expressing
specifications or properties of the system. Expressing non-input-receptive systems is equally
important in the context of PLCs as it enables consistency checking, i.e. checking if the
system suffers from runtime errors as overflows, divisions by zero, and others.</p>
      <p>The main contributions of this paper are the following:
1. We present an embedding of atomic PLC components (arithmetic, logic, timers)
into RCRS and we provide different mechanisms for handling error situations.
2. We show how a concrete example, expressed as a ladder logic diagram, can be
translated into RCRS and we show how RCRS can be used to prove properties of
this example.</p>
      <p>As a consequence of our work, RCRS framework can be used for PLC systems. We
introduce a formal mechanized semantics for PLC programming languages, and we
can (symbolically) execute these systems, we can check consistency and refinement
(verification of properties). We can also generate Python code that can be used to run
the PLC program.</p>
      <p>The Isabelle theories for the results presented in this paper are available from
https://megamart.ssf.fi/rcrs/plc.zip.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Halang, Kra¨mer and Vo¨lker [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] have introduced a run-time environment for high
integrity software represented by functional logic diagrams, and have developed a formal
correctness proof of a functional block occurring in the design of emergency shutdown
systems using Isabelle/HOL. Kra¨mer and Vo¨lker [
        <xref ref-type="bibr" rid="ref15 ref26">15, 26</xref>
        ] have extended this research
with methods for verification and validation of behavioral correctness and functional
safety of PLC programs, with support to the languages FBD, SFC and ST. The
semantics employed by these approaches allows specifying non-deterministic systems,
however it does not allow non-input-receptive systems. It is also unclear if the approach
is compositional and if it can be used for symbolic execution and code generation.
      </p>
      <p>
        Newell, Pang, Tremaine, Wassyng and Lawford [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] have presented a translation
from function block diagrams to the PVS theorem prover. This formalism seems also
to allow non-determinism, but it does not allow modeling non-input-receptive systems.
The translation from [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] cannot be used for symbolic execution or for code generation.
      </p>
      <p>
        Barbosa and De´rb [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] use the B method for formal verification of PLC programs. In
this approach. it is possible to specify and verify some specific properties expressed in
LTL, but there is no support for LTL properties in general.
      </p>
      <p>
        For each of the PLC programming languages FBD, IL, LD, SFC and ST
standardized by IEC 61131-3 [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], the model checking survey by Ovatman et al. [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] identifies
several tools that proceed via translation from that language. Interestingly, the model
checking approach by Darvas et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] uses IL as an intermediate language, whereas
Pavlovic´ and Ehrich [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] consider intermediate use of IL as a scalability problem.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3 Refinement calculus of reactive systems</title>
      <p>In this section we introduce the RCRS language that we use for modeling the PLC
systems. Since RCRS is implemented in Isabelle/HOL, we use a mathematical language
very close to the language supported by Isabelle/HOL. Isabelle/HOL is a general
purpose interactive theorem prover, implementing higher order logic (simple typed lambda
calculus). In Isabelle/HOL we have type variables 0a, type constants nat, int, real,
function types 0a ) 0b, and abstract data types. The basic Isabelle terms are
constructed from constant and variables using function application (f x y) = ((f x) y)
(function f applied to x applied to y), and lambda abstraction ( x . Suc (Suc x)) –
the function mapping x into Suc (Suc x). Typing of terms can be specified (f::nat
) 0a), or it can be inferred. The type inference for a term produces the most general
type such that the term is well typed. For example the inferred types for the term (f x
(g f)) are (f::0a ) 0b ) 0c) (x::0a) (g::(0a ) 0b ) 0c)) 0b). Binary
operators (+, -, ^, : : :) are functions with two arguments, and they have an infix
syntax (x + y).</p>
      <p>
        In RCRS we model reactive systems that take as input infinite traces of values and
produce as output infinite traces of values as monotonic property transformers. These
are monotonic functions from sets of output traces to sets on input traces, and they have
a weakest precondition interpretation [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. A property transformer S applied to a set of
output traces q returns the set of all input traces from which the execution is guaranteed
to produce a trace from q. This formalization allows modeling of non-deterministic
systems as well as systems that are non-input-receptive (there are inputs that cannot be
handled by the system). The complete treatment of these concepts is available in [
        <xref ref-type="bibr" rid="ref20 ref22">20,
22</xref>
        ]. Here we introduce some concepts that we use in this paper.
      </p>
      <p>We may use linear temporal logic (LTL), or other formalisms on infinite traces to
define specification of reactive systems, but concrete systems, that can be implemented,
are working in steps, and they maintain a state that is continuously updated. We call
these state transitions systems (STS), and we model them as monotonic predicate
transformers, mapping sets of output values to sets on input values with a similar weakest
precondition interpretation.</p>
      <p>For example a summation system that at step n outputs the sum of all inputs up to
step n 1 can be defined in RCRS as
definition summation = [- x, s
This system has input x and initial s, and produces output y and next state s0. Asumming
that the initial state is s0 = 0, and the input trace is x0, x1, x2, : : :, the state trace is
s0 = 0, s1 = s0 + x0 = x0, x2 = s1 + x1 = x0 + x1, : : :, and the output trace
is y0 = s0 = 0, y1 = s1 = x0, y2 = s2 = x0 + x1, : : :.</p>
      <p>The notation [- x, y, s, t z: x + y * x, s0: s + 1, t0: t + y -]
is the deterministic update statement and it introduces a system with inputs x, y and
current state s, t, output z = x + y * x and next state s0 = s + 1, t0 = t + y.
Non-deterministic systems are defined using the non-deterministic update statement [:
x, y, (s::nat) z, s0 . z &gt; x + y ^ s &lt; s0 &lt; s + 5 :]. The output z is
chosen such that is greater than x + y, and next state s0 is chosen between s + 1 and s
+ 4. Systems that are not input receptive are defined using assert statements: f. x, s
. 0 x s .g. If input x is between 0 and current state s, then this system behaves
as skip, otherwise it fails (the input in this case is not valid).</p>
      <p>In addition to the basic statements [- -], [: :], f. .g, we introduce also serial,
parallel and feedback compositions, represented graphically in Figure 1.</p>
      <p>A</p>
      <p>B</p>
      <p>A
B</p>
      <p>A</p>
      <p>The serial composition of A and B is denoted by A o B. In this composition, the
output of A becomes the input of B, and output type of A must match input type of B.</p>
      <p>We model a square root component with input x as a non-input-receptive system
that fails when x &lt; 0. For this we use the serial composition:
definition Sqrt = {.x . x
0.} o [- x
y: sqrt x -]
If x &lt; 0, then Sqrt fails, otherwise it produces output y = sqrt x, where sqrt::real
) real is Isabelle’s square root function. An important consequence of this
modeling is that if the input of Sqrt is provided by another component, for example a
nondeterministic system A = [:u x. x u + 1:], then the condition on the input of
Sqrt imposes a condition on the input of the composition:</p>
      <p>A o Sqrt = {.u. u + 1
0.} o [: u
y . y
sqrt (u + 1) :]</p>
      <sec id="sec-3-1">
        <title>A detailed discution of this can be found in [20, 22].</title>
        <p>The parallel composition of A and B is denoted by A ** B. The input of the parallel
composition is the pair (x,y) where x and y are the inputs of A and B, respectively, and
the output is the pair (u,v), where u is the output of A for input x, and v is the output
of B for input y. For example we have:
({.x. x &gt; 0.} o [-x y: 2 + x-]) ** ({.u. u &lt; 0.} o [:u v. v &gt; u:])
= {.x, u. x &gt; 0 ^ u &lt; 0.} o [:x, u y, v. y = 2 + x ^ v &gt; u:]
The result of composing in parallel a deterministic component with a non-deterministic
one is overall non-deterministic.</p>
        <p>The feedback composition of a system A is denoted feedback A, and it connects its
first output in feedback to its first input.</p>
        <p>feedback [- x, y, z u: y + z, v: x + y, w: 2 * x * z -]</p>
        <p>
          = [- y, z v: (y + z) + y, w: 2 * (y + z) * z -]
In this example, the output u = y + z does not contain variable x and the feedback
is simply the substitution of x by y + z in outputs v and w. In practical situations in
PLCs this is always the case, and as we will see in Section 5 sometimes we need to add
delays in order to enforce this property. Designing a feedback operation in the context
of non-deterministic and non-input-receptive systems is a non-trivial problem, and a
treatment of this subject can be found in [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ].
        </p>
        <p>The summation example introduced earlier can be expressed using the RCRS
operators applied to some simpler components as shown in Figure 2. This system can be
expressed in RCRS using the declaration simplify RCRS:
simplify_RCRS "summation0 = feedback([- u, x, s (u, x), s -] o
(ADD ** SKIP) o DELAY o (SPLIT ** SKIP) o [- (v, y), s' v, y, s0 -])"
This declaration, in addition to defining summation0, also simplifies the result
automatically producing a lemma stating the equality between summation0 and its simplified
version:
summation0 = [- x, s
The simplification is based on equality of predicate transformers. In the definition of
summation0 we use the following atomic components:
definition "ADD = [- a, b
definition "DELAY = [- a, s
definition "SPLIT = [- a
c: a + b -]"</p>
        <p>b: s, s0: a -]"
b: a, c: a -]"
Where ADD and SPLIT are stateless components, performing addition and splitting of
the input, respectively, and DELAY is a stateful component working in steps, similarly
to the summation. The component DEALY delays its input with one step. Please note
x
u</p>
        <p>ADD</p>
        <p>DELAY</p>
        <p>SPLIT
s s0
Fig. 2. Summation as composition of basic components.
v
y
that the names of the variables in the atomic components [- -], [: :], and f. .g
are bound, and serial and feedback compositions are not performed based on names but
require matching types.</p>
        <p>The last construct that is needed for modeling PLCs is an operator DelayFeedbackInit
which applied to an STS (a transition from input and current state to output and next
state) returns a reactive system working on infinite sequences on input values, and
producing infinite sequences of output values. For the summation system we have:
simplify_RCRS "summation_iter = DelayFeedbackInit 0</p>
        <p>
          ([-s, x x, s-] o summation o [-s', y y, s'-])"
where 0 is the initial value for the state s, and the two switches [-s, x x, s-]
and [-s’, y y, s’-] are needed because DelayFeedbackInit requires the state
variables to be first . The operator DelayFeedbackInit is formally defined in [
          <xref ref-type="bibr" rid="ref20 ref23">23, 20</xref>
          ].
        </p>
        <p>To symbolically execute the summation system all we need is to use Isabelle’s
value construct:</p>
        <p>value "((func summation_iter) x 4)::nat"
which returns x 0 + x 1 + x 2 + x 3, where func returns the function of the statement
[- -] (func [- x, y x + 2 * y -] (a, b) = a + 2 * b)).</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Modeling basic PLC functions in RCRS</title>
      <p>
        In this section we show how to model basic PLC functions as STS components in
RCRS. We model these components as defined by the PLC standard IEC 61131-3 [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ],
but we also model a retentive timer (RTO). The standard IEC 61131-3 is very precise
about the data types available in PLC programs, and describes in details the behavior of
PLC functions in the case of error conditions (overflows, divisions by zero, ...).
      </p>
      <sec id="sec-4-1">
        <title>4.1 PLC data types</title>
        <p>In this subsection we show how to model the numeric data types for storing Boolean,
integer and floating point values. In addition to the Boolean type (BOOL), PLC standard
defines a collection of different sized integer types, both signed (SINT - short
integer) and unsigned (USINT - unsigned short integer), as well as single and double sized
floating point numbers (REAL and LREAL). Additionally, PLC standard introduces some
generic data types. For example ANY NUM is a generic data type subsuming any numeric
types and ANY REAL subsuming the real types and ANY INT subsuming the integer types.</p>
        <p>
          In Isabelle all numerical operators are polymorphic and they are defined using
constructive type classes [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. A type class on an arbitrary type variable 0a introduces a
series of abstract operations and their assumptions as well as properties of these
operations based on the assumptions. Next Isabelle specification introduces the class of a
semigroup with an operation plus (+) satisfying the associativity property.
class semigroup =
fixes plus:: "0a ) 0a ) 0a" (infixl "+" 65)
assumes add_assoc: "(a + b) + c = a + (b + c)"
Concrete operations on concrete types like integer, real and natural numbers are
introduced as instantiations of these classes where each operation has a concrete definition,
and each assumption must be proved. For example the concrete type nat of natural
numbers is made a semigroup instance by providing a definition for the plus operation
and by proving the semigroup assumption:
instantiation nat :: semigroup begin
fun plus_nat where "0 + n = n" | "Suc m + n = Suc (m + n)"
        </p>
        <p>instance proof ... end
The type classes provide a very powerful mechanism for reusability. Many properties
common to different numeric types are proved at the abstract class level, and they
become available for concrete types via the instantiations.</p>
        <p>
          The fixed size integers and their operations are implemented in the Isabelle library
and some additional operations are implemented in the AFP entry [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. The type of
integers that can be represented on n bits is implemented by the Isabelle type (n word).
This type implements both signed and unsigned integers. Signed and unsigned
arithmetic operations are also implemented on (n word). Some of these operations
(addition, subtraction, multiplication) are the same for signed and unsigned integer, while
other operations like comparisons and division are different. Overflow conditions are
also different for signed vs unsigned integers. Because some operations are different
for signed and unsigned integers we introduce a new type of signed integers isomorphic
with the type (n word):
        </p>
        <p>typedef (overloaded) 0n sword = "UNIV::0n word set"
and we also lift all operations and properties from (n word) to (n sword).</p>
        <p>The type of an arithmetic expression (a + b) * 12 is 0a::fplus,times,numeralg,
where 0a is a type variable that belongs to classes plus (introducing the + operator),
times (introducing the * operator), and numeral (introducing the numeral constants –
0,1,2,...). However, if we restrict some sub-term to be of some specific type, then the
entire expression will be of this type. Moreover, the operations will be the arithmetic
operations as defined for the specific type. For example if we specify that the expression
21 + 11 has type int ((21::int) + 11), then + is the expected addition operation for
integers, and (21::int) + 11 = 32 6= 0 as expected. If we specify that this expression
is of type 4 word (unsigned integers represented on 4 bits), then (21::4 word) + 11
= 0.</p>
        <p>Unlike regular programming languages, PLC standard specify the possibility for
functional blocks to have Boolean outputs that are true when the arithmetic operations
overflow. To capture this we introduce a new class for the overflow operations:
class overflow =
fixes overflow_add:: "'a ) 'a ) bool"
fixes overflow_sub:: "'a ) 'a ) bool"
together with the instantiations to signed integers:
instantiation word :: (len) overflow
definition "overflow_add a b = (uint a + uint b 6= uint (a + b))"
definition "overflow_sub a b = (uint a - uint b 6= uint (a - b))"
where uint is the mapping from unsigned integers to unbounded integers.The addition
operation overflows for unsigned integers a and b if the result of the addition of a and
b as bounded unsigned integers is different from the addition of a and b as unbounded
integers. Similarly it works for signed integers, and for the other operations.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Arithmetic Functions</title>
        <p>We show how to model the arithmetic ADD function depicted in Figure 3. All other
functions are modeled in a similar manner. In general a function may have in addition
to the proper inputs and outputs, an input EN (Enable) and an output ENO (Enable Out).
If input EN is true, then the function output should be computed, and ENO should be true
if there are no errors (overflows, conversion errors, ...). If EN is false, then ENO must
be false, and the function output is not specified. Different manufacturers may chose
different implementations in this case. In case when EN is false we model the output to
be non-deterministic.</p>
        <p>EN
A
B</p>
        <p>ADD</p>
        <p>ENO</p>
        <p>C
In this definition, if EN is true, then the output of the function is A + B and ENO is true if
there is no overflow when adding A and B. If EN is false then ENO is false, and the output
of the function can be any value.</p>
        <p>The advantage of this non-deterministic definition, is that any manufacturer
specific implementation is a refinement of our definition, and as a consequence, a system
that is correct using our non-deterministic definition would be correct when using any
deterministic implementation. However, if we know that we work with a specific
implementation, then we could use a deterministic model. For example the ADD function
which outputs the default value 0 when EN is false is defined by:
definition "ADD0 = [- EN, A, B</p>
        <p>EN ^ : overflow_add A B, if EN then A + B else 0 -]"</p>
        <p>The version of the ADD function with the output ENO is useful in practical situations
when overflows can occur and the system needs to respond appropriately. However, in
situations when the system is designed such that no overflows occur, then we want to
make sure that this is the case. For these cases we can use a non-input-receptive version
of the addition function:
definition "ADDn = {. EN, A, B . : EN _ : overflow_add A B .}
o [: EN, A, B C . : EN _ C = A + B :]"
definition "ADD0n = {. A,B . : overflow_add A B .} o [- A,B
A + B -]"
If these functions occur in complex systems, then the local overflow conditions imposes
global conditions on the inputs of the overall system as discussed in the Sqrt example
in Section 3. If the global input conditions are satisfied, then we will not encounter
overflow in the addition function.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Timers</title>
        <p>We introduce the definition of a retentive timer (RTO) that we will use later in our
example. As compared to more standard PLC timers, the RTO retains the accumulated
time when the timer is disabled, and the accumulated time is set to zero only by a reset
input signal.</p>
        <p>definition "RTO = [- Enable, Reset, Preset, Accum</p>
        <p>Enabled: Enable, Done: Enable ^ Preset Accum,
Timing: Enable ^ Accum &lt; Preset, Accum0: if Reset then 0 else</p>
        <p>(if Enable ^ Accum &lt; Preset then nxt Accum else Accum) -]"
Intuitively, nxt t is adding to t the time duration of a PLC execution step. The RTO is
a stateful component, where the accumulated time is the state of the component: Accum
is the current state, and Accum0 is the next state.</p>
        <p>To accommodate different vendor specific timings, we introduce a class nxt with
one operation nxt:</p>
        <p>class nxt = fixes nxt: "0a ) 0a"
For a time t, nxt t is new time that corresponds to adding the duration of one step to
the time t. If we want to use a discrete time where one unit of time corresponds to one
step of the system, then we instantiate the class nxt as nat where nxt is the successor
function:</p>
        <p>instantiation nat :: nxt definition "nxt = Suc"
For times based on real values with step increments of 1/n we introduce the type
typedef 0n::len time = "UNIV::real set"
as a copy of the type real and we define the instantiation:
instantiation time :: (len) nxt</p>
        <p>definition "nxt (x::0n time) = x + 1 / real_to_time (len_of TYPE(0n))"
This enables for example types of the form (2 time) where nxt t = t + 1/2 or
(10 time) where the nxt t = t + 1/10. With this approach, we can have a single
definition, vendor independent, for timers, and by instantiating it for different types we
obtain different implementations.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5 Control lights in sequence example</title>
      <p>
        In this section we show on an example how to translate a PLC system defined by ladder
logic diagram into RCRS. We use a simplified version of the system for controlling
lights in sequence from [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The example is given in Figure 4. After a push to the Start
button it starts a cycle of turning on Light 1 for 5 time units, followed by turning on
Light 2 for 5 time units, and so on. When pressing Stop button, the active light turns off,
but the current internal state is preserved, and a new start will continue from the current
state.
      </p>
      <p>rung 1
rung 2
rung 3
rung 4
rung 5
rung 6
rung 7</p>
      <p>I1
] [
Start</p>
      <p>O1
] [
Master</p>
      <p>O1
] [
Master</p>
      <p>O1
] [
Master</p>
      <p>O1
] [
Master</p>
      <p>O1
] [
Master
T2/DN
] [</p>
      <p>I2
] [</p>
      <p>Stop
T1/DN
] [
T1/DN T2/DN
] [ ] [
T1/DN
] [</p>
      <p>RTO T1
Time base 0.1
Preset 5
Accum 0
RTO T2
Time base 0.1
Preset 5
Accum 0</p>
      <p>O1
( )
Master</p>
      <p>O2
( )
Light 1
(EN)
(DN)
O3
( )
Light 2
(EN)
(DN)
T1
(RES)
T2
(RES)
(END)</p>
      <p>The ladder logic diagram is organized in rungs, which have Boolean inputs ( ]
[ , ]6 [ ) and Boolean outputs ( ( ) ), as well as basic functions (timers, arithmetic
functions, ...). The list of inputs and outputs for the lights system are: I1 - Start input,
I2 - Stop input, O1 - Master coil output, O2 - Light 1 output, O3 - Light 2 output, T1
RTO for output O2, T2 - RTO for output O3, and RES - Reset coil output for timers.</p>
      <p>To model this system we use the definition of the RTO introduced before, and we
use all tree operations of RCRS (serial, parallel, and feedback). The idea is to model
all rungs as RCRS components A1, A2, : : :, An and then connect them all in parallel
and use feedback to connect the outputs to the corresponding inputs. In fact we do this
construction incrementally. First we construct B1 = FEEDBAK(A1 ** A2), next construct
B2 = FEEDBAK(B1 ** A3), and so on until we connect all components Ai. FEEDBAK in
this context means connecting the outputs to the corresponding inputs based on their
names in the ladder logic diagram. When we construct the feedback we check if there
are instantaneous dependencies, and if there are, then we introduce unit delays.</p>
      <p>For our example we start with the first rung:
definition "R1 = [-Start,Stop,Master Master0: (Start _ Master) _ : Stop -]"
This is the common industrial latching start/stop logic. When Start button is pushed it
turns on the Master coil, which turns on also the input Master in parallel with Start.
After this Master remains activated even if Start button is released. A push of the Stop
button will deactivate the Master coil.</p>
      <p>Already in this first rung the output Master0 is also used as input. We use the
feedback operation to connect the output Master0 to the input Master, but we need to use
also a unit delay since Master0 depends on Master.
simplify_RCRS "R10 = feedback(
[- Master, Start, Stop, S (Start, Stop), (Master, S) -] o (SKIP ** DELAY)
o [- (Start, Stop), (Master, S0) (Start, Stop, Master), S0 -]
o (R1 ** SKIP) o [- Master, S0 Master, Master, S0 -])"
"(Start, Stop, S)" "(Master, S0)" use (R1_def)
The result of simplify RCRS is the definition of R10 plus its simplification lemma:
R10 = [- (Start, Stop, S) Master: (Start _ S) ^ : Stop,</p>
      <p>S0: (Start _ S) ^ : Stop -]
The definition of R10 may seem complicated compared to its simplified version, by it
provides a systematic and mechanical way of handling arbitrary rung definitions, and
our tool reduces it automatically to its simplified form.</p>
      <p>Next we define rung 2 of the system as R2, we connect R10 with R2 in parallel, and
we use feedback to connect the output Master of R10 to the corresponding input of R2.
Additionally we need also to split the output of Master of R10 such that we can use it
again in rungs 3, 4 and 5.
definition "R2 = [- Master, T1_DN O2: Master ^ : T1_DN -]"
simplify_RCRS "B1 = feedback (
[-Master, Start, Stop, T1_DN, S (Start, Stop, S), (Master, T1_DN) -]
o(R10 ** R2) o [- (Master, S'), Light1 Master, Master, Light1, S0 -])"
"(Start, Stop, T1_DN, S)" "(Master, Light1, S0)" use (R10_simp)</p>
      <sec id="sec-5-1">
        <title>This gives us the simplified version of B1:</title>
        <p>B1 = [- (Start, Stop, T1_DN, S) Master: (Start _ S) ^ : Stop,</p>
        <p>Light1: (Start _ S) ^ : Stop ^ : T1_DN, S': (Start _ S) ^ : Stop -]
Here we can see already that Light 1 is on if the system is started, Stop button is off,
and if the timer T1 is not done.</p>
        <p>Continuing this approach for rungs 3, 4, 5, and 6 we obtain in the end the system:
LightTrs = [- (T1_Acc, T2_Acc, S), (Start, Stop)
let Master = (Start _ S) ^ : Stop in ((</p>
        <p>T1_Acc': if Master ^ T1_Acc T ^ T2_Acc T' then 0 else</p>
        <p>if Master ^ T1_Acc &lt; T then nxt T1_Acc else T1_Acc,
T2_Acc': if Master ^ : T1_Acc &lt; T ^ T2_Acc T' then 0 else</p>
        <p>if Master ^ T1_Acc T ^ T2_Acc &lt; T0 then nxt T2_Acc else T2_Acc,
S': Master), (
Light1: Master ^ T1_Acc&lt;T, Light2: Master ^ T1_Acc T ^ (T2_Acc&lt;T'),
T1_EN: Master, T2_EN: Master ^ T1_Acc T ))-]
and also the final reactive system:
simplify_RCRS "Lights = DelayFeedbackInit (0,0,0,False,False) LightTrs"
"(x)" "(y)" use(LightTrs_simp iter_simps)
In this final system, input x is an infinite trace with pairs of values for the start and stop
inputs, and otput y is an infinite trace of tuples of Light1, Light2, T1 EN, and T2 EN.</p>
        <p>For input x, with x 0 = (True,False) and x i = (False,False), i &gt; 0, we can
evaluate Lights x 0, Lights x 1, ... and we can observe the intended behavior. We can
also prove that after a stop, the lights are off, but the state of the system is preserved:
lemma "func LightTrs ((T1_Acc, T2_Acc, S), Start, True)</p>
        <p>= ((T1_Acc, T2_Acc, False), False, False, False, False)"
by (simp add: LightTrs_simp func_update)
6</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusions</title>
      <p>We have presented an embedding of PLC programming languages into RCRS
framework, and we have applied it to a ladder logic diagram. We also have shown how RCRS,
together with the class mechanism of Isabelle/HOL, can be used to efficiently model
arithmetical operations that can overflow or generate run-time errors. This enables
using all features of RCRS (refinement, consistency checking, symbolic execution, code
generation) to PLC programs. Our work is mechanically verified in Isabelle/HOL.</p>
      <p>In future work we plan to extend RCRS tool-set with new features for automatically
proving consistency properties and properties specified using LTL. We will also use the
RCRS tool-set in PLC projects at Space Systems Finland.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. R.-
          <source>J. Back and J. von Wright. Refinement Calculus</source>
          . Springer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R. J. R.</given-names>
            <surname>Back</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Kurki-Suonio</surname>
          </string-name>
          .
          <article-title>Decentralization of process nets with centralized control</article-title>
          .
          <source>Distributed Computing</source>
          ,
          <volume>3</volume>
          (
          <issue>2</issue>
          ):
          <fpage>73</fpage>
          -
          <lpage>87</lpage>
          ,
          <year>Jun 1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>H.</given-names>
            <surname>Barbosa</surname>
          </string-name>
          and
          <string-name>
            <surname>D. De</surname>
          </string-name>
          <article-title>´harbe. An approach using the b method to formal verification of plc programs in an industrial setting</article-title>
          . In R. Gheyi and D. Naumann, editors,
          <source>Formal Methods: Foundations and Applications</source>
          , pages
          <fpage>19</fpage>
          -
          <lpage>34</lpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>J.</given-names>
            <surname>Beeren</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Fernandez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Gao</surname>
          </string-name>
          , G. Klein,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kolanski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lewis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Matichuk</surname>
          </string-name>
          , and
          <string-name>
            <surname>T. Sewell.</surname>
          </string-name>
          <article-title>Finite machine word library</article-title>
          .
          <source>Archive of Formal Proofs</source>
          ,
          <year>June 2016</year>
          . http://isaafp.org/entries/Word Lib.html,
          <source>Formal proof development.</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Bhojasia</surname>
          </string-name>
          .
          <article-title>Plc program to control lights in a sequence (1</article-title>
          ),
          <year>January 2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>D.</given-names>
            <surname>Darvas</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Majzik</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E. B.</given-names>
            <surname>Vin</surname>
          </string-name>
          <article-title>˜uela. Formal verification of safety PLC based control software</article-title>
          . In E. A´ braha´m and M. Huisman, editors,
          <source>Integrated Formal Methods, 12th International Conference, IFM 2016</source>
          , Reykjavik, Iceland, June 1-5,
          <year>2016</year>
          , Proceedings, volume
          <volume>9681</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>508</fpage>
          -
          <lpage>522</lpage>
          . Springer,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. L. de Alfaro and
          <string-name>
            <given-names>T.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          .
          <article-title>Interface automata</article-title>
          .
          <source>In Foundations of Software Engineering (FSE)</source>
          . ACM Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>E.</given-names>
            <surname>Dijkstra</surname>
          </string-name>
          .
          <article-title>Guarded commands, nondeterminacy and formal derivation of programs</article-title>
          .
          <source>Comm. ACM</source>
          ,
          <volume>18</volume>
          (
          <issue>8</issue>
          ):
          <fpage>453</fpage>
          -
          <lpage>457</lpage>
          ,
          <year>1975</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>I.</given-names>
            <surname>Dragomir</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Preoteasa</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>Compositional Semantics and Analysis of Hierarchical Block Diagrams</article-title>
          .
          <source>In SPIN</source>
          , pages
          <fpage>38</fpage>
          -
          <lpage>56</lpage>
          . Springer,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. I.
          <string-name>
            <surname>Dragomir</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Preoteasa</surname>
            , and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>The Refinement Calculus of Reactive Systems Toolset</article-title>
          . In TACAS,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>F.</given-names>
            <surname>Haftmann</surname>
          </string-name>
          and M. Wenzel.
          <article-title>Constructive type classes in isabelle</article-title>
          . In T. Altenkirch and C. McBride, editors,
          <source>Types for Proofs and Programs</source>
          , pages
          <fpage>160</fpage>
          -
          <lpage>174</lpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>W. A.</given-names>
            <surname>Halang</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          <article-title>Kra¨mer, and</article-title>
          <string-name>
            <surname>N.</surname>
          </string-name>
          <article-title>Vo¨ lker. Formally verified building blocks in functional logic diagrams for emergency shutdown system design</article-title>
          .
          <source>High Integrity Systems</source>
          ,
          <volume>1</volume>
          (
          <issue>3</issue>
          ):
          <fpage>277</fpage>
          -
          <lpage>286</lpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>D.</given-names>
            <surname>Harel</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Pnueli</surname>
          </string-name>
          .
          <article-title>On the development of reactive systems</article-title>
          . In K. R. Apt, editor,
          <source>Logics and Models of Concurrent Systems</source>
          , pages
          <fpage>477</fpage>
          -
          <lpage>498</lpage>
          . Springer,
          <year>1985</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. IEC.
          <article-title>Programmable controllers - Part 3: Programming languages</article-title>
          .
          <source>International Electrotechnical Commission</source>
          , Geneva, Switzerland,
          <source>International standard IEC 61131-3</source>
          ,
          <string-name>
            <surname>Second</surname>
            <given-names>edition</given-names>
          </string-name>
          ,
          <year>January 2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. B.
          <article-title>Kra¨mer and N. Vo¨lker. A highly dependable computing architecture for safety-critical control applications</article-title>
          .
          <source>Real Time Systems</source>
          ,
          <volume>13</volume>
          (
          <issue>3</issue>
          ):
          <fpage>237</fpage>
          -
          <lpage>251</lpage>
          ,
          <year>November 1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>J. Newell</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Pang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Tremaine</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Wassyng</surname>
            , and
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Lawford</surname>
          </string-name>
          .
          <article-title>Translation of IEC 61131-3 function block diagrams to PVS for formal verification with real-time nuclear application</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          ,
          <volume>60</volume>
          (
          <issue>1</issue>
          ):
          <fpage>63</fpage>
          -
          <lpage>84</lpage>
          ,
          <year>January 2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>T.</given-names>
            <surname>Nipkow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. C.</given-names>
            <surname>Paulson</surname>
          </string-name>
          , and M. Wenzel. Isabelle/HOL - A
          <article-title>Proof Assistant for HigherOrder Logic</article-title>
          .
          <source>LNCS 2283</source>
          . Springer,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>T.</given-names>
            <surname>Ovatman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Aral</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Polat</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A. O.</surname>
          </string-name>
          <article-title>U¨ nver. An overview of model checking practices on verification of PLC software</article-title>
          .
          <source>Software &amp; Systems Modeling</source>
          ,
          <volume>15</volume>
          (
          <issue>4</issue>
          ):
          <fpage>937</fpage>
          -
          <lpage>960</lpage>
          ,
          <year>October 2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>O.</given-names>
            <surname>Pavlovic</surname>
          </string-name>
          ´ and H.
          <string-name>
            <surname>-D. Ehrich</surname>
          </string-name>
          .
          <article-title>Model checking PLC software written in function block diagram</article-title>
          .
          <source>In Proceedings of Third International Conference on Software Testing</source>
          , Verification, and Validation,
          <string-name>
            <surname>ICST</surname>
          </string-name>
          <year>2010</year>
          ,
          <volume>7</volume>
          -9
          <source>April</source>
          <year>2010</year>
          , Paris, France, pages
          <fpage>439</fpage>
          -
          <lpage>448</lpage>
          . IEEE,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>V.</given-names>
            <surname>Preoteasa</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dragomir</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>The Refinement Calculus of Reactive Systems</article-title>
          . CoRR, abs/1710.03979,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>V.</given-names>
            <surname>Preoteasa</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Dragomir</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>Mechanically proving determinacy of hierarchical block diagram translations</article-title>
          . In Verification, Model Checking, and
          <string-name>
            <surname>Abstract</surname>
          </string-name>
          Interpretation - 20th International Conference, VMCAI 2019, Cascais, Portugal, January
          <volume>13</volume>
          -
          <issue>15</issue>
          ,
          <year>2019</year>
          , Proceedings, pages
          <fpage>577</fpage>
          -
          <lpage>600</lpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <given-names>V.</given-names>
            <surname>Preoteasa</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>Refinement calculus of reactive systems</article-title>
          .
          <source>In Embedded Software (EMSOFT)</source>
          , 2014 International Conference on, pages
          <fpage>1</fpage>
          -
          <lpage>10</lpage>
          ,
          <year>Oct 2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <given-names>V.</given-names>
            <surname>Preoteasa</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          .
          <article-title>Towards Compositional Feedback in Non-Deterministic and Non-Input-Receptive Systems</article-title>
          .
          <source>In 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Lickly</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E. A.</given-names>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>A Theory of Synchronous Relational Interfaces</article-title>
          .
          <source>ACM TOPLAS</source>
          ,
          <volume>33</volume>
          (
          <issue>4</issue>
          ):
          <volume>14</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          :
          <fpage>41</fpage>
          ,
          <year>July 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <given-names>S.</given-names>
            <surname>Tripakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Stergiou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Broy</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E. A.</given-names>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>Error-Completion in Interface Theories</article-title>
          . In
          <source>International SPIN Symposium on Model Checking of Software - SPIN</source>
          <year>2013</year>
          , volume
          <volume>7976</volume>
          <source>of LNCS</source>
          , pages
          <fpage>358</fpage>
          -
          <lpage>375</lpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>N.</surname>
          </string-name>
          <article-title>V o¨lker and B</article-title>
          . Kra¨mer.
          <source>Automated verification of function block-based industrial control systems. Science of Computer Programming</source>
          ,
          <volume>42</volume>
          (
          <issue>1</issue>
          ):
          <fpage>101</fpage>
          -
          <lpage>113</lpage>
          ,
          <year>January 2002</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>