Starfish: A Table-Centric Tool for Design Derivation
description
Transcript of Starfish: A Table-Centric Tool for Design Derivation
![Page 1: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/2.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/4.jpg)
Two Common System Views
![Page 5: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/5.jpg)
Behavior Tables
Decision Table Action Table
Signals
Updates
Selector keys
Branches
![Page 6: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/8.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/9.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/10.jpg)
System Factorization
![Page 11: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/11.jpg)
System Factorization
![Page 12: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/12.jpg)
Creating Factorization Opportunities
• Retiming• Serialization• Data Refinement
![Page 13: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/13.jpg)
Retiming
update
top res
s{0}
update
top res
s{0}
0
instra
instra
![Page 14: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/14.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/15.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/16.jpg)
pop
pushtop
alutop
pops
instr
High-Level Synthesis
![Page 17: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/17.jpg)
pop
pushtop
alutop
pops
instr
High-Level Synthesis
![Page 18: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/18.jpg)
pop
pushtop
alutop
pops
instr
High-Level Synthesis
![Page 19: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/19.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/20.jpg)
Serialization Tables
Actions
Scheduling Table Evaluation Table
TermEval
EvaluationRequirements
![Page 21: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/21.jpg)
Serialization in Starfish
Propose final step & Confirm requirements
Insert schedule into behavior table
![Page 22: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/22.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/23.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/24.jpg)
Stack to Array Transformation
Apply to ‘s’
Apply to instances of ‘top’
![Page 25: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/25.jpg)
Stack to Linked List
Apply to signals‘s’ and ‘tl’
Apply to instancesof ‘top’
![Page 26: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/26.jpg)
Full StackCalc Decomposition
Controller
Memory ALU
![Page 27: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/27.jpg)
Garbage Collector Derivation
![Page 28: Starfish: A Table-Centric Tool for Design Derivation](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/28.jpg)
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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/29.jpg)
(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](https://reader036.fdocuments.in/reader036/viewer/2022070423/568167f1550346895ddd6428/html5/thumbnails/30.jpg)
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