StatAna.hs revision 730c5ceb32674079c15c015b9a673da9eb4037be
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance{- |
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel ManceModule : $Header$
81ec673ac5ab1493568d9ef7798b752ab8ee0e61Felix Gabriel ManceDescription : static ADL analysis
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel ManceCopyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel ManceLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel ManceMaintainer : Christian.Maeder@dfki.de
5d801400993c9671010d244646936d8fd435638cChristian MaederStability : provisional
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel MancePortability : portable
ffa6044b04fa0e31242141ff56a5d80c4233b676Felix Gabriel Mance
aa0ca44e856c87db27e61687cbb630f270976da1Felix Gabriel Mance-}
5d801400993c9671010d244646936d8fd435638cChristian Maeder
5d801400993c9671010d244646936d8fd435638cChristian Maedermodule Adl.StatAna where
5d801400993c9671010d244646936d8fd435638cChristian Maeder
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Manceimport Adl.As
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Manceimport Adl.Sign
097bc9f18b722812d480df0f5c634d09cbca8e21Felix Gabriel Mance
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Manceimport Common.AS_Annotation
852bd6145634dc2832b61c44678fe539bc1682d5Christian Maederimport Common.ExtSign
090c663fcc1593c66f39a0972326799a672760d5Christian Maederimport Common.GlobalAnnotations
f8c3d045dda224e92bf6bcb6288e1ee75ab54d1eChristian Maederimport Common.Result
f8c3d045dda224e92bf6bcb6288e1ee75ab54d1eChristian Maeder
feab1106bbee4f2ea2fd48bca7106dd041e4211dFelix Gabriel MancebasicAna :: (Context, Sign, GlobalAnnos)
18ff56829e5e99383ee6106584d55bcbd8ed45e7Felix Gabriel Mance -> Result (Context, ExtSign Sign Symbol, [Named Sen])
668c9c725a11c0f77057152148570af853a1bc0dFelix Gabriel MancebasicAna (c@(Context ps), sig, _) =
b1162cc13e8371724e3382ae6d1cfdeb43891fbbChristian Maeder let (_, ss) = foldr (\ p (r, s) ->
668c9c725a11c0f77057152148570af853a1bc0dFelix Gabriel Mance case p of
863fa65ac095659c6da1cde7fe7b839f1e7f60f9Felix Gabriel Mance Pr h u -> (r, case h of
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance Always -> makeNamed "" $ Assertion Nothing u
f8c3d045dda224e92bf6bcb6288e1ee75ab54d1eChristian Maeder RuleHeader k t -> makeNamed (show t) $ Assertion (Just k) u
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance : s)
668c9c725a11c0f77057152148570af853a1bc0dFelix Gabriel Mance Pm qs d _ ->
668c9c725a11c0f77057152148570af853a1bc0dFelix Gabriel Mance (d : r, map (\ q -> makeNamed (show (decnm d) ++ "_"
668c9c725a11c0f77057152148570af853a1bc0dFelix Gabriel Mance ++ showUp (propProp q))
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance $ DeclProp d q) qs ++ s)
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance _ -> (r, s)) ([], []) ps
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance in return (c, mkExtSign sig, ss)
c298a419605037f5352b5ad0f67b3e06db094051Felix Gabriel Mance