COTS%20Challenges%20for%20%20Embedded%20Systems - PowerPoint PPT Presentation

About This Presentation
Title:

COTS%20Challenges%20for%20%20Embedded%20Systems

Description:

'Computer programming is largely a matter of algorithms and data structures. ... An abstraction technique for algorithms. Argument types are as general as possible ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 6
Provided by: dsch7
Category:

less

Transcript and Presenter's Notes

Title: COTS%20Challenges%20for%20%20Embedded%20Systems


1
E81 CSE 532S Advanced Multi-Paradigm Software
Development
Introduction to Generic Programming in C
Chris Gill Department of Computer
Science Washington University, St.
Louis cdgill_at_cs.wustl.edu
2
Each Paradigm Has a Particular View
  • Computer programming is largely a matter of
    algorithms and data structures.
  • Austern pp. 3 (Generic Programming Paradigm)
  • Object-based might say methods and data
  • OO might say inheritance and polymorphism
  • Patterns might say design forces and contexts
  • And so forth

3
What is the STL?
  • An abstract library of concepts
  • A formal hierarchy of software requirements
  • A library of interchangeable modules
  • Algorithms
  • Containers
  • Iterators
  • Function objects, and much more
  • A flexible and efficient software framework
  • An extensible platform for software development

4
What is Generic Programming?
  • An abstraction technique for algorithms
  • Argument types are as general as possible
  • Separates algorithm steps argument properties
  • What GoF design pattern does this resemble?
  • Type requirements can be specified, systematized
  • Can cluster requirements into abstractions
  • Termed concepts
  • Concepts can refine other concepts
  • Captures relationships between concepts
  • Analogy to inheritance hierarchies
  • A type that meets a concepts requirements
  • Is a model of the concept
  • Can be plugged in to meet that set of
    requirements

5
Generic Algorithm Example
  • STL linear search (based on Austern pp. 13)
  • template lttypename Iterator, typename Tgt
  • Iterator find2 (Iterator first, Iterator last,
  • const T value)
  • while (first ! last first ! value)
  • first
  • return first
  • A generic algorithm
  • Searches any one-dimensional sequence of
    elements, for any type on which the operators work
Write a Comment
User Comments (0)
About PowerShow.com