Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- module Data.Biapplicative
- module Data.Bifoldable
- module Data.Bitraversable
- type Location = Word64
- type SLocation = SWord64
- class SynthSpec s a where
- class SynthSpec spec a => SynthComponent comp spec a | comp -> spec where
- data SimpleSpec a = SimpleSpec {
- simpleArity :: Word
- simpleFunc :: [SBV a] -> SBV a -> SBool
- data SimpleComponent a = SimpleComponent {
- simpleName :: String
- simpleSpec :: SimpleSpec a
- data SynthesisError
- data IOs l = IOs {}
- data Instruction l a = Instruction {
- instructionIOs :: IOs l
- instructionComponent :: a
- data Program l a = Program {
- programIOs :: IOs l
- programInstructions :: [Instruction l a]
- toIOsList :: Program l a -> [l]
- sortInstructions :: Ord l => Program l a -> Program l a
- data ProgramTree a
- = InstructionNode a [ProgramTree a]
- | InputLeaf Location
- buildProgramTree :: Program Location a -> ProgramTree a
- buildForestResult :: Program Location a -> [ProgramTree a]
Documentation
module Data.Biapplicative
module Data.Bifoldable
module Data.Bitraversable
type Location = Word64 Source #
Type used to represent a value from the set of location variables \(l_x \in L\).
class SynthSpec s a where Source #
Class for a program or a component specification \(φ(\vec I, O)\). Type
variable a
stands for function's domain type.
specArity :: s a -> Word Source #
Number of inputs the specification function takes.
Instances
SynthSpec SimpleSpec a Source # | |
Defined in Data.SBV.Program.Types |
class SynthSpec spec a => SynthComponent comp spec a | comp -> spec where Source #
A class for a library component.
compName :: comp a -> String Source #
Component name (optional). Used for naming SBV variables and when rendering the resulting program.
compSpec :: comp a -> spec a Source #
Component's specification.
extraLocConstrs :: comp a -> [[SLocation] -> SLocation -> SBool] Source #
Optional constraints to set on location variables \(l_x \in L\).
Instances
SynthComponent SimpleComponent SimpleSpec a Source # | |
Defined in Data.SBV.Program.Types compName :: SimpleComponent a -> String Source # compSpec :: SimpleComponent a -> SimpleSpec a Source # extraLocConstrs :: SimpleComponent a -> [[SLocation] -> SLocation -> SBool] Source # |
data SimpleSpec a Source #
A simplest specification datatype possible. Type variable a
stands
for function's domain type.
SimpleSpec | |
|
Instances
SynthSpec SimpleSpec a Source # | |
Defined in Data.SBV.Program.Types | |
SynthComponent SimpleComponent SimpleSpec a Source # | |
Defined in Data.SBV.Program.Types compName :: SimpleComponent a -> String Source # compSpec :: SimpleComponent a -> SimpleSpec a Source # extraLocConstrs :: SimpleComponent a -> [[SLocation] -> SLocation -> SBool] Source # |
data SimpleComponent a Source #
A simplest library component datatype possible.
Instances
SynthComponent SimpleComponent SimpleSpec a Source # | |
Defined in Data.SBV.Program.Types compName :: SimpleComponent a -> String Source # compSpec :: SimpleComponent a -> SimpleSpec a Source # extraLocConstrs :: SimpleComponent a -> [[SLocation] -> SLocation -> SBool] Source # | |
Show (SimpleComponent spec) Source # | |
Defined in Data.SBV.Program.Types showsPrec :: Int -> SimpleComponent spec -> ShowS # show :: SimpleComponent spec -> String # showList :: [SimpleComponent spec] -> ShowS # |
data SynthesisError Source #
Possible failure reasons during synthesis operation.
Instances
Show SynthesisError Source # | |
Defined in Data.SBV.Program.Types showsPrec :: Int -> SynthesisError -> ShowS # show :: SynthesisError -> String # showList :: [SynthesisError] -> ShowS # |
Instances
Foldable IOs Source # | |
Defined in Data.SBV.Program.Types fold :: Monoid m => IOs m -> m # foldMap :: Monoid m => (a -> m) -> IOs a -> m # foldMap' :: Monoid m => (a -> m) -> IOs a -> m # foldr :: (a -> b -> b) -> b -> IOs a -> b # foldr' :: (a -> b -> b) -> b -> IOs a -> b # foldl :: (b -> a -> b) -> b -> IOs a -> b # foldl' :: (b -> a -> b) -> b -> IOs a -> b # foldr1 :: (a -> a -> a) -> IOs a -> a # foldl1 :: (a -> a -> a) -> IOs a -> a # elem :: Eq a => a -> IOs a -> Bool # maximum :: Ord a => IOs a -> a # | |
Traversable IOs Source # | |
Functor IOs Source # | |
Show l => Show (IOs l) Source # | |
Eq l => Eq (IOs l) Source # | |
Ord l => Ord (IOs l) Source # | |
EqSymbolic l => EqSymbolic (IOs l) Source # | |
Defined in Data.SBV.Program.Types |
data Instruction l a Source #
A datatype that holds a SynthComponent
with inputs and output locations.
Instruction | |
|
Instances
A datatype that unites program instructions with IOs
of the program itself.
Program | |
|
Instances
Bifoldable Program Source # | |
Bifunctor Program Source # | |
Bitraversable Program Source # | |
Defined in Data.SBV.Program.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Program a b -> f (Program c d) # | |
(Show l, Show a) => Show (Program l a) Source # | |
(Eq l, Eq a) => Eq (Program l a) Source # | |
(Ord l, Ord a) => Ord (Program l a) Source # | |
Defined in Data.SBV.Program.Types |
toIOsList :: Program l a -> [l] Source #
Extract all locations from the program as a list, including locations of instructions.
sortInstructions :: Ord l => Program l a -> Program l a Source #
Sorts program's instructions by their output location.
data ProgramTree a Source #
A Program
converted into a tree-like structure.
Instances
buildProgramTree :: Program Location a -> ProgramTree a Source #
Create a ProgramTree
for a given Program
by resolving its Location
s.
This function effectively performs dead code elimination.
buildForestResult :: Program Location a -> [ProgramTree a] Source #
Create a ProgramTree
for each unused output in the Program