Performance Specifications Based upon Complete Profiles

Slides:



Advertisements
Similar presentations
College of Information Technology & Design
Advertisements

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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 24 Slide 1 Critical Systems Validation 2.
Katz Formal Specifications Larch 1 Algebraic Specification and Larch Formal Specifications of Complex Systems Shmuel Katz The Technion.
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.
Midterm Exam Two Tuesday, November 25 st In class cumulative.
From Module Breakdown to Interface Specifications Completing the architectural design of Map Schematizer.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Data Structures/ Algorithms and Generic Programming Sorting Algorithms.
Data Structures and Programming.  John Edgar2.
Data Structures 1- Course Syllabus. 2- Introduction about Data Structures.
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.
Lecture 16 March 22, 2011 Formal Methods CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
Computer Science School of Computing Clemson University Introduction to Formal Specification Murali Sitaraman Clemson University.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
Lecture 17 March 24, 2011 Formal Methods 2 CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
CSE-C1 Algs & DS 1 CSE–C1 Algorithms and Data Structures 1 lecturer Dr.Matthew Montebello office CB 409 credit 1 lectures 10.
Information and Computer Sciences University of Hawaii, Manoa
ดร.สุรศักดิ์ มังสิงห์ SPU, Computer Science Dept.
Data Design and Implementation. Definitions of Java TYPES Atomic or primitive type A data type whose elements are single, non-decomposable data items.
Cohesion and Coupling CS 4311
Computer Science School of Computing Clemson University Discrete Math and Reasoning about Software Correctness Joseph E. Hollingsworth
1 Algorithms CS/APMA 202 Rosen section 2.1 Aaron Bloomfield.
Chapter Algorithms 3.2 The Growth of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors.
1 The Evaluator. 2 Compiler vs. Interpreter Command Processing Unit The Computer Program in Low Level Machine Language Program in High Level Language.
1 Algorithms CS 202 Epp section ??? Aaron Bloomfield.
1 Chapter 17: Amortized Analysis I. 2 About this lecture Given a data structure, amortized analysis studies in a sequence of operations, the average time.
Data Abstaraction Chapter 10.
Abstraction ADTs, Information Hiding and Encapsulation.
“Never doubt that a small group of thoughtful, committed people can change the world. Indeed, it is the only thing that ever has.” – Margaret Meade Thought.
This research is funded in part by grant CCR from the U. S. National Science Foundation. Profiles: A Compositional Mechanism for Performance Specification.
1 Performance Specifications Based upon Complete Profiles Joan Krone William F. Ogden Murali Sitaraman.
Algorithms Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006 by Maria Litvin, Gary Litvin,
Four different data structures, each one best in a different setting. Simple Heap Balanced Heap Fibonacci Heap Incremental Heap Our results.
2004 Hawaii Inter Conf Comp Sci1 Specifying and Proving Object- Oriented Programs Arthur C. Fleck Computer Science Department University of Iowa.
Final Exam Tuesday, December 22nd 2:00 - 3:50pm room 102 Warren Weaver Hall.
As Of March 28 th, 2001 A quick summary of LeNDI / Celware Integration. rbp.
RESOLVE VERIFICATION: A New Perspective Joan Krone William F. Ogden.
Computer Science School of Computing Clemson University Mathematical Reasoning with Objects.
Prof. Necula CS 164 Lecture 171 Operational Semantics of Cool ICOM 4029 Lecture 10.
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)
Examples (D. Schmidt et al)
Interface Concepts Modeling Core Team
Data Structures Interview Questions.
Growth of Functions & Algorithms
Priority Queues An abstract data type (ADT) Similar to a queue
Data Structures and Algorithms
Chapter 8 Analysis & Modeling
Component Implementations Using RESOLVE
Formal Specification of Java Interfaces
Introduction to Components and Specifications Using RESOLVE
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
Data Structures and Algorithms
Functional Programming
Formal Specification of Interfaces
A Robust Data Structure
Introduction to Components and Specifications Using RESOLVE
Mathematical Reasoning
Priority Queues An abstract data type (ADT) Similar to a queue
Mathematical Reasoning with Data Abstractions
CSE 373, Copyright S. Tanimoto, 2002 Priority Queues -
Heaps By JJ Shepherd.
Algorithms.
Formal Methods Lecture 16 March 22, 2011 CS 315 Spring 2011
Presentation transcript:

Performance Specifications Based upon Complete Profiles Joan Krone William F. Ogden Murali Sitaraman

Our Starting Point D. Parnas: A good specification should tell a client everything he needs to know about a component and nothing more. Us: A client needs to know not only about the functionality provided by a component, but also about its performance.

Goals for a Performance Specification Mechanism It should support: Abstracting away confusing details Retaining adequate precision (completeness) Scaling for arbitrarily large components Verifying correctness of compositions Extending functional specifications and critically: Describing commonalities

Commonality Identification Example Various “Sorting” Implementations . . . bubble quick select heap tree insert

Type_Fam Entry_Keeper Oper Add_Entry Oper Change_Modes Oper Remove_a_Smallest  Abstract Sorting Component (Prioritizer) Functionality Abstraction . . . bubble quick select heap tree insert

Type_Fam Entry_Keeper Oper Add_Entry Oper Change_Modes Oper Remove_a_Smallest  Abstract Sorting Component (Prioritizer) Functionality Abstraction Quad_ Ch_Md (PCQC) LoG_ Rmv (PCGR) Linear_ Add_E (PCLA) . . . Performance Abstraction . . . bubble quick select heap tree insert

Simple Profile Example with Stacks Concept Stack_Template( type Entry; eval Max_Depth:  Type_Family Stack  Str(Entry); 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 Depth_of( preserves S: Stack ): Integer; ensures Depth_of = ( |S| );

Enhancement Flipping_Capability for Stack_Template; Operation Flip( updates S: Stack ); ensures S = #SRev; end Flipping_Capability; Possible Implementation: Realization Obvious_F_C_Realiz for Flipping_Capability Procedure Flip( updates S: Stack ); Var Next_Entry: Entry; Var S_Flipped: Stack; While Depth_of( S )  0 affecting S, S_Flipped, Next_Entry; maintaining #S = S_FlippedRev ◦ S and Entry.Is_Init(Next_Entry); decreasing |S|; do Pop( Next_Entry, S ); Push( Next_Entry, S_Flipped ); end; S :: S_Flipped; end Flip; end Obvious_F_C_Realiz;

An Example Profile Profile SSCF short_for Stack_Space_Conscious_Flip for Flipping_Capability for Stack_Template with_profile SSC; Defines SSCFF1, SSCFF2: ℝ0; Defines SSCFFMC1, SSCFFMC2: ℕ; Operation Flip( updates S: Stack ); duration SSCFF1 + Entry.I_Dur + Stack.I_Dur + Entry.F_IV_Dur + Stack.F_IV_Dur + (SSCFF2 + Entry.I_Dur + Entry.F_IV_Dur)|#S|; manip_disp (SSCFFMC1 + Entry.I_Disp + Stack.I_Disp) + Max( SSCFFMC2, Entry.IM_Disp, Entry.F_IVM_Disp ); end SSCF;

duration SSCFF1 + Entry.I_Dur + Stack.I_Dur + Entry.F_IV_Dur + Stack.F_IV_Dur + (SSCFF2 + Entry.I_Dur + Entry.F_IV_Dur)|#S|; ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Realization Obvious_F_C_Realiz for Flipping_Capability Definition SSCFF1: ℝ0 = ( DurCall(1) + SSCDp + Int.Dur + Dur:: ); Definition SSCFF2: ℝ0 = ( SSCDp + Int.Dur + SSCPo1 + SSCPu ); Definition SSCFFMC1: ℕ =   Procedure Flip( updates S: Stack ); Var Next_Entry: Entry; Var S_Flipped: Stack; While Depth_of( S )  0 affecting S, S_Flipped, Next_Entry; maintaining #S = S_FlippedRev ◦ S and Entry.Is_Init(Next_Entry); decreasing |S|; elapsed_time ( SSCFF2 + Entry.I_Dur + Entry.F_IV_Dur )|S_Flipped|; do Pop( Next_Entry, S ); Push( Next_Entry, S_Flipped ); end; S :: S_Flipped; end Flip;

Profile SSC short_for Space_Conscious for Stack_Template; Defines SSCI, SSCI1, SSCF, SSCPo1, SSCPu, SSCC, SSCC1, SSCDp, SSCRC: ℝ0; Type_Family Stack; Initialization duration SSCI + (SSCI1 + Entry.I_Dur)Max_Depth; Operation Pop( replaces R: Entry; updates S: Stack ); duration SSCPo1 + Entry.I_Dur + Entry.F_Dur(#R);† Operation Push( alters E: Entry; updates S: Stack ); ensures Entry.Is_Init(E);‡ duration SSCPu; Operation Depth_of( preserves S: Stack ): Integer; duration SSCDp;  end SSC; †Note that this duration expression is split between the externally defined terms for the duration of an Entry initialization, Entry.I_Dur, and the finalization of the incoming value of R, Entry.F_Dur(#R) and the internally defined term SSCPo1. ‡Note that this extension of the functional specification for Push is essential for achieving tight performance specifications.

So, the Profile construct is a performance specification mechanism that supports: Abstracting away confusing details Retaining adequate precision (completeness) Scaling for arbitrarily large components Verifying correctness of compositions Extending functional specifications Describing commonalities It (or something quite similar) should be included in any serious language for component specification and verification.

What Else is There? What happens with displacement (space). How component composition works. Multiple profiles for a constituent. How large components can have simple profiles. How to formally verify profiles. When to supplement an object model.