mirror of
https://github.com/Jaxan/nominal-lstar.git
synced 2025-04-27 14:47:45 +02:00
Removed some debug IO
This commit is contained in:
parent
15a02c4762
commit
e475c5b471
2 changed files with 5 additions and 10 deletions
|
@ -37,7 +37,6 @@ mainExample learnerName teacherName autName = do
|
|||
NomLStar -> learnAngluinRows teacher
|
||||
NomLStarCol -> learnAngluin teacher
|
||||
NomNLStar -> learnBollig teacher
|
||||
putStrLn "Finished! Final hypothesis ="
|
||||
print h
|
||||
|
||||
mainWithIO :: String -> IO ()
|
||||
|
@ -46,7 +45,6 @@ mainWithIO learnerName = do
|
|||
NomLStar -> learnAngluinRows teacherWithIO
|
||||
NomLStarCol -> learnAngluin teacherWithIO
|
||||
NomNLStar -> learnBollig teacherWithIO
|
||||
putStrLn "Finished! Final hypothesis ="
|
||||
print h
|
||||
|
||||
main :: IO ()
|
||||
|
|
|
@ -246,11 +246,8 @@ ioMembership inputs = unsafePerformIO $ do
|
|||
loop
|
||||
Just f -> return f
|
||||
answer <- runInputT defaultSettings loop
|
||||
Prelude.print $ orbit [] (input, fromBool answer)
|
||||
return $ orbit [] (input, fromBool answer)
|
||||
let answersAsSet = sum . fromList $ answers
|
||||
Prelude.putStrLn "\n# Thanks!"
|
||||
Prelude.print answersAsSet
|
||||
let answersAsSet = simplify . sum . fromList $ answers
|
||||
return answersAsSet
|
||||
|
||||
-- Poses a query to the terminal, waiting for the user to provide a counter example
|
||||
|
@ -260,7 +257,7 @@ ioEquivalent hypothesis = unsafePerformIO $ do
|
|||
Prelude.putStrLn "\n# Is the following automaton correct?"
|
||||
Prelude.putStr "# "
|
||||
Prelude.print hypothesis
|
||||
Prelude.putStrLn "# Nothing for Yes, Just [...] for a counter example"
|
||||
Prelude.putStrLn "# \"Nothing\" for equivalent, \"Just [...]\" for a counter example (eg \"Just [0,1,0]\")"
|
||||
answer <- runInputT defaultSettings loop
|
||||
case answer of
|
||||
Nothing -> return Nothing
|
||||
|
@ -278,10 +275,10 @@ ioEquivalent hypothesis = unsafePerformIO $ do
|
|||
loop = do
|
||||
x <- getInputLine "> "
|
||||
case x of
|
||||
Nothing -> error "Quit"
|
||||
Nothing -> error "Bye bye, have a good day!"
|
||||
Just str -> do
|
||||
case readMaybe str :: Maybe (Maybe [Prelude.String]) of
|
||||
case readMaybe str :: Maybe (Maybe [Int]) of
|
||||
Nothing -> do
|
||||
outputStrLn $ "Unable to parse " ++ str ++ " :: Maybe [String]"
|
||||
outputStrLn $ "Unable to parse " ++ str ++ " :: Maybe [Int]"
|
||||
loop
|
||||
Just f -> return f
|
||||
|
|
Loading…
Add table
Reference in a new issue