trommler / VeriGHC

Towards a verified back-end for The Glorious Glasgow Haskell Compilation System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate native code generator files with hs-to-coq

trommler opened this issue · comments

Do something like this:
stack exec hs-to-coq -- ~/ghc/compiler/nativeGen/PPC/Instr.hs -N -I ~/ghc/compiler -I ~/ghc/compiler/stage1 -I ~/ghc/compiler/stage1/build -I ~/ghc/includes/dist-derivedconstants/header -i ~/ghc/compiler/nativeGen -i ~/ghc/compiler/cmm -i ~/ghc/compiler/main -i ~/ghc/compiler/basicTypes -i ~ghc/compiler/parser -i ~/ghc/compiler/prelude -i ~/ghc/compiler/utils -i ~/ghc/compiler/stage1/build -i ~/ghc/compiler/stage1/build/autogen --ghc "-D STAGE=1" --ghc -XHaskell2010 --ghc -XNoImplicitPrelude --ghc -hide-all-packages --ghc -no-user-package-db --ghc "-package-db ~/ghc/libraries/bootstrapping.conf" --ghc "-this-unit-id ghc-8.7" --ghc "-package-id base-4.11.1.0" --ghc "-package-id containers-0.5.11.0" --ghc "-package-id bytestring-0.10.8.2" --ghc "-package-id unix-2.7.2.2" --ghc "-package-id filepath-1.4.2" --ghc "-package-id directory-1.3.1.5" --ghc "-package-id time-1.8.0.2" --ghc "-package-id transformers-0.5.5.0" --ghc "-package-id deepseq-1.4.3.0" --ghc "-package-id ghc-boot-8.7" -o ~/tmp
This command line should be generated from the GHC build system data.

To do this

  • add GHC as a submodule
  • configure and build GHC
  • create build rule to generate files in nativeGen/PPC

This seems to be quite involved. We leave it for later.

It seems that extending hs-to-coq/examples/ghc is the way to go.

This is done now.