This research is funded in part by grant CCR0113181 from the PowerPoint PPT Presentation

presentation player overlay
1 / 28
About This Presentation
Transcript and Presenter's Notes

Title: This research is funded in part by grant CCR0113181 from the


1
Profiles A Compositional Mechanism for
Performance Specification
Joan Krone, Denison University William F. Ogden,
Ohio State University Murali Sitaraman, Clemson
University
E-mail murali_at_cs.clemson.edu http//www.cs.clemso
n.edu/resolve
This research is funded in part by grant
CCR-0113181 from the U. S. National Science
Foundation.
2
RESOLVE Research Objectives
3
Predictable Behavior
  • Need to be able to specify precisely the behavior
    we want
  • Need to be able to reason that a component is
    correct, i.e., it does what it is supposed to do

4
Predictable Performance and Efficiency
  • Predictable performance
  • Need to be able to specify the performance we
    want (time space constraints)
  • Need to be able to reason that a component
    performs as specified
  • Efficiency
  • Components should be efficient
  • Alternative components should allow efficiency
    tradeoffs

5
Scalability
  • How can specifications scale?
  • Abstraction in specification
  • How can reasoning scale?
  • Modularity in reasoning, i.e., ability to reason
    about one component at a time, using only
    specifications of reused components

6
Modular Reasoning
uses
implements
uses
implements
implements
uses
7
RESOLVE Research Effort
  • To achieve predictability in behavior and
    performance, RESOLVE research has entailed
  • Language design development
  • Software design development
  • System design development
  • Multi-institution effort (Clemson, Denison, Ohio
    State, Virginia Tech., others)

8
This Talk
  • Profiles for Compositional Specification of
    Performance

9
Specification Outline
Concept Stack_Template (type Entry eval
Max_Depth Integer) Type_Family Stack
Operation Push Operation Pop Operation
Depth_of Operation Clear ... end
Stack_Template
10
Mathematical Modeling
Concept Stack_Template (type Entry eval
Max_Depth Integer) uses String_Theory require
s Max_Depth gt 0 Type_Family Stack Í
Str(Entry) exemplar S constraints ½S½
Max_Depth initialization ensures S
L Operation Push Operation Pop ... end
Stack_Template
11
Specification of Operations
Operation Push (alters E Entry updates S
Stack) requires ½S½ lt Max_Depth ensures S
?E? S Operation Pop (replaces R Entry
updates S Stack) requires ½S½ gt 0 ensures S
?R? S Operation Clear (clears S
Stack) ...
12
Exmple Use
... Facility Tree_Stk_Fac is Stack_Template(Tree_I
nfo, 300) realized_by Clean_Array_Realiz ...
Var T1, T2 Tree_Info Var S1, S2
Stack ... Pop(T1, S1) Push(T1, S1) Push(T2,
S1) ...
13
Performance Profile Outline
Profile SSC short_for Space_Conscious for
Stack_Template Type_Family Stack Displacement
Initialization duration manip_disp
Operation Push duration manip_disp
... end SSC
14
The Object Displacement Clause
  • Assume the following representation
  • Type Stack Record
  • Contents Array (1..Max_Depth) of Entry
  • Top Integer
  • end
  • Space-conscious implementation(s) maintain this
    convention
  • all unused array locations (i.e., from index Top
    1 to Max_Depth) always contain initial entries

15
The Object Displacement Clause
Profile SSC short_for Space_Conscious for
Stack_Template Defines SSCD N ... Type_Famil
y Stack Defn Cnts_Disp( ? Str(Entry) ) N (
) Displacement SSCD Cnts_Disp( S
) (Max_Depth ? S)Entry.I_Disp
... end SSC
16
Initialization Performance Specification
Profile SSC short_for Space_Conscious for
Stack_Template ... Defines SSCI, SSCI1 R?0
Defines SSCMI N Type_Family
Stack Displacement ... Initialization durat
ion SSCI (SSCI1 Entry.I_Dur)?Max_Depth
manip_disp SSCMI (Max_Depth
1)?Entry.I_Disp Entry.IM_Disp end SSC
17
Performance Specification of Pop
Profile SSC short_for Space_Conscious for
Stack_Template Defines SSCPo R?0
Type_Family Stack ... Oper Pop( replaces
R Entry updates S Stack ) duration SSCPo
Entry.I_Dur Entry.F_Dur(R) manip_disp SSCMPo
Max(Entry.IM_Disp, Entry.FM_Disp(R))
... end SSC
18
Code for Pop
Realization Clean_Array_Realiz for
Stack_Template with_profile SSC Definition
SSCPo R?0 DurCall(2) 2Array.Dur
6Record.Dur. Int Int- Type Stack
Record Procedure Pop( replaces R Entry
updates S Stack ) Var Fresh_Val Entry R
? S.Contents(S.Top) S.Contents(S.Top) ?
Fresh_Val S.Top ? S.Top ? 1 end Pop
... end Clean_Array_Realiz
19
Performance Specification of Operations
Profile SSC short_for Space_Conscious for
Stack_Template Defines ... Type_Family Stack
... Oper Pop( replaces R Entry updates S
Stack ) duration SSCPo Entry.I_Dur
Entry.F_Dur(R) manip_disp SSCMPo
Max(Entry.IM_Disp, Entry.FM_Disp(R)) Oper
Push( clears E Entry updates S Stack
) duration manip_disp ... end SSC
20
Performance Profile for Faster Implementations
Profile SFC short_for Fast_Clear for
Stack_Template Type_Family Stack Displacement
Initialization duration manip_disp
Operation Push duration manip_disp
... end SFC
21
Efficient Implementations of Clear and Pop
Realization Faster_Array_Realiz for
Stack_Template with_profile SFC Type Stack
Record ... Procedure Pop( replaces R
Entry updates S Stack ) R ?
S.Contents(S.Top) S.Top ? S.Top ? 1 end
Pop Procedure Clear( updates S Stack
) S.Top ? 0 end Clear ... end
Faster_Array_Realiz
22
Need for Supplementary Models in Profiles
  • Consider this code
  • Var S1, S2 Stack
  • Push(, S2)
  • Push (, S2)
  • Clear(S2)
  • At the end of the above code, S1 S2 L, but
    occupied space may not be the same
  • How would we express the storage usage for a
    Stack object based on its abstract value?

23
The Object Displacement Clause
Profile SFC short_for Fast_Clear for
Stack_Template Type_Family Stack Supplement
SFC with Resid Str(Entry) constraint S.ipso
S.Resid Max_Depth Defn Cnts_Disp( ?
Str(Entry) ) N Displacement SFCD
Cnts_Disp( S.Resid?S.ipso ) ... end SFC
24
Profile of Operations
Profile SFC short_for Fast_Clear for
Stack_Template Type_Family Stack Supplement
SFC with Resid Str(Entry) ... Oper Pop(
replaces R Entry updates S Stack ) ensures
S.Resid ?R??S.Resid duration manip_disp
Oper Push( alters E Entry updates S Stack
) ensures S.Resid ?E??S.Resid ... Oper
Clear( clears S Stack ) ensures S.Resid
S.Resid?S.ipso ... end SFC
25
Profile Composition Exercise
Operation Flip( updates S Stack ) ensures S
SRev Procedure Flip( updates S Stack )
Var Next_Entry Entry Var S_Flipped
Stack While ( Depth_of( S ) ? 0 ) do Pop(
Next_Entry, S ) Push( Next_Entry, S_Flipped )
end S ? S_Flipped end
26
Performance Profile of Flip Using SSC for
Stack_Template
Operation Flip( updates S Stack ) duration
(SFFF1 Entry.I_Dur Entry.Fin_IV_Dur
Stack.I_Dur Stack.Fin_IV_Dur (SFFF2
Entry.I_Dur Entry.Fin_IV_Dur)S
manip_disp (SFFFMC1 Entry.I_Disp Stack.I_Disp
Max (SFFFMC2, Entry.IM_Disp,Entry.FM_Disp))
27
How do you prove?
  • Topic for another talk ?
  • Modular Verification of Performance Constraints,
    Technical Report RSRG-03-04, Department of
    Computer Science, Clemson University, Clemson, SC
    29634-0974, May 2003, 25 pages.  
  • Available at www.clemson.edu/resolve

28
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com