pla i d pattern language for abstract datatypes
play

Pla i d: Pattern Language for Abstract Datatypes Austin Clements - PowerPoint PPT Presentation

Motivation Patternology Applications Implementation Pla i d: Pattern Language for Abstract Datatypes Austin Clements Irene Zhang Dan Ports Friday, May 11, 2007 Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract


  1. Motivation Patternology Applications Implementation Pla i d: Pattern Language for Abstract Datatypes Austin Clements Irene Zhang Dan Ports Friday, May 11, 2007 Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  2. Motivation Patternology Applications Implementation Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  3. Motivation Patternology Applications Implementation Syntax Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  4. Motivation Patternology Applications Implementation Syntax Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) ( define ( crash − computer comp) ( cond (( match comp ’( ∗ computer ∗ windows )) ’ done ) (( match comp ’( ∗ computer ∗ l i n u x )) ’ f a i l e d ) ) ) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  5. Motivation Patternology Applications Implementation Syntax Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) Abstraction ( define ( crash − computer comp) ( cond (( match comp ’( ∗ computer ∗ windows )) Violation ’ done ) (( match comp ’( ∗ computer ∗ l i n u x )) ’ f a i l e d ) ) ) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  6. Motivation Patternology Applications Implementation Syntax Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) Abstraction ( define ( crash − computer comp) ( cond (( match comp ’( ∗ computer ∗ windows )) Violation ’ done ) (( match comp ’( ∗ computer ∗ l i n u x )) ’ f a i l e d ) ) ) Syntax patterns are limited to built-in types. Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  7. Motivation Patternology Applications Implementation Syntax Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) ( define ( crash − computer comp) ( cond (( match comp ’( make − computer ’ windows )) ’ done ) (( match comp ’( make − computer ’ l i n u x )) ’ f a i l e d ) ) ) Syntax patterns are limited to built-in types. Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  8. Motivation Patternology Applications Implementation Semantic Patterns and ADT’s ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) ( d e f i n e ( computer? datum ) ( d e f i n e ( match : make − computer? p a t t e r n ) ( and ( p a i r ? datum ) ( and ( p a i r ? p a t t e r n ) ( eq? ( car datum ) ’ ∗ computer ∗ ) ) ) ( eq? ( car p a t t e r n ) ’ make − computer ) ) ) ( d e f i n e computer − model t h i r d ) ( d e f i n e match : make − computer − model second ) ( d e f i n e computer − os second ) ( d e f i n e match : make − computer − os t h i r d ) ( d e f i n e ( match : make − computer model − comb os − comb) ( d e f i n e ( match data d i c t i o n a r y succeed ) ( and ( computer? data ) (model − comb ( computer − model data ) d i c t i o n a r y ( lambda ( new − dict n ) (os − comb ( computer − os data ) new − dict succeed ) ) ) ) ) match ) ( d e f i n e ( compile − match − make − computer pat use − env loop ) ‘( match : make − computer ,( loop ( match : make − computer − model pat )) ,( loop ( match : make − computer − os pat ) ) ) ) ( eq − put! ’ make − computer ’ pattern − keyword compile − match − make − computer ) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  9. Motivation Patternology Applications Implementation (match comp ’(make − computer ’windows)) We want to be able to write this Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  10. Motivation Patternology Applications Implementation ( d e f i n e ( computer? datum ) ( d e f i n e ( match : make − computer? p a t t e r n ) ( and ( p a i r ? datum ) ( and ( p a i r ? p a t t e r n ) ( eq? ( car datum ) ’ ∗ computer ∗ ) ) ) ( eq? ( car p a t t e r n ) ’ make − computer ) ) ) ( d e f i n e computer − model t h i r d ) ( d e f i n e match : make − computer − model second ) ( d e f i n e computer − os second ) ( d e f i n e match : make − computer − os t h i r d ) ( d e f i n e ( match : make − computer model − comb os − comb) ( d e f i n e ( match data d i c t i o n a r y succeed ) ( and ( computer? data ) (model − comb ( computer − model data ) d i c t i o n a r y ( lambda ( new − dict n ) (os − comb ( computer − os data ) new − dict succeed ) ) ) ) ) match ) ( d e f i n e ( compile − match − make − computer pat use − env loop ) ‘( match : make − computer ,( loop ( match : make − computer − model pat )) ,( loop ( match : make − computer − os pat ) ) ) ) ( eq − put! ’ make − computer ’ pattern − keyword compile − match − make − computer ) Without having to write this Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  11. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns 1 Motivation 2 Patternology Constructor-Oriented Pattern Syntax Abstraction, Abstraction, Abstraction Embedding Patterns in Scheme Pro-Choice Patterns 3 Applications 4 Implementation Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  12. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 (? x)) (cons 1 (cons x ())) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  13. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 . ((? x) . ())) (cons 1 (cons x ())) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  14. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 . ((? x) . ())) (cons 1 (cons x ())) Literals Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  15. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 . ((? x) . ())) (cons 1 (cons x ())) Literals Pattern variables Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  16. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 . ((? x) . ())) (cons 1 (cons x ())) Literals Pattern variables Implicit Deconstructors Explicit Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  17. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Constructor-Oriented Pattern Syntax Data-oriented Constructor-oriented Resembles data Resembles code (1 . ((? x) . ())) (cons 1 (cons x ())) Literals Pattern variables Implicit Deconstructors Explicit Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  18. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Abstraction, Abstraction, Abstraction ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

  19. Motivation Constructor-Oriented Pattern Syntax Patternology Abstraction, Abstraction, Abstraction Applications Embedding Patterns in Scheme Implementation Pro-Choice Patterns Abstraction, Abstraction, Abstraction ( define ( make − computer model os ) ( l i s t ’ ∗ computer ∗ os model )) Pattern Datum (make − computer ’linux) ( ∗ computer ∗ linux pc) Austin Clements, Irene Zhang, Dan Ports Pla i d: Pattern Language for Abstract Datatypes

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend