<!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>An Approach for Formal Verification of Updated Java Bytecode Programs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Razika Lounas1;2</string-name>
          <email>lounas@umbb.dz</email>
          <email>razika lounas@umbb.dz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mohamed Mezghiche</string-name>
          <email>mohamed-mezghiche@umbb.dz</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jean-Louis Lanet</string-name>
          <email>jean-louis.lanet@inria.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>1University of M'hamed Bougara of Boumerdes, Facutly of Sciences, LIMOSE Laboratory</institution>
          ,
          <addr-line>Avenue de l'independance, 35000 Boumerdes</addr-line>
          ,
          <country country="DZ">Algeria</country>
          ,
          <institution>2University of Limoges</institution>
          ,
          <addr-line>123 Avenue Albert Thomas, 87700 Limoges</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>INRIA LHS-PEC</institution>
          ,
          <addr-line>263 Avenue Ge ́ ne ́ ral Leclerc, 35000 Rennes</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of M'hamed Bougara of Boumerdes, Facutly of Sciences, LIMOSE Laboratory</institution>
          ,
          <addr-line>Avenue de l'independance, 35000 Boumerdes</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper deals with formal specification and verification of Java bytecode update. Programs update for java applications has gained a wide interest since it is used for several purposes: transforming semantics of a program, adding features to a program or performing optimizations. In this paper, we focus on program transformations for java programs at the bytecode level. Because these transformations may introduce errors, our goal is to provide a formal way to verify the update and establish its correctness. Our approach for formal specification and verification of updated Java bytecode programs is based on four ingredients: a formal interpretation of the semantics of update operations, a functional representation of bytecode, bytecode annotation and predicate transformation calculus. We use the concept of Hoare predicate transformation to derive a specification of an annotated bytecode. Annotations are used to express update operations within the code. A functional representation is used to model annotations and bytecode. The approach derives then a new specification for the annotated bytecode using a weakest precondition calculus defined to deal with update operations. Verification conditions are then generated and proved to establish the correction of the update.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        During their life cycle, programs need to be
updated in order to alter their semantics, perform
optimizations or add features. Several techniques
were presented for this purpose in literature, for
example, (
        <xref ref-type="bibr" rid="ref23">Neamtiu et al. (2006)</xref>
        and
        <xref ref-type="bibr" rid="ref24">Gupta et al.
(1996)</xref>
        ) present systems for C programs updating
and (
        <xref ref-type="bibr" rid="ref25">Orso et al. (2002)</xref>
        ,
        <xref ref-type="bibr" rid="ref26">Hlopko et al. (2013)</xref>
        )
present systems to update Java programs.
Updating programs leads to the transformation
of their elements such as code, data structures
and state. We focus on the transformation of
Java codes. In this context, several tools were
developed, for example, Java Syntactic Extender
(JSE) (
        <xref ref-type="bibr" rid="ref12">Bachrach and Playford (2001)</xref>
        ) and ixj
(
        <xref ref-type="bibr" rid="ref18">Boshernitsan and Graham (2004)</xref>
        ). However, in
some cases, the source code is not available (or
not distributed). Transforming a program at bytecode
level is an interesting alternative since several
languages like Java or Java Card are based on
virtual machines executing bytecode. Transforming
programs at bytecode level offers some advantages:
it does not require to recompile which can be a time
consuming task as in the case of transformations
at source code level. On the other hand, bytecode
level transformation is more complex than
sourcelevel manipulation for the users because they have
to know bytecode language very well and because
of the many low-level details one needs to use.
Java bytecode transformation is used in several
applications and several tools were developed to
manipulate Java bytecode programs such as BCEL
(
        <xref ref-type="bibr" rid="ref10">Dahm (1999)</xref>
        ) and RuggedJ (
        <xref ref-type="bibr" rid="ref16">McGachey et al.
(2009)</xref>
        ). In (
        <xref ref-type="bibr" rid="ref11">Sakamoto et al. (2000)</xref>
        ), the authors
developed an algorithm to ensure portable thread
migration in Java. This algorithm is based on
bytecode transformation. Bytecode is transformed in
order to enable programs to save and restore their
execution state after migration through the network.
Another purpose for bytecode transformation is
presented in (
        <xref ref-type="bibr" rid="ref3">Binder and Hulaas (2005)</xref>
        ) where
a framework based on bytecode transformation is
developed in order to enable Java applications to
perform CPU management.
      </p>
      <p>
        In some cases, the transformation occurs at runtime.
The update is then said to be dynamic (Dynamic
Software Update: DSU). In (
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi (2011)</xref>
        ) and
in (
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi et al. (2011)</xref>
        ), the authors presented a
system to perform DSU: while the Java Card virtual
machine is executing the program, the bytecode is
updated.
      </p>
      <p>This large interest of Java bytecode transformation
and its use in many critical applications raise the
question of its correctness. In fact, a transformation
may introduce an error which may alter the
bytecode leading the system to an unexpected
state. Besides, in some cases, the update is
critical (e.g. EmbedDSU) in such a way that an
attacker can take advantage of an incorrect update.
In these applications where security issues are
involved the update must pass some certification
procedure for example Common Criteria (Common
Criteria (2015)). For a certain certification level
one has to provide a formal proof of the security
mechanism implemented. A formal way to specify
transformations and verify their correctness is then
necessary.</p>
      <p>
        Formal methods offer rigourous means in specifying
software properties and establishing the correctness
of programs regarding their formal specifications.
In this work, we present an approach for formal
verification of bytecode update. We focus on Java
bytecode and the system presented in (
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi et
al. (2011)</xref>
        ) called embedDSU: a system developed
to implement DSU functionalities in Java Card
applications. It is based on two parts: off-card in
which a module called DIFF generator computes
the syntactic changes between the old and the new
version of the application and generates a DIFF file
(called also a patch). This patch is then sent on
the card to perform the update by other modules
implemented by extending the Java Card virtual
machine.
      </p>
      <p>In this work, we propose to formally verify that
the obtained bytecode is semantically equivalent to
the one written by the programmer and used to
perform the DIFF file. Our approach is based on
the following contributions: the definition of a new
weakest precondition calculus as the base of the
verification process, a formal interpretation of the
semantics of the update operations, a functional
representation of bytecode programs and bytecode
annotation. The choice of functional representation
is motivated by our interest in capturing the behavior
of the initial bytecode and the updated version and
the mature existing tools for formal reasoning about
functional programming languages.</p>
      <p>This paper is organized as follows: in section 2
we give an overview of embedDSU. Section 3
introduces the language and the formal semantics of
the updates. In section 4, we present an overview
of our approach in its steps. We present the
specification languages is section 5. In section 6,
we give our functional modelisation of Java bytecode
and annotations. We propose a predicate calculus
for update operations in section 7 and give the
notion of a correct update. This section ends with an
example to show how the logic works. We discuss
related work in section 8 and conclude in section 9.</p>
    </sec>
    <sec id="sec-2">
      <title>2. OVERVIEW OF EMBEDDSU</title>
      <p>
        EmbedDSU (
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi (2011)</xref>
        ,
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi et al. (2011)</xref>
        ,
        <xref ref-type="bibr" rid="ref13">Noubissi et al. (2010)</xref>
        ), is a software-based DSU
technique for Java-based smart cards which relies
on the Java virtual machine. It is based on
the modification of an embedded virtual machine.
EmbedDSU is divided in two parts: off-card and
oncard:
(i) In off-card, a module called DIFF generator
determines the syntactic changes between
versions of classes in order to apply the update
only to the parts of the application that are
really affected by the update. The changes are
expressed using a Domain Specific Language
(DSL). Then, the DIFF file result is transfered
to the card and used to perform the update.
(ii) The on-card part is divided into two layers:
1) Application Layer: The binary DIFF file
is uploaded into the card. After a signature
check with the wrapper, the binary DIFF is
interpreted and the resulting instructions are
transferred to the patcher in order to perform
the update. The patcher initializes data
structures for update. These data structures
are read by the updater module to determine
what to update and how to update, by the
safeUpdatePoint detector module to determine
when to apply the update and by the rollbacker
to determine how to return to the previous
version in case of update failure. These
points require the introspection of the virtual
machine. 2) System Layer: the modified virtual
machine supports the followings features: (1)
Introspection module which provides search
functions to go through VM data structures
like the references tables, the threads table,
the class table, the static object table,
the heap and stack frames for retrieving
information necessary to other modules;
(2) updater module which modifies object
instances, method bodies, class metadata,
references, affected registers in the stack
thread and affected VM data structures; (3)
SafeUpdatePoint detector module permits to
detect safe point in which we can apply the
update by preserving coherence of the system.
The system EmbedDSU is suitable for smard cards
especially in term of resource limitations. It was
established that sending a DIFF file is less ressource
consuming than sendig the whole new version to the
card and perform updates and that the resources
implied by the update modules are acceptable in
term of memory occupation (
        <xref ref-type="bibr" rid="ref21 ref4">Noubissi (2011)</xref>
        ). The
system EmbedDSU updates three principal parts:
(i) The bytecode: the process updates first the
bytecode of the updated class and the meta
data associated with it e.g., constant pool,
fields table, methods table...
(ii) The heap: The process updates the instances
of the updated class in the heap, obtains new
references for modified objects and updates
instances using these references.
(iii) The frames: The process updates in each frame
in the thread stack the references of updated
objects to point to new instances.
      </p>
      <p>This paper addresses the first part: bytecode update
at the method level. The types of updates that
may occur are: adding, modifying or suppressing
bytecode instructions, changing the signatures of a
method or modifying local variables. These updates
are contained in the DIFF file which indicates the
update and where it occurs in the bytecode. An
example is shown figure 2: the patch indicates that
the instruction iadd in the method compute sum is
deleted and the instruction isub is added at the same
place provided by the program counter.</p>
    </sec>
    <sec id="sec-3">
      <title>3. LANGUAGE AND SEMANTICS</title>
    </sec>
    <sec id="sec-4">
      <title>3.1. The language</title>
      <p>
        For the definition of the semantics, we extend the
formalism used by Freund and Mitchell (
        <xref ref-type="bibr" rid="ref1">Freund and
Mitchell (1999)</xref>
        ). The authors define a type system
for a small subset of Java bytecode. We define a
subset and propose to extend it with instructions
to indicate updates called update instructions
(Upd instr ) for instruction addition, deletion and
modification. In this definition, x is a local variable;
L is an instruction address; A is a class name; f is a
field name; l is a method name and pc the program
counter.
      </p>
      <p>Instruction ::= jpop jif L jstore x jload x jnew A
jbinop jneg jconst a jinvokevirtual A l t jgoto L
jgetf ield A f t jputf ield A f t jreturn
U pd Instr ::= Add Inst Instruction pc
jDlt Inst Instruction pc
jM od Inst Instruction instruction pc
In this language, the instruction pop extracts the top
of the stack and const a pushes a constant a on
the top of the stack. The instruction load x pushes
the value in the variable x on the top of the stack
whereas the instruction store x pops the top of the
stack and stores it in the variable x. The instruction
if L jumps to L if the top of the stack is not zero else
it performs the following instruction. Goto L jumps to
L. The instruction N ew A allocates a new object of
type A and pushes it on the top of the stack. The
instructions manipulating fields are : getf ield A f t
and putf ield A f t. Getfield reads the field f , which
has the type t of the object of class A whose
reference is on the top of the stack and pushes its
value on the top of the stack and putfield modifies
the field f with the value popped form the stack.
The instruction invokevirtual invokes the method l
of signature t and the class A. The instruction Binop
is used to gather arithmetic binary operations: add,
mult and sub. The instruction neg negates the top of
the stack and return is for method return.</p>
      <p>Update instructions are respectively: adding an
instruction, deleting instruction and modifying an
instruction. We indicate the place of the update
operation with pc.</p>
    </sec>
    <sec id="sec-5">
      <title>3.2. Operational semantics for bytecode instructions</title>
      <p>
        We model the interpretation of the instructions
of the bytecode instructions using the standard
framework for operational semantics (
        <xref ref-type="bibr" rid="ref1">Freund and
Mitchell (1999)</xref>
        ,
        <xref ref-type="bibr" rid="ref15">Bannwart and Mu¨ller (2005)</xref>
        ). Each
instruction is characterised by the transformation of
a configuration. A configuration &lt; M; s; h; f; pc &gt;
representing a step execution consists of an operand
stack s, a heap h, a local variables map f, a
program counter pc and the body M. Operational
semantics is defined by a transition relation over
configurations. A transition &lt; M; s; h; f; pc &gt;!&lt;
M; s2; h2; f2; pc2 &gt; takes the state from the
configuration &lt; M; s; h; f; pc &gt; to the configuration
&lt; M; s2; h2; f2; pc2 &gt;.
      </p>
      <p>The rules for the instructions of our language are
represented in table 1. The instruction new A creates
a new object of class A, thereby modifying the
current heap. A reference to the new object is
pushed onto the stack. store x pops a value from
the evaluation stack and assigns it to a variable,f is
modified accordingly. load x put the value of x on the
top of the stack. The binop operation which pops two
values from the stack, performs the binary operation,
and pushes the result. if l has two rules; wether it
jumps to the indicated line or performs the following
instruction according to the value of the top of stack.
The instruction putfield updates the heap with the
new value of the field of the object which is on the
top of the stack. The new value is popped from the
second element of the stack. invokevirtual invokes
the method l on an object reference and parameters
on the stack and replaces these values by the return
value v of the invoked method after its execution.</p>
    </sec>
    <sec id="sec-6">
      <title>3.3. Formal semantics for update instructions</title>
      <p>
        We propose a static semantics to express the effects
of update instructions on a configuration of the
bytecode. This semantics was introduced in our
initial paper (
        <xref ref-type="bibr" rid="ref20">Lounas et al. (2012)</xref>
        ). The purpose
of the semantics is to express formally the effects
and the conditions of update instructions and thus
prevent type errors in the updated bytecode. In this
paper, we give more rules and show how to use
the semantics to establish that an updated program
is well typed. It is also used in further section to
derive specifications for program transformations. In
the rules shown in tables 2 and 3, F is a mapping
from a program point to a mapping from a frame
variable to a type. S is a mapping from a program
point to an ordered sequence of types, i denotes
a program point or an address of code. The map
Fi gives a type of local variables at program point
i. The string Si gives the types of entries in the
operand stack at program point i. These F and S
are useful to our semantics since they contain typing
information about valid local variables and entries
in the operand stack respectively. SD represents
the stack depth and M (mapping) is a function that
associates a number to each line. Dom is the set
of addresses used by the method. A configuration
at line i is represented by &lt; (F; S; SD; M ); i &gt;. The
judgement that expresses that a bytecode BC is well
typed by F , S, SD and M is:
      </p>
      <p>F1 = F⊤; SD1 = 0
S1 = "; M1 = Map(BC)
8i 2 DOM(BC); F; S; SD; M; i ⊢ BC</p>
      <p>F;S;M;SD⊢BC
The first two lines of the judgement represent the
initial configuration: all variables are mapped to the
value top (default initial value), stack depth is zero,
the sequence of types is initially empty (") and M1
is the mapping of the initial bytecode. The last line
expresses that each instruction (update instruction)
in the bytecode is well typed. This is ensured by
the rules given in tables 2 and 3. For illustration,
the insertion of the instruction new A at line i +
1 allows us to obtain a new configuration if the
stack depth is incremented, local variables are not
affected and in the stack, the type A is inserted.
In the instruction invokevirtual the function dom
represents the domain of the invoked function (types
of its arguments) and the function card represents
the number of elements in the domain. The rule
expresses that these arguments are popped from the
stack of type and then the result is pushed. For the
insertion of an instruction representing an arithmetic
binary operation Binop, we show the rule of the
instruction add: this operation pops two elements
(integers) from the stack and then pushes the result.
mult and sub have analogous explanations by writing
the right operation. In the rules, the mapping M2 is
the result of operations on M1. The operations which
represent manipulations on bytecode are: range and
shift. The operation range extracts from a mapping
M1 a part M2 included between line n and line m.
The second operation shifts a part from a mapping
between n and m for p positions which is determined
by the number of added instructions.</p>
      <p>We define the operations look f or jumps and
update jumps to take into account jumps in bytecode
transformation: look f or jumps returns from a
mapping a list of jumps instructions represented by
their line number and the operation update jumps
updates jump instructions:
Look f or jumps : mapping ! int list
U pdate jumps : mapping int list int ! mapping
These operations updates jumps within the bytecode
if necessary. When we add for instance an
instruction at pc, the instructions after this position
are shifted and their numbers change. It is then
necessary to update goto and if instructions
accordingly. These modifications keep the structure
of the bytecode coherent. In the rules for instructions
suppression (table 3), Ef f ect ST K, Ef f ect F and
Ef f ects SD are used to express the effects of
an instruction of the stack and the local variables
and stack depth. They are used to readjust these
elements to the instruction at (i + 1) in the
new bytecode after the suppression. The notation
(M 2)F (Respectively, (M 2)S) is used to express F
(Respectively, S) in the mapping M 2. We notice that
in this formalisation, a modification is considered as
a suppression followed by an insertion.</p>
    </sec>
    <sec id="sec-7">
      <title>4. APPROACH FOR FORMAL VERIFICATION</title>
      <p>The mechanism of EmbedDSU implies the
modification of the bytecode of a running application on-card
after the conventional verification during the process
of its life cycle. In this process, bytecode passes
verification process based especially on type
verification. The applications of update operations
oncard is performed with insertion and suppression of
instructions according to the DIFF file. Consequently,
we obtain on-card, after the update process, a new
bytecode that was not submitted to the conventional
verification process. Our framework allows to:
(i) Ensure the validity of update operations of the
DIFF file according to the formal specification
of the Java Card virtual machine specification.
(ii) Guarantee that the application of the update
leads to a bytecode with the specification
that is conform to the intended specification
(provided by the programmer).</p>
      <p>The first point is ensured by the formalisation
of the semantics of update operations. In the
second point, we aim to establish that given an
initial program P 1, its new version P 2 and a
DIFF file ∆ containing the specification of the
transformation derived from the differences between
P 1 and P 2, the application of the DIFF file
oncard on P 1 (noted App PATCH) leads to P 2′.
The two programs P 2 and P 2′ are verified to be
semantically equivalent. This equivalence ensures
that the system indeed implemented the desired
transformation. This problem can be expressed
equationally by:
8P 1; P 2; P 2′; ∆ = DIF F (P 1; P 2); P 2′
App P AT CH(P 1; ∆) ) P 2 P 2′
=
This raises two major issues: 1- how to model
the application of the DIFF file on an existing
program? and 2- how to express the equivalence
which guarantees the correctness of the update?
We present the overview of our approach for
transformation verification. Figure 3 represents an
overview of our approach which is split in three parts:
(i) The transformation block: in this stage, we obtain
from a first version of a bytecode program
BC V 1 and a second version BC V 2 (Version
one transformed), a DIFF file. This DIFF file
will be applied to the on-card first version.
We obtain a new version on-card. The goal
of our approach is to establish that the
oncard new version and BC V 2 are semantically
equivalent. At this level, the specifications of
both BC V 1 and BC V 2 are provided by
the programmer using existing specification
languages.
(ii) The functional block: we define a functional
model for representing and manipulating
the Java Card bytecode. We implement an
automatic translator called functional reader
which takes a program written in bytecode
and produces a functional representation of it.
The application of the DIFF file is represented
at this level as annotations of the functional
representation with expressions indicating the
place of the update operation and its nature
(addition of instructions, deletion . . . )
(iii) The verification block: our goal is to verify
that the bytecode obtained by transformation
is equivalent to the one written by the
programmer i.e., it satisfies the same specification. The
specification of the obtained bytecode in its
functional representation with annotations is
performed by a weakest precondition calculus
that we define specially to deal with update
operations. A verification condition generator
gives then statements to be verified to
establish that the obtained specification matches
the specification given by the programmer at
the level one. A proof assistant is used to
discharge verification conditions.</p>
    </sec>
    <sec id="sec-8">
      <title>5. JML AND BML SPECIFICATIONS</title>
      <p>The starting point is a new version BC V 2 of
un existing program BC V 1. First the programmer
writes the new version with its specification in terms
of pre/post conditions. The specification language
used is JML (Java Modeling Language).</p>
      <p>JML (Burdy et al. (2005)) is a specification language
for Java/Java Card programs. It allows assertions
to be included in the source code, specifying for
example pre- and postconditions and invariants. JML
annotations are a special kind of Java comments:
they are preceded by / / @, or written between /*
@ and @* /.</p>
      <p>A simple method specifications is of the form:
This specification means that if the precondition
(requires) holds at the beginning of a method
invocation, then the method terminates normally
and the postcondition (ensures) will hold at the
end of the method. Constructs are defined to write
assertion such as: nold, to denotes the old value of a
variable,nresult to denote the result of a method and
the quantifiers, nforall and nexists.</p>
      <p>
        The DIFF file in the system EmbedDSU is created
from the program’s bytecode. To ensure the
correctness of the transformation, the verification
of the specification will be done at bytecode level.
The language BML (
        <xref ref-type="bibr" rid="ref6">Burdy et al. (2007)</xref>
        ), allows
to express specifications of bytecode programs. Its
formalism is based on JML and the structures of
specifications in both languages are very similar.
At the transformation block, specifications for
both first version and second version are written
in JML. Starting from a specified source code
fPjmlgcodesourcefQjmlg, with Pjml and Qjml
representing respectively precondition and
postcondition of codesource, we obtain a specified bytecode
program fPbmlgcodeBCfQbmlg. This information is
obtained by applying a compiler JML2BML and will
be used by the next stages of the approach to
perform verification condition generation and ensure
the transformation correctness.
      </p>
    </sec>
    <sec id="sec-9">
      <title>6. ANNOTATION AND FUNCTIONAL</title>
    </sec>
    <sec id="sec-10">
      <title>REPRESENTATION OF BYTECODE</title>
      <p>The DIFF file containing the update instructions
is calculated at bytecode level and then sent to
perform the update on-card. In order to ensure that
we send the right one, we model its application on
an initial version of bytecode P1 as annotations.
The operation of annotating a bytecode with
expressions indicating where an update instruction
occurs and what is the operation involved can be
defined recursively as an annotation function which
transforms a program to an annotated program.
Annot("; P ) P
Annot([Updij∆]; P ) let P ′ =
Add Annot Line(Updi; P ) in Annot(∆; P ′)
The annotation of a program with an empty DIFF
file (") is the program itself otherwise, the function
iterates over the update operations (Updi) in the
patch and adds a corresponding annotated line
(Add Annot Line(Updi; P )) to the program. Figure
4 shows an annotated program obtained by the
application of a DIFF file on an initial byte
code. The annotations are represented as special
commentaries. For example, Del 4 : deletes the
instruction at program counter (pc) 4 and add isub
4, adds the instruction isub at pc 4.</p>
      <p>In our framework, we use a functional representation
for both bytecode programs and annotation function.
Figure 5 shows a fragment of the formalisation
written in OCaml. We start by defining the data
manipulated by the program (integers, objects and
variables, then, we formalise the instructions of the
sub language. The definition of an instruction is
given by the name of a construct (representing the
name of the instruction) followed by its arguments.
For example, for the instruction new, we have
the construct New taking an Object as argument
and the instruction putfield is represented by the
construct Putfield followed by a triple representing
the arguments: the class (Object ) and the names of
the type of the field and its name as strings.
A bytecode line is defined as a number (representing
the program counter) with an instruction. The
bytecode is represented as a list of bytecode
lines. An annotated line is represented by the
product of a bytecode line and a string representing
the annotation. An annotated bytecode is a list
of annotated bytecode lines. The result of this
modelisation is used to derive specifications of
updated programs.</p>
    </sec>
    <sec id="sec-11">
      <title>7. VERIFICATION</title>
      <p>
        Our approach for verification is based on the
fact that the transformation of a bytecode (of
its semantics) implies the transformation of its
specification. In Hoare Logic (
        <xref ref-type="bibr" rid="ref8">Hoare (1969)</xref>
        ), a
program P 1 and its specification is represented by
a triple fpre1gP 1fpost1g where pre1 (post1) is the
precondition (postcondition) of the program P 1. A
new version of this triple written off-card by the
programmer is fpre2gP 2fpost2g (a target triple). The
DIFF file is performed with P1 and P2 and then sent
to the card to perform update operations, meaning,
obtaining a new bytecode and a new spacification.
Our goal is to establish that the target triple and the
obtained triple match.
      </p>
    </sec>
    <sec id="sec-12">
      <title>7.1. Interpretation of the update</title>
      <p>In order to formally define our update interpreter,
we need to define some notions. In this
interpretation, a state is modeled by a 3-tuple:&lt;
Heap; F rame; Stack F rame &gt; which represents
the machine state where Heap represents the
contents of the heap, Frame represents the
execution state of the current Method and,
StackFrame is a list of frames corresponding to the
call stack. A frame contains the following
elements : the stack of operands OperandStack and
the values of the local variables LocalV ar at the
program point P C of the method M ethod ( &lt;
H; M ethod; P C; OperandStack; LocalV ar &gt; ). The
definition of the update interpretation is based on the
notion of step.</p>
      <p>Definition 1. Step The semantics of an instruction
(update instruction) is specified as a function step:
Bytecode P rog State Specif ication &gt; State
StepN ame Specif ication that, given a bytecode
P, a state S and a specification SP, computes the
next state S’, the name of the next step and a new
specification.</p>
      <p>Definition 2. Java bytecode update interpreter
We define now an update interpreter (U pd int) which
iterates over steps, take as parameters an annotated
program in its functional representation, an initial
state and an initial specification and relies on
predicate calculus and update interpretation function
to produce a new state and a new specification. The
interpreter is defined as U pd int(BC; S) = (S′; Sp′)
with S = initial(BC; Sp) the function for defining an
initial state for the execution of the bytecode BC with
the initial specification Sp. The Code BC is given
with its parameters and an initial heap. The result of
the interpreter is a state S′ and a new specification
Sp′.</p>
      <p>Definition 3. Verified updated bytecode</p>
      <p>Let P 1 and P 2 be the first and the new version
of a program and P a patch,
let P 2′ = annot(P 1; P ) be the program
obtained by annotation of P1 with P,
let f (P 2′) the functional representations of P 2′,
let spec(P 1) = (pre1; post1) the specification
of P 1 and spec(P 2) = (pre2; post2) the
specification of P2,
We say that P 2′ is a successfully verified update of
P 1 if and only if: verif ication(spec(P 2); spec(P 2′))
succeeds where spec(P 2′) is obtained by predicate
transformation on f (P 2′) starting from post2.</p>
    </sec>
    <sec id="sec-13">
      <title>7.2. Weakest precondition calculus</title>
      <p>In this section, we define a bytecode update
logic in terms of a weakest precondition calculus.</p>
      <p>The proposed weakest precondition (WP) considers
that each (update) instruction has a precondition.</p>
      <p>An instruction with its precondition is called an
wp( Add instr(pop,i)) = (shif t exp2(@Ei))
wp( Add instr(store x,i)) = shif t exp2(@Ei)(S(0)=x)
wp(Add instr(if L,i)) = ((S(0) = 0) ) shif t exp2(EL)) ^ ((S(0) ̸= 0) ) shif t exp2(@Ei))
wp(Add instr(load x,i)) = unshif t exp(shif t exp(@Ei))(x=S(0))
wp(Add instr(const a,i)) = unshif t exp(shif t exp(@Ei))(a=S(0))
wp(Add instr (new A,i)) = unshif t exp(shif t exp(@Ei[create(H; A)=S(0); A :: H=H])
wp(Add instr(add,i) = (shif t exp2(@Ei))[(s(1) + S(0))=S(1)]
wp(Add instr(neg,i) = (unshif t exp(@Ei))[ S(0)=S(0)]
wp(Add instr (getfield a f t,i) ) = shif t exp(@Ei[(val(S(0); (a; f )))=S(0)]) ^ S(0) ̸= null
wp(Add instr(putfield a f t,i)) = (shif t exp3(@Ei))[H((S(0); (a; f )) := S(1))=H] ^ S(0) ̸= null
wp(goto l1) = shif t exp(El1)
instruction specification and is noted as: Ei : Ii
where Ii is the instruction and the expression Ei
its specification. This notation expresses that the
precondition Ei holds when the program pointer is
at the program counter i. Table 4 shows the calculus
of the WP rules for the update operations (inserting
instructions).</p>
      <p>Functions and notations used. The functions
shif t exp and unshif t exp are used to express:
the effect of pushing (popping) elements to (from)
the stack S and the effect of shifting an expression
regarding to the stack elements due to the insertion
of instructions. They are defined as follows:
shif t exp(Exp) = Exp[s(i + 1)=s(i) f orall i 2 N ]
unshif t exp = shif t exp 1
The elements of the stack are represented by
positive integers, the top stack is 0. The symbol @
is used to express the old specification associated
to a position i: when we add an instruction at
position i, the program and the specification are
shifted from i and then a new instruction is inserted.</p>
      <p>Its precondition is calculated with the specification
of the instruction that was at position i before the
update.</p>
      <p>
        In the rules, for the instructions store x, load x,
and pop, a precondition is obtained, as in Hoare’s
assignment (
        <xref ref-type="bibr" rid="ref8">Hoare (1969)</xref>
        ) by substituting the
righthand side by the left-hand side in the postcondition.
      </p>
      <p>The precondition of an instruction store x under a
postcondition Ei+1 (the precondition of the following
instruction) is given by: shif t exp(Ei+1)(S(0)=x)
meaning that if the expression E holds after the
execution of store x then it also holds for the top of
the stack before storing it in x. The function shif t exp
is used to express that before the execution of the
instruction, the top of the stack corresponding to the
instruction at i + 1 was at index 1.</p>
      <p>Inserting an instruction, e.g. store x at line i means
that the precondition of the old instruction at i
becomes the postcondition of the inserted instruction
and thus the calculated precondition starts from
this old postcondition (@Ei). The function shif t exp
is used twice (shif t exp2) to express also the
impact due to the insertion of the instruction on the
specifications of the following instructions.</p>
      <p>The instructions new, putf ield and getf ield are heap
manipulating instructions. The function create used
in the instruction new A returns a new object of
type A in the heap H. This obtained heap (A :: H)
replaces the old heap. The function val used in the
definition of getfield to get the value of the field f of
the class a from the address (top of the stack). This
value is then pushed on the stack. In putf ield, the
value of the field designated by the top of the stack
is updated with the value at the second elements of
the stack. The insertion of this instruction which pops
two values implies three applications of shif t exp.</p>
      <p>In order to establish semantical equivalence of a
code written by the programmer and a program
obtained by applying a DIFF file, we check the
equivalence of the weakest precondition of an
annotated program obtained by WP calculus and a
precondition written by the programmer before DIFF
file is performed.</p>
    </sec>
    <sec id="sec-14">
      <title>7.3. Example</title>
      <p>In order to illustrate how the logic works, we take
the example of the function abs that returns the
absolute value of an integer taken as argument.
This function is then transformed in order to get
the double of the result in the initial calculus: for
an integer given as argument, the new function
returns the abstract value multiplied by two (modified
abs). The specifications of the two functions are
respectively:</p>
      <p>0 ! result = P ) ^ (P &lt; 0 !
fp = P g abs f(P
result = P )g
fp = P g modif ied abs f(P
(P &lt; 0 ! result = 2 P )g
0 ! result = 2</p>
      <p>P ) ^
In the specification, P denotes the logical value at
the entry and result is the result of the function.
Figure 6 shows the bytecode of the first version
(a) and the second version (b) of the described
function. The part (c) of the figure shows the DIFF
file generated from the two versions. The last part of
the figure (d) shows the bytecode of the function abs
annotated with update instructions. We notice that
in this bytecode local variables are represented by
integers: in load 1 for example, the number 1 means
the local variable 1. The same notation is applied to
other local variables.</p>
      <p>In figure 7, The WP calculus is performed on
the bytecode (without annotation) starting from the
postcondition of the new version. The WP calculus
is applied on the annotated bytecode as shown on
figure 8. The specification for the update instructions
are in bold. This example shows that we obtain
the same precondition fP = v0g which means
that at the beginning of the calculus the logical
value P is in the first local variable of the function.
This result expresses the equivalence of the two
bytecodes according to our definition of verified
updated program.</p>
    </sec>
    <sec id="sec-15">
      <title>8. RELATED WORK</title>
      <p>
        Several studies have been conducted in order
to use formal semantics to prevent type errors
in bytecode. Our work extends the formalism
presented in (
        <xref ref-type="bibr" rid="ref1">Freund and Mitchell (1999)</xref>
        ). This
work defined semantics and a type system to study
object initialization in bytecode. The original idea
was developed in (
        <xref ref-type="bibr" rid="ref9">Stata and Abadi (1999)</xref>
        ) to
study bytecode subroutines. In (
        <xref ref-type="bibr" rid="ref7">Freund and Mitchell
(2003)</xref>
        ), the authors extended the work (
        <xref ref-type="bibr" rid="ref1">Freund
and Mitchell (1999)</xref>
        ) to bytecode subroutines, virtual
method invocation and exceptions. On another
side, using predicate transformation to reason
about bytecode properties has been studied in
(
        <xref ref-type="bibr" rid="ref2">Gre´goire,Sacchini and Sivan (2008</xref>
        )). The authors
presented a verification condition generator for
bytecode formalized in the Coq proof assistant and
based on weakest precondition calculus. Another
work using weakest precondition to generate
verification conditions from an annotated bytecode
is presented in (
        <xref ref-type="bibr" rid="ref5">Burdy and Pavlova (2006)</xref>
        ,
        <xref ref-type="bibr" rid="ref6">Burdy et
al. (2007)</xref>
        ).
      </p>
      <p>
        Our work is close to (
        <xref ref-type="bibr" rid="ref1">Freund and Mitchell (1999)</xref>
        )
in the sense of the use of static semantics to
analyze bytecode. The specificity of our work is
the definition of semantics for updates. We use
predicate transformation to reason about bytecode
properties using existing tools for specification and
proofs. Our bytecode logic for weakest precondtion
calculus is inspired by (
        <xref ref-type="bibr" rid="ref15">Bannwart and Mu¨ller (2005)</xref>
        ).
The authors present a Hoare-style logic combined
with instruction specification in term of precondition
for sequential bytecode. We adopted such instruction
specification in our logic for weakest precondition for
update operation.
      </p>
      <p>
        In some studies, manipulating and analysing
bytecode requires its modelisation in flexible
representations suitable to the manipulation required. In (
        <xref ref-type="bibr" rid="ref17">Puder
and Lee (2009)</xref>
        ), bytecode is represented by XML
trees in order to use the technologies supporting
XML to ease the injection and extraction of bytecode.
In (
        <xref ref-type="bibr" rid="ref22">Albert and al. (2007</xref>
        )), bytecode is represented
by clauses written in Prolog to perform verification of
bytecode programs. Generally, functional
modelisation is used when the goal is to consider programs
as mathematical models whose meaning is
independent of runtime states. Therefore, it is possible
to apply equational rewriting and reasoning to them
(
        <xref ref-type="bibr" rid="ref19">Guodong (2010)</xref>
        ) and use several proof systems
that are built on or uses functional languages in
specifications.
      </p>
    </sec>
    <sec id="sec-16">
      <title>9. CONCLUSION</title>
      <p>In this paper, we proposed an approach for
formalisation and verification of java bytecode
updated programs. Our approach relies on four
main concepts. We showed first how to use existing
specification languages for Java and Java bytecode
programs to write specification and transform
them. Then, we defined a formal semantics which
constitute a formal mean to establish the validity
of update operations with regard to Java type
safety. We proposed a functional representation of
bytecode in order to model the application of update
operations with the use of the notion of bytecode
annotation. We presented a predicate transformation
calculus based on weakest precondition for update
operations to derive a specification for the annotated
bytecode and showed how to establish the
correctness of the update.</p>
      <p>The approach presented is implemented using
the OCaml language. Our study started with
considering the system EmbedDSU but this is
not restrictive, the framework proposed can be
generalised to specification and verification of
updated programs written in languages that are
complied to bytecode. The use of the functional
language and representation eases its integration
with existing formal methods. Our immediate future
work is to define WP calculus for instruction
suppression. We plan to define another predicate
transformation calculus (strongest postcondition) for
update operation and the integration of our approach
in an existing formal method supporting verification
condition generation for functional programs.</p>
      <p>Common Criteria,http://www.commmoncriteria.org</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Freund</surname>
            ,
            <given-names>S. N</given-names>
          </string-name>
          and Mitchell,
          <string-name>
            <surname>J. C</surname>
          </string-name>
          , (
          <year>1999</year>
          )
          <article-title>A type system for object initialization in the Java bytecode language</article-title>
          .
          <source>In ACM Trans. Program. Lang. Syst.</source>
          , vol
          <volume>21</volume>
          , pp.
          <fpage>1196</fpage>
          -
          <lpage>1250</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Gre</surname>
          </string-name>
          ´goire, B,
          <string-name>
            <surname>Sacchini</surname>
            ,
            <given-names>J. L</given-names>
          </string-name>
          and
          <string-name>
            <surname>Sivan</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          , (
          <year>2008</year>
          )
          <article-title>Combining a verification condition generator for a bytecode language with static analyses</article-title>
          .
          <source>In Proceedings of the 3rd conference on Trustworthy global computing</source>
          , Springer-Verlag, pp.
          <fpage>23</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Binder</surname>
            ,
            <given-names>W</given-names>
          </string-name>
          and Hulaas,
          <string-name>
            <surname>J</surname>
          </string-name>
          , (
          <year>2005</year>
          )
          <article-title>Java Bytecode Transformations for Efficient, Portable CPU Accounting</article-title>
          .
          <source>In Electron. Notes Theor. Comput. Sci</source>
          ., Elsevier Science Publishers B. V. vol
          <volume>141</volume>
          , pp.
          <fpage>53</fpage>
          -
          <lpage>73</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Noubissi</surname>
            ,
            <given-names>A.C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iguchi-Cartigny</surname>
            ,
            <given-names>J</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lanet</surname>
            ,
            <given-names>J. L</given-names>
          </string-name>
          , (
          <year>2011</year>
          )
          <article-title>Hot updates for Java based smart cards</article-title>
          .
          <source>In ICDE Workshops</source>
          , pp.
          <fpage>168</fpage>
          -
          <lpage>173</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Burdy</surname>
            ,
            <given-names>L</given-names>
          </string-name>
          and Pavlova,
          <string-name>
            <surname>M</surname>
          </string-name>
          , (
          <year>2006</year>
          )
          <article-title>Java bytecode specification and verification</article-title>
          <source>In SAC</source>
          <year>2006</year>
          , pp.
          <fpage>1835</fpage>
          -
          <lpage>1839</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Burdy</surname>
            ,
            <given-names>L</given-names>
          </string-name>
          , Huisman, M and Pavlova,
          <string-name>
            <surname>M</surname>
          </string-name>
          , (
          <year>2007</year>
          )
          <article-title>Preliminary Design of BML: A Behavioral Interface Specification Language for Java Bytecode In FASE 2007</article-title>
          , pp.
          <fpage>215</fpage>
          -
          <lpage>229</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Freund</surname>
            ,
            <given-names>S. N</given-names>
          </string-name>
          and Mitchell,
          <string-name>
            <surname>J. C</surname>
          </string-name>
          ,(
          <year>2003</year>
          )
          <article-title>A Type System for the Java Bytecode Language and Verifier</article-title>
          .
          <source>In J. Autom. Reasoning</source>
          , vol
          <volume>30</volume>
          , pp.
          <fpage>271</fpage>
          -
          <lpage>321</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Hoare</surname>
            ,
            <given-names>C. A. R</given-names>
          </string-name>
          , (
          <year>1969</year>
          )
          <article-title>An Axiomatic Basis for Computer Programming</article-title>
          .
          <source>In Commun. ACM</source>
          , vol
          <volume>12</volume>
          , pp.
          <fpage>576</fpage>
          -
          <lpage>580</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <surname>Stata</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          and Abadi,
          <string-name>
            <surname>M</surname>
          </string-name>
          , (
          <year>1999</year>
          )
          <article-title>A Type System for Java Bytecode Subroutine In ACM Trans</article-title>
          .
          <source>Program. Lang. Syst., vol21</source>
          , pp.
          <fpage>90</fpage>
          -
          <lpage>137</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Dahm</surname>
            ,
            <given-names>M</given-names>
          </string-name>
          , (
          <year>1999</year>
          )
          <article-title>Byte Code Engineering</article-title>
          . InJavaInformations-Tage, pp.
          <fpage>267</fpage>
          -
          <lpage>277</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Sakamoto</surname>
            ,
            <given-names>T</given-names>
          </string-name>
          , Sekiguchi, T and Yonezawa,
          <string-name>
            <surname>A</surname>
          </string-name>
          , (
          <year>2000</year>
          )
          <article-title>Bytecode Transformation for Portable Thread Migration in Java</article-title>
          . In ASA/MA,
          <year>2000</year>
          , pp.
          <fpage>16</fpage>
          -
          <lpage>28</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Bachrach</surname>
            ,
            <given-names>J</given-names>
          </string-name>
          and
          <string-name>
            <surname>Playford</surname>
            ,
            <given-names>K</given-names>
          </string-name>
          , (
          <year>2001</year>
          )
          <article-title>The Java Syntactic Extender</article-title>
          .
          <source>In OOPSLA 2001</source>
          , pp.
          <fpage>31</fpage>
          -
          <lpage>42</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <surname>Noubissi</surname>
            ,
            <given-names>A. C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iguchi-Cartigny</surname>
            ,
            <given-names>J</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lanet</surname>
            ,
            <given-names>J. L</given-names>
          </string-name>
          , (
          <year>2010</year>
          )
          <article-title>Incremental Dynamic Update for Java-Based Smart Cards</article-title>
          .
          <source>In Fifth International Conference on Systems</source>
          , pp.
          <fpage>110</fpage>
          -
          <lpage>113</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Burdy</surname>
            ,
            <given-names>L</given-names>
          </string-name>
          , Cheon,
          <string-name>
            <surname>Y</surname>
          </string-name>
          , Cok,
          <string-name>
            <given-names>D. R</given-names>
            ,
            <surname>Ernst</surname>
          </string-name>
          , M. D,
          <string-name>
            <surname>Kiniry</surname>
            ,
            <given-names>J. R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leavens</surname>
            ,G. T, Leino,
            <given-names>K. R.</given-names>
          </string-name>
          <article-title>M, and</article-title>
          <string-name>
            <surname>Poll</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          <article-title>An Overview of JML Tools and Applications</article-title>
          .
          <source>In Int. J. Softw. Tools Technol. Transf.</source>
          , vol
          <volume>7</volume>
          , pp.
          <fpage>212</fpage>
          -
          <lpage>232</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Bannwart</surname>
            ,
            <given-names>F</given-names>
          </string-name>
          and Mu¨ller,
          <string-name>
            <surname>P</surname>
          </string-name>
          , (
          <year>2005</year>
          )
          <article-title>A Program Logic for Bytecode</article-title>
          .
          <source>In Electron. Notes Theor. Comput. Sci</source>
          .vol
          <volume>141</volume>
          ,
          <string-name>
            <surname>Elsevier</surname>
            <given-names>Science Publishers B. V.</given-names>
          </string-name>
          ,
          <year>2005</year>
          , pp
          <fpage>255</fpage>
          -
          <lpage>273</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <string-name>
            <surname>McGachey</surname>
            ,
            <given-names>P</given-names>
          </string-name>
          , Hosking,
          <string-name>
            <given-names>A. L</given-names>
            and
            <surname>Moss</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.E.B,</surname>
          </string-name>
          (
          <year>2009</year>
          )
          <article-title>Pervasive Load-Time Transformation for Transparently Distributed Java</article-title>
          .
          <source>In Electron. Notes Theor. Comput. Sci.,</source>
          vol
          <volume>253</volume>
          ,
          <string-name>
            <surname>Elsevier Science</surname>
          </string-name>
          Publishers B. V., pp.
          <fpage>47</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Puder</surname>
            ,
            <given-names>P</given-names>
          </string-name>
          and Lee,
          <string-name>
            <surname>J</surname>
          </string-name>
          , (
          <year>2009</year>
          )
          <article-title>Towards an XMLbased Bytecode Level Transformation Framework</article-title>
          .
          <source>In Electron. Notes Theor. Comput. Sci.,</source>
          vol
          <volume>253</volume>
          ,
          <string-name>
            <surname>Elsevier Science</surname>
          </string-name>
          Publishers B. V., pp.
          <fpage>97</fpage>
          -
          <lpage>111</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <surname>Boshernitsan</surname>
            , M and Graham,
            <given-names>S. L</given-names>
          </string-name>
          , (
          <year>2004</year>
          )
          <article-title>iXj: Interactive Source-to-source Transformations for Java</article-title>
          .
          <source>In Companion to the 19th Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications</source>
          , pp.
          <fpage>212</fpage>
          -
          <lpage>213</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <string-name>
            <surname>Guodong</surname>
            ,
            <given-names>L</given-names>
          </string-name>
          , (
          <year>2010</year>
          )
          <article-title>Formal verification of programs and their transformations</article-title>
          .
          <source>PhD thesis</source>
          , University of Utah, USA.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          <string-name>
            <surname>Lounas</surname>
            ,
            <given-names>R</given-names>
          </string-name>
          , Mezghiche, M and Lanet,
          <string-name>
            <surname>J. L</surname>
          </string-name>
          , (
          <year>2012</year>
          )
          <article-title>Towards a General Framework for Formal Reasoning about Java Bytecode Transformation</article-title>
          <source>In Proceedings Fourth International Symposium on Symbolic Computation in Software Science</source>
          , pp.
          <fpage>63</fpage>
          -
          <lpage>73</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          <string-name>
            <surname>Noubissi</surname>
            ,
            <given-names>A. C,</given-names>
          </string-name>
          (
          <year>2011</year>
          )
          <article-title>Mise a´ jour dynamique et se´curise´e de composants syste´me dans une carte a´ puce</article-title>
          .
          <source>PhD thesis</source>
          , University of Limoges, France,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Albert</surname>
            ,
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gomez-Zamalloa</surname>
            ,
            <given-names>M</given-names>
          </string-name>
          , Hubert,
          <string-name>
            <surname>L</surname>
          </string-name>
          and Puebla,
          <string-name>
            <surname>G</surname>
          </string-name>
          , (
          <year>2007</year>
          )
          <article-title>Verification of Java Bytecode Using Analysis and Transformation of Logic Programs</article-title>
          .
          <source>In Practical Aspects of Declarative Languages</source>
          ,
          <year>2007</year>
          , Springer Berlin Heidelberg,pp.
          <fpage>124</fpage>
          -
          <lpage>139</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Neamtiu</surname>
            ,
            <given-names>I</given-names>
          </string-name>
          , Hicks,
          <string-name>
            <surname>M</surname>
          </string-name>
          , Stoyle,
          <string-name>
            <surname>G</surname>
          </string-name>
          and Oriol,
          <string-name>
            <surname>M</surname>
          </string-name>
          , (
          <year>2006</year>
          )
          <article-title>Practical Dynamic Software Updating for C</article-title>
          .
          <source>In ACM SIGPLAN Conference on Programming Language Design and Implementation</source>
          , pages
          <fpage>7283</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jalote</surname>
            <given-names>P</given-names>
          </string-name>
          and Barua,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>A formal framework for online software version change</article-title>
          .
          <source>Software Engineering</source>
          , IEEE Transactions on,
          <volume>22</volume>
          (
          <issue>2</issue>
          ):
          <fpage>120131</fpage>
          ,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          <string-name>
            <surname>Orso</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rao</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          and Harrold,
          <string-name>
            <surname>M. J.</surname>
          </string-name>
          <article-title>A technique for dynamic updating of Java Software</article-title>
          .
          <source>In ICSM</source>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          <string-name>
            <surname>Hlopko</surname>
            ,
            <given-names>M</given-names>
          </string-name>
          , Kurs,
          <string-name>
            <given-names>J</given-names>
            , and
            <surname>Vrany</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Towards</surname>
          </string-name>
          <article-title>a Runtime Code Update in Java an exploration using STX:LIBJAVA</article-title>
          .
          <source>In proceeding of Dateso</source>
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>