due to the decompression phase. As a consequence,
time performance issues could preventthe adoption of
the compression system especially in contexts where
time constraints are strict.
The most popular technique for speeding-up the
Java interpreter is the Just In Time (JIT) compilation.
Unfortunately, this approach is not compliant with the
typical smart card hardware configurations. A differ-
ent approach based on an interpreter with hardware
support is more suitable for smart cards.
In this paper we integrate the dictionary decom-
pression functionality on an interpreter with hardware
support. As final result, we obtain an interpreter able
to execute compressed applications faster than a stan-
dard software interpreter executing a non-compressed
application.
The structure of the rest of this paper is as follows.
Section 2 reviews the previous work that forms the
basis of this research. Section 3 analyzes the dictio-
nary compression and its application to the interpreter
with hardware support. In section 4 we evaluate the
proposed models with particular attention to the exe-
cution time. Finally, in section 5 we report our con-
clusions and present suggestions for future work.
2 RELATED WORKS
Java Card is a Java subset specifically created for
smart cards that allows developers to use an object-
oriented programming language and to write appli-
cations hardware independently (Chen, 2000). The
virtual machine in the run-time environment repre-
sents a common abstraction layer between the hard-
ware platform and the application, and makes it pos-
sible to compile the application once and run it in each
platform deploying a compliant Java Card environ-
ment. The issuing format of Java Card applications
is the CAP file, whose inside is organized in compo-
nents (Oracle, 2011b). All the methods of the classes
are stored in the method component; consequently the
latter is usually the component with the highest con-
tribution to the overall application ROM size. For this
reason, a reduction of the size of the method compo-
nent would mean a significant reduction of the ROM
space needed to install the application on the smart
card.
Alongside following good programming prac-
tices, the main solution for reducing the ROM size
of an application is the compressing of said applica-
tion. The drawback of common compression tech-
niques based on Huffmann and LZ77 algorithms is
their need of a considerable amount of memory to
decompress the application before its execution (Sa-
lomon, 2004).
Dictionary compression is a technique based on
a dictionary containing the definitions of new sym-
bols (macros) (Salomon, 2004). Each definition in
the dictionary consists of a sequence of symbols that
is often repeated in the data to compress. In the com-
pression phase the repeated sequences are substituted
with the respective macros (the macro definition and
the substituted sequence have to be the same), while
in the decompression phase the macros are substituted
with their definition. Claussen et al. applied dictio-
nary compression to Java for low-end embedded sys-
tems (Clausen et al., 2000). Applied to interpreted
languages like Java, the main advantage of this com-
pression technique, when compared to the traditional
techniques, resides in the possibility to decompress
the code on-the-fly during run-time. In fact, when the
interpreter encounters a macro in the code, it starts
the interpretation of the code in the macro definition,
not needing the decompression of the entire code.
Claussen et al. could save up to 15% of the appli-
cation space, but this had also the disadvantage of a
slower execution speed quantifiable between 5% and
30%. In (Zilli et al., 2013), we explored the exten-
sions of the base dictionary technique. In that work,
we evaluated the static and dynamic dictionary as well
as the use of generalized macros with arguments.
The main disadvantage of interpreted languages
compared with native applications is the low execu-
tion performance. The system commonly used to im-
prove the execution speed in standard Java environ-
ments is the “Just In Time” (JIT) compilation (Sug-
anuma et al., 2000) (Cramer et al., 1997) (Krall and
Grafl, 1997). JIT compilation consists of the run-time
compilation and optimization of sequences of byte-
codes into native machine instructions. The disadvan-
tage of this technique is the amount of RAM memory
required to temporary store the compiled code. For
low-end embedded systems such as smart cards, the
amount of RAM memory needed for JIT compilations
does not comply with the memory configurations.
Another solution for overcoming the low execu-
tion speed is the hardware implementation of the Java
virtual machine. Previous works can be categorized
into two main approaches: the direct bytecode execu-
tion in hardware, and the hardware translation from
Java bytecode to machine instructions. An example
of the first case is picoJava (McGhan and O’Connor,
1998), a Java processor that executes the bytecodes
directly in hardware. This approach reaches high ex-
ecution performance, but has the disadvantage of a
difficult integration with applications written in na-
tive code. An example of hardware bytecode transla-
tion is the ARM Jazelle technology (Steel, 2001). In
PECCS2015-5thInternationalConferenceonPervasiveandEmbeddedComputingandCommunicationSystems
306