Keywords

figure a
figure b

1 Introduction

Reliable, correctly functioning IT systems are fundamental in a digital world. One way to achieve correct systems is to apply formal methods. Tools for formal methods are intricate software systems, which often compute abstract models to prove system implementations correct or find errors. There is already a large pool of mature and well-established verification tools (for example, in the area of software verification [1,2,3,4,5]), and automatic tools are heavily used in industrial software-engineering applications [4, 6,7,8]. Sometimes such tools are even used as components in meta verifiers [9,10,11,12,13,14]. However, the integration of verification tools provides multiple obstacles: (1) There exists a plentitude of research verification tools that are no longer maintained despite delivering interesting results, making them incapable of running in modern software environments, (2) the tools often provide poor documentation of their requirements on the environment (e.g., whether LLVM 9 or LLVM 12 is required), and which operating system they expect (e.g., Ubuntu 20.04), and (3) these tools often have a huge configuration space resulting in a complicated set of command-line interface (CLI) arguments that users have to understand and set correctly. These obstacles deter developers and researchers from experimenting or even integrating verification tools in their own processes and tools [15, 16].

Fig. 1.
figure 1

Overview of FM-Weck

FM-Weck is a command-line tool that mitigates these issues by using the developer-provided metadata from the FM-Tools repository [17, 18]. The FM-Tools repository is a community-maintained source of metadata for formal-methods tools. The repository and the metadata format has been adopted by the international competitions on software verification (SV-COMP) [19] and testing (Test-Comp) [20], and tool developers maintain the information about their tools, including the expected runtime environments and execution parameters. FM-Weck uses these data provided by experts to give researchers and users easy access to controlled runtime environments and execution of more than currently 50 verification tools for C and Java. Figure 1 gives an overview of FM-Weck ’s three modes of operation, , , and , which assist users working with tools for formal methods. In the following section, we briefly introduce the FM-Tools metadata format that is used by the FM-Tools repository (for more details we refer to the format description [17]), then we present how to use FM-Weck ’s modes of operation before concluding with current applications of the tool.

Related Work. CoVeriTeam  [21] is a tool and language for constructing tool compositions. It uses a YAML-based format for the atomic-actor definitions (information where to download, how to assemble command-lines). This format has inspired the format used in FM-Tools. Unfortunately, CoVeriTeam does not configure the execution environment for the tools and simply assumes that the host machine has all required packages readily installed, which FM-Weck solves. Conserving tools for formal methods is an old desire [22], also addressed by CoVeriTeam Service  [9]. FM-Weck adds the use of Docker containers to make the environment reproducible and easy to run, also independently from web services.

2 FM-Tools: Tool Metadata

The FM-Tools repository aggregates relevant information about tools for formal methods: It specifies the download location, maintainers, command-line options, as well as other related information. In addition, FM-Tools stores information about container images on which the tool is guaranteed to run according to the maintainers. An FM-Tools file for a specific tool is a YAML document with a precisely defined set of keys (a schema for the metadata of formal-methods tools is available in the repository). FM-Tools was adopted by SV-COMP and Test-Comp in their 2024 edition [19, 20]. As part of FM-Weck, we also provide a Python library [23] that helps users to parse, use, and modify FM-Tools.

figure f

Listing 1 shows an example of a tool-version entry in FM-Tools. The field specifies the Ubuntu packages that are required to run the tool. The field specifies the Ubuntu container images on which the required Ubuntu packages can be installed, and with which the tool is guaranteed to run after package installation. The field specifies self-contained container images that are guaranteed to run the tool out-of-the-box. For a tool t it shall hold that

(1)
(2)

where \(\oplus \) denotes the operation of installing the packages on the image i and \(i \models t\) denotes that the image i is sufficient to run the tool t.

FM-Tools currently refers to Ubuntu packages, because most tools run on Linux, and Ubuntu as a widespread distribution, whose long-term support keeps specifying and installing the packages straightforward across verifiers.

3 FM-Weck

FM-Weck is a command-line tool written in Python, which consumes FM-Tools  [18] tool metadata to execute formal-methods tools inside of a container. (The tool’s name is inspired by a German brand of jars for conserving food.) The utility can be used to run, develop, and experiment with formal-methods tools. The software architecture of FM-Weck also allows and encourages usage as a library.

FM-Weck simplifies the execution of formal-methods tools by setting up and starting containers tailored for each tool. FM-Weck can also configure a container runtime such that benchmarks with BenchExec are possible inside of them. To launch the actual container, FM-Weck uses podman [24] internally with the crun runtime [25]. The FM-Weck CLI comes with three modes of operation: , , and .

3.1 FM-Weck Modes

Every command in FM-Weck takes an FM-Tools file as input. This file can be specified either as a path, or as the identifier of the tool. In the latter case, FM-Weck uses the bundled file from the FM-Tools repository with the corresponding name. In any case, users can also specify a specific version of a verifier by appending it with a colon after the file path or name, e.g., .

figure o

The mode enables plug-and-play execution of formal-methods tools: it downloads and unpacks a tool from the archive specified in the FM-Tools metadata file (’verifier.yml’ above) into a user-specified cache directory on the host system. This cache is mounted into the container, where the verifier is then executed with the given command-line arguments. The mode takes two additional arguments: (1) the argument specifies a property file, i.e., the goal for the verifier—this can either be a path to the property file or the name of one of the properties used in SV-COMP or Test-Comp, and (2) the files that shall be passed to the tool. In the case of software verifiers, these program files are the input programs to be verified.

figure t

The mode is for manual interaction with a verifier: it executes a given verifier, specified through the corresponding FM-Tools YAML file, in its containerized environment passing any additional arguments verbatim to the verifier. Just like in the mode, FM-Weck takes care of downloading and unpacking the verifier as well as setting up the container before the execution. All arguments following the tool are passed to the verifier in the container, which makes the mode essentially act like the verifier if it was executed directly on the host system. The following is an example execution that displays the version of the CPAchecker verifier:

figure aa

The mode enters an interactive shell inside of the container specified by the given verifier. The shell mode launches a Bash shell with the current working directory mounted inside. Users may mount additional directories through a configuration file described in Sect. 3.2. Like with the mode, the container information is extracted from the FM-Tools metadata file provided by the user. The shell mode takes no additional parameters. The following example starts an interactive shell in the container of Ultimate Automizer:

3.2 Project-Specific Configuration

FM-Weck works without any additional configuration, but expert users can still modify aspects of FM-Weck to their needs. Users may set default values and additional files or directories which shall be available inside the container. The configuration is specified in TomL format, as seen in Listing 2. If users define a default image file in this configuration, they can omit the verifier.yml in the mode, and the keys in the and modes.

figure ai

Relative paths in the configuration file are relative to the directory that contains the configuration file. If no configuration path is explicitly set via the command line, FM-Weck first looks for a configuration file .weck in the current working directory. If this does not exist, it looks for a configuration file .config/weck in the user’s home directory.

4 Applications

FM-Weck is designed with three core applications in mind: (1) to execute a single tool based on its FM-Tools metadata, (2) to facilitate the execution of unmaintained tools in future competition instances, and (3) as a utility that enables OS-independent execution in CoVeriTeam  [21].

4.1 Execution of a Single Tool

FM-Weck provides a bother-free user experience that encourages curious researchers and developers to try and experiment with different verification tools—from well established behemoths to cutting-edge research tools. Users do not have to worry about the tool’s dependencies, installation, or complicated command-line configurations. The mode of FM-Weck achieves this goal. Running CPAchecker to find overflows in a C program is as simple as:

figure ak

4.2 Containerized Execution in CoVeriTeam

CoVeriTeam  [21] is a framework for cooperative verification. Similar to fm-weck, CoVeriTeam takes tool metadata in a YAML format as input, to download and run the tools specified in a cooperative-verification workflow. Each tool is executed inside a containerized environment provided by BenchExec  [26]. However, these BenchExec containers do not support OCI container images. This means that all tools running in a CoVeriTeam workflow must be able to run on the host system. We extend CoVeriTeam with an FM-Weck-based run mode. This enables the cooperation of actors regardless of their system requirements.

Figure 2 illustrates the integration of FM-Weck in CoVeriTeam. Instead of calling BenchExec, CoVeriTeam calls FM-Weck to instantiate a container for the given tool and execute the assembled command inside of it. CoVeriTeam is also written in Python and uses FM-Weck directly as a library.

Fig. 2.
figure 2

FM-Weck as executor in CoVeriTeam

Fig. 3.
figure 3

FM-Weck as drop-in command for SV-COMP infrastructure

4.3 Reliable Execution in SV-COMP  2025

SV-COMP comparatively evaluates more than 70 verification tools on an extensive benchmark set [19, 27]. The server infrastructure that executes these millions of verification and validation runs during the competition is hosted on the always-latest Ubuntu LTS Version. This is a formal requirement of the SV-COMP rules. However, there is a growing number of tools that are no longer actively maintained and serve as a retrospective baseline—the so-called hors-concours participants. These tools are benchmarked in the same way as the regular participants, but they do not compete in the ranking. Until SV-COMP  2024, these tools were manually migrated by volunteers to still work on the latest Ubuntu LTS Version, but with 26 hors-concurs participants, the amount of migration-labor becomes infeasible.

With FM-Weck we extend the functionality of the current SV-COMP infrastructure to execute these tools in the SV-COMP  2024 environment. Figure 3 illustrates how FM-Weck is used as a drop-in solution. We wrap the existing invocation of the benchmark command inside of a pre-built image. This image replicates the OS and installed packages of SV-COMP  2024. By default, BenchExec cannot run inside of another container: FM-Weck also sets up the container runtime such that BenchExec works inside of it.

5 Conclusion

We developed FM-Weck, a utility to run formal-methods tools in containerized environments. The goals are to (a) conserve the tools, such that they stay executable in the future, and (b) make it easy for researchers, practitioners, and educators to use and explore the existing tools for formal methods. The application scenarios in CoVeriTeam and SV-COMP infrastructure demonstrate the capabilities of FM-Weck as a library as well as a command-line tool. The tool is open source, licensed under Apache 2.0, and available on GitLab [28].