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. #1432

Merged
merged 3 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ packages:
deps/crucible/crucible-jvm
deps/crucible/crucible-llvm
deps/crucible/crucible-saw
deps/crucible/crucible-symio
deps/crucible/crucible-syntax
deps/crucible/crux
deps/crucible/crux-mir
Expand Down
2 changes: 1 addition & 1 deletion cryptol-saw-core/src/Verifier/SAW/CryptolEnv.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import qualified Cryptol.ModuleSystem.Renamer as MR

import qualified Cryptol.Utils.Ident as C

import Cryptol.Utils.PP
import Cryptol.Utils.PP hiding ((</>))
import Cryptol.Utils.Ident (Ident, preludeName, preludeReferenceName
, packIdent, interactiveName, identText
, packModName, textToModName, modNameChunks
Expand Down
2 changes: 1 addition & 1 deletion deps/crucible
Submodule crucible updated 145 files
2 changes: 1 addition & 1 deletion deps/cryptol
Submodule cryptol updated 63 files
+1 −1 cryptol-remote-api/python/cryptol/commands.py
+25 −0 cryptol-remote-api/python/tests/cryptol/test-files/Types.cry
+2 −2 cryptol-remote-api/python/tests/cryptol/test_AES.py
+1 −1 cryptol-remote-api/python/tests/cryptol/test_DES.py
+45 −0 cryptol-remote-api/python/tests/cryptol/test_types.py
+2 −2 cryptol.cabal
+1 −1 cryptol/REPL/Haskeline.hs
+ docs/ProgrammingCryptol.pdf
+5 −5 docs/ProgrammingCryptol/crashCourse/CrashCourse.tex
+ docs/Semantics.pdf
+1 −1 src/Cryptol/Backend/Concrete.hs
+1 −1 src/Cryptol/Eval/Concrete.hs
+3 −4 src/Cryptol/Eval/Reference.lhs
+6 −9 src/Cryptol/Eval/Value.hs
+1 −1 src/Cryptol/ModuleSystem/Monad.hs
+1 −1 src/Cryptol/ModuleSystem/NamingEnv.hs
+14 −14 src/Cryptol/ModuleSystem/Renamer/Error.hs
+39 −35 src/Cryptol/Parser/AST.hs
+2 −2 src/Cryptol/Parser/Name.hs
+1 −1 src/Cryptol/Parser/NoInclude.hs
+9 −9 src/Cryptol/Parser/ParserUtils.hs
+5 −5 src/Cryptol/Parser/Selector.hs
+25 −25 src/Cryptol/REPL/Browse.hs
+25 −24 src/Cryptol/REPL/Command.hs
+3 −3 src/Cryptol/REPL/Monad.hs
+3 −3 src/Cryptol/Symbolic.hs
+4 −6 src/Cryptol/TypeCheck.hs
+23 −22 src/Cryptol/TypeCheck/AST.hs
+49 −49 src/Cryptol/TypeCheck/Error.hs
+26 −24 src/Cryptol/TypeCheck/InferTypes.hs
+20 −8 src/Cryptol/TypeCheck/Parseable.hs
+1 −2 src/Cryptol/TypeCheck/SimpleSolver.hs
+1 −1 src/Cryptol/TypeCheck/Solver/SMT.hs
+26 −25 src/Cryptol/TypeCheck/Type.hs
+1 −1 src/Cryptol/TypeCheck/TypeOf.hs
+77 −63 src/Cryptol/Utils/PP.hs
+2 −1 tests/examples/allexamples.icry.stdout
+10 −5 tests/issues/issue1024.icry.stdout
+3 −3 tests/issues/issue152.icry.stdout
+25 −31 tests/issues/issue226.icry.stdout
+6 −6 tests/issues/issue268.icry.stdout
+3 −4 tests/issues/issue407.icry.stdout
+3 −7 tests/issues/issue410.icry.stdout
+1 −2 tests/issues/issue494.icry.stdout
+10 −9 tests/issues/issue513.icry.stdout
+4 −2 tests/issues/issue702.icry.stdout
+2 −1 tests/issues/issue894.icry.stdout
+2 −2 tests/issues/padding.icry.stdout
+2 −1 tests/modsys/nested/T1.icry.stdout
+8 −4 tests/modsys/nested/T2.icry.stdout
+16 −16 tests/mono-binds/test01.icry.stdout
+20 −20 tests/mono-binds/test02.icry.stdout
+16 −16 tests/mono-binds/test03.icry.stdout
+8 −8 tests/mono-binds/test04.icry.stdout
+25 −24 tests/mono-binds/test05.icry.stdout
+24 −24 tests/mono-binds/test06.icry.stdout
+1 −1 tests/regression/float.icry.stdout
+35 −44 tests/regression/instance.icry.stdout
+4 −4 tests/regression/rec-update.icry.stdout
+3 −3 tests/regression/repl-decls.icry.stdout
+2 −2 tests/regression/sort.icry.stdout
+25 −26 tests/regression/specialize.icry.stdout
+1 −2 tests/regression/superclass.icry.stdout
2 changes: 1 addition & 1 deletion deps/llvm-pretty
2 changes: 1 addition & 1 deletion saw/SAWScript/REPL/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import SAWScript.REPL.Trie
import SAWScript.Position (getPos)

import Cryptol.Parser (ParseError())
import Cryptol.Utils.PP
import Cryptol.Utils.PP hiding ((</>))

import Control.Monad (guard)
import Data.Char (isSpace,isPunctuation,isSymbol)
Expand Down
47 changes: 36 additions & 11 deletions src/SAWScript/Crucible/LLVM/Builtins.hs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ import qualified Lang.Crucible.Simulator.PathSatisfiability as Crucible
import qualified Lang.Crucible.LLVM.ArraySizeProfile as Crucible
import qualified Lang.Crucible.LLVM.DataLayout as Crucible
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.Translation as Crucible
Expand Down Expand Up @@ -486,7 +487,7 @@ withMethodSpec ::
LLVMModule arch ->
String {- ^ Name of the function -} ->
LLVMCrucibleSetupM () {- ^ Boundary specification -} ->
((?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
((?lc :: Crucible.TypeContext, ?memOpts::Crucible.MemOptions, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
LLVMCrucibleContext arch -> MS.CrucibleMethodSpecIR (LLVM arch) -> TopLevel a) ->
TopLevel a
withMethodSpec pathSat lm nm setup action =
Expand Down Expand Up @@ -530,7 +531,11 @@ withMethodSpec pathSat lm nm setup action =
action cc methodSpec

verifyMethodSpec ::
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
LLVMCrucibleContext arch ->
MS.CrucibleMethodSpecIR (LLVM arch) ->
[MS.ProvedSpec (LLVM arch)] ->
Expand Down Expand Up @@ -1038,7 +1043,12 @@ ppGlobalPair cc gp =
--------------------------------------------------------------------------------

registerOverride ::
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth wptr, wptr ~ Crucible.ArchWidth arch, Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth wptr
, wptr ~ Crucible.ArchWidth arch
, Crucible.HasLLVMAnn Sym
) =>
Options ->
LLVMCrucibleContext arch ->
Crucible.SimContext (SAWCruciblePersonality Sym) Sym Crucible.LLVM ->
Expand Down Expand Up @@ -1075,7 +1085,11 @@ registerOverride opts cc sim_ctx top_loc cs =
Crucible.writeGlobal mvar mem'

registerInvariantOverride ::
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options ->
LLVMCrucibleContext arch ->
W4.ProgramLoc ->
Expand Down Expand Up @@ -1152,7 +1166,12 @@ withBreakpointCfgAndBlockId context name parent k =
Nothing -> fail $ "Unexpected breakpoint name: " ++ name

verifySimulate ::
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth wptr, wptr ~ Crucible.ArchWidth arch, Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth wptr
, wptr ~ Crucible.ArchWidth arch
, Crucible.HasLLVMAnn Sym
) =>
Options ->
LLVMCrucibleContext arch ->
[Crucible.GenericExecutionFeature Sym] ->
Expand Down Expand Up @@ -1266,7 +1285,12 @@ scAndList sc = conj . filter nontrivial
--------------------------------------------------------------------------------

verifyPoststate ::
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth wptr, wptr ~ Crucible.ArchWidth arch, Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth wptr
, wptr ~ Crucible.ArchWidth arch
, Crucible.HasLLVMAnn Sym
) =>
LLVMCrucibleContext arch {- ^ crucible context -} ->
MS.CrucibleMethodSpecIR (LLVM arch) {- ^ specification -} ->
Map AllocIndex (LLVMPtr wptr) {- ^ allocation substitution -} ->
Expand Down Expand Up @@ -1331,7 +1355,7 @@ verifyPoststate cc mspec env0 globals ret =
setupLLVMCrucibleContext ::
Bool {- ^ enable path sat checking -} ->
LLVMModule arch ->
((?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
((?lc :: Crucible.TypeContext, ?memOpts::Crucible.MemOptions, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
LLVMCrucibleContext arch -> TopLevel a) ->
TopLevel a
setupLLVMCrucibleContext pathSat lm action =
Expand All @@ -1349,6 +1373,10 @@ setupLLVMCrucibleContext pathSat lm action =
Crucible.llvmPtrWidth ctx $ \wptr ->
Crucible.withPtrWidth wptr $
do let ?lc = ctx^.Crucible.llvmTypeCtx
let ?memOpts = Crucible.defaultMemOptions
{ Crucible.laxPointerOrdering = laxPointerOrdering
}
let ?intrinsicsOpts = Crucible.defaultIntrinsicsOptions
let ?recordLLVMAnnotation = \_ _ -> return ()
cc <-
io $
Expand Down Expand Up @@ -1382,11 +1410,8 @@ setupLLVMCrucibleContext pathSat lm action =
crucible_assert_then_assume_enabled

let bindings = Crucible.fnBindingsFromList []
let memOpts = Crucible.defaultMemOptions
{ Crucible.laxPointerOrdering = laxPointerOrdering
}
let simctx = Crucible.initSimContext sym intrinsics halloc stdout
bindings (Crucible.llvmExtensionImpl memOpts)
bindings (Crucible.llvmExtensionImpl ?memOpts)
Common.SAWCruciblePersonality
mem <- Crucible.populateConstGlobals sym (Crucible.globalInitMap mtrans)
=<< Crucible.initializeMemoryConstGlobals sym ctx llvm_mod
Expand Down
49 changes: 35 additions & 14 deletions src/SAWScript/Crucible/LLVM/Override.hs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ ppArgs sym cc cs (Crucible.RegMap args) = do
-- predicates.
methodSpecHandler ::
forall arch rtp args ret.
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options {- ^ output/verbosity options -} ->
SharedContext {- ^ context for constructing SAW terms -} ->
LLVMCrucibleContext arch {- ^ context for interacting with Crucible -} ->
Expand Down Expand Up @@ -586,7 +590,11 @@ methodSpecHandler opts sc cc top_loc css h = do
-- predicates.
methodSpecHandler_prestate ::
forall arch ctx.
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options {- ^ output/verbosity options -} ->
SharedContext {- ^ context for constructing SAW terms -} ->
LLVMCrucibleContext arch {- ^ context for interacting with Crucible -} ->
Expand Down Expand Up @@ -630,16 +638,21 @@ methodSpecHandler_poststate opts sc cc retTy cs =
computeReturnValue opts cc sc cs retTy (cs ^. MS.csRetValue)

-- learn pre/post condition
learnCond :: (?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym)
=> Options
-> SharedContext
-> LLVMCrucibleContext arch
-> MS.CrucibleMethodSpecIR (LLVM arch)
-> PrePost
-> [MS.AllocGlobal (LLVM arch)]
-> Map AllocIndex (MS.AllocSpec (LLVM arch))
-> MS.StateSpec (LLVM arch)
-> OverrideMatcher (LLVM arch) md ()
learnCond ::
( ?lc :: Crucible.TypeContext
, ?memOpts::Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options ->
SharedContext ->
LLVMCrucibleContext arch ->
MS.CrucibleMethodSpecIR (LLVM arch) ->
PrePost ->
[MS.AllocGlobal (LLVM arch)] ->
Map AllocIndex (MS.AllocSpec (LLVM arch)) ->
MS.StateSpec (LLVM arch) ->
OverrideMatcher (LLVM arch) md ()
learnCond opts sc cc cs prepost globals extras ss =
do let loc = cs ^. MS.csLoc
matchPointsTos opts sc cc cs prepost (ss ^. MS.csPointsTos)
Expand Down Expand Up @@ -870,7 +883,11 @@ ppProgramLoc loc =
-- statement cannot be executed until bindings for any/all lhs
-- variables exist.
matchPointsTos :: forall arch md.
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts :: Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options {- ^ saw script print out opts -} ->
SharedContext {- ^ term construction context -} ->
LLVMCrucibleContext arch {- ^ simulator context -} ->
Expand Down Expand Up @@ -1334,7 +1351,11 @@ learnGhost _sc _cc _loc _prepost _var (TypedTerm tp _)
-- Returns a string on failure describing a concrete memory load failure.
learnPointsTo ::
forall arch md ann.
(?lc :: Crucible.TypeContext, Crucible.HasPtrWidth (Crucible.ArchWidth arch), Crucible.HasLLVMAnn Sym) =>
( ?lc :: Crucible.TypeContext
, ?memOpts :: Crucible.MemOptions
, Crucible.HasPtrWidth (Crucible.ArchWidth arch)
, Crucible.HasLLVMAnn Sym
) =>
Options ->
SharedContext ->
LLVMCrucibleContext arch ->
Expand Down
2 changes: 2 additions & 0 deletions src/SAWScript/Crucible/LLVM/X86.hs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ type Ptr = C.LLVM.LLVMPtr Sym 64
type X86Constraints =
( C.LLVM.HasPtrWidth (C.LLVM.ArchWidth LLVMArch)
, C.LLVM.HasLLVMAnn Sym
, ?memOpts :: C.LLVM.MemOptions
, ?lc :: C.LLVM.TypeContext
)

Expand Down Expand Up @@ -295,6 +296,7 @@ llvm_verify_x86 (Some (llvmModule :: LLVMModule x)) path nm globsyms checkSat se
$ modTrans llvmModule ^. C.LLVM.transContext = do
start <- io getCurrentTime
let ?ptrWidth = knownNat @64
let ?memOpts = C.LLVM.defaultMemOptions
let ?recordLLVMAnnotation = \_ _ -> return ()
sc <- getSharedContext
opts <- getOptions
Expand Down
3 changes: 2 additions & 1 deletion src/SAWScript/X86.hs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ translate opts elf fun =
do let name = funName fun
sayLn ("Translating function: " ++ BSC.unpack name)

let ?memOpts = Crucible.defaultMemOptions
let ?recordLLVMAnnotation = \_ _ -> return ()

let sym = backend opts
Expand Down Expand Up @@ -431,7 +432,7 @@ setSimulatorVerbosity verbosity sym = do


doSim ::
Crucible.HasLLVMAnn Sym =>
(?memOpts::Crucible.MemOptions, Crucible.HasLLVMAnn Sym) =>
Options ->
RelevantElf ->
SymFuns Sym ->
Expand Down
Loading