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.BreakLoop
    8 Description :
    9 Copyright   : (c) Aleksandr Penskoi, 2021
   10 License     : BSD3
   11 Maintainer  : aleksandr.penskoi@gmail.com
   12 Stability   : experimental
   13 -}
   14 module NITTA.Synthesis.Steps.BreakLoop (
   15     BreakLoopMetrics (..),
   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
   23 import NITTA.Model.TargetSystem
   24 import NITTA.Synthesis.Types
   25 
   26 data BreakLoopMetrics = BreakLoopMetrics
   27     deriving (Generic)
   28 
   29 instance ToJSON BreakLoopMetrics
   30 
   31 instance
   32     (UnitTag tag, VarValTime v x t) =>
   33     SynthesisDecisionCls
   34         (SynthesisState (TargetSystem (BusNetwork tag v x t) tag v x t) tag v x t)
   35         (TargetSystem (BusNetwork tag v x t) tag v x t)
   36         (BreakLoop v x)
   37         (BreakLoop v x)
   38         BreakLoopMetrics
   39     where
   40     decisions SynthesisState{sTarget} o = [(o, breakLoopDecision sTarget o)]
   41 
   42     parameters SynthesisState{} BreakLoop{} _ = BreakLoopMetrics
   43 
   44     estimate _ctx _o _d BreakLoopMetrics = 5000