Changelog for crucible-llvm-0.7
0.7 -- 2024-08-30
- Add support for GHC 9.8
- Add integer-related
llvm.vector.reduce.*
intrinsics. - Add workaround to allow loading bitcode using LLVM's reltable lookup optimization.
register_llvm_overrides{,_}
now returns the list of overrides that were applied.- The
doMallocHandle
function was removed. - The
RegOverrideM
monad was replaced by theMakeOverride
function newtype. - Several type parameters were removed from
OverrideTemplate
, and theext
parameter was added. This had downstream effects inbasic_llvm_override
,polymorphic1_llvm_override
, and other functions for registering overrides. - Override registration code was generalized.
bind_llvm_{handle,func}
now don't require a wholeLLVMContext
, just aGlobalVar Mem
, and are polymorphic overext
. build_llvm_override
is now generic over theext
type parameter. This should be a backwards-compatible change.LLVMOverride
now has an additionalext
type parameter. See the Haddocks forLLVMOverride
for details and motivation.- The
llvmOverride_def
field ofLLVMOverride
no longer takes abak
argument. To retrieve the current symbolic backend, useLang.Crucible.Simulator.OverrideSim.ovrWithBackend
. - Add overrides for integer-related
llvm.vector.reduce.*
intrinsics. - Add support for atomic
fadd
,fsub
,fmax
,fmin
,uinc_wrap
, andudec_wrap
operations inatomicrmw
instructions.
0.6 -- 2024-02-05
bindLLVMFunPtr
now accepts anText.LLVM.AST.Symbol
rather than a wholeDeclare
. UsedecName
to get aSymbol
from aDeclare
.- Implement overrides for the LLVM
llvm.is.fpclass.f*
intrinsics. - Implement overrides for the
isinf
,__isinf
, and__isinff
C functions. - Implement overrides for the LLVM
llvm.fma.f*
andllvm.fmuladd.f*
intrinsics. - Implement overrides for the
fma
andfmaf
C functions. - Add a
Lang.Crucible.LLVM.MemModel.CallStack.null
function. - Add a
ppLLVMLatest
function toLang.Crucible.LLVM.PrettyPrint
, which pretty-prints an LLVM AST using the latest LLVM version thatllvm-pretty
currently supports. Also add derived combinators (ppDeclare
,ppIdent
, etc.) for calling thellvm-pretty
functions of the same names in tandem withppLLVMLatest
.
0.5
-
Add
?memOpts :: MemOptions
constraints to the following functions:Lang.Crucible.LLVM.MemModel
:doStore
,storeRaw
,condStoreRaw
, andstoreConstRaw
Lang.Crucible.LLVM.Globals
:populateGlobal
Lang.Crucible.LLVM.MemModel.Generic
:writeMem
andwriteConstMem
-
Lang.Crucible.LLVM
:registerModuleFn
has changed type to accomodate lazy loading of Crucible IR. -
Lang.Crucible.LLVM.Translation
: TheModuleTranslation
record is now opaque, thecfgMap
is no longer exported andglobalInitMap
andmodTransNonce
have become lens-style getters instead of record accessors. CFGs should be retrieved using the newgetTranslatedCFG
orgetTranslatedCFGForHandle
functions. -
Lang.Crucible.LLVM
: new functionsregisterLazyModuleFn
andregisterLazyModule
, which delay the building of Crucible CFGs until the functions in question are actually called. -
executeDirectives
inLang.Crucible.LLVM.Printf
now returns aByteString
instead of aString
so that we can better preserve the exact bytes used in string arguments, without applying a particular text encoding. -
crucible-llvm
now handles LLVM's opaque pointer types, an alternative representation of pointer types that does not store a pointee type. As a result,MemType
now has an additionalPtrOpaqueType
constructor in addition to the existing (non-opaque)PtrType
constructor.LLVM 15 and later use opaque pointers by default, so it is recommended that you add support for
PtrOpaqueType
(and opaque pointers in general) going forward.crucible-llvm
still supports both kinds of pointers, so you can fall back to non-opaque pointers if need be. -
A new
Lang.Crucible.LLVM.SimpleLoopInvariant
module has been added, which provides an execution feature that facilitates reasoning about certain kinds of loops (which may not terminate) using loop invariants. Note that this functionality is very experimental and subject to change in the future.
0.4
-
A new
indeterminateLoadBehavior
flag inMemOptions
now controls now reading from uninitialized memory works whenlaxLoadsAndStores
is enabled. IfStableSymbolic
is chosen, then allocating memory will also initialize it with a fresh symbolic value so that subsequent reads will always return that same value. IfUnstableSymbolic
is chosen, then each read from a section of uninitialized memory will return a distinct symbolic value each time.As a result of this change,
?memOpts :: MemOptions
constraints have been added to the following functions:Lang.Crucible.LLVM.Globals
:initializeAllMemory
,initializeMemoryConstGlobals
,populateGlobals
,populateAllGlobals
, andpopulateConstGlobals
Lang.Crucible.LLVM.MemModel
:doAlloca
,doCalloc
,doInvalidate
,doMalloc
,doMallocUnbounded
,mallocRaw
,mallocConstRaw
,allocGlobals
, andallocGlobal
-
HasLLVMAnn
now has an additionalCallStack
argument, which is used for annotating errors with call stacks.