[improve accuracy of points-to analysis
John Meacham <john@repetae.net>**20050913072319] hunk ./Fixer.hs 100
-    --writeIORef (pending v) bottom
hunk ./Fixer.hs 101
-    --f vs True
hunk ./Grin/PointsToAnalysis.hs 120
-    mappend (VsBas a) (VsBas b) | a == b = VsBas a
-    mappend (VsBas a) (VsBas b) = VsBas (a ++ b)
+    mappend (VsBas a) (VsBas b) = VsBas a
+    --mappend (VsBas a) (VsBas b) = VsBas (a ++ b)
hunk ./Grin/PointsToAnalysis.hs 197
-newHeap ht p@(Con a ps)
-    | tagIsSuspFunction a, Identity t <- tagToFunction a = newHeap' ht (mappend p (Func t))
+--newHeap ht p@(Con a ps)
+--    | tagIsSuspFunction a, Identity t <- tagToFunction a = newHeap' ht (mappend p (Func t))
hunk ./Grin/PointsToAnalysis.hs 226
-        toHEq (NodeC t []) | not (tagIsWHNF t) = return (SharedEval,Union [Con t [], func (fromAtom t) ] )
+        --toHEq (NodeC t []) | not (tagIsWHNF t) = return (SharedEval,Union [Con t [], func (fromAtom t) ] )
+        toHEq (NodeC t []) | not (tagIsWHNF t) = return (SharedEval,Con t []  )
hunk ./Grin/PointsToAnalysis.hs 352
-        --tell mempty { appEq = [(funcEval,[x])] }
+        tell mempty { appEq = [(funcEval,[x])] }
hunk ./Grin/PointsToAnalysis.hs 367
-        case fromAtom a of
-            'F':rs -> tell mempty { appEq = [(toAtom ('f':rs),ts)] }
-            'B':rs -> tell mempty { appEq = [(toAtom ('b':rs),ts)] }
-            _ -> return ()
+        --case fromAtom a of
+        --    'F':rs -> tell mempty { appEq = [(toAtom ('f':rs),ts)] }
+        --    'B':rs -> tell mempty { appEq = [(toAtom ('b':rs),ts)] }
+        --    _ -> return ()
hunk ./Grin/PointsToAnalysis.hs 377
-        case fromAtom a of
-            'F':rs -> tell mempty { appEq = [(toAtom ('f':rs),ts)] }
-            'B':rs -> tell mempty { appEq = [(toAtom ('b':rs),ts)] }
-            _ -> return ()
+        --case fromAtom a of
+        --    'F':rs -> tell mempty { appEq = [(toAtom ('f':rs),ts)] }
+        --    'B':rs -> tell mempty { appEq = [(toAtom ('b':rs),ts)] }
+        --    _ -> return ()
hunk ./Grin/PointsToAnalysis.hs 577
+        procApp a [p] | a == funcEval = do
+            p' <- newVal p
+            dynamicRule p' $ \p -> flip mapM_ (Set.toList (getHeaps p)) $ \h -> do
+                case Map.lookup h heapMap of
+                    Just (e',_) -> dynamicRule e' $ \e -> do
+                        flip mapM_ (fsts [ runIdentity $ Map.lookup (tagFlipFunction n) funcMap | n <- (Set.toList $ getNodes e), tagIsSuspFunction n ]) $ \z -> do
+                            e' `isSuperSetOf` z
+                    Nothing -> return ()
+
hunk ./Grin/PointsToAnalysis.hs 595
-        simplePos (Variable v) = case Map.lookup v varMap of
+        simplePos var@(Variable v) = case Map.lookup v varMap of
hunk ./Grin/PointsToAnalysis.hs 597
-            Nothing -> error "varMap has no var"
+            Nothing -> error $ "varMap has no var:" ++ show var
hunk ./Grin/Whiz.hs 186
-    f (Var v _) | Just n <- Map.lookup v env =  return n
+    f var@(Var v _)
+        | Just n <- Map.lookup v env =  return n
+        -- | V n <- v, n < 0 = return var
+        -- | otherwise = error $ "Var not found: " ++ show var
hunk ./Main.hs 252
-    --Stats.print "Grin" Stats.theStats
-    --wdump FD.GrinPreeval $ printGrin x
+    Stats.print "Grin" Stats.theStats
+    wdump FD.Grin $ printGrin x
hunk ./Main.hs 271
-    wdump FD.Progress $ putErrLn "Linear nodes analysis..."
-    lr <- Grin.Linear.grinLinear x
+    --wdump FD.Progress $ putErrLn "Linear nodes analysis..."
+    --lr <- Grin.Linear.grinLinear x
+    --mapM_ CharIO.print lr