Authors: Petr Ročkai, Zuzana Baranová, Jan Mrázek, Katarína Kejstová, Jiří Barnat
Abstract:

In this paper, we describe DiOS, a lightweight model operating system which can be used to execute programs that make use of POSIX APIs. Such executions are fully reproducible: running the same program with the same inputs twice will result in two exactly identical instruction traces, even if the program uses threads for parallelism.

DiOS is implemented almost entirely in portable C and C++: although its primary platform is DiVM, a verification-oriented virtual machine, it can be configured to also run in KLEE, a symbolic executor. Finally, it can be compiled into machine code to serve as a user-mode kernel.

Additionally, DiOS is modular and extensible. Its various components can be combined to match both the capabilities of the underlying platform and to provide services required by a particular program. New components can be added to cover additional system calls or APIs.

The experimental evaluation has two parts. DiOS is first evaluated as a component of a program verification platform based on DiVM. In the second part, we consider its portability and modularity by combining it with the symbolic executor KLEE.

Documents:

Source Code

The tagged and annotated test programs mentioned in Section 5 of the paper are available here: test.tar.gz. We compiled the test programs approximately this way (the exact executable instructions are part of test.tar.gz, in file test/lib/verify):

divine cc -o klee-pre.bc "$name" /dios/lib/config/seq.bc \
          -C,-ldios,-lc++abi,-lc,-ldios_klee
lart klee-pre.bc klee.bc functionmeta
klee -entry-point=klee_boot -exit-on-error -output-dir=_klee_out \
     -check-overshift=false klee.bc

The source code of DiOS itself can be found in dios.tar.gz. Please note that neither of the tarballs are standalone, and are mainly useful for inspection. To execute the automated build and testcases, we suggest that you download divine-4.3.0+dios.tar.gz and run make. To be able to run the testcases with KLEE, you will need to build a patched version of KLEE: (klee-2.0+dios.tar.gz) and put the resulting klee binary on your path.

To run the testsuite, you can issue make functional (alternatively, make functional F=klee will only run testcases using klee).