2004 · 356 citations · 29 references
ComputingComputer ScienceFormal MethodsLogicProgramming LanguagesControl-flow AnalysisData-flow AnalysisHoare LogicPredicate LogicType CheckingType SystemsConstant PropagationCorrectness ProofsDead Code EliminationInvariantsLoop InvariantsProgram SlicingProgram TransformationRedundancy Elimination
We show how some classical static analyses for imperative programs, and the optimizing transformations which they enable, may be expressed and proved correct using elementary logical and denotationaltechniques. The key ingredients are an interpretation of program properties as relations, rather than predicates, and a realization that although many program analyses are traditionally formulated in very intensional terms, the associated transformations are actually enabled by more liberal extensional properties.We illustrate our approach with formal systems for analysing and transforming while-programs. The first is a simple type system which tracks constancy and dependency information and can be used to perform dead-code elimination, constant propagation and program slicing as well as capturing a form of secure information flow. The second is a relational version of Hoare logic, which significantly generalizes our first type system and can also justify optimizations including hoisting loop invariants. Finally we show how a simple available expression analysis and redundancy elimination transformation may be justified by translation into relational Hoare logic.
29
An axiomatic basis for computer programming
C. A. R. Hoare · Communications of the ACM · 1969 · 3.9K citations · Full text
Mark Weiser · IEEE Transactions on Software Engineering · 1984 · 3.2K citations
A unified approach to global program optimization
Gary A. Kildall · 1973 · 901 citations