Skip to main navigation Skip to search Skip to main content

Formal Verification of Source Code
: OpenJML versus Frama-C

  • Daniel Hametner

    Student thesis: Master's Thesis

    Abstract

    Formal verification offers mathematical proofs of the correctness of programs that con
    ventional testing methods cannot provide. Despite its long history, its adoption in the
    software industry remains limited, and the technical literature lacks a comprehensive
    and up-to-date comparison of established specification languages and their verification
    tools. This thesis fills this gap for two of the most widely used programming languages,
    Java and C, by systematically comparing the specification languages JML (Java Mod
    eling Language) and ACSL (ANSI/ISO C Specification Language) along with their
    respective deductive verification tools, OpenJML and Frama-C.
    The comparison follows an empirical approach based on a catalog of approximately
    80 representative verification scenarios. Each scenario is implemented and annotated in
    both Java using JML and in C using ACSL, and is then verified using OpenJML and
    Frama-C. To isolate the deductive verification process, the analysis is limited to static
    verification and deliberately excludes the dynamic modes of both tools.
    The results show that the two specification languages are largely alike. Both are
    based on the principle of Design by Contract and differ only where the paradigm of
    the underlying language requires it, such as with the exception clauses in JML or the
    memory-related predicates in ACSL. The more significant differences are evident at the
    level of the tools, whose implemented capabilities fall short of the expressiveness of the
    languages they support. A common limitation is the handling of generalized quantifiers,
    which neither tool can verify, while each tool has additional weaknesses rooted in its
    target language, specifically unbounded numeric types for quantifiers in OpenJML and
    pointer aliasing in Frama-C. In terms of usability, OpenJML offers a lower barrier to
    entry, as it is provided as a standalone package with integrated solvers and practical
    tutorials, whereas Frama-C has a more complex installation process and requires a
    more thorough understanding of its extensive reference manuals. However, both tools
    are actively maintained open-source projects supported by a dedicated community.
    Date of Award2026
    Original languageEnglish (American)
    Awarding Institution
    • FH OÖ
    SupervisorJosef Pichler (Supervisor)

    Studyprogram

    • Software Engineering

    Cite this

    '