diff --git a/src/MA/PartitionPrinter.hs b/src/MA/PartitionPrinter.hs index 0278d6c54d4f83808660aea6067b03ae9395f8da..2d6470f767875bbfcbb2b63cd97b352357647cda 100644 --- a/src/MA/PartitionPrinter.hs +++ b/src/MA/PartitionPrinter.hs @@ -1,5 +1,6 @@ module MA.PartitionPrinter - ( printPartition + ( restrictPartitionToSort1 + , printPartition , writePartition , showPartition ) where @@ -24,6 +25,14 @@ import qualified Data.Partition as Partition import MA.Coalgebra.Parser (SymbolTable(..)) import MA.FunctorExpression.Sorts + +restrictPartitionToSort1 :: Encoding a (Sorted h1) -> Partition -> [[State]] +restrictPartitionToSort1 encoding partition = + let blocks = Partition.toBlocks partition + sort1 = statesWithSort1 encoding + in restrictBlocks blocks sort1 + + printPartition :: Encoding a (Sorted h1) -> SymbolTable -> Partition -> IO () printPartition enc symTab part = TLazyIO.putStr (Build.toLazyText (formatPartition enc symTab part)) diff --git a/src/main/Main.hs b/src/main/Main.hs index e42b8c42226fa095e9611d138f1fe4e70ebe8e2c..6058ab9825de3ecf64c29442bb2fa51f35ee7887 100644 --- a/src/main/Main.hs +++ b/src/main/Main.hs @@ -311,6 +311,11 @@ main = do "final-partition-size" (tshow (Partition.numBlocks partition)) + logStat + stats + "explicit-final-partition-size" + (tshow (length (restrictPartitionToSort1 encoding partition))) + withTime stats "output-duration" (outputPartition (refineOutputFile r) encoding symbolTable partition)