This research is funded in part by grant CCR-0113181 from the U. S. National Science Foundation. Profiles: A Compositional Mechanism for Performance Specification.

Slides:



Advertisements
Similar presentations
This research is funded in part the U. S. National Science Foundation grant CCR DEET for Component-Based Software Murali Sitaraman, Durga P. Gandi.
Advertisements

Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Computer Science School of Computing Clemson University Introduction to Mathematical Reasoning Jason Hallstrom and Murali Sitaraman Clemson University.
School of Computing Clemson University Mathematical Reasoning  Goal: To prove correctness  Method: Use a reasoning table  Prove correctness on all valid.
Addressing the Challenges of Current Software. Questions to Address Why? What? Where? How?
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
This research has been funded in part by grants from the U. S. National Science Foundation for the past 20 years. Towards Verified Software: Research and.
1 Abstract Data Types. Objectives To appreciate the concept and purpose of abstract data types, or ADTs To understand both the abstract behavior and the.
A New and More Efficient Implementation of an Undirected Graph Component Shawn Christopher Craft The Ohio State University Department of Computer and Information.
1 Chapter 7: Runtime Environments. int * larger (int a, int b) { if (a > b) return &a; //wrong else return &b; //wrong } int * larger (int *a, int *b)
Analysis Stage (Phase I) The goal: understanding the customer's requirements for a software system. n involves technical staff working with customers n.
Enhancements Enabling Flexible Feature and Implementation Selection John Hunt and Murali Sitaraman Reusable Software Research Group Department of Computer.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
TCSS 342, Winter 2005 Lecture Notes
Computer Science School of Computing Clemson University Mathematical Modeling Murali Sitaraman Clemson University.
DATA STRUCTURE Subject Code -14B11CI211.
Mathematics throughout the CS Curriculum Support by NSF #
Jason Hallstrom (Clemson), Joan Krone (Denison), Joseph E. Hollingsworth (IU Southeast), and Murali Sitaraman(Clemson) This workshop is funded in part.
Data Structures and Programming.  John Edgar2.
Computer Science School of Computing Clemson University Discrete Math and Reasoning about Software Correctness Murali Sitaraman
Computer Science School of Computing Clemson University Specification and Reasoning in SE Projects Using a Web IDE Charles T. Cook (Clemson) Svetlana V.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Computer Science School of Computing Clemson University Mathematical Reasoning across the Curriculum Software Development Foundations and Software Engineering.
Data Structures Winter What is a Data Structure? A data structure is a method of organizing data. The study of data structures is particularly important.
Lecture 16 March 22, 2011 Formal Methods CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
Data Structures Week 5 Further Data Structures The story so far  We understand the notion of an abstract data type.  Saw some fundamental operations.
CompSci 105 SS 2005 Principles of Computer Science Lecture 4 Lecturer: Santokh Singh.
Computer Science School of Computing Clemson University Introduction to Formal Specification Murali Sitaraman Clemson University.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Lecture 17 March 24, 2011 Formal Methods 2 CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
Computer Science and Engineering College of Engineering The Ohio State University Interfaces The credit for these slides goes to Professor Paul Sivilotti.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Computer Science School of Computing Clemson University Discrete Math and Reasoning about Software Correctness Joseph E. Hollingsworth
Introduction to Data Structures and Algorithms CS 110: Data Structures and Algorithms First Semester,
Chapter 1 Data Structures and Algorithms. Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
A.Alzubair Hassan Abdullah Dept. Computer Sciences Kassala University A.Alzubair Hassan Abdullah Dept. Computer Sciences Kassala University NESTED SUBPROGRAMS.
Data Abstaraction Chapter 10.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Abstraction ADTs, Information Hiding and Encapsulation.
Addressing Modes Chapter 6 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
1 Performance Specifications Based upon Complete Profiles Joan Krone William F. Ogden Murali Sitaraman.
RESOLVE VERIFICATION: A New Perspective Joan Krone William F. Ogden.
CS212: Object Oriented Analysis and Design Lecture 22: Generic Class Design.
Computer Science School of Computing Clemson University Mathematical Reasoning with Objects.
Formal Methods in Software Engineering1 Today’s Agenda  Mailing list  Syllabus  Introduction.
Implementing Subprograms
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
Integrating Math Units and Proof Checking for Specification and Verification SAVCBS Workshop 2008 SIGSOFT 2008 / FSE 16 November 9th, 2008 Hampton Smith.
Lecture 18 March 29, 2011 Formal Methods 3 CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
 System Requirement Specification and System Planning.
Computer Science School of Computing Clemson University Reasoning with Queues and Web Interface Demo.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Modular Alternatives to Testing
Types for Programs and Proofs
Component Implementations Using RESOLVE
Formal Specification of Java Interfaces
Lecture 2 of Computer Science II
Foundations of Computer Science
Introduction to Components and Specifications Using RESOLVE
Performance Specifications Based upon Complete Profiles
Formal Specification of Interfaces
Introduction to Components and Specifications Using RESOLVE
Mathematical Reasoning
More Mathematical Reasoning (Conditional Statements)
Mathematical Reasoning with Data Abstractions
Formal Methods Lecture 16 March 22, 2011 CS 315 Spring 2011
Presentation transcript:

This research is funded in part by grant CCR from the U. S. National Science Foundation. Profiles: A Compositional Mechanism for Performance Specification Joan Krone, Denison University William F. Ogden, Ohio State University Murali Sitaraman, Clemson University

RESOLVE Research Objectives

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

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

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

Modular Reasoning uses implements uses implements uses

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)

This Talk Profiles for Compositional Specification of Performance

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;

Mathematical Modeling Concept Stack_Template (type Entry; eval Max_Depth: Integer); uses String_Theory; requires Max_Depth > 0; Type_Family Stack  Str(Entry); exemplar S; constraints  S   Max_Depth; initialization ensures S =  ; Operation Push … Operation Pop …... end Stack_Template;

Specification of Operations Operation Push (alters E: Entry; updates S: Stack); requires  S   Max_Depth; ensures S =  #E   #S; Operation Pop (replaces R: Entry; updates S: Stack); requires  S   0; ensures #S =  R  ° S; Operation Clear (clears S: Stack);...

Exmple Use... Facility Tree_Stk_Fac is Stack_Template(Tree_Info, 300) realized_by Clean_Array_Realiz;... Var T1, T2: Tree_Info; Var S1, S2: Stack;... Pop(T1, S1); Push(T1, S1); Push(T2, S1);...

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;

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

The Object Displacement Clause Profile SSC short_for Space_Conscious for Stack_Template; Defines SSC D : ℕ ;... Type_Family Stack; Defn Cnts_Disp(  : Str(Entry) ): ℕ =( ); Displacement SSC D + Cnts_Disp( S ) + (Max_Depth  |S|)·Entry.I_Disp;... end SSC;

Initialization Performance Specification Profile SSC short_for Space_Conscious for Stack_Template;... Defines SSC I, SSC I1 : ℝ  0 ; Defines SSC MI : ℕ ; Type_Family Stack; Displacement... Initialization; duration SSC I + (SSC I1 + Entry.I_Dur)  Max_Depth; manip_disp SSC MI + (Max_Depth – 1)  Entry.I_Disp + Entry.IM_Disp; end SSC;

Performance Specification of Pop Profile SSC short_for Space_Conscious for Stack_Template; Defines SSC Po : ℝ  0 ; Type_Family Stack;... Oper Pop( replaces R: Entry; updates S: Stack ); duration SSC Po + Entry.I_Dur + Entry.F_Dur(#R); manip_disp SSC MPo + Max(Entry.IM_Disp, Entry.FM_Disp(#R));... end SSC;

Code for Pop Realization Clean_Array_Realiz for Stack_Template with_profile SSC; Definition SSC Po : ℝ  0 = Dur Call (2) + 2·Array.Dur :=: + 6·Record.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;

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 SSC Po + Entry.I_Dur + Entry.F_Dur(#R); manip_disp SSC MPo + Max(Entry.IM_Disp, Entry.FM_Disp(#R)); Oper Push( clears E: Entry; updates S: Stack ); duration … manip_disp …... end SSC;

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;

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;

Need for Supplementary Models in Profiles Consider this code: Var S1, S2: Stack; … Push(…, S2); Clear(S2); At the end of the above code, S1 = S2 = , but occupied space may not be the same How would we express the storage usage for a Stack object based on its abstract value?

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) ): ℕ = … Displacement SFC D + Cnts_Disp( S.Resid◦S.ipso );... end SFC;

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;

Profile Composition Exercise Operation Flip( updates S: Stack ); ensures S = #S Rev ; 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;

Performance Profile of Flip Using SSC for Stack_Template Operation Flip( updates S: Stack ); duration (SFF F1 + Entry.I_Dur + Entry.Fin_IV_Dur + Stack.I_Dur + Stack.Fin_IV_Dur + (SFF F2 + Entry.I_Dur + Entry.Fin_IV_Dur)·|#S|; manip_disp (SFFF MC1 + Entry.I_Disp + Stack.I_Disp + Max (SFFFMC2, Entry.IM_Disp,Entry.FM_Disp));

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 , May 2003, 25 pages. Available at: