Optimization of resolution on Java card
-
摘要: 针对复杂的传统Java智能卡指令解析问题,结合Applet的部署特点,提出了指令预解析的概念;给出了转换后的Applet文件(CAP,Converted Applet file)中导入组件、常数池和导出组件的预解析优化存储结构及包注册表结构,使用定长存储结构替代原有的变长存储结构以加快查找过程,引入了导出组件辅助索引表以加快外包类的解析过程;设计了基于优化后组件的静态域、静态方法和类访问字节码指令的快速解析流程,将解析算法的时间复杂度降为常数阶;在Applet下载过程中通过预解析来生成优化后的组件存储结构,在执行过程中依据快速解析流程来完成静态域、静态方法和类对象的快速访问,从而缩短了Applet运行时的解析时间.测试结果表明,在不改变标准Applet下载、运行流程的情况下,该方法有效地减少了卡内存储器的访问次数,缩短了解析算法的执行时间,提高了Applet执行的整体性能.Abstract: The pre-resolution was proposed based on the process of Applets deployment in order to optimize the resolution on Java card. At first, The optimized structure of import, constant pool and export component in CAP(converted Applet file)and package registration table were given. The fixed length structure instead of variable length structure in optimized components was used so as to speed up the search of resolution objects. Furthermore, the index of export component was designed to improve the resolution of classes in external packages. Secondly, the fast runtime resolution algorithms of static fields, static methods and classes were designed based on this optimized structure. The time complexity of those algorithms is O(1). Thirdly, the optimized component structures were generated by pre-resolution during Applet download. The fast resolution of static fields, static methods and classes was implemented with runtime resolution based on those optimized structures. Test results show that this optimization algorithm reduces the times of memory access, speeds up the execution of resolution and improves the runtime performance of Applets on Java card.
-
Key words:
- Java programming language /
- smart cards /
- optimization
点击查看大图
计量
- 文章访问数: 3248
- HTML全文浏览量: 79
- PDF下载量: 1512
- 被引次数: 0