Copyright | (c) Fabricio Olivetti 2021 - 2024 |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | experimental |
Portability | |
Safe Haskell | None |
Language | Haskell2010 |
Algorithm.EqSat.Info
Contents
Description
Functions related to info/data calculation in Equality Graph data structure Heavily based on hegg (https:/github.comalt-romes/hegg by alt-romes)
Synopsis
- joinData :: EClassData -> EClassData -> EClassData
- makeAnalysis :: forall (m :: Type -> Type). Monad m => CostFun -> ENode -> EGraphST m EClassData
- getChildrenMinHeight :: forall (m :: Type -> Type). Monad m => ENode -> EGraphST m Int
- calculateHeights :: forall (m :: Type -> Type). Monad m => EGraphST m ()
- calculateCost :: forall (m :: Type -> Type). Monad m => CostFun -> SRTree EClassId -> EGraphST m Cost
- calculateConsts :: forall (m :: Type -> Type). Monad m => SRTree EClassId -> EGraphST m Consts
- combineConsts :: SRTree Consts -> Consts
- insertFitness :: forall (m :: Type -> Type). Monad m => EClassId -> Double -> PVector -> EGraphST m ()
Data related functions
joinData :: EClassData -> EClassData -> EClassData Source #
join data from two e-classes TODO: instead of folding, just do not apply rules list of values instead of single value
makeAnalysis :: forall (m :: Type -> Type). Monad m => CostFun -> ENode -> EGraphST m EClassData Source #
Calculate e-node data (constant values and cost)
calculateHeights :: forall (m :: Type -> Type). Monad m => EGraphST m () Source #
update the heights of each e-class won't work if there's no root
calculateCost :: forall (m :: Type -> Type). Monad m => CostFun -> SRTree EClassId -> EGraphST m Cost Source #
calculates the cost of a node