Tree Component Alternatives to the Composite Design Pattern

dc.contributor.authorSudhir, Arunen
dc.contributor.committeechairKulczycki, Gregory W.en
dc.contributor.committeememberChen, Ing-Rayen
dc.contributor.committeememberLu, Chang-Tienen
dc.contributor.departmentComputer Scienceen
dc.date.accessioned2014-03-14T20:50:06Zen
dc.date.adate2009-01-31en
dc.date.available2014-03-14T20:50:06Zen
dc.date.issued2008-12-03en
dc.date.rdate2009-01-31en
dc.date.sdate2008-12-16en
dc.description.abstractThe Composite design pattern is commonly employed in object-oriented languages to design a system of objects that form a part-whole hierarchical structure with composite objects formed out of primitive objects. The client does not differentiate between a composite object and a primitive object. The composite hierarchy effectively forms a tree-like hierarchical grouping of objects. From a software engineering perspective, there are at least two problems with the Composite pattern. First, it does not maintain a separation of concerns between the structure of the objects in a system and the objects themselves. The objects that comprise the system contain information about their relationship to other objects. This limits the ability of programmers to reuse the system's structural information. Secondly, there is no mechanism for encapsulating the system as a whole. This makes it difficult to specify and reason about global system properties. This thesis presents two tree components that can be used as alternatives to the Composite design pattern in systems that are traditionally implemented with the pattern. Both components are data structures that can contain arbitrary objects and maintain the structure of those objects as an ordered-tree. Since the components encapsulate only the tree structure, they only need to be specified and verified once, and they are available for black-box reuse. The first component is a traversable tree that maintains a conceptual "cursor" position. Methods are provided for inserting and removing objects at the cursor position, and for moving the cursor throughout the tree. The second component extends the traversable tree. A formal specification for each tree component is presented in the Tako language — a Java-like language with alias avoidance that is designed to facilitate specification and verification. A case study is presented that shows how the indexed tree can be used and reasoned about in an application — a text-based adventure game. Finally, a similar application is developed in Java, once using the composite pattern and once using the indexed tree data structure, and object-oriented metrics are given for both systems.en
dc.description.degreeMaster of Scienceen
dc.identifier.otheretd-12162008-180406en
dc.identifier.sourceurlhttp://scholar.lib.vt.edu/theses/available/etd-12162008-180406/en
dc.identifier.urihttp://hdl.handle.net/10919/36206en
dc.language.isoenen
dc.publisherVirginia Techen
dc.relation.haspartThesis.pdfen
dc.rightsIn Copyrighten
dc.rights.urihttp://rightsstatements.org/vocab/InC/1.0/en
dc.subjectFormal Reasoningen
dc.subjectTakoen
dc.subjectJavaen
dc.subjectDesign Patternsen
dc.subjectTreeen
dc.subjectIndexed Treeen
dc.subjectComposite Patternen
dc.titleTree Component Alternatives to the Composite Design Patternen
dc.typeThesisen
thesis.degree.disciplineComputer Scienceen
thesis.degree.grantorVirginia Polytechnic Institute and State Universityen
thesis.degree.levelmastersen
thesis.degree.nameMaster of Scienceen

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Thesis.pdf
Size:
660.99 KB
Format:
Adobe Portable Document Format

Collections