crux-llvm-0.8: A verification tool for C programs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crux.LLVM.Config

Synopsis

Documentation

data SupplyMainArguments Source #

What sort of main functions should crux-llvm support simulating?

Constructors

NoArguments

Only support simulating main functions with the signature int main(). Attempting to simulate a main function that takes arguments will result in an error. This is crux-llvm's default behavior.

EmptyArguments

Support simulating both int main() and int(main argc, char *argv[]). If simulating the latter, supply the arguments argc=0 and argv={}. This is a reasonable choice for programs whose main function is declared with the latter signature but never make use of argc or argv.

Instances

Instances details
Show SupplyMainArguments Source # 
Instance details

Defined in Crux.LLVM.Config

findDefaultLibDir :: IO FilePath Source #

The c-src directory, which contains crux-llvm–specific files such as crucible.h, can live in different locations depending on how crux-llvm was built. This function looks in a couple of common places:

  1. A directory relative to the crux-llvm binary itself. This is the case when running a crux-llvm binary distribution. If that can't be found, default to...
  2. The data-files directory, as reported by cabal's getDataDir function.

This isn't always guaranteed to work in every situation, but it should cover enough common cases to be useful in practice.