[BUGFIX when synthesising multiple targets, add those targets to bgk which are currently not processed
martin.hofmann@uni-bamberg.de**20090611034146] hunk ./src/Data/IgorMonad.hs 8
-    setTarget, getTarget, currentBestHypos, getEvidence, getSearchSpace, 
+    setTarget, getTarget, addBgk, remBgk, currentBestHypos, getEvidence, getSearchSpace, 
hunk ./src/Data/IgorMonad.hs 30
+import Data.List ( (\\) )
hunk ./src/Data/IgorMonad.hs 106
+addBgk :: [Name] -> IM ()
+addBgk ns = do
+    bgk <- gets $ cnf_bgks.config
+    let bgk' = bgk ++ ns
+    modify (\i@(Igor _ _ _ c) -> i{config=c{cnf_bgks=bgk'}})
+    
+remBgk :: [Name] -> IM ()
+remBgk ns = do
+    bgk <- gets $ cnf_bgks.config
+    let bgk' = bgk \\ ns
+    modify (\i@(Igor _ _ _ c) -> i{config=c{cnf_bgks=bgk'}})
hunk ./src/SynthesisEngine.hs 5
-import Data.List (minimumBy)
+import Data.List (minimumBy, (\\))
hunk ./src/SynthesisEngine.hs 47
-synthesiseTargets n = liftM concat $ mapM synthesiseTarget n
- 
-synthesiseTarget :: Name -> IM [[(Name,Rules)]]
-synthesiseTarget n =  do
-
-    llogEnterIN
-    llogIN $ text "STARTING SYNTHESIS for TARGET" <+> squotes (pretty n)
+synthesiseTargets ns = liftM oneFromEach $ mapM synthesiseTarget ns
+    where 
+    synthesiseTarget :: Name -> IM [[(Name,Rules)]]
+    synthesiseTarget n =  do
hunk ./src/SynthesisEngine.hs 52
-    setTarget n >> enterLoop
+        llogEnterIN
+        llogIN $ text "STARTING SYNTHESIS for TARGET" <+> squotes (pretty n)
+        
+        remBgk ns >> addBgk (ns \\ [n]) >> setTarget n >> enterLoop
+    oneFromEach []    = [[]]
+    oneFromEach (x:xs)= [e ++ es | e <- x, es <- (oneFromEach xs)]