2.3.2 Example: Symbolic Differentiation . . . . . . . 197
2.3.3 Example: Representing Sets . . . . . . . . . . . 205
2.3.4 Example: Huffman Encoding Trees . . . . . . . 218
2.4 Multiple Representations for Abstract Data . . . . . . . 229
2.4.1 Representations for Complex Numbers . . . . . 232
2.4.2 Tagged data . . . . . . . . . . . . . . . . . . . . 237
2.4.3 Data-Directed Programming and Additivity . . 242
2.5 Systems with Generic Operations . . . . . . . . . . . . 254
2.5.1 Generic Arithmetic Operations . . . . . . . . . 255
2.5.2 Combining Data of Different Types . . . . . . . 262
2.5.3 Example: Symbolic Algebra . . . . . . . . . . . 274
3 Modularity, Objects, and State 294
3.1 Assignment and Local State . . . . . . . . . . . . . . . 296
3.1.1 Local State Variables . . . . . . . . . . . . . . . 297
3.1.2 e Benefits of Introducing Assignment . . . . 305
3.1.3 e Costs of Introducing Assignment . . . . . . 311
3.2 e Environment Model of Evaluation . . . . . . . . . . 320
3.2.1 e Rules for Evaluation . . . . . . . . . . . . . 322
3.2.2 Applying Simple Procedures . . . . . . . . . . . 327
3.2.3 Frames as the Repository of Local State . . . . 330
3.2.4 Internal Definitions . . . . . . . . . . . . . . . . 337
3.3 Modeling with Mutable Data . . . . . . . . . . . . . . . 341
3.3.1 Mutable List Structure . . . . . . . . . . . . . . 342
3.3.2 Representing eues . . . . . . . . . . . . . . . 353
3.3.3 Representing Tables . . . . . . . . . . . . . . . 360
3.3.4 A Simulator for Digital Circuits . . . . . . . . . 369
3.3.5 Propagation of Constraints . . . . . . . . . . . 386
3.4 Concurrency: Time Is of the Essence . . . . . . . . . . . 401
v
评论0
最新资源