Copyright | (c) Fabricio Olivetti 2021 - 2024 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | |
Safe Haskell | None |
Language | Haskell2010 |
Algorithm.EqSat.SearchSR
Description
Support functions for search symbolic expressions with e-graphs
Synopsis
- type RndEGraph a = EGraphST (StateT StdGen IO) a
- io :: IO a -> RndEGraph a
- rnd :: StateT StdGen IO a -> RndEGraph a
- myCost :: SRTree Int -> Int
- while :: Monad f => (t -> Bool) -> t -> (t -> f t) -> f t
- fitnessFun :: Int -> Distribution -> DataSet -> DataSet -> Fix SRTree -> PVector -> (Double, PVector)
- fitnessFunRep :: Int -> Int -> Distribution -> DataSet -> DataSet -> Fix SRTree -> RndEGraph (Double, PVector)
- fitnessMV :: Bool -> Int -> Int -> Distribution -> [(DataSet, DataSet)] -> Fix SRTree -> RndEGraph (Double, [PVector])
- insertExpr :: Fix SRTree -> (Fix SRTree -> RndEGraph (Double, [PVector])) -> RndEGraph EClassId
- updateIfNothing :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> EClassId -> StateT EGraph m Bool
- pickRndSubTree :: RndEGraph (Maybe EClassId)
- getParetoEcsUpTo :: forall {m :: Type -> Type}. Monad m => Int -> Int -> StateT EGraph m [EClassId]
- getParetoDLEcsUpTo :: forall {m :: Type -> Type}. Monad m => Int -> Int -> StateT EGraph m [EClassId]
- getBestExprWithSize :: forall {m :: Type -> Type}. Monad m => Int -> StateT EGraph m [(EClassId, Maybe Double)]
- insertRndExpr :: Int -> Rng (Fix SRTree) -> Rng (SRTree ()) -> StateT EGraph (StateT StdGen IO) EClassId
- refit :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> EClassId -> StateT EGraph m ()
- printBest :: forall {m :: Type -> Type} {t} {p} {b}. (Monad m, Num t) => p -> (t -> EClassId -> StateT EGraph m b) -> StateT EGraph m b
- paretoFront :: (Fix SRTree -> StateT EGraph (StateT StdGen IO) (Double, [PVector])) -> Int -> (Int -> EClassId -> StateT EGraph (StateT StdGen IO) [String]) -> RndEGraph [[String]]
- evaluateUnevaluated :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> StateT EGraph m ()
- evaluateRndUnevaluated :: (Fix SRTree -> StateT EGraph (StateT StdGen IO) (Double, [PVector])) -> StateT EGraph (StateT StdGen IO) Key
- doesExist :: ENode -> RndEGraph Bool
- doesNotExist :: ENode -> RndEGraph Bool
- doesNotExistGens :: [Maybe (EClassId -> ENode)] -> ENode -> RndEGraph Bool
- checkToken :: (EClassId -> ENode) -> ENode -> StateT EGraph (StateT StdGen IO) Bool
Documentation
fitnessFun :: Int -> Distribution -> DataSet -> DataSet -> Fix SRTree -> PVector -> (Double, PVector) Source #
fitnessFunRep :: Int -> Int -> Distribution -> DataSet -> DataSet -> Fix SRTree -> RndEGraph (Double, PVector) Source #
fitnessMV :: Bool -> Int -> Int -> Distribution -> [(DataSet, DataSet)] -> Fix SRTree -> RndEGraph (Double, [PVector]) Source #
insertExpr :: Fix SRTree -> (Fix SRTree -> RndEGraph (Double, [PVector])) -> RndEGraph EClassId Source #
updateIfNothing :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> EClassId -> StateT EGraph m Bool Source #
getParetoEcsUpTo :: forall {m :: Type -> Type}. Monad m => Int -> Int -> StateT EGraph m [EClassId] Source #
getParetoDLEcsUpTo :: forall {m :: Type -> Type}. Monad m => Int -> Int -> StateT EGraph m [EClassId] Source #
getBestExprWithSize :: forall {m :: Type -> Type}. Monad m => Int -> StateT EGraph m [(EClassId, Maybe Double)] Source #
insertRndExpr :: Int -> Rng (Fix SRTree) -> Rng (SRTree ()) -> StateT EGraph (StateT StdGen IO) EClassId Source #
refit :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> EClassId -> StateT EGraph m () Source #
printBest :: forall {m :: Type -> Type} {t} {p} {b}. (Monad m, Num t) => p -> (t -> EClassId -> StateT EGraph m b) -> StateT EGraph m b Source #
paretoFront :: (Fix SRTree -> StateT EGraph (StateT StdGen IO) (Double, [PVector])) -> Int -> (Int -> EClassId -> StateT EGraph (StateT StdGen IO) [String]) -> RndEGraph [[String]] Source #
evaluateUnevaluated :: forall {m :: Type -> Type}. Monad m => (Fix SRTree -> StateT EGraph m (Double, [PVector])) -> StateT EGraph m () Source #
evaluateRndUnevaluated :: (Fix SRTree -> StateT EGraph (StateT StdGen IO) (Double, [PVector])) -> StateT EGraph (StateT StdGen IO) Key Source #
doesExist :: ENode -> RndEGraph Bool Source #
check whether an e-node exists or does not exist in the e-graph
doesNotExist :: ENode -> RndEGraph Bool Source #
check whether an e-node exists or does not exist in the e-graph