Concepts in Software Engineering


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Concepts in Software Engineering

  1. 1. <ul><li>Faculty: Ana Milanova, Dave Musser </li></ul><ul><li>Principal Research Areas: </li></ul><ul><ul><li>Generic Programming; Generic Software Libraries; Semantic Checking Tools (Concept-Based & Proof-Based) </li></ul></ul><ul><ul><li>Program Analysis; Software Testing and Understanding ( not covered in this talk; please see Prof. Milanova’s home page ) </li></ul></ul><ul><li>Related Courses: </li></ul><ul><ul><li>Generic Software Design (CSCI-6090): offered this Fall </li></ul></ul><ul><ul><li>Program Analysis for Software Engineering (CSCI-6967 /CSCI-4972) </li></ul></ul>Concepts in Software Engineering (CISE) A Rensselaer Computer Science Department Research Program
  2. 2. <ul><li>Programming with concepts Slide 2 </li></ul><ul><li>An example concept hierarchy: STL container concepts Slide 3 </li></ul><ul><li>Concept refinement: stronger requirements enable more and better algorithms Slide 4 </li></ul><ul><li>Extending STL concepts: the Boost Graph Library Slide 7 </li></ul><ul><li>Generic libraries designed and developed via the concept-based approach </li></ul><ul><li>The correctness issue for generic libraries </li></ul>Concepts in Software Engineering Generic Programming in the STL and Beyond
  3. 3. Concept = set of abstractions (e.g., types) Generic Programming = Programming with Concepts defined by a set of requirements generic algorithms e.g., generic container algorithms: copy, for_each, equal, transform, accumulate, … and efficiently  Back { vector<T>, deque<T>, list<T>, set<K>, map<K,T>, hash_set<K>, …} = Definition: Container refines Basic-container; uses Input-iterator; introduces begin(containers) -> iterators, end(containers) -> iterators, size(containers) -> naturals, empty(containers) -> bool; requires (for c: containers) size(c) = size(range(c, begin(c), end(c))), empty(c) = (size(c) = 0), valid(range(c, begin(c), end(c))). algorithms that work correctly for every abstraction in a concept = Container Concept e.g., Container Concept in Standard Template Library (STL)
  4. 4. Container STL Container Concepts  Back Associative Container Sorted A. C. Unique A. C. Multiple A. C. Hashed A. C. Unique Sorted A. C. Multiple Sorted A. C. Unique Hashed A. C. Multiple Hashed A. C. Simple A. C. Pair A. C. Set Multiset H. Set H. Multiset H. Multi- map H. Map Map Multimap Front Insertion Sequence Back Insertion Sequence Random Access Container Forward Container Sequence Reversible Container List Vector Deque Front & Back Insertion Sequence Slist See also Click on any node in the above concept hierarchy to see the corresponding requirements as specified in the SGI STL Programmer’s Guide
  5. 5. Container Forward Container Sequence Front Insertion Sequence Back Insertion Sequence Reversible Container Random Access Container List Vector Deque Front & Back Insertion Sequence Slist STL Generic Algorithms on Forward Containers Requires input iterators Enables generic algorithms copy, for_each, equal, transform, … Requires forward iterators Enables find, merge, fill, replace, generate, remove, unique, rotate, … … Requires bidirectional iterators Enables reverse, partition, inplace_merge, … Requires random access iterators Enables sort, binary_search, random_shuffle, …  Back
  6. 6. Container Forward Container Associative Container STL Concepts Input Iterator Output Iterator Iterator Forward Iterator Bidirectional Iterator Random Access Iterator Algorithm Functor Adaptor Input Algorithm Output Algorithm Forward Algorithm Bidirectional Algorithm Random Access Algorithm Unary Functor Binary Functor Binary Predicate Order Relation Iterator Adaptor  Back
  7. 7. STL Concepts Container Iterator Algorithm Functor Adaptor New Concepts in the Boost Graph Library See also  Back BGL Concepts Graph Iterator Graph Incidence Graph Adj. Graph EdgeList Graph … Graph Algorithms Visitor BFS Visitor DFS Visitor Uniform Cost Visitor …
  8. 8. <ul><li>Standard Template Library (HP, RPI, SGI) </li></ul><ul><li>Matrix Template Library (Indiana U.) </li></ul><ul><li>Boost Graph Library (Indiana U.) </li></ul><ul><li>Parallel Boost Graph Library (D. Gregor [RPI PhD], Indiana U.) </li></ul><ul><li>Boost Array Library (N. Josuttis) </li></ul><ul><li>Boost Multi-Array Library (Indiana U.) </li></ul><ul><li>Boost Basic Linear Algebra Library (J. Walter, M. Koch) </li></ul><ul><li>Boost Property Map Library (Indiana U.) </li></ul><ul><li>Boost Random Number Generator Library (J. Mauer) </li></ul><ul><li>Boost Threads Library (W. Kempf) </li></ul><ul><li>Boost Concept Checking Library (Indiana U.) </li></ul><ul><li>Computational Geometry Algorithms Library (H. Br ő nnimann, S. Schirra, R. Veltkamp, …) </li></ul>Generic Libraries Designed and Developed Via the Concept-Based Approach
  9. 9. <ul><li>How do we know when generic library components are correctly implemented? </li></ul><ul><ul><li>Does the implementation code satisfy the requirements specification? </li></ul></ul><ul><li>How do we know whether we are using them correctly? That is, do we satisfy the required preconditions? </li></ul><ul><ul><ul><li>Syntactic checking (including type-checking) </li></ul></ul></ul><ul><ul><ul><li>Semantic checking (including proof-checking) </li></ul></ul></ul>The Correctness Issue for Generic Libraries
  10. 10. A Concept-Based, Proof-Based Approach to Semantic Checking