Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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:
- A subdirectory named
root
that contains the concrete files in the symbolic filesystem (i.e., the directory mapped to/
) - (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
- loadInitialFiles :: IsSymInterface sym => sym -> FilePath -> IO (InitialFileSystemContents sym)
- data FileSystemLoadError
- = ErrorDecodingJSON String
- | forall k. FileSpecifiedAsSymbolicAndConcrete (FDTarget k)
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
data FileSystemLoadError Source #
ErrorDecodingJSON String | |
forall k. FileSpecifiedAsSymbolicAndConcrete (FDTarget k) |
Instances
Exception FileSystemLoadError Source # | |
Show FileSystemLoadError Source # | |
Defined in Lang.Crucible.SymIO.Loader showsPrec :: Int -> FileSystemLoadError -> ShowS # show :: FileSystemLoadError -> String # showList :: [FileSystemLoadError] -> ShowS # |