Skip to content

Commit 39e7e38

Browse files
committed
Remove CryptolM and SpecM sawcore modules and associated code.
1 parent 1e7f193 commit 39e7e38

File tree

17 files changed

+12
-5314
lines changed

17 files changed

+12
-5314
lines changed

cryptol-saw-core/saw/CryptolM.sawcore

Lines changed: 0 additions & 823 deletions
This file was deleted.

cryptol-saw-core/saw/SpecM.sawcore

Lines changed: 0 additions & 944 deletions
This file was deleted.

cryptol-saw-core/src/CryptolSAWCore/Cryptol.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,12 @@ import SAWCore.Term.Pretty (showTerm)
101101
-- local modules:
102102
import CryptolSAWCore.Panic
103103

104-
-- Type-check the Prelude, Cryptol, SpecM, and CryptolM modules at compile time
104+
-- Type-check the Prelude and Cryptol modules at compile time
105105
import Language.Haskell.TH
106106
import CryptolSAWCore.Prelude
107-
import CryptolSAWCore.PreludeM
108107

109108
$(runIO (mkSharedContext >>= \sc ->
110-
scLoadPreludeModule sc >> scLoadCryptolModule sc >>
111-
scLoadSpecMModule sc >> scLoadCryptolMModule sc >> return []))
109+
scLoadPreludeModule sc >> scLoadCryptolModule sc >> pure []))
112110

113111
--------------------------------------------------------------------------------
114112

cryptol-saw-core/src/CryptolSAWCore/PreludeM.hs

Lines changed: 0 additions & 24 deletions
This file was deleted.

saw-central/src/SAWCentral/Prover/Exporter.hs

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ import Lang.JVM.ProcessUtils (readProcessExitIfFailure)
7474
import CryptolSAWCore.CryptolEnv (initCryptolEnv, loadCryptolModule,
7575
ImportPrimitiveOptions(..), mkCryEnv)
7676
import CryptolSAWCore.Prelude (cryptolModule, scLoadPreludeModule, scLoadCryptolModule)
77-
import CryptolSAWCore.PreludeM (cryptolMModule, specMModule,
78-
scLoadSpecMModule, scLoadCryptolMModule)
7977
import SAWCore.ExternalFormat(scWriteExternal)
8078
import SAWCore.FiniteValue
8179
import SAWCore.Module (emptyModule, moduleDecls)
@@ -449,23 +447,6 @@ withImportCryptolPrimitivesForSAWCore config@(Coq.TranslationConfiguration { Coq
449447
]
450448
}
451449

452-
withImportSpecM ::
453-
Coq.TranslationConfiguration -> Coq.TranslationConfiguration
454-
withImportSpecM config@(Coq.TranslationConfiguration { Coq.postPreamble }) =
455-
config { Coq.postPreamble = postPreamble ++ unlines
456-
[ "From CryptolToCoq Require Import SpecM."
457-
]
458-
}
459-
460-
withImportSpecMPrimitivesForSAWCore ::
461-
Coq.TranslationConfiguration -> Coq.TranslationConfiguration
462-
withImportSpecMPrimitivesForSAWCore config@(Coq.TranslationConfiguration { Coq.postPreamble }) =
463-
config { Coq.postPreamble = postPreamble ++ unlines
464-
[ "From CryptolToCoq Require Import SpecMPrimitivesForSAWCore."
465-
]
466-
}
467-
468-
469450
withImportCryptolPrimitivesForSAWCoreExtra ::
470451
Coq.TranslationConfiguration -> Coq.TranslationConfiguration
471452
withImportCryptolPrimitivesForSAWCoreExtra config@(Coq.TranslationConfiguration { Coq.postPreamble }) =
@@ -570,42 +551,25 @@ writeCoqSAWCorePrelude outputFile notations skips = do
570551
writeFile outputFile (show . vcat $ [ Coq.preamble configuration, doc ])
571552

572553
writeCoqCryptolPrimitivesForSAWCore ::
573-
FilePath -> FilePath -> FilePath ->
554+
FilePath ->
574555
[(Text, Text)] ->
575556
[Text] ->
576557
IO ()
577-
writeCoqCryptolPrimitivesForSAWCore cryFile specMFile cryMFile notations skips = do
558+
writeCoqCryptolPrimitivesForSAWCore cryFile notations skips = do
578559
sc <- mkSharedContext
579560
() <- scLoadPreludeModule sc
580561
() <- scLoadCryptolModule sc
581-
() <- scLoadSpecMModule sc
582-
() <- scLoadCryptolMModule sc
583562
() <- scLoadModule sc (emptyModule (mkModuleName ["CryptolPrimitivesForSAWCore"]))
584563
m <- scFindModule sc nameOfCryptolPrimitivesForSAWCoreModule
585-
m_spec <- scFindModule sc (Un.moduleName specMModule)
586-
m_mon <- scFindModule sc (Un.moduleName cryptolMModule)
587564
mm <- scGetModuleMap sc
588565
let configuration =
589566
withImportSAWCorePreludeExtra $
590567
withImportSAWCorePrelude $
591568
coqTranslationConfiguration notations skips
592-
let configuration_spec =
593-
withImportCryptolPrimitivesForSAWCore $
594-
withImportSpecM configuration
595-
let configuration_mon =
596-
withImportSpecMPrimitivesForSAWCore configuration
597569
let doc = Coq.translateSAWModule configuration mm m
598570
writeFile cryFile (show . vcat $ [ Coq.preamble configuration
599571
, doc
600572
])
601-
let doc_spec = Coq.translateSAWModule configuration_spec mm m_spec
602-
writeFile specMFile (show . vcat $ [ Coq.preamble configuration_spec
603-
, doc_spec
604-
])
605-
let doc_mon = Coq.translateSAWModule configuration_mon mm m_mon
606-
writeFile cryMFile (show . vcat $ [ Coq.preamble configuration_mon
607-
, doc_mon
608-
])
609573

610574
-- | Tranlsate a SAWCore term into an AIG
611575
bitblastPrim :: (AIG.IsAIG l g) => AIG.Proxy l g -> SharedContext -> Term -> IO (AIG.Network l g)

saw-core-coq/coq/_CoqProject

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33

44
generated/CryptolToCoq/SAWCorePrelude.v
55
generated/CryptolToCoq/CryptolPrimitivesForSAWCore.v
6-
generated/CryptolToCoq/SpecMPrimitivesForSAWCore.v
7-
# generated/CryptolToCoq/CryptolMPrimitivesForSAWCore.v
86

9-
handwritten/CryptolToCoq/SpecM.v
10-
# handwritten/CryptolToCoq/CompM.v
11-
# handwritten/CryptolToCoq/CompMExtra.v
127
handwritten/CryptolToCoq/CoqVectorsExtra.v
138
handwritten/CryptolToCoq/CryptolPrimitivesForSAWCoreExtra.v
149
handwritten/CryptolToCoq/SAWCoreBitvectors.v
@@ -17,6 +12,5 @@ handwritten/CryptolToCoq/SAWCorePrelude_proofs.v
1712
handwritten/CryptolToCoq/SAWCorePreludeExtra.v
1813
handwritten/CryptolToCoq/SAWCoreScaffolding.v
1914
handwritten/CryptolToCoq/SAWCoreVectorsAsCoqVectors.v
20-
# handwritten/CryptolToCoq/SpecMExtra.v
2115

2216
handwritten/CryptolToCoq/Everything.v

0 commit comments

Comments
 (0)