[no subfunction intro on a bound variable
martin.hofmann@uni-bamberg.de**20090513135237] hunk ./src/Data/Rules.hs 24
-import Data.List (foldl', transpose, (\\), nub, sort)
+import Data.List (foldl', transpose, (\\), nub, sortBy, partition, isPrefixOf)
hunk ./src/Data/Rules.hs 73
-             deriving (Show)
+             deriving (Eq, Ord,Show)
hunk ./src/Data/Rules.hs 231
-hypos2decs hs =  map (sort.rules2decs) hs
+hypos2decs hs =  map (rearrange.rules2decs) hs
+    where
+    rearrange = (uncurry (++)). partition (\(FunD n _) -> not $ isPrefixOf "fun" (show n)) 
hunk ./src/Data/Rules.hs 242
-rules2clauses rs = map rule2clause (reverse.S.toAscList $ rs)
+rules2clauses rs = map rule2clause  (sortByPatLength rs)
+    where
+    sortByPatLength = (sortBy $ on compare $ show.pretty.lhs).S.toList
hunk ./src/RuleDevelopment/Subfunction.hs 26
-    let novarpos = posOfVarSubts cr
hunk ./src/RuleDevelopment/Subfunction.hs 27
-    let ios      = map (abduceIOAt covcruls) novarpos
+    let ios      = map (abduceIOAt covcruls) posOfVarSubts
hunk ./src/RuleDevelopment/Subfunction.hs 30
-    let rfnew = foldl' addCallAt cr $ zip novarpos subfnnms
+    let rfnew = foldl' addCallAt cr $ zip posOfVarSubts subfnnms
hunk ./src/RuleDevelopment/Subfunction.hs 39
-             text "Pos:" <+> pretty novarpos <^>
+             text "Pos:" <+> pretty posOfVarSubts <^>
hunk ./src/RuleDevelopment/Subfunction.hs 45
-    directlyBelowRoot = (\p -> (p > Root) && p < (0°0°Root))
hunk ./src/RuleDevelopment/Subfunction.hs 47
-    posOfVarSubts = fst.unzip.filterNoVars.label.subterms.rhs.crul 
-    -- get the positions of immediate subterms which contain variables
-    label        = zip [ Body (i°Root) | i<- [0..]]
-    -- keep track of the position
-    filterNoVars = filter (hasVars.snd)
-    -- throw away all subterms with no variables
+    posOfVarSubts = map (\(_,i `Dot` _) -> Body (i°Root)) $ opos cr 
+    -- get the positions of immediate subterms which are neither constant nor 
+    -- contain a bound variable.
hunk ./src/Syntax/Terms.hs 6
-    Position(..),
+    Position(..), isSubPos,
hunk ./src/Syntax/Terms.hs 54
+-- | @isSubPos p1 p2 == Trueq iff there is a direct path downwards in the term 
+--   tree from p2 to p1 
+isSubPos :: Position -> Position -> Bool
+isSubPos _ Root = True
+isSubPos (Dot i p) (Dot i' p') = (i == i') && isSubPos p p'
+    