|
ESBMC
Efficient SMT-based Context-Bounded Model Checker
|
Files bundled into the binary, overlaid on the real filesystem. More...
#include <filesystem.h>
Public Member Functions | |
| void | add_bundled (const std::string &path, const char *data, size_t size) |
| Registers static file contents; see file_data::bundled(). | |
| std::optional< file_data > | read (const std::string &path) const |
| Contents of path, or nothing if it is neither bundled nor a readable file. | |
| bool | exists (const std::string &path) const |
| bool | readable (const std::string &path) const |
| Whether the contents of path can actually be obtained. | |
| size_t | bundled_count () const noexcept |
| How many bundled files are registered. | |
| std::vector< std::string > | list (const std::string &prefix) const |
| Every bundled path below prefix, at any depth. | |
| const std::string & | materialize (const std::string &prefix, const std::string &format) |
| Writes every bundled file below prefix into a fresh temporary directory named after format, and returns that directory. | |
Static Public Member Functions | |
| static filesystemt & | get () |
Files bundled into the binary, overlaid on the real filesystem.
Files scripts/flail.py bundles are registered under ESBMC_VFS_ROOT. read() checks the registry first and falls back to disk, so callers cannot tell which layer answered. materialize() writes a subtree out for consumers that cannot read ESBMC's memory: a forked python3 or solc.
| void filesystemt::add_bundled | ( | const std::string & | path, |
| const char * | data, | ||
| size_t | size ) |
Registers static file contents; see file_data::bundled().
path must not already be registered.
|
noexcept |
How many bundled files are registered.
Only ever grows, so a change means new registrations arrived.
| bool filesystemt::exists | ( | const std::string & | path | ) | const |
|
static |
| std::vector< std::string > filesystemt::list | ( | const std::string & | prefix | ) | const |
Every bundled path below prefix, at any depth.
| const std::string & filesystemt::materialize | ( | const std::string & | prefix, |
| const std::string & | format ) |
Writes every bundled file below prefix into a fresh temporary directory named after format, and returns that directory.
Cached per prefix, so a subtree is written at most once per run. The directory is removed when ESBMC exits.
| std::optional< file_data > filesystemt::read | ( | const std::string & | path | ) | const |
Contents of path, or nothing if it is neither bundled nor a readable file.
| bool filesystemt::readable | ( | const std::string & | path | ) | const |