Documentation/comment fixes.

This commit is contained in:
Kevin Quick 2019-02-03 10:56:28 -08:00
parent 957addd204
commit d9ee884a90
No known key found for this signature in database
GPG Key ID: E6D7733599CC0A21
4 changed files with 15 additions and 9 deletions

View File

@ -32,7 +32,8 @@ import Data.Macaw.Memory
------------------------------------------------------------------------
-- ArchitectureInfo
-- | Function for disassembling a block.
-- | Function for disassembling a range of code (usually a function in
-- the target code image) into blocks.
--
-- A block is defined as a contiguous region of code with a single known
-- entrance and potentially multiple exits.
@ -68,7 +69,7 @@ data ArchitectureInfo arch
-- ^ Use the abstract block state information to infer register
-- values to use for disassembling from given address.
, disassembleFn :: !(DisassembleFn arch)
-- ^ Function for disasembling a block.
-- ^ Function for disassembling a block.
, mkInitialAbsState :: !(Memory (RegAddrWidth (ArchReg arch))
-> ArchSegmentOff arch
-> AbsBlockState (ArchReg arch))

View File

@ -1,8 +1,13 @@
{-|
Copyright : (c) Galois, Inc 2017-2018
Copyright : (c) Galois, Inc 2017-2019
Maintainer : jhendrix@galois.com
This provides a rewriter for simplifying values.
This provides a rewriter for simplifying blocks by rewriting value
computations and performing other rearrangement and adjustments.
The main entry point is calling 'runRewriter' with a constructed
'RewriteContext' to control the rewrite operation and a Rewriter monad
computation that rewrites the statements for a particular block.
-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
@ -127,7 +132,7 @@ appendRewrittenStmt stmt = Rewriter $ do
seq stmt $ seq stmts' $ do
rwRevStmts .= stmts'
-- | Add a statment to the list
-- | Add a architecture-specific statement to the list
appendRewrittenArchStmt :: ArchStmt arch (Value arch tgt) -> Rewriter arch s src tgt ()
appendRewrittenArchStmt = appendRewrittenStmt . ExecArchStmt

View File

@ -1181,10 +1181,10 @@ parseBlock ctx idx initRegs b absProcState = do
}
pure (ret, idx+1)
-- | This evalutes the statements in a block to expand the information known
-- | This evaluates the statements in a block to expand the information known
-- about control flow targets of this block.
addBlocks :: ArchSegmentOff arch
-- ^ Address of theze blocks
-- ^ Address of these blocks
-> FoundAddr arch
-- ^ State leading to explore block
-> RegState (ArchReg arch) (Value arch ids)

View File

@ -94,8 +94,8 @@ data FunctionExploreReason w
-- | This describes why we are exploring a given block within a function.
data BlockExploreReason w
-- | Exploring because the given block writes it to memory.
-- =- InWrite !(MemSegmentOff w)
-- -- | Exploring because the given block writes it to memory.
-- =- InWrite !(MemSegmentOff w)
-- | Exploring because the given block jumps here.
= NextIP !(MemSegmentOff w)
-- | Identified as an entry point from initial information