SlideShare a Scribd company logo
UTAH STATE UNIVERSITY
                                        COMPUTER SCIENCE
                                    CS-7350 Reading Assignment
                                  GoF Patterns: Interpreter, Iterator
                                        Jorge Edison Lascano
                                            Spring 2012
                                             01-27-2012


INTERPRETER, ITERATORGoFPATTERNS

Interpreter, its main intent is interpreting well-structured sentences based on grammars, looking
for sequence of actions that make sense syntactically. One constraint is that it only serves for
simple grammars, then the question is How to measure the complexity of the grammar?. Other
difficulty is the representation of the tree structure (solved in certain way by composite). The
Interpret method represents the main behavior, but it needs help to traverse the structure.
Concluding, this pattern by itself does not solve all the proposed problems by GoF.

The consideration of a complex grammar is still present. It is said that it is helpful for regular
expressions, but not for parsers. So, the complexity could be measured by the level of
(de)composition, or the complexity in the grammatical structure of the sentences.

Iterator, also known as cursor, it´s intent is to allow access to elements sequentially without
exposing their representation. The main use is mentioned as data structure traverse, but, this
feature is already implemented by almost every modern language, namely:Java, C#, Smalltalk in
their Collections. Now, the question is: Is it really necessary to implement an iterator? And the
answer is YES, if we need to implement a different way (than traditional data structures) to
traverse the elements and also if we need to implement multiple traversal ways at the same time.

As this is a behavior pattern, the main concern should be oriented to decide the place where the
traversal algorithm should be implemented. Maybe using a Bridge between the ConcreteIterator
and the ConcreteAggregate could solve this problem.

More Related Content

PPT
Interpreter
PPTX
Representation of syntax, semantics and Predicate logics
PDF
Ijarcet vol-3-issue-3-623-625 (1)
PDF
Classical and Fuzzy Relations
PPTX
Lfg and gpsg
PDF
C7 agramakirshnan2
PPTX
8 polynomial functions
Interpreter
Representation of syntax, semantics and Predicate logics
Ijarcet vol-3-issue-3-623-625 (1)
Classical and Fuzzy Relations
Lfg and gpsg
C7 agramakirshnan2
8 polynomial functions

What's hot (20)

PPTX
Possible Word Representation
PDF
Dbms 10: Conversion of ER model to Relational Model
PDF
Anandkumar novel approach
PPTX
CLUE-Aligner: An Alignment Tool to Annotate Pairs of Paraphrastic and Transla...
PPTX
Presentation1
PDF
Major and Minor Elements of Object Model
PDF
D2 anandkumar
PDF
MORPHOLOGICAL SEGMENTATION WITH LSTM NEURAL NETWORKS FOR TIGRINYA
PDF
Ai lecture 07(unit03)
PDF
DETERMINING CUSTOMER SATISFACTION IN-ECOMMERCE
PDF
Ai lecture 11(unit03)
DOC
referát.doc
PDF
A deep analysis of Multi-word Expression and Machine Translation
PDF
Review of Parsing in Modern Greek - A New Approach
PDF
Review: Deep contextualized word representations
PPT
Modular Ontologies: the Package-based Description Logics Approach
PDF
Constructive Description Logics 2006
PPTX
Finite state system or finite automata
DOCX
Bca3020– data base management system(dbms)
PDF
ESSLLI2016 DTS Lecture Day 5-1: Introduction to day 5
Possible Word Representation
Dbms 10: Conversion of ER model to Relational Model
Anandkumar novel approach
CLUE-Aligner: An Alignment Tool to Annotate Pairs of Paraphrastic and Transla...
Presentation1
Major and Minor Elements of Object Model
D2 anandkumar
MORPHOLOGICAL SEGMENTATION WITH LSTM NEURAL NETWORKS FOR TIGRINYA
Ai lecture 07(unit03)
DETERMINING CUSTOMER SATISFACTION IN-ECOMMERCE
Ai lecture 11(unit03)
referát.doc
A deep analysis of Multi-word Expression and Machine Translation
Review of Parsing in Modern Greek - A New Approach
Review: Deep contextualized word representations
Modular Ontologies: the Package-based Description Logics Approach
Constructive Description Logics 2006
Finite state system or finite automata
Bca3020– data base management system(dbms)
ESSLLI2016 DTS Lecture Day 5-1: Introduction to day 5
Ad

Viewers also liked (10)

PPT
Railsgirls presentation
PPT
Hominidnewby:tonyh
PPSX
Modalidad de doble programa ua
PPTX
чомучки
PPT
Unit Test for ZF SlideShare Component
PPTX
PDF
Gerundio. Per chi abbiamo lavorato?
PDF
【エンジニア勉強会】MicrosoftAzure.
PPT
Tema 6.3.
PPTX
Deloitte_JCAmado_ClimateResilienceReadinessIndex_Aug25_08072014FINAL
Railsgirls presentation
Hominidnewby:tonyh
Modalidad de doble programa ua
чомучки
Unit Test for ZF SlideShare Component
Gerundio. Per chi abbiamo lavorato?
【エンジニア勉強会】MicrosoftAzure.
Tema 6.3.
Deloitte_JCAmado_ClimateResilienceReadinessIndex_Aug25_08072014FINAL
Ad

Similar to Hw6 interpreter iterator GoF (20)

DOCX
Hw4 composite decorator facade flyweight
PPTX
nlp (1).pptx
PDF
Substitutability
DOCX
Hw7 mediator memento observer
PDF
EasyChair-Preprint-7375.pdf
PDF
Transformer Models_ BERT vs. GPT.pdf
PDF
Patterns of Value
PDF
Language Combinatorics: A Sentence Pattern Extraction Architecture Based on C...
PPTX
LFG and GPSG.pptx
PDF
IRJET- Short-Text Semantic Similarity using Glove Word Embedding
PDF
Cross-lingual event-mining using wordnet as a shared knowledge interface
PDF
master_thesis_greciano_v2
PDF
10.1.1.35.8376
PDF
Differentiable Logic Machines, published on TMLR
PDF
Oop Article Jan 08
PDF
NLP Deep Learning with Tensorflow
PPT
The Valladolid Presentation - Nov, 16, 2011
PDF
An Ontology For Building A Conceptual Problem Solving Model
DOCX
Java OOPs Concepts.docx
PPTX
Breaking down the AI magic of ChatGPT: A technologist's lens to its powerful ...
Hw4 composite decorator facade flyweight
nlp (1).pptx
Substitutability
Hw7 mediator memento observer
EasyChair-Preprint-7375.pdf
Transformer Models_ BERT vs. GPT.pdf
Patterns of Value
Language Combinatorics: A Sentence Pattern Extraction Architecture Based on C...
LFG and GPSG.pptx
IRJET- Short-Text Semantic Similarity using Glove Word Embedding
Cross-lingual event-mining using wordnet as a shared knowledge interface
master_thesis_greciano_v2
10.1.1.35.8376
Differentiable Logic Machines, published on TMLR
Oop Article Jan 08
NLP Deep Learning with Tensorflow
The Valladolid Presentation - Nov, 16, 2011
An Ontology For Building A Conceptual Problem Solving Model
Java OOPs Concepts.docx
Breaking down the AI magic of ChatGPT: A technologist's lens to its powerful ...

More from Edison Lascano (11)

PDF
eXtreme Programming May Be Embedded inside Scrum
PDF
An Infectious Disease Surveillance Simulation (IDSS) in the Cloud
PPTX
UML for Aspect Oriented Design
PPT
Soap and Rest
DOCX
Hw8 GoF state, strategy, tempate method, visitor
DOCX
Hw5 proxy, chain of responsability, command
DOCX
Hw12 refactoring to factory method
DOCX
Hw11 refactoringcreation
DOC
GoF Patterns: Prototype, Singleton, Adapter, Bridge
DOC
Abstract Factory and Builder patterns
DOC
GoF design patterns chapters 1 and 2
eXtreme Programming May Be Embedded inside Scrum
An Infectious Disease Surveillance Simulation (IDSS) in the Cloud
UML for Aspect Oriented Design
Soap and Rest
Hw8 GoF state, strategy, tempate method, visitor
Hw5 proxy, chain of responsability, command
Hw12 refactoring to factory method
Hw11 refactoringcreation
GoF Patterns: Prototype, Singleton, Adapter, Bridge
Abstract Factory and Builder patterns
GoF design patterns chapters 1 and 2

Recently uploaded (20)

PDF
Trump Administration's workforce development strategy
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Lesson notes of climatology university.
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Pharma ospi slides which help in ospi learning
PDF
Computing-Curriculum for Schools in Ghana
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
Trump Administration's workforce development strategy
Orientation - ARALprogram of Deped to the Parents.pptx
A systematic review of self-coping strategies used by university students to ...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Lesson notes of climatology university.
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Yogi Goddess Pres Conference Studio Updates
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Pharma ospi slides which help in ospi learning
Computing-Curriculum for Schools in Ghana
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Microbial disease of the cardiovascular and lymphatic systems
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
human mycosis Human fungal infections are called human mycosis..pptx

Hw6 interpreter iterator GoF

  • 1. UTAH STATE UNIVERSITY COMPUTER SCIENCE CS-7350 Reading Assignment GoF Patterns: Interpreter, Iterator Jorge Edison Lascano Spring 2012 01-27-2012 INTERPRETER, ITERATORGoFPATTERNS Interpreter, its main intent is interpreting well-structured sentences based on grammars, looking for sequence of actions that make sense syntactically. One constraint is that it only serves for simple grammars, then the question is How to measure the complexity of the grammar?. Other difficulty is the representation of the tree structure (solved in certain way by composite). The Interpret method represents the main behavior, but it needs help to traverse the structure. Concluding, this pattern by itself does not solve all the proposed problems by GoF. The consideration of a complex grammar is still present. It is said that it is helpful for regular expressions, but not for parsers. So, the complexity could be measured by the level of (de)composition, or the complexity in the grammatical structure of the sentences. Iterator, also known as cursor, it´s intent is to allow access to elements sequentially without exposing their representation. The main use is mentioned as data structure traverse, but, this feature is already implemented by almost every modern language, namely:Java, C#, Smalltalk in their Collections. Now, the question is: Is it really necessary to implement an iterator? And the answer is YES, if we need to implement a different way (than traditional data structures) to traverse the elements and also if we need to implement multiple traversal ways at the same time. As this is a behavior pattern, the main concern should be oriented to decide the place where the traversal algorithm should be implemented. Maybe using a Bridge between the ConcreteIterator and the ConcreteAggregate could solve this problem.