Concepts in Software Engineering

  • 1,878 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,878
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1.
    • Faculty: Ana Milanova, Dave Musser
    • Principal Research Areas:
      • Generic Programming; Generic Software Libraries; Semantic Checking Tools (Concept-Based & Proof-Based)
      • Program Analysis; Software Testing and Understanding ( not covered in this talk; please see Prof. Milanova’s home page )
    • Related Courses:
      • Generic Software Design (CSCI-6090): offered this Fall
      • Program Analysis for Software Engineering (CSCI-6967 /CSCI-4972)
    Concepts in Software Engineering (CISE) A Rensselaer Computer Science Department Research Program
  • 2.
    • Programming with concepts Slide 2
    • An example concept hierarchy: STL container concepts Slide 3
    • Concept refinement: stronger requirements enable more and better algorithms Slide 4
    • Extending STL concepts: the Boost Graph Library Slide 7
    • Generic libraries designed and developed via the concept-based approach
    • The correctness issue for generic libraries
    Concepts in Software Engineering Generic Programming in the STL and Beyond
  • 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. 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 http://www.sgi.com/tech/stl Click on any node in the above concept hierarchy to see the corresponding requirements as specified in the SGI STL Programmer’s Guide
  • 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. 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. STL Concepts Container Iterator Algorithm Functor Adaptor New Concepts in the Boost Graph Library See also http://www.boost.org/libs/graph/doc  Back BGL Concepts Graph Iterator Graph Incidence Graph Adj. Graph EdgeList Graph … Graph Algorithms Visitor BFS Visitor DFS Visitor Uniform Cost Visitor …
  • 8.
    • Standard Template Library (HP, RPI, SGI)
    • Matrix Template Library (Indiana U.)
    • Boost Graph Library (Indiana U.)
    • Parallel Boost Graph Library (D. Gregor [RPI PhD], Indiana U.)
    • Boost Array Library (N. Josuttis)
    • Boost Multi-Array Library (Indiana U.)
    • Boost Basic Linear Algebra Library (J. Walter, M. Koch)
    • Boost Property Map Library (Indiana U.)
    • Boost Random Number Generator Library (J. Mauer)
    • Boost Threads Library (W. Kempf)
    • Boost Concept Checking Library (Indiana U.)
    • Computational Geometry Algorithms Library (H. Br ő nnimann, S. Schirra, R. Veltkamp, …)
    Generic Libraries Designed and Developed Via the Concept-Based Approach
  • 9.
    • How do we know when generic library components are correctly implemented?
      • Does the implementation code satisfy the requirements specification?
    • How do we know whether we are using them correctly? That is, do we satisfy the required preconditions?
        • Syntactic checking (including type-checking)
        • Semantic checking (including proof-checking)
    The Correctness Issue for Generic Libraries
  • 10. A Concept-Based, Proof-Based Approach to Semantic Checking