The breakneck evolution of modern programming languages aggravates the development of deductive verification tools, which struggle to timely and fully support all new language features. To address this challenge, we present ByteBack: a verification technique that works on Java bytecode. Compared to high-level languages, intermediate representations such as bytecode offer a much more limited and stable set of features; hence, they may help decouple the verification process from changes in the source-level language.
ByteBack offers a library to specify functional correctness properties at the level of the source code, so that the bytecode is only used as an intermediate representation that the end user does not need to work with. Then, ByteBack reconstructs some of the information about types and expressions that is erased during compilation into bytecode but is necessary to correctly perform verification. Our experiments with an implementation of ByteBack demonstrate that it can successfully verify bytecode compiled from different versions of Java, and including several modern language features that even state-of-the-art Java verifiers (such as KeY and OpenJML) do not directly support$\unicode{x2013}$thus revealing how ByteBack's approach can help keep up verification technology with language evolution.
Efficient and Expressive Bytecode-Level Instrumentation for Java Programs
我们提出了一个有效的和富有表现力的工具,在字节码级的Java程序的仪器。BISM(Bytecode-Level Instrumentation for Software Monitoring)是一个轻量级的Java字节码插装工具,它具有一种表达性高的高级控制流感知插装语言。该语言受到面向方面编程范例的启发,将插装模块化为单独的Transformers,封装连接点选择和内联建议。BISM允许捕获从字节码指令到方法执行的连接点,并提供全面的静态和动态上下文信息。它以两种检测模式运行:构建时和加载时。BISM还提供了一种机制来组合Transformers并自动检测它们在基本程序中的冲突。组合中的Transformers可以控制它们的通知和来自基本程序的其他指令的可见性。我们展示了BISM的几个示例应用程序,并使用三个实验证明其有效性:安全场景,金融交易系统和一般运行时验证案例。结果表明,BISM插装引起低的运行时间和内存开销。
JooFlux: Hijacking Java 7 InvokeDynamic To Support Live Code Modifications
在运行时更改功能性和非功能性软件实现在开发和生产环境中是有用的,有时甚至是至关重要的。JooFlux是一个JVM代理,它允许方法实现的动态替换和方面建议的应用。它通过字节码转换来利用Java SE 7中添加的新invokedynamic指令来帮助实现JVM的动态语言。JooFlux可以使用JMX代理进行管理,以便在运行时进行动态修改,而无需求助于专用的特定领域语言。我们将JooFlux与现有的AOP平台和动态语言进行了比较。结果表明,JooFlux的性能接近Java的--与大多数时间边际开销,有时增益--在AOP平台和动态语言提出显着的开销。这为JooFlux未来有趣的发展和应用铺平了道路。
Deductive Verification of Floating-Point Java Programs in KeY
演绎验证在验证真实世界程序的有趣属性方面取得了成功。一个值得注意的差距是对浮点推理的支持有限。这是不幸的,因为浮点运算由于舍入以及特殊值infinity和“Not a Number”(NaN)的存在而特别不直观。在本文中,我们提出了第一个浮点支持的演绎验证工具的Java程序设计语言。我们在KeY验证器中的支持通过SMT求解器内部的浮点决策过程处理算术,并通过公理化处理超越函数。我们在新的基准上评估这种集成,并表明这种方法足够强大,可以证明没有浮点特殊值-通常是进一步推理数值计算的先决条件-以及现实基准的某些功能特性。