[included wildcards in matching, unify ..., matching runs without crash, but erroneous
martin.hofmann@uni-bamberg.de**20090507155141] hunk ./src/Data/HypoSpace.hs 217
-                        text "ID -> Hypo: <ommitted>" -- <$> pretty (hypoIdBimap hsp)
+                        text "ID -> Hypo: <omitted>" -- <$> pretty (hypoIdBimap hsp)
hunk ./src/Data/IOData.hs 238
+                        text "Background :" <$> pretty (background iod) <$>
hunk ./src/Data/Rules.hs 76
-    pretty (Arg i pos) = text "Arg" <> int i <$> pretty pos 
-    pretty (Body pos)  = text "Body" <$> pretty pos 
+    pretty (Arg i pos) = text "Arg" <> int i <+> pretty pos 
+    pretty (Body pos)  = text "Body" <+> pretty pos 
hunk ./src/Logging/PrettyPrinter.hs 117
+    
+instance Pretty Ordering where
+    pretty = text.show
hunk ./src/RuleDevelopment.hs 22
-    return $ parts  ++ subfs
+    return $ parts  ++ subfs ++ mtchs
hunk ./src/RuleDevelopment.hs 24
-    
- -- introduces a function call
-functionCall :: 
-    CovrRule ->             -- ^the rule to partition 
-                            --  FIXME: need covered target rules here) 
-    IM (CovrRule,[CovrRule]) -- ^the modified rule(now closed), and the 
-                            -- synthesised subfunctions
-functionCall r = return (r,[])          -- FIXME
--- TODO:
--- * uses abduce :: Rules -> Rules -> IM Funcrulment
--- * find a Funcrulment 'crul' in background knowledge which contains a rule f
---   for each rule in the rules covered by r (covering(r)) which matches its rhs
--- * create a new rule from 'r' by replacing its rhs by a function call to 'crul'
--- * for each argument of 'crul' abduce the I/O pairs for a subfunction which
---   returns the argument value from the input of r
--- * call Igor recursively to synthesise the subfunction. 
-   
---subfunction :: 
---    CovrRule ->                 -- ^the rule to partition 
---                            --  FIXME: need covered target rules here) 
---    IM (CovrRule,[CovrRule]) -- ^the modified rule (now closed), and the 
---                            -- synthesised subfunctions
---subfunction r = return (r,[])          -- FIXME
--- TODO:
--- * uses abduce :: Rules -> Rules -> IM Funcrulment
--- * replace every open variable by a call to a subfunction 
--- * abduce I/O pairs for every subfunction
--- * the abduced I/O pairs of each subfunction are added to the background 
---   knowledge (check if it is feasible to modify the IM at this point or 
---   better at top-level 
--- * synthesize every subfunction recursively. 
---   !!! 
---       If inserting the synthesized function into a hypothese,
---       a hypothese should never be strict  
---   !!!
hunk ./src/RuleDevelopment/Matching.hs 9
+import Control.Monad.Error
hunk ./src/RuleDevelopment/Matching.hs 19
+import Logging
hunk ./src/RuleDevelopment/Matching.hs 24
+    llogEnterIN
+    llogIN ( text "Compute matchings for:" <^> (pretty $ cr))
+    llogIN ( text "Trying calls to:" <^> (pretty $ allowdCs iod))
hunk ./src/RuleDevelopment/Matching.hs 35
-computeMatchings _ (_, Nothing) =  return [] -- no call allowed
+computeMatchings _ (n, Nothing) = 
+    llogIN ( text "* Not allowed to call" <+> (text.show $ n)) >> 
+    return [] -- no call allowed
hunk ./src/RuleDevelopment/Matching.hs 39
-     tgtrs <- breakupM $ cr
-     cllrs <- liftM (getAll n) getEvidence
-     cllios <- liftM oneFromEachCol $ makeIOMatrix tgtrs o cllrs
+     tgtrs  <- breakupM $ cr
+     cllrs  <- liftM (getAll n) getEvidence
+     cllios <- (do { r <- (liftM oneFromEachCol $ makeIOMatrix tgtrs o cllrs) 
+                  ; (llogIN ( text "* Make call to" <+> (text.show $ n))) 
+                  ;  return r}) 
+                `catchError` 
+                (\msg -> llogIN ( text "* Not able to call" <+> 
+                                      (text.show $ n) <+>
+                                      text "because of" <+> text msg) >> 
+                             return [])     
hunk ./src/RuleDevelopment/Matching.hs 51
--- TODO: should return a Maybe, because matching may fail intendedly, need to catch this here
hunk ./src/RuleDevelopment/Matching.hs 91
+    -- check whether matching is allowed
hunk ./src/RuleDevelopment/Matching.hs 93
+              -- match on lhss
hunk ./src/RuleDevelopment/Matching.hs 102
+              -- return the calling relation and a list of reules, i.e. on IO
+              -- pair for each argument of the called function
hunk ./src/Syntax/Expressions.hs 58
-    (==) s@(TVarE sn _ ) t@(TVarE tn _) = (sameTy s t) && (sn == tn)
-    (==) s@(TConE sn _) t@(TConE tn _)  = (sameTy s t) && (sn == tn)
-    (==) s@(TLitE sl _) t@(TLitE tl _)  = (sameTy s t) && (sl == tl)
+    (==) s@(TVarE  sn _ ) t@(TVarE tn _)  = (sameTy s t) && (sn == tn)
+    (==) s@(TWildE _ _ ) t                = (sameTy s t)
+    (==) s t@(TWildE _ _)                 = (sameTy s t) 
+    (==) s@(TConE sn _) t@(TConE tn _)    = (sameTy s t) && (sn == tn)
+    (==) s@(TLitE sl _) t@(TLitE tl _)    = (sameTy s t) && (sl == tl)
hunk ./src/Syntax/Expressions.hs 118
+    pretty (TWildE n t)        = 
+        braces $ pretty (VarE (mkName ('?':(show n)))) <+> colon <> colon <+> pretty t
hunk ./src/Syntax/Expressions.hs 123
-    typeOf (TVarE _ t) = t
-    typeOf (TConE _ t) = t
-    typeOf (TLitE _ t) = t
-    typeOf (TAppE _ _ t) = t
+    typeOf (TVarE _ t)       = t
+    typeOf (TConE _ t)       = t
+    typeOf (TLitE _ t)       = t
+    typeOf (TAppE _ _ t)     = t
hunk ./src/Syntax/Expressions.hs 128
-    typeOf (TTupE _  t) = t
-    typeOf (TListE _  t) = t
+    typeOf (TTupE _  t)      = t
+    typeOf (TListE _  t)     = t
hunk ./src/Syntax/Expressions.hs 131
+    typeOf (TWildE _ t)      = t
hunk ./src/Syntax/Expressions.hs 137
+    sameSymAtRoot (TWildE _ _ ) (TWildE _ _)                    = True
hunk ./src/Syntax/Expressions.hs 180
+    root e@(TWildE _ _)                      = const e
hunk ./src/Syntax/Expressions.hs 186
-    root (TListE (l:ls) t)                  = \[l, TListE ls _] -> TListE (l:ls) t 
+    root (TListE (l:ls) t)                  = \(l:ls) -> trace ("ROOT at LIST" ++ (show.pretty $ (l:ls)))$ TListE (l:ls) t 
hunk ./src/Syntax/Expressions.hs 193
+    subterms (TWildE _ _)                        = []
hunk ./src/Syntax/Expressions.hs 221
-    -- matching wildcards
+    -- matching wildcards 
+    -- TODO: ?create subst
+    match s@(TWildE i1 _) t     = checkMatch s t >> return ()
+    match s t@(TWildE i1 _)     = checkMatch s t >> return ()
hunk ./src/Syntax/Expressions.hs 285
-    match s t                               =
-        let msg =  patternNotDef [pretty s, pretty t]
-        in lift (setCurrentLogger "Unifier.match of TExp") >>
-           llogWA msg >> llogDE (hsep (map pretty (unfoldTAppE t))) >>
-           fail (show msg)
+    match s t                               = flush "No Match!"
+--        let msg =  patternNotDef [text.show $ s, pretty t]
+--        in  llogDE msg >> llogDE (hsep (map pretty (unfoldTAppE t))) >>
+--            flush "No Match!"
hunk ./src/Syntax/Expressions.hs 290
-        
+    
+    -- unifying wildcards 
+    -- TODO: ?create substitution?
+    unify s@(TWildE i1 _) t     = checkUnify s t >> return ()
+    unify s t@(TWildE i1 _)     = checkUnify s t >> return ()    
hunk ./src/Syntax/Expressions.hs 354
-    unify s t                               =
-        let msg =  patternNotDef [pretty s, pretty t]
-        in lift (setCurrentLogger "Unifier.unify of TExp") >>
-           llogWA msg >> llogDE (hsep (map pretty (unfoldTAppE t))) >>
-           fail (show msg)
+    unify s t                               = flush "Not unifiable!"
+--        let msg =  patternNotDef [text.show $ s, pretty t]
+--        in llogWA msg >> llogDE (hsep (map pretty (unfoldTAppE t))) >>
+--           flush "Not unifiable!"
hunk ./src/Syntax/Expressions.hs 369
+    apply u t@(TWildE _ _)     = return t
hunk ./src/Syntax/Expressions.hs 381
-        let msg =  patternNotDef [pretty u, pretty t]
-        in setCurrentLogger "Terms.Terms.apply of TExp" >>
-           logWA msg >> fail (show msg)       
+        let msg =  patternNotDef [text.show $ u, pretty t]
+        in logWA msg >> fail (show msg)       
hunk ./src/Syntax/Expressions.hs 473
+        checkforAntiInstance l   
+    -- antiunifying (VarE Name)              
+    aunify l@((TWildE _ _):xs) =  
hunk ./src/Syntax/Expressions.hs 577
+fromTExp (TWildE n _)        = VarE (mkName ('?':(show n)))
hunk ./src/SynthesisEngine.hs 123
-    llogIN $ text "Advancing" <+> pretty rf 
+    llogIN $ linebreak <^> text "Advancing" <+> pretty rf 
hunk ./src/UI/UIStarter.hs 206
-    let exmpls = liftM2 (,) (getBindings tgts (context s))(getBindings tgts (context s))
+    let exmpls = liftM2 (,) (getBindings tgts (context s))(getBindings bgks (context s))