fix: do not exclude expressions with new examples from the pool (do not consider them nonequal to any other)

This commit is contained in:
ProgramSnail 2025-11-26 12:36:22 +03:00
parent 75dafdab5e
commit 9c3825e0d4
2 changed files with 9 additions and 4 deletions

View file

@ -103,7 +103,7 @@ eval conf (SelfE es) = do recInput <- foldM (\es e -> consValsM es (eval conf e)
case (oracleFunc $ confOracle conf) recInput of
Just recOutput -> if recInput `elem` confExamples conf || not (confTryFindExamples conf) -- TODO: better way
then return recOutput
else NewExamples $ trace ("New example: " ++ show [(recInput, recOutput)]) [(recInput, recOutput)]
else NewExamples {- $ trace ("New example: " ++ show [(recInput, recOutput)]) -} [(recInput, recOutput)]
Nothing -> FatalError $ "no oracle output on " ++ show recInput
where consValsM :: [Value] -> Result Value -> Result [Value]
consValsM vs (Result v) = Result $ v : vs