feat(cdcl): add solver statistics

This commit is contained in:
dualfroz committed 2026-08-24 12:25:00 +02:00
1 parent 0818ca05ff
commit 81664ccad0
1 file changed
+27
+27
View File
@@ -0,0 +1,27 @@
module Sift.Stats
( Stats(..)
, emptyStats
, renderStats
) where
data Stats = Stats
{ statsDecisions :: Int
, statsConflicts :: Int
, statsPropagations :: Int
, statsRestarts :: Int
, statsLearned :: Int
, statsRemoved :: Int
} deriving (Eq, Show)
emptyStats :: Stats
emptyStats = Stats 0 0 0 0 0 0
renderStats :: Stats -> [String]
renderStats st =
[ "c decisions " ++ show (statsDecisions st)
, "c conflicts " ++ show (statsConflicts st)
, "c propagations " ++ show (statsPropagations st)
, "c restarts " ++ show (statsRestarts st)
, "c learned " ++ show (statsLearned st)
, "c removed " ++ show (statsRemoved st)
]