never executed always true always false
    1 {-# LANGUAGE GADTs #-}
    2 {-# LANGUAGE NoMonomorphismRestriction #-}
    3 
    4 {-# OPTIONS -fno-warn-orphans #-}
    5 
    6 {- |
    7 Module      : NITTA.Synthesis.Steps.ConstantFolding
    8 Description :
    9 Copyright   : (c) Daniil Prohorov, 2021
   10 License     : BSD3
   11 Maintainer  : aleksandr.penskoi@gmail.com
   12 Stability   : experimental
   13 -}
   14 module NITTA.Synthesis.Steps.ConstantFolding (
   15     ConstantFoldingMetrics (..),
   16 ) where
   17 
   18 import Data.Aeson (ToJSON)
   19 import GHC.Generics
   20 import NITTA.Model.Networks.Bus
   21 import NITTA.Model.Problems.Refactor
   22 import NITTA.Model.ProcessorUnits.Types
   23 import NITTA.Model.TargetSystem
   24 import NITTA.Model.Time
   25 import NITTA.Synthesis.Types
   26 
   27 data ConstantFoldingMetrics = ConstantFoldingMetrics
   28     deriving (Generic)
   29 
   30 instance ToJSON ConstantFoldingMetrics
   31 
   32 instance
   33     (UnitTag tag, VarValTime v x t) =>
   34     SynthesisDecisionCls
   35         (SynthesisState (TargetSystem (BusNetwork tag v x t) tag v x t) tag v x t)
   36         (TargetSystem (BusNetwork tag v x t) tag v x t)
   37         (ConstantFolding v x)
   38         (ConstantFolding v x)
   39         ConstantFoldingMetrics
   40     where
   41     decisions SynthesisState{sTarget} o = [(o, constantFoldingDecision sTarget o)]
   42 
   43     parameters SynthesisState{} ConstantFolding{} _ = ConstantFoldingMetrics
   44 
   45     estimate _ctx _o _d ConstantFoldingMetrics = 5050