camfort-0.700: CamFort - Cambridge Fortran infrastructure

Safe HaskellNone
LanguageHaskell98

Analysis.LVA

Description

Provides live-variable analysis for Fortran code. One of the simpler analyses in the suite (a good starting point for any new developers). This demonstrates the use of the "zipper" format, and various helpers from Syntax and Traverse.

lva is the top-level definition here.

Synopsis

Documentation

lva :: Program Annotation -> Program Annotation Source

live-variable analysis on a program

lvaOnUnit :: ProgUnit Annotation -> ProgUnit Annotation Source

live-variable analysis at the level of a unit, not whole-program,iterates lva1 until a fixed-point is reached

lva1 :: Zipper (ProgUnit Annotation) -> Zipper (ProgUnit Annotation) Source

Single iteration of live-variable analysis over the zipper for an AST

kill :: Fortran Annotation -> [Access] Source

Variables killed by the current statement

gen :: Fortran Annotation -> [Access] Source

Variables generated (made live) by the current statement