StatAna.hs revision 083c76e485943cbbdeef6ee4bcf5c0d72b77051e
ca010363454de207082dfaa4b753531ce2a34551Christian Maeder{- |
ca010363454de207082dfaa4b753531ce2a34551Christian MaederModule : $Header$
49fc18b4bb1d4a8d3ec05e0cffd5f0475b289592Christian MaederDescription : static ADL analysis
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian MaederCopyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010
ca010363454de207082dfaa4b753531ce2a34551Christian MaederLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
eca29a7be76eb73944ec19b06eda3d6a9e6e543dChristian Maeder
ca010363454de207082dfaa4b753531ce2a34551Christian MaederMaintainer : Christian.Maeder@dfki.de
49fc18b4bb1d4a8d3ec05e0cffd5f0475b289592Christian MaederStability : provisional
ca010363454de207082dfaa4b753531ce2a34551Christian MaederPortability : portable
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder
ca010363454de207082dfaa4b753531ce2a34551Christian Maeder-}
ca010363454de207082dfaa4b753531ce2a34551Christian Maeder
49fc18b4bb1d4a8d3ec05e0cffd5f0475b289592Christian Maedermodule Adl.StatAna where
ca010363454de207082dfaa4b753531ce2a34551Christian Maeder
ca010363454de207082dfaa4b753531ce2a34551Christian Maederimport Adl.As
ca010363454de207082dfaa4b753531ce2a34551Christian Maederimport Adl.Sign
ca010363454de207082dfaa4b753531ce2a34551Christian Maeder
b603f34b79bc0992e5d74f484e5bdc9f9c2346c6Christian Maederimport qualified Common.Lib.Rel as Rel
53301de22afd7190981b363b57c48df86fcb50f7Christian Maederimport Common.AS_Annotation
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian Maederimport Common.ExtSign
c438c79d00fc438f99627e612498744bdc0d0c89Christian Maederimport Common.Id
23f8d286586ff38a9e73052b2c7c04c62c5c638fChristian Maederimport Common.GlobalAnnotations
fcb1d8a27670f3206bd4ca28d77d4172619db602Christian Maederimport Common.Result
fc8c6570c7b4ee13f375eb607bed2290438573bfChristian Maeder
fc8c6570c7b4ee13f375eb607bed2290438573bfChristian Maederimport qualified Data.Map as Map
83cc27e4ca7cf1a4bb5f4a8df17d3e6d44e6f1eaChristian Maederimport qualified Data.Set as Set
53301de22afd7190981b363b57c48df86fcb50f7Christian Maeder
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian MaederbasicAna :: (Context, Sign, GlobalAnnos)
975642b989852fc24119c59cf40bc1af653608ffChristian Maeder -> Result (Context, ExtSign Sign Relation, [Named Sen])
53301de22afd7190981b363b57c48df86fcb50f7Christian MaederbasicAna (c@(Context ps), sig, _) =
83cc27e4ca7cf1a4bb5f4a8df17d3e6d44e6f1eaChristian Maeder let (rs, ss) = foldr (\ p (r, s) ->
fc8c6570c7b4ee13f375eb607bed2290438573bfChristian Maeder case p of
83cc27e4ca7cf1a4bb5f4a8df17d3e6d44e6f1eaChristian Maeder Pr u -> (r, makeNamed "" (Assertion u) : s)
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder Pm qs d -> (d : r, map (\ q ->
53301de22afd7190981b363b57c48df86fcb50f7Christian Maeder makeNamed (decnm d ++ "_" ++ showProp q)
53301de22afd7190981b363b57c48df86fcb50f7Christian Maeder $ DeclProp d q) qs ++ s)
49fc18b4bb1d4a8d3ec05e0cffd5f0475b289592Christian Maeder _ -> (r, s)) ([], []) ps
53301de22afd7190981b363b57c48df86fcb50f7Christian Maeder in return (c, mkExtSign sig, ss)
53301de22afd7190981b363b57c48df86fcb50f7Christian Maeder