HPIOM: Heterogeneous Parallel Input/Output Machines

Based on a chapter written by Matthieu Moy

Presented By Blake Kaplan

Rice University

Where Are We?


We are the intermediate representation.

Motivation

Goals

Requirements for the intermediate formalism

Well defined formal semantics
The goal of this project is to prove theorems about SystemC, if the intermediate representation lacks formal semantics, it's failed.
Powerful enough
The intermediate representation must be able to represent the semantics of the model.
Simple to manipulate
The purpose of this representation is to reason about it.
Executable
Allows for easy verification of correctness against the SystemC engine.
Provable
The ultimate goal is to provide a formal verification of a program.

Introduction to HPIOM

Trade-offs Made

HPIOM Basic Concepts

Expressions and Conditions

Types

Boolean
Can either be true or false.
Integer
Signed, unbounded precision, integral representation.
Enumerated types
A type that may take one of several statically defined values.
Arrays
Provided as a convenience over using n variables of the same type.

Automata

Definition: An automaton A is a reactive machine formally defined by a tuple (Q, V, U, q0, Ν0, qf, T, M)where:

Q
a set of control points.
V
The set of variables.
U
Set of unknown values.
q0 ∈ Q
The initial control point
Ν0
The intial values of known variables.
qf
The "final" control point
T
The set of labeled edges between control points.
M
The set of signals that can be sent when moving along an edge.

Example of an Automata

An automata with control points s1, s2, s3 and edges t1, t2 and variables x, y.

Edges

Definition: An edge is a tuple (qs, qt, G, A, E) where:

qs and qt
Source and target control points
G
A condition on V and U and the precence and values of a signal
A
Parallel assignments in the form v := e
E
Signals emitted while taking this edge

Communication Between Automata

More Complicated Example

Example of a more complicated Automaton

States

Definition: a state s is a tuple (q, Ν) with:

q
A control point.
Ν
The valuation of all variables in the automaton

The set of initial states of A is {(q0, Ν)} where Ν is a valuation of all variables in A with their default values.

Transitions

Formally, given an edge (qs, qt, G, A, E) and U describing the unknown values, the set of transitions is the set of ((qs, Νs), (qt, Νt), G', E', U) where:

U
A valuation of the unknown values of A.
Νt
The valuation after apply the substitution A to Νs.
G'
Condition created by replacing variabled of G by their value in Νs.
E'
Set of valued signals with the values updated for Νs.

Semantics of a Whole System

Validity Condition

For an HPIOM automata to be valid, it must pass the condition:

If ∃i,j|Gi is a function of a signal emitted by Aj, then Gj is not a function of Ai.

Global Execution

The global execution trace of a system is a sequence of global transitions:
((S0, S1, E1, U1), (S1, S2, E2, U2), ..., (Sn - 1, Sn, En, Un))

This follows directly from the definitions of global transitions and global states.

Non-determinism

Implicit
When two transitions along different edges are possible in one step.
Explicit
Using unknown_value and non_deterministic_choice

Abstracted Types

Other Convenience Constructs

Abstract Addresses

Abstract Addresses (cont.)

Conservativeness

Advantages of Conservativeness

Operations on Addresses

Illustration

Comparisons

Expression of Properties

Other Abstractions of Addresses

Composite Tree Pattern

Composite Tree Pattern (cont.)

For more information, see http://en.wikipedia.org/wiki/Composite_pattern .

Visitor Design Pattern

interface Base {
    void behavior1();
    void behavior2();
    .
    .
    .
}

class Derived : Base {
    // Implement each behavior.
}

Problems and Solution

Optimizations

Future work

The End

Up Next: Chapter 6, Bise