Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runCFI :: (ALU m ll element, Show element) => CFInstruction -> CentralProcessingStep ll m
- popAddress :: ALU m ll element => CentralProcessingMemory ll -> m $ CentralProcessingMemory ll
- branchInstruction :: (ALU m ll element, Show element) => BranchTest -> BranchOperand -> CentralProcessingStep ll m
- branchSwappedInstruction :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingStep ll m
- branchTopInstruction :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingStep ll m
- branchImmediateInstruction :: (ALU m ll element, DynamicLabel l) => BranchTest -> l -> CentralProcessingStep ll m
- branchArtificialInstruction :: ALU m ll element => BranchTest -> Label -> CentralProcessingStep ll m
- branch :: ALU m ll element => BranchTest -> element -> m InstructionCounter -> CentralProcessingStep ll m
- labeledInstruction :: (ALU m ll element, Show element) => LabelOperation -> LabelOperand -> CentralProcessingStep ll m
- labeledTopInstruction :: (ALU m ll element, Show element) => LabelOperation -> CentralProcessingStep ll m
- labeledImmediateInstruction :: (ALU m ll element, DynamicLabel l) => LabelOperation -> l -> CentralProcessingStep ll m
- labeledArtificialInstruction :: ALU m ll element => LabelOperation -> Label -> CentralProcessingStep ll m
- findAddressForNaturalLabel :: (MonadSafe m, DynamicLabel n) => n -> InstructionVector -> m InstructionAddress
- findAddressForArtificialLabel :: MonadSafe m => Label -> InstructionVector -> m InstructionAddress
- labeled :: LabelOperation -> InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll
- jump :: InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll
- call :: InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll
- newCM :: InstructionList -> ControlMemory
- currentInstruction :: MonadSafe m => ControlMemory -> m Instruction
- incrementPC :: ControlMemory -> ControlMemory
- cpmProgram :: CentralProcessingMemory al -> InstructionVector
- cpmPop1 :: ALU m ll element => CentralProcessingMemory ll -> m (element, CentralProcessingMemory ll)
- cpmPop2 :: ALU m ll element => CentralProcessingMemory ll -> m (element, element, CentralProcessingMemory ll)
- type DynamicLabel l = (Integral l, Show l)
- type CentralProcessingStep ll m = CentralProcessingMemory ll -> m $ CentralProcessingMemory ll
- data CentralProcessingMemory ll = CPM {
- controlMemory :: ControlMemory
- alm :: ll
- data ControlMemory = CM {}
- newtype InstructionStack = IS [InstructionAddress]
- type InstructionCounter = InstructionAddress
- type InstructionAddress = Int
Documentation
runCFI :: (ALU m ll element, Show element) => CFInstruction -> CentralProcessingStep ll m #
popAddress :: ALU m ll element => CentralProcessingMemory ll -> m $ CentralProcessingMemory ll #
branchInstruction :: (ALU m ll element, Show element) => BranchTest -> BranchOperand -> CentralProcessingStep ll m #
branchSwappedInstruction :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingStep ll m #
branchTopInstruction :: (ALU m ll element, Show element) => BranchTest -> CentralProcessingStep ll m #
branchImmediateInstruction :: (ALU m ll element, DynamicLabel l) => BranchTest -> l -> CentralProcessingStep ll m #
branchArtificialInstruction :: ALU m ll element => BranchTest -> Label -> CentralProcessingStep ll m #
branch :: ALU m ll element => BranchTest -> element -> m InstructionCounter -> CentralProcessingStep ll m #
labeledInstruction :: (ALU m ll element, Show element) => LabelOperation -> LabelOperand -> CentralProcessingStep ll m #
labeledTopInstruction :: (ALU m ll element, Show element) => LabelOperation -> CentralProcessingStep ll m #
labeledImmediateInstruction :: (ALU m ll element, DynamicLabel l) => LabelOperation -> l -> CentralProcessingStep ll m #
labeledArtificialInstruction :: ALU m ll element => LabelOperation -> Label -> CentralProcessingStep ll m #
findAddressForNaturalLabel :: (MonadSafe m, DynamicLabel n) => n -> InstructionVector -> m InstructionAddress #
findAddressForArtificialLabel :: MonadSafe m => Label -> InstructionVector -> m InstructionAddress #
labeled :: LabelOperation -> InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll #
jump :: InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll #
call :: InstructionCounter -> CentralProcessingMemory ll -> CentralProcessingMemory ll #
newCM :: InstructionList -> ControlMemory #
ControlMemory methods
currentInstruction :: MonadSafe m => ControlMemory -> m Instruction #
cpmPop1 :: ALU m ll element => CentralProcessingMemory ll -> m (element, CentralProcessingMemory ll) #
cpmPop2 :: ALU m ll element => CentralProcessingMemory ll -> m (element, element, CentralProcessingMemory ll) #
type DynamicLabel l = (Integral l, Show l) #
Types
type CentralProcessingStep ll m = CentralProcessingMemory ll -> m $ CentralProcessingMemory ll #
data CentralProcessingMemory ll #
CPM | |
|
Instances
Show ll => Show (CentralProcessingMemory ll) # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> CentralProcessingMemory ll -> ShowS # show :: CentralProcessingMemory ll -> String # showList :: [CentralProcessingMemory ll] -> ShowS # |
data ControlMemory #
Instances
Show ControlMemory # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> ControlMemory -> ShowS # show :: ControlMemory -> String # showList :: [ControlMemory] -> ShowS # |
newtype InstructionStack #
Instances
Show InstructionStack # | |
Defined in HelVM.HelMA.Automaton.Combiner.CPU showsPrec :: Int -> InstructionStack -> ShowS # show :: InstructionStack -> String # showList :: [InstructionStack] -> ShowS # |
type InstructionAddress = Int #