Generative Programming: Methods, Tools, and Applications (Paperback)
暫譯: 生成式程式設計:方法、工具與應用(平裝本)

Krysztof Czarnecki, Ulrich Eisenecker

  • 出版商: Addison Wesley
  • 出版日期: 2000-06-06
  • 售價: $2,275
  • 貴賓價: 9.5$2,161
  • 語言: 英文
  • 頁數: 864
  • 裝訂: Paperback
  • ISBN: 0201309777
  • ISBN-13: 9780201309775
  • 立即出貨(限量) (庫存=3)

買這商品的人也買了...

商品描述

 

Description

 

 

Generative programming: Breakthrough techniques for automating the creation of software systems.

  • Building generative models: overcoming the limitations of traditional object-oriented modeling.
  • Aspect-Oriented Programming, metaprogramming, next-generation code generators, and more.
  • Includes illustrative sample code in C, C++, and Java, and three detailed, start-to-finish case studies.

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.

Krzysztof Czarnecki is a Ph.D. candidate at the University of Ilmenau, Department of Software Engineering and Media Technology, and a researcher at the DaimlerChrysler AG Research Center in Ulm, Germany. Ulrich Eisenecker, a faculty member in Computer Science and Microsystem Engineering at the University of Applied Sciences Kaiserslautern. He was formerly a researcher at Daimler-Benz Research Center in Ulm, Germany.

Back to Top


Appropriate Courses

C++--Intermediate Programming.

Back to Top

 

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


Back to Top

 

 

商品描述(中文翻譯)

 

描述

 

 

生成式程式設計:自動化軟體系統創建的突破性技術。


  • 建立生成模型:克服傳統物件導向建模的限制。

  • 面向方面的程式設計、元程式設計、下一代程式碼生成器等。

  • 包含 C、C++ 和 Java 的示範範例程式碼,以及三個詳細的從頭到尾的案例研究。

生成式程式設計 (GP) 提供了從「獨一無二」的軟體系統轉向半自動化製造各種軟體的承諾——本質上是一條軟體系統的生產線。GP 的目標是建模軟體系統家族並構建軟體模組,以便在給定特定需求規範的情況下,可以按需構建高度定制和優化的中間或最終產品。本書是第一本深入探討生成式程式設計的書籍。作者是該領域的領導者,介紹了兩階段的 GP 開發週期:一個階段用於設計和實現生成領域模型,另一個階段用於使用該模型構建具體系統。他們回顧了生成建模與用於「獨一無二」系統的過程之間的主要差異。接下來,他們介紹了關鍵的 GP 概念,如特徵模型,並展示了「通用程式設計」技術,用於創建易於組合和重用的組件。本書還介紹了面向方面的程式設計,這使開發人員能夠解決傳統物件導向開發中的關鍵重複問題;並呈現了用於構建強大程式生成器的元程式設計技術。三個詳細的案例研究展示了整個生成開發週期,從分析到實施。

Krzysztof Czarnecki 是德國伊爾門瑙大學軟體工程與媒體技術系的博士候選人,並且是德國烏爾姆的戴姆勒克萊斯勒 AG 研究中心的研究員。Ulrich Eisenecker 是凱瑟斯勞滕應用科技大學計算機科學與微系統工程的教職員。他曾是德國烏爾姆的戴姆勒-賓士研究中心的研究員。



回到頂部



適合的課程

C++--中級程式設計。



回到頂部

 

目錄

 

1. 本書的主題是什麼?

 

從手工製作到自動化生產線。

生成式程式設計。

好處與適用性。

 

I. 分析與設計方法與技術。

 

 



2. 領域工程。

 

為什麼這一章值得閱讀?

什麼是領域工程?

領域分析。

領域設計與領域實施。

應用工程。

產品線實踐。

關鍵的領域工程概念。

領域。

領域範圍與範疇。

領域之間的關係。

特徵與特徵模型。

方法調整與專門化。



領域分析與領域工程方法的調查。

特徵導向領域分析 (FODA)。

組織領域建模 (ODM)。

Draco。

Capture。

領域分析與重用環境 (DARE)。

領域特定軟體架構 (DSSA) 方法。

代數方法。

其他方法。



領域工程及相關方法。

歷史註解。

總結。



3. 領域工程與物件導向分析與設計。

 

 

為什麼這一章值得閱讀?

OO 技術與重用。

解決方案空間。

問題空間。



領域工程與物件導向分析與設計 (OOA/D) 方法之間的關係。

整合領域工程與 OOA/D 方法的各個方面。

橫向與縱向方法。

選定的方法。

Rational Unified Process。

00ram。

重用驅動的軟體工程業務 (RSEB)。

FeatuRSEB。

可重用演算法庫的領域工程方法 (DEMRAL)。



4. 特徵建模。

 

 

為什麼這一章值得閱讀?

特徵重訪。

特徵建模。

特徵模型。

特徵圖。

與特徵模型中的特徵圖相關的其他資訊。

為可變特徵分配優先級。

可用性站點、綁定站點和綁定模式。



特徵圖與其他建模符號及實施技術之間的關係。

單一繼承。

多重繼承。

參數化繼承。

靜態參數化。

動態參數化。



實施約束。

特徵模型的工具支持。

有關特徵圖的常見問題。

特徵建模過程。

如何尋找特徵。

可變性在建模中的角色。



5. 生成式程式設計的過程。

 

 

為什麼這一章值得閱讀?

生成領域模型。

生成式程式設計的主要開發步驟。

為生成式程式設計調整領域工程。

領域特定語言。

DEMRAL:生成式程式設計的領域工程方法示例。

DEMRAL 的大綱。

領域分析。

領域定義。

領域建模。



領域設計。

實施的範圍領域模型。

識別包。

開發目標架構並識別實施組件。

識別用戶 DSL。

識別 DSL 之間的互動。

指定 DSL 及其翻譯。

配置 DSL。

表達 DSL。



領域實施。

 

II. 實施技術。

 

 



6. 通用程式設計。

 

 

為什麼這一章值得閱讀?

什麼是通用程式設計?

通用程式設計與生成式程式設計的區別。

通用參數。

參數化與子類型多型性。

Java 中的通用性。



有界與無界多型性。

對多型性的全新看法。

參數化組件。

參數化程式設計。

類型、介面與規範。

適配器。

垂直與水平參數。

模組表達式。



C++ 標準模板庫。

迭代器。

獨立函數與成員函數。



通用方法論。

歷史註解。



7. 基於模板的組件導向 C++ 程式設計技術。

 

 

為什麼這一章值得閱讀?

系統配置的類型。

C++ 對動態配置的支持。

C++ 對靜態配置的支持。

靜態類型。

靜態綁定。

內聯。

模板。