Home > Store

Generative Programming: Methods, Tools, and Applications

Register your product to gain access to bonus material or receive a coupon.

Generative Programming: Methods, Tools, and Applications

Book

  • Your Price: $51.99
  • List Price: $64.99
  • Usually ships in 24 hours.

Description

  • Copyright 2000
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 864
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-30977-7
  • ISBN-13: 978-0-201-30977-5

Generative Programming (GP) offers the promise of moving from "one-of-a-kind" software systems to the semi-automated manufacture of wide varieties of software -- essentially, an assembly line for software systems. GP's goal is to model software system families and build software modules such that, given particular requirements specs, highly customized and optimized intermediate or end products can be constructed on demand. This is the first book to cover Generative Programming in depth. The authors, leaders in their field, introduce the two-stage GP development cycle: one stage for designing and implementing a generative domain model, and another for using the model to build concrete systems. They review key differences between generative modeling and processes used for "one-of-a-kind" systems. Next, they introduce key GP concepts such as feature models, and demonstrate "generic programming" techniques for creating components which lend themselves to easy combination and reuse. The book also introduces Aspect Oriented Programming, which allows developers to solve key recurring problems in traditional O-O development; and presents metaprogramming techniques for building powerful program generators. Three detailed case studies demonstrate the entire generative development cycle, from analysis to implementation.

Sample Content

Table of Contents



1. What Is This Book About?

From Handcrafting to Automated Assembly Lines.

Generative Programming.

Benefits and Applicability.

I. ANALYSIS AND DESIGN METHODS AND TECHNIQUES.

2. Domain Engineering.

Why Is This Chapter Worth Reading?

What Is Domain Engineering?

Domain Analysis.

Domain Design and Domain Implementation.

Application Engineering.

Product-Line Practices.

Key Domain Engineering Concepts.

Domain.

Domain Scope and Scoping.

Relationships between Domains.

Features and Feature Models.

Method Tailoring and Specialization.

Survey of Domain Analysis and Domain Engineering Methods.

Feature-Oriented Domain Analysis (FODA).

Organization Domain Modeling (ODM).

Draco.

Capture.

Domain Analysis and Reuse Environment (DARE).

Domain-Specific Software Architecture (DSSA) Approach.

Algebraic Approach.

Other Approaches.

Domain Engineering and Related Approaches.

Historical Notes.

Summary.

3. Domain Engineering and Object-Oriented Analysis and Design.

Why Is This Chapter Worth Reading?

OO Technology and Reuse.

Solution Space.

Problem Space.

Relationship between Domain Engineering and Object-Oriented Analysis and Design (OOA/D) Methods.

Aspects of Integrating Domain Engineering and OOA/D Methods.

Horizontal versus Vertical Methods.

Selected Methods.

Rational Unified Process.

00ram.

Reuse-Driven Software Engineering Business (RSEB).

FeatuRSEB.

Domain Engineering Method for Reusable Algorithmic Libraries (DEMRAL).

4. Feature Modeling.

Why Is This Chapter Worth Reading?

Features Revisited.

Feature Modeling.

Feature Models.

Feature Diagrams.

Other Infon-Nation Associated with Feature Diagrams in a Feature Model.

Assigning Priorities to Variable Features.

Availability Sites, Binding Sites, and Binding Modes.

Relationship between Feature Diagrams and Other Modeling Notations and Implementation Techniques.

Single Inheritance.

Multiple Inheritance.

Parameterized Inheritance.

Static Parameterization.

Dynamic Parameterization.

Implementing Constraints.

Tool Support for Feature Models.

Frequently Asked Questions about Feature Diagrams.

Feature Modeling Process.

How to Find Features.

Role of Variability in Modeling.

5. The Process of Generative Programming.

Why Is This Chapter Worth Reading?

Generative Domain Models.

Main Development Steps in Generative Programming.

Adapting Domain Engineering for Generative Programming.

Domain-Specific Languages.

DEMRAL: Example of a Domain Engineering Method for Generative Programming.

Outline of DEMRAL.

Domain Analysis.

Domain Definition.

Domain Modeling.

Domain Design.

Scope Domain Model for Implementation.

Identify Packages.

Develop Target Architectures and Identify the Implementation Components.

Identify User DSLs.

Identify Interactions between DSLs.

Specify DSLs and Their Translation.

Configuration DSLs.

Expression DSLs.

Domain Implementation.

II. IMPLEMENTATION TECHNOLOGIES.

6. Generic Programming.

Why Is This Chapter Worth Reading?

What Is Generic Programming?

Generic versus Generative Programming.

Generic Parameters.

Parametric versus Subtype Polymorphism.

Genericity in Java.

Bounded versus Unbounded Polymorphism.

A Fresh Look at Polymorphism.

Parameterized Components.

Parameterized Programming.

Types, Interfaces, and Specifications.

Adapters.

Vertical and Horizontal Parameters.

Module Expressions.

C++ Standard Template Library.

Iterators.

Freestanding Functions versus Member Functions.

Generic Methodology.

Historical Notes.

7. Component-Oriented Template-Based C++ Programming Techniques.

Why Is This Chapter Worth Reading?

Types of System Configuration.

C++ Support for Dynamic Configuration.

C++ Support for Static Configuration.

Static Typing.

Static Binding.

Inlining.

Templates.

Parameterized Inheritance.

typedefs.

Member Types.

Nested Classes.

Prohibiting Certain Template Instantiations.

Static versus Dynamic Parameterization.

Wrappers Based on Parameterized Inheritance.

Template Method Based on Parameterized Inheritance.

Parameterizing Binding Mode.

Consistent Parameterization of Multiple Components.

Static Interactions between Components.

Components with Influence.

Components under Influence.

Structured Configurations.

Recursive Components.

Intelligent Configuration.

8. Aspect-Oriented Decomposition and Composition.

Why Is This Chapter Worth Reading?

What Is Aspect-Oriented Programming?

Aspect-Oriented Decomposition Approaches.

Subject-Oriented Programming.

Composition Filters.

Demeter / Adaptive Programming.

Aspect-Oriented Decomposition and Domain Engineering.

How Aspects Arise.

Composition Mechanisms.

Requirements on Composition Mechanisms.

Example: Synchronizing a Bounded Buffer.

“Tangled” Synchronized Stack.

Separating Synchronization Using Design Patterns.

Separating Synchronization Using SOP.

Some Problems with Design Patterns and Some Solutions.

Implementing Noninvasive, Dynamic Composition in Smalltalk.

Kinds of Crosscutting.

How to Express Aspects in Programming Languages.

Separating Synchronization Using AspectJ Cool.

Implementing Dynamic Cool in Smalltalk.

Implementation Technologies for Aspect-Oriented Programming.

Technologies for Implementing Aspect-Specific Abstractions.

Technologies for Implementing Weaving.

AOP and Specialized Language Extensions.

AOP and Active Libraries.

Final Remarks.

9. Generators.

Why Is This Chapter Worth Reading?

What Are Generators?

Transformational Model of Software Development.

Technologies for Building Generators.

Compositional versus Transformational Generators.

Kinds of Transformations.

Compiler Transformations.

Source-to-Source Transformations.

Transformation Systems.

Scheduling Transformations.

Existing Transformation Systems and Their Applications.

Selected Approaches to Generation.

Draco.

GenVoca.

Approaches Based on Algebraic Specifications.

10. Static Metaprogramming in C++.

Why Is This Chapter Worth Reading?

What Is Metaprogramming?

A Quick Tour of Metaprogramming.

Static Metaprogramming.

C++ as a Two-Level Language.

Functional Flavor of the Static Level.

Class Templates as Functions.

Integers and Types as Data.

Symbolic Names Instead of Variables.

Constant Initialization and typedef-Statements Instead of Assignment.

Template Recursion Instead of Loops.

Conditional Operator and Template Specialization as Conditional Constructs.

Template Metaprogramming.

Template Metafunctions.

Metafinctions as Arguments and Return Values of Other Metafinctions.

Representing Metainformation.

Member Traits.

Traits Classes.

Traits Templates.

Example: Using Template Metafunctions and Traits Templates to Implement Type Promotions.

Compile-Time Lists and Trees as Nested Templates.

Compile-Time Control Structures.

Explicit Selection Constructs.

Template Recursion as a Looping Construct.

Explicit Looping Constructs.

Code Generation.

Simple Code Selection.

Composing Templates.

Generators Based on Expression Templates.

Recursive Code Expansion.

Explicit Loops for Generating Code.

Example: Using Static Execute Loops to Test Metafunctions.

Partial Evaluation in C++.

Workarounds for Partial Template Specialization.

Problems of Template Metaprogramming.

Historical Notes.

11. Intentional Programming.

Why Is This Chapter Worth Reading?

What Is Intentional Programming?

Technology behind IP.

System Architecture.

Representing Programs in IP: The Source Graph.

Source Graph + Methods = Active Source.

Working with the IP Programming Environment.

Editing.

Further Capabilities of the IP Editor.

Extending the IP System with New Intentions.

Advanced Topics.

Questions, Methods, and a Frameworklike Organization.

Source-Pattem-Based Polymorphism.

Methods as Visitors.

Asking Questions Synchronously and Asynchronously.

Reduction.

The Philosophy behind IP.

Why Do We Need Extendible Programming Environments? or What Is the Problem with Fixed Programming Languages?

Moving Focus from Fixed Languages to Language Features and the Emergence of an Intention Market.

Intentional Programming and Component-Based Development.

Frequently Asked Questions.

Summary.

III. APPLICATION EXAMPLES.

12. List Container.

Why Is This Chapter Worth Reading?

Overview.

Domain Analysis.

Domain Design.

Implementation Components.

Manual Assembly.

Specifying Lists.

The Generator.

Extensions.

13. Bank Account.

Why Is This Chapter Worth Reading?

The Successful Programming Shop.

Design Pattems, Frameworks, and Components.

Domain Engineering and Generative Programming.

Feature Modeling.

Architecture Design.

Implementation Components.

Configurable Class Hierarchies.

Designing a Domain-Specific Language.

Bank Account Generator.

Testing Generators and Their Products.

14. Generative Matrix Computation Library (GMCL).

Why Is This Chapter Worth Reading?

Why Matrix Computations?

Domain Analysis.

Domain Definition.

Domain Modeling.

Domain Design and Implementation.

Matrix Type Generation.

Generating Code for Matrix Expressions.

Implementing the Matrix Component in IP.

APPENDICES.

Appendix A: Conceptual Modeling.

What Are Concepts?

Theories of Concepts.

Basic Terminology.

The Classical View.

The Probabilistic View.

The Exemplar View.

Summary of the Three Views.

Important Issues Concerning Concepts.

Stability of Concepts.

Concept Core.

Informational Contents of Features.

Feature Composition and Relationships between Features.

Quality of Features.

Abstraction and Generalization.

Conceptual Modeling, Object-Orientation, and Software Reuse.

Appendix B: Instance-Specific Extension Protocol for Smalltalk.
Appendix C: Protocol for Attaching Listener Objects in Smalltalk.
Appendix D: Glossary of Matrix Computation Terms.
Appendix E: Metafunction for Evaluating Dependency Tables.
Glossary of Generative Programming Terms.
References.
Index. 020130977T04062001

Preface

The advent of most any new programming book evokes the question: What is, or will be, the place of this book in history? That a book even evokes that question itself says something exciting, something about paradigm shifts or about new ideas or about breaking with old ways. And it is a curiously pertinent question for this book in these times.

Over the past ten years the object-oriented literature has seen a peppering of apparently unrelated ideas ranging from subject-oriented programming to components. What they all had in common is that there was something decidedly unobject-oriented about each of them, though each of them spent time in the object-oriented limelight. But in the past one or two years many of these fragments have found common ground and have rallied together around common themes: metaobject protocols, reflection, intentionality, an insightful interpretation of components, the cutting of features across structure and, in general, the breakdown of classic models of simple modularity. For me, one of the highlights of 1999 was the First International Symposium on Generative and Component-Based Software Engineering (GCSE '99) in Erfurt, Germany, where many researchers had already linked many of these ideas together and shared a consciousness about their significance. But it is just one forum where these ideas came together; one sees the same things at many conference workshops and in some of the emerging literature.

It's always difficult to assess history from within the events that contribute to it, but it is perhaps no less responsible nor dangerous to do so than to try to interpret it after the fact, distanced from the firsthand events. In that spirit, look around and consider that we might, right now, be at a crucial turning point in computer science, particularly in the area of programming and design technique. The industry has been struggling with how to move beyond the limiting confines of the object paradigm. Patterns were one noble attempt and, though they have done much good to draw attention to the value of experience and of the human element in programming, it is unlikely that computer science will ever achieve anything remotely approaching Alexander's vision or level of systems thinking. It is rare that software achieves a true paradigm shift in the Kuhnian sense. Perhaps we're a conservative bunch. And our fascination with novelty sometimes keeps us even from the simplest learnings; many of the tenets of the vernacular components movement hark back to early principles of object-oriented design that experience suggests should have been dropped after only a few years of experience.

But there are new signs of seeds of change. Perhaps the industry can't easily suffer a revolution, but it can tolerate a move to new techniques that build on the status quo. There is a strong and recurring move to find programming and design expression that go beyond objects and things to concepts and features. That is the essence of intentional programming, for example and, to a large degree, of techniques such as domain engineering. This vein of thought is blossoming in a wide range of forums across the industry. We see it in the vulgar (non-Alexanderian) pattern movement; we see it in aspect-oriented programming; we see it in the resurgence of generic programming and in techniques such as multi-paradigm design. And as conferences like OOPSLA focus less and less on the foundations of those things called objects and more and more on conceptual extensions, we start thinking less about parts and more about systems and features. And as OOPSLA shrinks, conferences like GCSE are becoming more numerous and popular. There is a broad-based move in this direction today. And this book finds itself squarely in the middle of this shift. I believe that the reader should neither underestimate the significance of this shift nor of this book's role in both communicating and shaping that shift. We are at the threshold of an evolution, and this book is one of the early normative works of this new genre.

This book perhaps reflects a degree of maturation in computer science that, for the first time, attempts to legitimize an integrative view in its own right rather than extol a technique by differentiating it from its predecessors. As such, the book covers much ground and embraces many disciplines: components, objects, aspects, reflection, intentional programming and generic programming for the technology-focussed, and domain engineering for the systems thinkers. It is a great introduction to both emerging and established techniques for those who are encountering them for the first time. An uninformed glance at this book might take it to be a compendium of existing practice, certainly in the area of domain engineering, but in the broader arena of things beyond objects as well.

Yet this book is more than a collection of techniques. The book develops strong themes around unifying principles that tie the pieces together, most notably domain engineering and metaprogramming. The authors treat the reader to a broad survey of domain engineering and guide the reader to appreciate its essence. Perhaps more than any single idea, domain engineering provides a common thread or theme that one could use to "explain" generative programming. But more than that, the authors draw on other schools of programming as building blocks that can be used to delineate gestalten that amplify each other in a broad, cogent vision called generative programming. The result is certainly more than the sum of the parts; most of the parts have been around for years, but an understanding of how to bring them together is just now emerging and receiving broad exposure.

It's crucial to understand that this book is not just some refreshing diversion nor just an exposition of some noteworthy niche techniques. It is a harbinger of a broader enlightenment that opens the door to a new age. It is the coming of age of techniques, such as reflection, metaprogramming, and aspects that could augment and even displace objects as the foundations of mainstream programming practice in the years to come.

And even if the historical analysis is wrong, it doesn't diminish the book's value. The ideas are sound and timeless. Though the book builds most heavily on the C++ legacy, the ideas should provoke thought in any partisan linguistic community and indeed in the communities for most programming ideologies.

This book is just a beginning. This book invites others to follow: those who will bring methods and processes to help the designer and programmer better master and apply generative programming, and those who will bring formalisms and unifying models that will carry this work into the next generation of research. To those researchers and practitioners who are willing to go behind the confines of objects, this book raises the bar and challenges them to carry its own ideas further. I am sure nothing would please the authors more than if you took up the challenge. The first joy of publishing a book comes for an author when holding the first copy between one's hands, almost in wonder. But the greater joy comes much later, and only vicariously, as the book visibly leaves its mark on emerging practice. Few books offer this return on the authors' investment. I am both hopeful and confident that this will be one of these books, and that is because I believe the power of these ideas will draw you in as a reader and excite you to adopt these new expressive programming and design constructs. I wish you great pleasure in learning from this book, as I did, and exhort you to seek your own place in history as a pioneer who helps take these ideas forward into our discipline through the artisanship of your own programs.

James Coplien
Naperville, Illinois
February 2000



0201309777P02212002

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020