crucible-symio-0.1: An implementation of symbolic I/O primitives for Crucible
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lang.Crucible.SymIO.Loader

Description

This module defines a default loader for initial symbolic filesystem contents

It uses a simple convention to convert on-disk files and metadata into a InitialFileSystemContents. This is not the only way to construct initial filesystem contents, but it is a good default if a tool does not have more specific needs.

The caller provides a single input: a path to a directory. The directory contains two things:

  1. A subdirectory named root that contains the concrete files in the symbolic filesystem (i.e., the directory mapped to /)
  2. (Optional) A file named symbolic-manifest.json, which describes symbolic files and overlays

The symbolic manifest specifies the contents of symbolic files, including constraints on symbolic values. Furthermore, it enables users to specify that concrete files in the provided filesystem have symbolic values overlaid over the concrete values. If an overlay is specified in the symbolic manifest, the referenced concrete file must exist.

Note: future versions of this interface could support symbolic filesystems stored in zip or tar files.

Synopsis

Documentation

loadInitialFiles :: IsSymInterface sym => sym -> FilePath -> IO (InitialFileSystemContents sym) Source #

Load the symbolic filesystem at the given file path

Note that this will throw an exception if:

  • The symbolic manifest declares an overlay for a file that does not exist in the concrete portion of the filesystem