tokstyle-0.0.9: TokTok C code style checker
Safe HaskellNone
LanguageHaskell2010

Tokstyle.Analysis.SecurityRank.Lattice

Synopsis

Documentation

data SecurityRank Source #

Represents the security level of data. The Ord instance defines the lattice structure, where the minimum element is the most restrictive/tainted. Bottom < Safe < Rank 0 < Rank 1 < ...

Constructors

Bottom

Uninitialized or unreachable code path.

Safe

A value known to be safe (e.g., a literal).

Rank Int

A tainted value with a specific integer rank.

mergeRank :: SecurityRank -> SecurityRank -> SecurityRank Source #

The merge operation for the lattice. When control paths join, we take the most restrictive (i.e., minimum) rank.

type TaintState = Map AbstractLocation SecurityRank Source #

The TaintState is the fact that flows through the analysis. It maps every abstract location currently in scope to its security rank.