e071fb22ea9923a2a4ff41184d80ca46b55ee932Till MossakowskiDescription : Static analysis for COL
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiCopyright : (c) Christian Maeder, Uni Bremen 2004
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu ProdescuLicense : GPLv2 or higher, see LICENSE.txt
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian MaederMaintainer : till@informatik.uni-bremen.de
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiStability : provisional
881f43de18aeae879886be203cd32e90051799c0Till MossakowskiPortability : portable
0cd45e749d5c847c9652afdd0617a18488a94d1fChristian Maederstatic analysis of COL parts
ad270004874ce1d0697fb30d7309f180553bb315Christian Maederimport qualified Data.Set as Set
ad270004874ce1d0697fb30d7309f180553bb315Christian Maederimport qualified Data.Map as Map
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederimport Data.Maybe (fromMaybe)
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederaddConstructor :: Id -> COLSign -> Result COLSign
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederaddConstructor i m = return
2bbf88585fe313af8585da0288880310cc1b027dChristian Maeder m { constructors = Set.insert i $ constructors m }
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederaddObserver :: (Id, Maybe Int) -> COLSign -> Result COLSign
2bbf88585fe313af8585da0288880310cc1b027dChristian MaederaddObserver (i, v) m = return
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder m { observers = Map.insert i (fromMaybe 0 v) $ observers m }
5e605dc61ff9ec5724c319603905dc9b0dccc05fChristian Maederana_COL_SIG_ITEM :: Ana COL_SIG_ITEM () COL_SIG_ITEM () COLSign
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maederana_COL_SIG_ITEM _ mi =
2bbf88585fe313af8585da0288880310cc1b027dChristian Maeder Constructor_items al ps -> do
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder mapM_ (updateExtInfo . addConstructor . item) al
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder return $ Constructor_items al ps
2bbf88585fe313af8585da0288880310cc1b027dChristian Maeder Observer_items al ps -> do
e85b224577b78d08ba5c39fe9dcc2e53995454a2Christian Maeder mapM_ (updateExtInfo . addObserver . item) al
e953bea49e7f0e1a43bccf2a66c5e2a2b50848e0Christian Maeder return $ Observer_items al ps