Tools Project - PowerPoint PPT Presentation

About This Presentation
Title:

Tools Project

Description:

Project Help. 11. Parts must be unique ... Project Help. 17. UML language architecture. UML metamodel defines meaning of UML models ... – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 32
Provided by: karllie
Category:
Tags: help | project | tools

less

Transcript and Presenter's Notes

Title: Tools Project


1
Tools Project
  • COM 1205

2
The 5 tasks
  • Each class must be defined in the class
    dictionary or must be imported.
  • No inheritance cycle.
  • Parts must be unique.
  • Single inheritance.
  • Terminal Buffer Rule.

3
Extreme programming
  • Important feature
  • Write test cases early.

4
Parts must be unique
  • A ltbgt B ltbgt C. B . C .
  • A J K common ltbgt B.
  • J ltbgt C. K .
  • Reduce second case to first case by flattening.
  • Use above examples as test cases.

5
Parts must be uniqueReduction
  • A J K common ltbgt B.
  • J ltbgt C. K .
  • Flattened
  • A J K.
  • J ltbgt C ltbgt B. K ltbgt B.

6
Add additional task 6 Flatten
  • Test case
  • A J K common ltbgt B.
  • J ltbgt C. K .
  • Flattened
  • A J K.
  • J ltbgt C ltbgt B. K ltbgt B.

7
Is Flatten useful elsewhere?
  • Test case
  • A J K common ltbgt B.
  • J ltb1gt C. K String.
  • Flattened
  • A J K.
  • J ltb1gt C ltbgt B. K String ltbgt B.

8
Is Flatten useful elsewhere?
  • Test case
  • A J K common ltbgt B.
  • J ltbgt C. K String.
  • Flattened
  • A J K.
  • J ltbgt C ltbgt B. K String ltbgt B.

Terminal Buffer Rule
9
Parts must be unique
  • Delay flatten implementation and assume input is
    flat. We want to get a program running soon.
  • Phase 1 Implement Parts must be unique (PU)
    for flat class graphs with construction and
    alternation nodes and edges.

10
Parts must be unique
  • Which problem must be solved?
  • Find duplicates in a Java list. Search on
    google.com brought me to a book by John Zukowski
    Mastering Java. He is a Northeastern CCS
    undergraduate alumnus. He describes that the set
    interface eliminates duplicates. His book is
    featured on the SUN site.

11
Parts must be unique
  • Proposal add all the label elements of a class
    definition to a set and check if the set already
    contains each element. If so, have a violation.
  • Need an efficient imlementation of a set
    HashSet offers constant time performance for add
    and contains.

12
Some useful code
  • Set partNames new HashSet()
  • partNames.contains(aName)
  • partNames.add(aName)

13
Design for computing flattened class graph
  • compute_parts(TraversalGraph CA)
  • for each concrete class
  • find list of super classes
  • append parts of super classes to immediate parts
  • eliminate all parts from abstract classes.

14
Finding Superclasses
  • add auxiliary edges to class graph.
  • set them with one traversal.

15
Context Switch
16
Context switch
  • Multi-layer architecture similar to Demeters
    architecture.

17
UML language architecture
  • UML metamodel defines meaning of UML models
  • Defined in a metacircular manner, using a subset
    of UML to specify itself
  • UML metamodel bootstraps itself. Similar
  • compiler compiles itself
  • grammar defines itself
  • class dictionary defines itself

18
4 layer metamodel architecture
  • UML metamodel one of the layers
  • Why four layers?
  • Proven architecture for complex models
  • Validates core constructs by using them to define
    themselves

19
Four layer architecture
  • meta-metamodel
  • language for specifying metamodels
  • metamodel
  • language for specifying models
  • model
  • language for specifying objects in some domain
  • user objects

20
Four levels
  • User Objects in running system
  • check run-time constraints
  • Model of System under design
  • specify run-time constraints
  • Meta-model
  • specify constraints on use of constructs in model
  • Meta-metamodel
  • data interchange between modeling tools

21
Three layers of Demeter
instance of
defines classes
Demeter behavior and aspect files
B metamodel L model P user objects
CB
your behavior and aspect files
CL
metamodel OB
classes
model OL
TB
user object OP
objects
a class dictionary for class dictionaries
TL
class dictionary
text
TP
sentence
22
Icon
Demeter Tiling
Use as reminder for Demeter Tiling.
CB OB CL TB OL
TL OP TP
23
Example
???
Demeter Tiling
CB OB CL TB OL
TL OP TP
Basket
aBasketBasket
With respect to the project class dictionary as
OB
24
Example
Vertex (or Ident)
Demeter Tiling
CB OB CL TB OL
TL OP TP
Basket
aBasketBasket
With respect to the project class dictionary as
OB
25
Example
???
Demeter Tiling
CB OB CL TB OL
TL OP TP
Regular_Syntax
aRegular_SyntaxRegular_Syntax
With respect to the project class dictionary as
OB OL
26
Example
Vertex
Demeter Tiling
CB OB CL TB OL
TL OP TP
Regular_Syntax
aRegular_SyntaxRegular_Syntax
With respect to the project class dictionary as
OB OL
27
Example
???
Demeter Tiling
CB OB CL TB OL
TL OP TP
Labeled ltlabel_namegt Ident ...
ltbgt
With respect to the project class dictionary as
OB OL
28
Example
Adjacency ltsourcegt Vertex ...
Demeter Tiling
CB OB CL TB OL
TL OP TP
Labeled ltlabel_namegt Ident ...
ltbgt
With respect to the project class dictionary as
OB OL
29
Example
???
Demeter Tiling
CB OB CL TB OL
TL OP TP
Adjacency ltsourcegt Vertex ...
A ltbgt B ltbgt B.
With respect to the project class dictionary
30
Example
Adjacency ltsourcegt Vertex ...
Demeter Tiling
CB OB CL TB OL
TL OP TP
Adjacency ltsourcegt Vertex ...
A ltbgt B ltbgt B.
With respect to the project class dictionary
31
Buffer Rules
  • Many problems of software engineering can be
    solved by another layer of indirection.
Write a Comment
User Comments (0)
About PowerShow.com