Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump submodules. #2011

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/cryptol-specs
RyanGlScott marked this conversation as resolved.
Show resolved Hide resolved
Submodule cryptol-specs updated 146 files
2 changes: 1 addition & 1 deletion deps/llvm-pretty
2 changes: 1 addition & 1 deletion deps/macaw
Submodule macaw updated 65 files
+6 −0 .github/workflows/ci.yaml
+2 −0 base/ChangeLog.md
+2 −2 base/src/Data/Macaw/AbsDomain/AbsState.hs
+1 −1 base/src/Data/Macaw/AbsDomain/JumpBounds.hs
+4 −3 base/src/Data/Macaw/Analysis/FunctionArgs.hs
+27 −25 base/src/Data/Macaw/Analysis/RegisterUse.hs
+12 −7 base/src/Data/Macaw/Architecture/Info.hs
+0 −1 base/src/Data/Macaw/CFG/AssignRhs.hs
+1 −1 base/src/Data/Macaw/CFG/Core.hs
+1 −1 base/src/Data/Macaw/Discovery.hs
+1 −1 base/src/Data/Macaw/Discovery/Classifier.hs
+2 −2 base/src/Data/Macaw/Discovery/Classifier/JumpTable.hs
+1 −1 base/src/Data/Macaw/Discovery/ParsedContents.hs
+4 −3 base/src/Data/Macaw/Memory.hs
+166 −4 base/src/Data/Macaw/Memory/ElfLoader.hs
+3 −0 cabal.project.dist
+2 −0 cabal.project.werror
+1 −1 deps/crucible
+1 −1 deps/elf-edit
+6 −0 macaw-aarch32-symbolic/tests/pass/Makefile
+18 −0 macaw-aarch32-symbolic/tests/pass/strd.c_template
+ macaw-aarch32-symbolic/tests/pass/strd.opt.exe
+31 −0 macaw-aarch32-symbolic/tests/pass/strd.s
+ macaw-aarch32-symbolic/tests/pass/strd.unopt.exe
+0 −1 macaw-aarch32/src/Data/Macaw/ARM/Disassemble.hs
+5 −4 macaw-ppc/src/Data/Macaw/PPC/Disassemble.hs
+4 −0 macaw-ppc/tests/ppc32/Makefile
+6 −0 macaw-ppc/tests/ppc32/test-relocs.c
+ macaw-ppc/tests/ppc32/test-relocs.exe
+48 −0 macaw-ppc/tests/ppc32/test-relocs.s
+6 −0 macaw-ppc/tests/ppc32/test-relocs.s.expected
+10 −0 macaw-ppc/tests/ppc64/Dockerfile
+4 −0 macaw-ppc/tests/ppc64/Makefile
+6 −0 macaw-ppc/tests/ppc64/README.md
+6 −0 macaw-ppc/tests/ppc64/test-relocs.c
+ macaw-ppc/tests/ppc64/test-relocs.exe
+50 −0 macaw-ppc/tests/ppc64/test-relocs.s
+6 −0 macaw-ppc/tests/ppc64/test-relocs.s.expected
+10 −11 macaw-semmc/src/Data/Macaw/SemMC/Generator.hs
+2 −2 macaw-semmc/src/Data/Macaw/SemMC/Translations.hs
+30 −0 symbolic-syntax/LICENSE
+29 −0 symbolic-syntax/README.md
+135 −0 symbolic-syntax/macaw-symbolic-syntax.cabal
+543 −0 symbolic-syntax/src/Data/Macaw/Symbolic/Syntax.hs
+11 −0 symbolic-syntax/test-data/byte_id.cbl
+33 −0 symbolic-syntax/test-data/byte_id.out
+33 −0 symbolic-syntax/test-data/byte_id.out.good
+6 −0 symbolic-syntax/test-data/copy.cbl
+21 −0 symbolic-syntax/test-data/copy.out
+21 −0 symbolic-syntax/test-data/copy.out.good
+12 −0 symbolic-syntax/test-data/ops.cbl
+45 −0 symbolic-syntax/test-data/ops.out
+45 −0 symbolic-syntax/test-data/ops.out.good
+11 −0 symbolic-syntax/test-data/short_id.cbl
+33 −0 symbolic-syntax/test-data/short_id.out
+33 −0 symbolic-syntax/test-data/short_id.out.good
+5 −0 symbolic-syntax/test-data/zero_size_t.cbl
+14 −0 symbolic-syntax/test-data/zero_size_t.out
+14 −0 symbolic-syntax/test-data/zero_size_t.out.good
+60 −0 symbolic-syntax/test/Test.hs
+46 −6 symbolic/src/Data/Macaw/Symbolic.hs
+21 −4 symbolic/src/Data/Macaw/Symbolic/MemOps.hs
+5 −4 symbolic/src/Data/Macaw/Symbolic/Memory/Lazy.hs
+9 −4 x86/src/Data/Macaw/X86.hs
+6 −0 x86/src/Data/Macaw/X86/Semantics.hs
9 changes: 5 additions & 4 deletions heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Data.Parameterized.Some
import Lang.Crucible.Types
import Lang.Crucible.LLVM.DataLayout
import Lang.Crucible.LLVM.MemModel
import Lang.Crucible.LLVM.PrettyPrint

import Verifier.SAW.OpenTerm
import Verifier.SAW.Term.Functor (ModuleName)
Expand Down Expand Up @@ -86,12 +87,12 @@ traceAndZeroM msg =
-- | Helper function to pretty-print the value of a global
ppLLVMValue :: L.Value -> String
ppLLVMValue val =
L.withConfig (L.Config True True True) (show $ PPHPJ.nest 2 $ L.ppValue val)
ppLLVMLatest (show $ PPHPJ.nest 2 $ L.ppValue val)
andreistefanescu marked this conversation as resolved.
Show resolved Hide resolved

-- | Helper function to pretty-print an LLVM constant expression
ppLLVMConstExpr :: L.ConstExpr -> String
ppLLVMConstExpr ce =
L.withConfig (L.Config True True True) (show $ PPHPJ.nest 2 $ L.ppConstExpr ce)
ppLLVMLatest (show $ PPHPJ.nest 2 $ L.ppConstExpr ce)

-- | Translate a typed LLVM 'L.Value' to a Heapster shape + an element of the
-- translation of that shape to a SAW core type
Expand Down Expand Up @@ -182,7 +183,7 @@ translateLLVMType _ (L.PrimType (L.Integer n))
(bvTypeOpenTerm n))
translateLLVMType _ tp =
traceAndZeroM ("translateLLVMType does not yet handle:\n"
++ show (L.ppType tp))
++ show (ppType tp))

-- | Helper function for 'translateLLVMValue' applied to a constant expression
translateLLVMConstExpr :: (1 <= w, KnownNat w) => NatRepr w -> L.ConstExpr ->
Expand Down Expand Up @@ -251,7 +252,7 @@ translateZeroInit w (L.PackedStruct tps) =

translateZeroInit _ tp =
traceAndZeroM ("translateZeroInit cannot handle type:\n"
++ show (L.ppType tp))
++ show (ppType tp))

-- | Top-level call to 'translateLLVMValue', running the 'LLVMTransM' monad
translateLLVMValueTop :: (1 <= w, KnownNat w) => DebugLevel -> EndianForm ->
Expand Down
14 changes: 7 additions & 7 deletions src/SAWScript/Crucible/LLVM/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ import qualified Data.Vector as V
import Prettyprinter
import System.IO
import qualified Text.LLVM.AST as L
import qualified Text.LLVM.PP as L (ppType, ppSymbol)
import Text.URI
import qualified Control.Monad.Trans.Maybe as MaybeT

Expand Down Expand Up @@ -167,6 +166,7 @@ import qualified Lang.Crucible.LLVM.Bytes as Crucible
import qualified Lang.Crucible.LLVM.Intrinsics as Crucible
import qualified Lang.Crucible.LLVM.MemModel as Crucible
import qualified Lang.Crucible.LLVM.MemType as Crucible
import qualified Lang.Crucible.LLVM.PrettyPrint as Crucible
import Lang.Crucible.LLVM.QQ( llvmOvr )
import qualified Lang.Crucible.LLVM.Translation as Crucible

Expand Down Expand Up @@ -231,13 +231,13 @@ displayVerifExceptionOpts opts (DefNotFound (L.Symbol nm) nms) =
[ "Could not find definition for function named `" ++ nm ++ "`."
] ++ if simVerbose opts < 3
then [ "Run SAW with --sim-verbose=3 to see all function names" ]
else "Available function names:" : map ((" " ++) . show . L.ppSymbol) nms
else "Available function names:" : map ((" " ++) . show . Crucible.ppSymbol) nms
displayVerifExceptionOpts opts (DeclNotFound (L.Symbol nm) nms) =
unlines $
[ "Could not find declaration for function named `" ++ nm ++ "`."
] ++ if simVerbose opts < 3
then [ "Run SAW with --sim-verbose=3 to see all function names" ]
else "Available function names:" : map ((" " ++) . show . L.ppSymbol) nms
else "Available function names:" : map ((" " ++) . show . Crucible.ppSymbol) nms
displayVerifExceptionOpts _ (SetupError e) =
"Error during simulation setup: " ++ show (ppSetupError e)

Expand Down Expand Up @@ -1825,7 +1825,7 @@ handleTranslationWarning :: Options -> Crucible.LLVMTranslationWarning -> IO ()
handleTranslationWarning opts (Crucible.LLVMTranslationWarning s p msg) =
printOutLn opts Warn $ unwords
[ "LLVM bitcode translation warning"
, show (L.ppSymbol s)
, show (Crucible.ppSymbol s)
, show p
, Text.unpack msg
]
Expand Down Expand Up @@ -2163,7 +2163,7 @@ llvm_fresh_var name lty =
sc <- lift $ lift getSharedContext
let dl = Crucible.llvmDataLayout (ccTypeCtx cctx)
case cryptolTypeOfActual dl lty' of
Nothing -> throwCrucibleSetup loc $ "Unsupported type in llvm_fresh_var: " ++ show (L.ppType lty)
Nothing -> throwCrucibleSetup loc $ "Unsupported type in llvm_fresh_var: " ++ show (Crucible.ppType lty)
Just cty -> Setup.freshVariable sc name cty

llvm_fresh_cryptol_var ::
Expand Down Expand Up @@ -2261,7 +2261,7 @@ memTypeForLLVMType loc lty =
case Crucible.liftMemType lty of
Right m -> return m
Left err -> throwCrucibleSetup loc $ unlines
[ "unsupported type: " ++ show (L.ppType lty)
[ "unsupported type: " ++ show (Crucible.ppType lty)
, "Details:"
, err
]
Expand All @@ -2277,7 +2277,7 @@ llvm_sizeof (Some lm) lty =
case Crucible.liftMemType lty of
Right mty -> pure (Crucible.bytesToInteger (Crucible.memTypeSize dl mty))
Left err -> fail $ unlines
[ "llvm_sizeof: Unsupported type: " ++ show (L.ppType lty)
[ "llvm_sizeof: Unsupported type: " ++ show (Crucible.ppType lty)
, "Details:"
, err
]
Expand Down
6 changes: 3 additions & 3 deletions src/SAWScript/Crucible/LLVM/MethodSpecIR.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ import Data.Functor.Compose (Compose(..))
import qualified Data.Map as Map
import qualified Prettyprinter as PPL
import qualified Text.LLVM.AST as L
import qualified Text.LLVM.PP as L

import Data.Parameterized.All (All(All))
import Data.Parameterized.Some (Some(Some))
Expand All @@ -132,6 +131,7 @@ import What4.ProgramLoc (ProgramLoc)
import qualified Lang.Crucible.Types as Crucible (SymbolRepr, knownSymbol)
import qualified Lang.Crucible.Simulator.Intrinsics as Crucible
(IntrinsicMuxFn(IntrinsicMuxFn))
import qualified Lang.Crucible.LLVM.PrettyPrint as Crucible.LLVM

import SAWScript.Crucible.Common
import qualified SAWScript.Crucible.Common.MethodSpec as MS
Expand Down Expand Up @@ -243,11 +243,11 @@ data SetupError
ppSetupError :: SetupError -> PPL.Doc ann
ppSetupError (InvalidReturnType t) =
PPL.pretty "Can't lift return type" PPL.<+>
PPL.viaShow (L.ppType t) PPL.<+>
PPL.viaShow (Crucible.LLVM.ppType t) PPL.<+>
PPL.pretty "to a Crucible type."
ppSetupError (InvalidArgTypes ts) =
PPL.pretty "Can't lift argument types " PPL.<+>
PPL.encloseSep PPL.lparen PPL.rparen PPL.comma (map (PPL.viaShow . L.ppType) ts) PPL.<+>
PPL.encloseSep PPL.lparen PPL.rparen PPL.comma (map (PPL.viaShow . Crucible.LLVM.ppType) ts) PPL.<+>
PPL.pretty "to Crucible types."

resolveArgs ::
Expand Down
12 changes: 7 additions & 5 deletions src/SAWScript/Crucible/LLVM/Setup/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module SAWScript.Crucible.LLVM.Setup.Value
import Control.Lens
import Data.Map ( Map )
import qualified Data.Map as Map
import Data.Maybe
import qualified Data.Text as Text
import Data.Type.Equality (TestEquality(..))
import Data.Void (Void)
Expand All @@ -100,6 +101,7 @@ import What4.ProgramLoc (ProgramLoc)
import qualified Lang.Crucible.FunctionHandle as Crucible (HandleAllocator)
import qualified Lang.Crucible.Simulator.ExecutionTree as Crucible (SimContext)
import qualified Lang.Crucible.Simulator.GlobalState as Crucible (SymGlobalState)
import qualified Lang.Crucible.LLVM.PrettyPrint as Crucible.LLVM

import SAWScript.Crucible.Common
import qualified SAWScript.Crucible.Common.Setup.Value as Setup
Expand Down Expand Up @@ -236,19 +238,19 @@ showLLVMModule :: LLVMModule arch -> String
showLLVMModule (LLVMModule name m _) =
unlines [ "Module: " ++ name
, "Types:"
, showParts L.ppTypeDecl (L.modTypes m)
, showParts (Crucible.LLVM.ppLLVMLatest L.ppTypeDecl) (L.modTypes m)
, "Globals:"
, showParts ppGlobal' (L.modGlobals m)
, showParts (Crucible.LLVM.ppLLVMLatest ppGlobal') (L.modGlobals m)
, "External references:"
, showParts L.ppDeclare (L.modDeclares m)
, showParts Crucible.LLVM.ppDeclare (L.modDeclares m)
, "Definitions:"
, showParts ppDefine' (L.modDefines m)
, showParts (Crucible.LLVM.ppLLVMLatest ppDefine') (L.modDefines m)
]
where
showParts pp xs = unlines $ map (show . PP.nest 2 . pp) xs
ppGlobal' g =
L.ppSymbol (L.globalSym g) PP.<+> PP.char '=' PP.<+>
L.ppGlobalAttrs (L.globalAttrs g) PP.<+>
L.ppGlobalAttrs (isJust $ L.globalValue g) (L.globalAttrs g) PP.<+>
L.ppType (L.globalType g)
ppDefine' d =
L.ppMaybe L.ppLinkage (L.defLinkage d) PP.<+>
Expand Down
4 changes: 2 additions & 2 deletions src/SAWScript/HeapsterBuiltins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ import Lang.Crucible.FunctionHandle
import Lang.Crucible.CFG.Core
import Lang.Crucible.LLVM.Extension
import Lang.Crucible.LLVM.MemModel
import qualified Lang.Crucible.LLVM.PrettyPrint as Crucible.LLVM
import Lang.Crucible.LLVM.Translation
-- import Lang.Crucible.LLVM.Translation.Types
import Lang.Crucible.LLVM.TypeContext
import Lang.Crucible.LLVM.DataLayout

import qualified Text.LLVM.AST as L
import qualified Text.LLVM.Parser as L
import qualified Text.LLVM.PP as L
import qualified Text.PrettyPrint.HughesPJ as L (render)

import SAWScript.TopLevel
Expand Down Expand Up @@ -973,7 +973,7 @@ heapster_find_symbol_commands _bic _opts henv str =
return $
concatMap (\tp ->
"heapster_find_symbol_with_type env\n \"" ++ str ++ "\"\n " ++
print_as_saw_script_string (L.render $ L.ppType tp) ++ ";\n") $
print_as_saw_script_string (L.render $ Crucible.LLVM.ppType tp) ++ ";\n") $
concatMap (\(Some lm) ->
mapMaybe (\decl ->
if isInfixOf str (symString $ L.decName decl)
Expand Down
4 changes: 2 additions & 2 deletions src/SAWScript/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ import qualified SAWScript.Crucible.JVM.MethodSpecIR ()
import qualified SAWScript.Crucible.MIR.MethodSpecIR ()
import qualified Lang.JVM.Codebase as JSS
import qualified Text.LLVM.AST as LLVM (Type)
import qualified Text.LLVM.PP as LLVM (ppType)
import SAWScript.JavaExpr (JavaType(..))
import SAWScript.JavaPretty (prettyClass)
import SAWScript.MGU (instantiate)
Expand Down Expand Up @@ -118,6 +117,7 @@ import qualified Lang.Crucible.JVM as CJ

import Lang.Crucible.Utils.StateContT
import Lang.Crucible.LLVM.ArraySizeProfile
import qualified Lang.Crucible.LLVM.PrettyPrint as Crucible.LLVM

import Mir.Generator
import Mir.Intrinsics (MIR)
Expand Down Expand Up @@ -373,7 +373,7 @@ showsPrecValue opts nenv p v =
VLLVMSkeletonState _ -> showString "<<Skeleton state>>"
VLLVMFunctionProfile _ -> showString "<<Array sizes for function>>"
VJavaType {} -> showString "<<Java type>>"
VLLVMType t -> showString (show (LLVM.ppType t))
VLLVMType t -> showString (show (Crucible.LLVM.ppType t))
VMIRType t -> showString (show (PP.pretty t))
VCryptolModule m -> showString (showCryptolModule m)
VLLVMModule (Some m) -> showString (CMSLLVM.showLLVMModule m)
Expand Down
Loading