@@ -0,0 +1,200 @@
1+diff -aur serious/sad-2.3-25/Alice/Core/Base.hs sad-2.3-25/Alice/Core/Base.hs
2+--- serious/sad-2.3-25/Alice/Core/Base.hs 2008-03-29 18:24:12.000000000 +0000
3++++ sad-2.3-25/Alice/Core/Base.hs 2015-11-27 06:38:28.740840823 +0000
5+ module Alice.Core.Base where
8++import Control.Applicative
13+ type CRMC a b = IORef RState -> IO a -> (b -> IO a) -> IO a
14+ newtype CRM b = CRM { runCRM :: forall a . CRMC a b }
16++instance Functor CRM where
19++instance Applicative CRM where
23+ instance Monad CRM where
24+ return r = CRM $ \ _ _ k -> k r
25+ m >>= n = CRM $ \ s z k -> runCRM m s z (\ r -> runCRM (n r) s z k)
27++instance Alternative CRM where
31+ instance MonadPlus CRM where
32+ mzero = CRM $ \ _ z _ -> z
33+ mplus m n = CRM $ \ s z k -> runCRM m s (runCRM n s z k) k
34+diff -aur serious/sad-2.3-25/Alice/Core/Thesis.hs sad-2.3-25/Alice/Core/Thesis.hs
35+--- serious/sad-2.3-25/Alice/Core/Thesis.hs 2008-03-05 13:10:50.000000000 +0000
36++++ sad-2.3-25/Alice/Core/Thesis.hs 2015-11-27 06:35:08.311015166 +0000
38+ module Alice.Core.Thesis (thesis) where
41++import Control.Applicative
47+ newtype TM res = TM { runTM :: [String] -> [([String], res)] }
49++instance Functor TM where
52++instance Applicative TM where
56+ instance Monad TM where
57+ return r = TM $ \ s -> [(s, r)]
58+ m >>= k = TM $ \ s -> concatMap apply (runTM m s)
59+ where apply (s, r) = runTM (k r) s
61++instance Alternative TM where
65+ instance MonadPlus TM where
66+ mzero = TM $ \ _ -> []
67+ mplus m k = TM $ \ s -> runTM m s ++ runTM k s
68+diff -aur serious/sad-2.3-25/Alice/Export/Base.hs sad-2.3-25/Alice/Export/Base.hs
69+--- serious/sad-2.3-25/Alice/Export/Base.hs 2008-03-09 09:36:39.000000000 +0000
70++++ sad-2.3-25/Alice/Export/Base.hs 2015-11-27 06:32:47.782738005 +0000
74+ readPrDB :: String -> IO [Prover]
75+-readPrDB file = do inp <- catch (readFile file) $ die . ioeGetErrorString
76++readPrDB file = do inp <- catchIOError (readFile file) $ die . ioeGetErrorString
78+ let dws = dropWhile isSpace
79+ cln = reverse . dws . reverse . dws
80+diff -aur serious/sad-2.3-25/Alice/Export/Prover.hs sad-2.3-25/Alice/Export/Prover.hs
81+--- serious/sad-2.3-25/Alice/Export/Prover.hs 2008-03-09 09:36:39.000000000 +0000
82++++ sad-2.3-25/Alice/Export/Prover.hs 2015-11-27 06:36:47.632919161 +0000
84+ when (askIB IBPdmp False ins) $ putStrLn tsk
86+ seq (length tsk) $ return $
87+- do (wh,rh,eh,ph) <- catch run
88++ do (wh,rh,eh,ph) <- catchIOError run
89+ $ \ e -> die $ "run error: " ++ ioeGetErrorString e
91+ hPutStrLn wh tsk ; hClose wh
92+diff -aur serious/sad-2.3-25/Alice/ForTheL/Base.hs sad-2.3-25/Alice/ForTheL/Base.hs
93+--- serious/sad-2.3-25/Alice/ForTheL/Base.hs 2008-03-09 09:36:39.000000000 +0000
94++++ sad-2.3-25/Alice/ForTheL/Base.hs 2015-11-27 06:31:51.921230428 +0000
96+ varlist = do vs <- chainEx (char ',') var
97+ nodups vs ; return vs
99+-nodups vs = unless (null $ dups vs) $
100++nodups vs = unless ((null :: [a] -> Bool) $ dups vs) $
101+ fail $ "duplicate names: " ++ show vs
103+ hidden = askPS psOffs >>= \ n -> return ('h':show n)
104+diff -aur serious/sad-2.3-25/Alice/Import/Reader.hs sad-2.3-25/Alice/Import/Reader.hs
105+--- serious/sad-2.3-25/Alice/Import/Reader.hs 2008-03-09 09:36:39.000000000 +0000
106++++ sad-2.3-25/Alice/Import/Reader.hs 2015-11-27 06:36:41.818866167 +0000
108+ import Control.Monad
110+ import System.IO.Error
112++import System.Exit hiding (die)
114+ import Alice.Data.Text
115+ import Alice.Data.Instr
117+ readInit "" = return []
120+- do input <- catch (readFile file) $ die file . ioeGetErrorString
121++ do input <- catchIOError (readFile file) $ die file . ioeGetErrorString
122+ let tkn = tokenize input ; ips = initPS ()
123+ inp = ips { psRest = tkn, psFile = file, psLang = "Init" }
124+ liftM fst $ fireLPM instf inp
126+ reader lb fs (ps:ss) [TI (InStr ISfile file)] =
127+ do let gfl = if null file then hGetContents stdin
129+- input <- catch gfl $ die file . ioeGetErrorString
130++ input <- catchIOError gfl $ die file . ioeGetErrorString
131+ let tkn = tokenize input
132+ ips = initPS $ (psProp ps) { tvr_expr = [] }
133+ sps = ips { psRest = tkn, psFile = file, psOffs = psOffs ps }
134+diff -aur serious/sad-2.3-25/Alice/Parser/Base.hs sad-2.3-25/Alice/Parser/Base.hs
135+--- serious/sad-2.3-25/Alice/Parser/Base.hs 2008-03-09 09:36:40.000000000 +0000
136++++ sad-2.3-25/Alice/Parser/Base.hs 2015-11-27 06:14:28.616734527 +0000
139+ module Alice.Parser.Base where
141++import Control.Applicative
142+ import Control.Monad
146+ type CPMC a b c = (c -> CPMS a b) -> (String -> CPMS a b) -> CPMS a b
147+ newtype CPM a c = CPM { runCPM :: forall b . CPMC a b c }
149++instance Functor (CPM a) where
152++instance Applicative (CPM a) where
156+ instance Monad (CPM a) where
157+ return r = CPM $ \ k _ -> k r
158+ m >>= n = CPM $ \ k l -> runCPM m (\ b -> runCPM (n b) k l) l
159+ fail e = CPM $ \ _ l -> l e
161++instance Alternative (CPM a) where
165+ instance MonadPlus (CPM a) where
166+ mzero = CPM $ \ _ _ _ z -> z
167+ mplus m n = CPM $ \ k l s -> runCPM m k l s . runCPM n k l s
168+diff -aur serious/sad-2.3-25/init.opt sad-2.3-25/init.opt
169+--- serious/sad-2.3-25/init.opt 2007-10-11 15:25:45.000000000 +0000
170++++ sad-2.3-25/init.opt 2015-11-27 07:23:41.372816854 +0000
172+ # Alice init options
174+-[provers provers/provers.dat]
175++[library @out@/examples]
176++[provers @out@/provers/provers.dat]
180+diff -aur serious/sad-2.3-25/provers/provers.dat sad-2.3-25/provers/provers.dat
181+--- serious/sad-2.3-25/provers/provers.dat 2008-08-26 21:20:25.000000000 +0000
182++++ sad-2.3-25/provers/provers.dat 2015-11-27 07:24:18.878169702 +0000
188++C@out@/provers/moses
190+ Nfound unprovable in
196+-Cprovers/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
197++C@spass@/bin/SPASS -CNFOptSkolem=0 -PProblem=0 -PGiven=0 -Stdin -TimeLimit=%d
198+ YSPASS beiseite: Proof found.
199+ NSPASS beiseite: Completion found.
200+ USPASS beiseite: Ran out of time.