[BUGFIX: simplification removed target funs, more heuristics added
martin.hofmann@uni-bamberg.de**20090605031448] hunk ./expl/Examples.hs 75
-
-
hunk ./expl/Examples.hs 103
-multfst [] = []
+--multfst [] = []
hunk ./expl/Examples.hs 156
+
+
hunk ./src/Context/SynthesisContext.hs 100
+    ,('True, ConT (''Bool) )
+    ,('False, ConT (''Bool) )
hunk ./src/Data/Rules.hs 234
-hypos2decs :: Bool -> [[(Name,Rules)]] -> [[Dec]]
-hypos2decs b hs =  map (rearrange.rules2decs.preprocess) hs
+hypos2decs :: (Bool,[Name]) -> [[(Name,Rules)]] -> [[Dec]]
+hypos2decs (b,tgts) hs =  map (rearrange.rules2decs.preprocess) hs
hunk ./src/Data/Rules.hs 241
-    isRec      = (>1).S.size.snd
+    isRec (n,r)     = (elem n tgts) || ((>1).S.size $ r)
hunk ./src/Logging/PrettyPrinter.hs 123
+   
+instance (Pretty a,Pretty b,Pretty c,Pretty d) => Pretty (a,b,c,d) where
+  pretty (w,x,y,z)= tupled [pretty w, pretty x, pretty y, pretty z]
+   
+instance (Pretty a,Pretty b,Pretty c,Pretty d,Pretty e) => Pretty (a,b,c,d,e) where
+  pretty (v,w,x,y,z)= tupled [pretty v,pretty w, pretty x, pretty y, pretty z]
+   
+instance (Pretty a,Pretty b,Pretty c,Pretty d,Pretty e,Pretty f) => Pretty (a,b,c,d,e,f) where
+  pretty (u,v,w,x,y,z)= tupled [pretty u, pretty v, pretty w, pretty x, pretty y, pretty z]
hunk ./src/Rating/Rateable.hs 18
-
-type RatingData = (Int,Int, Int)   
+import Data.Function (on)
+type RatingData = (Int,Int,Int,Float,Int)   
hunk ./src/Rating/Rateable.hs 39
-    rate h       = ( numberOfPartitions h
-                   , numberOfOpenRules h
-                   , numberOfTotalRules h)
+    rate h       = 
+     let numPartitions  = numberOfPartitions h
+         numOpenRules   = numberOfOpenRules h
+         numFreeVars    = numberOfFreeVars h
+         numTotalRules   = numberOfTotalRules h
+         numFVarPerRule  = on (/) fromIntegral numFreeVars numOpenRules
+     in ( numPartitions
+        , numOpenRules
+        , numFreeVars
+        , numFVarPerRule
+        , numTotalRules)
hunk ./src/Rating/Rateable.hs 58
-                 
+
+numberOfFreeVars :: Hypo -> Int
+numberOfFreeVars h = 
+    foldl1 (+) $ map (length.freeVars) (S.toList $ allRules h)
+
hunk ./src/SynthesisEngine.hs 44
-    return $ hypos2decs (cnf_simplify conf) result       
+    return $ hypos2decs ((cnf_simplify conf),map fst tgts) result       