language-c-0.3.2.1: Analysis and generation of C code

Portability | ghc
Stability | alpha
Maintainer | benedikt.huber@gmail.com
Safe Haskell | None

Language.C.Analysis

Contents

- Semantic representation
- Error datatypes for the analysis
- Traversal monad
- Top level analysis
- Analyzing declarations
- Debug print

Description

Analysis of the AST.

Currently, we provide a monad for analysis and analyze declarations and types. Especially note that there is no direct support for analyzing function bodies and constant expressions.

NOTE This is an experimental interface, and therefore the API will change in the future.

DONE:

- Name analysis framework
- File-scope analysis
- Declaration analysis

TODO:

- Type checking expressions
- Constant expression evaluation (CEE)
- Typed representation of attributes (depends on CEE)
- Normalized representation of initializers
- Support for analyzing function bodies (depends on CEE)
- Normalizing expressions and statements
- Formal rules how to link back to the AST using NodeInfo fields
- Typed assembler representation

Synopsis

- module Language.C.Analysis.SemRep
- module Language.C.Analysis.SemError
- module Language.C.Analysis.TravMonad
- module Language.C.Analysis.AstAnalysis
- module Language.C.Analysis.DeclAnalysis
- module Language.C.Analysis.Debug

# Semantic representation

module Language.C.Analysis.SemRep

# Error datatypes for the analysis

module Language.C.Analysis.SemError

# Traversal monad

module Language.C.Analysis.TravMonad

# Top level analysis

module Language.C.Analysis.AstAnalysis

# Analyzing declarations

module Language.C.Analysis.DeclAnalysis

# Debug print

module Language.C.Analysis.Debug