starfish: a table-centric tool for design derivation

30
Starfish: A Table- Centric Tool for Design Derivation Alex Tsow The MITRE Corporation Affiliation with The MITRE Corporation is provided for identification purposes only, and is not intended to convey or imply MITRE's concurrence with, or support for, the positions, opinions or viewpoints expressed by the author.

Upload: agnes

Post on 25-Feb-2016

26 views

Category:

Documents


2 download

DESCRIPTION

Starfish: A Table-Centric Tool for Design Derivation . Alex Tsow The MITRE Corporation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Starfish: A Table-Centric Tool for Design Derivation

Starfish: A Table-Centric Tool for Design Derivation

Alex TsowThe MITRE Corporation

Affiliation with The MITRE Corporation is provided for identification purposes only, and is not intended to convey or imply MITRE's

concurrence with, or support for, the positions, opinions or viewpoints expressed by the author.

Page 2: Starfish: A Table-Centric Tool for Design Derivation

Thanks to the NASA Langley Research Center

• This work was supported by a 3 year fellowship from the Graduate Student Researchers Program (GSRP).

• Sponsorship originated from

NASA Langley Formal Methods GroupRicky Butler

Paul S. Miner

Page 3: Starfish: A Table-Centric Tool for Design Derivation

Design Derivation• Formally generates systems

– Transformational algebra– Contrast with post-design formal

verification• Synchronous stream networks• Manual interaction

• How best to achieve interaction?• How best to deliver a deep

transformation space?

Page 4: Starfish: A Table-Centric Tool for Design Derivation

Two Common System Views

Page 5: Starfish: A Table-Centric Tool for Design Derivation

Behavior Tables

Decision Table Action Table

Signals

Updates

Selector keys

Branches

Page 6: Starfish: A Table-Centric Tool for Design Derivation

Starfish

• Tool for behavior table manipulation– Implements transformation algebra– b.t. display and derivation playback

• Explicit type system– Data Refinement

• Interactive Serialization Tables– Environment for high-level synthesis

• Retiming

Page 7: Starfish: A Table-Centric Tool for Design Derivation

Related Work• Transformation systems

– Eisenbiegler & Kumar, Formally Embedding Existing High Level Synthesis Algorithms

– Teica, Radhakrishnan & Vemuri, An Approach to High Level Synthesis & System Validation Using Formally Verified Transformations

– Matthews & Launchbury, Elementary Microarchitecture Algebra

• Table-Oriented Engineering– Heninger, Kallander, Parnas & Shore, Software Requirements for the A-7

Aircraft– Heitmeyer, Labaw, et.al. SCR*– Leveson et.al., RSML

• Algebraic Specification– Goguen, Thatcher, Wagner (ADJ), Initial Algebra Approach to the

Specification, Correctness, and Implementation of Abstract Data Types– Gurevich, Evolving Algebras

Page 8: Starfish: A Table-Centric Tool for Design Derivation

Behavior Table SemanticsStackCalc(inst,a)=res where res = (top s) s = {0} ! (sel (inst-cat instr) (push s a) (pop s) (push (pop (pop s)) (alu (inst->op instr) (top s) (top (pop s)))))

Inputsinstr = (push, push, add …)a = (5, 22, 2007, …)Internal Signals:res = ( 0, 5, 22, 27 …)s = ({0}, {0,5}, {0,5,22}, {0,27}, …)

Page 9: Starfish: A Table-Centric Tool for Design Derivation

Table Algebra

• Add/Remove signal• Apply a term-level algebraic identity• Instantiate a “don’t care” subterm• Substitute combinational action for variable • Tuple/Untuple signals• Add/Remove decision key• Instantiate decision branches• Substitute branch value for decision key term• Split a table into multiple tables

Page 10: Starfish: A Table-Centric Tool for Design Derivation

System Factorization

Page 11: Starfish: A Table-Centric Tool for Design Derivation

System Factorization

Page 12: Starfish: A Table-Centric Tool for Design Derivation

Creating Factorization Opportunities

• Retiming• Serialization• Data Refinement

Page 13: Starfish: A Table-Centric Tool for Design Derivation

Retiming

update

top res

s{0}

update

top res

s{0}

0

instra

instra

Page 14: Starfish: A Table-Centric Tool for Design Derivation

Retiming

Add Tail SignalExpand ‘s’Combinational identities

Retiming ‘res’ and ‘tl’’

Simplify ‘res’ and ‘tl’ Eliminate ‘s’

Page 15: Starfish: A Table-Centric Tool for Design Derivation

pop

pushtop

alutop

pop

pops

instr

High-Level Synthesis

Data Flow Graph for (push (pop (pop s))

(alu-op instr (top s) (top (pop s))))

Page 16: Starfish: A Table-Centric Tool for Design Derivation

pop

pushtop

alutop

pops

instr

High-Level Synthesis

Page 17: Starfish: A Table-Centric Tool for Design Derivation

pop

pushtop

alutop

pops

instr

High-Level Synthesis

Page 18: Starfish: A Table-Centric Tool for Design Derivation

pop

pushtop

alutop

pops

instr

High-Level Synthesis

Page 19: Starfish: A Table-Centric Tool for Design Derivation

pop

pushtop

alutop

pops

ss

sss s

x

x

x x

y

instr

High-Level Synthesis

Page 20: Starfish: A Table-Centric Tool for Design Derivation

Serialization Tables

Actions

Scheduling Table Evaluation Table

TermEval

EvaluationRequirements

Page 21: Starfish: A Table-Centric Tool for Design Derivation

Serialization in Starfish

Propose final step & Confirm requirements

Insert schedule into behavior table

Page 22: Starfish: A Table-Centric Tool for Design Derivation

Types in Starfish• Multi-sorted structures with identities

– Enforces syntactic correctness– Identity database for term manipulation

• Declarative structures– Unbounded types; groups– Enumerated types; booleans, states– Parameterized types; stacks over data– Inter-type functions and identities

• Special types and expressions– Polymorphic tuples & selectors, bit vectors,

integers

Page 23: Starfish: A Table-Centric Tool for Design Derivation

Types in Starfish

• Type inferencing is necessary– What’s the type of empty-stack?– Type annotations

• Facilities for type translation– One-to-one– One-to-many

• Choice of representation contingent on current representation: A,R) R

– Stateful refinement, reference-state pattern

Page 24: Starfish: A Table-Centric Tool for Design Derivation

Stack to Array Transformation

Apply to ‘s’

Apply to instances of ‘top’

Page 25: Starfish: A Table-Centric Tool for Design Derivation

Stack to Linked List

Apply to signals‘s’ and ‘tl’

Apply to instancesof ‘top’

Page 26: Starfish: A Table-Centric Tool for Design Derivation

Full StackCalc Decomposition

Controller

Memory ALU

Page 27: Starfish: A Table-Centric Tool for Design Derivation

Garbage Collector Derivation

Page 28: Starfish: A Table-Centric Tool for Design Derivation

Garbage Collector Derivation

Factor outabstract memories

Encapsulate memorywith function names Apply switch

refinementMove swinto DT

Page 29: Starfish: A Table-Centric Tool for Design Derivation

(define secd (letrec ([exec (lambda (s e c d) (case (car c) ('RTN (exec (cons (car s) (car d)) ...)) ('DUM (exec s (cons nil e) (cdr c) d)) ('AP (exec '()

(cons (car (cdr s)) (cdr (car s)))(car (car s))(cons (cdr (cdr s)) (cons e (cons (cdr c) d)))))

… ('STOP (exec s e c d))))]) exec ))

SECD Derivation

Page 30: Starfish: A Table-Centric Tool for Design Derivation

Conclusion / Future Work• Starfish expands factorization space

– Behavior table viewer and transformer– Explicit type system and data refinement– High Level Synthesis w/ Serialization tables– Retiming

• Interface/Transaction Specification• Integration with other tools

– DDD / Theorem provers / CASL• Develop backends to synchronous targets

– FPGAs– Multicore systems / real-time software