我想在使用 ghc 前端和 llvm 后端编译 haskell 文件生成的 .bc 文件上运行 klee。
我的 haskell hello.hs 文件中有以下代码:
main = putStrLn "Hello World!"
我使用以下命令用 ghc 编译 hello.hs
ghc -fllvm -keep-llvm-files -force-recomp -hello.hs
它会生成一个 hello.ll 文件以及其他文件。然后我尝试将此 .ll 文件编译成 .bc 文件。
llvm-as hello.ll -o hello.bc
问题是当我尝试运行 klee 或尝试在 .bc 文件上运行 lli 时出现以下错误
main function not found in module error
我在 docker 上运行 ghc 和 llvm。我有 llvm 3.4 版和 ghc 7.6.3 版。