Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

MIR

The Medium-level Intermediate Representation (MIR) representation falls between source code and object code. The conceptual parts of MIR are:

  • Nodes of the control-flow graph. Every node is either a conditional node, switch node, leaf node, or expression node.
  • Edges of the control-flow graph, representing control-flow between nodes.
  • Expression nodes, similar in nature to abstract syntax trees (AST) for expressions. Each node may contain a read expression (right-hand side) and write expression (left-hand side).
  • Memory items, which are conceptual objects that represent some abstract location in memory. Not every possible memory location is represented by a memory item. For example, there are no memory items for individual array elements, only for the whole array. A memory item is an object that allows value tracking across multiple nodes. Expressions cannot be used to do this because every node has a unique instance of an expression. However, it is possible to extract memory items from two expressions and see if they are the same.
  • Semantic information, which describes the program data and types. This information is somewhat limited compared to semantic information that can be derived using the Code Style Analysis API.
  • Value constraints, which are constraints on integer values inferred by the Klocwork engine. You can query the Klocwork C/C++ Path API Reference PDF about whether values for certain memory items lie within some specific range.

The MIR is built separately for each function and class method.