On the Criteria to Be Used in Decomposing Systems into Modules Group 1: Lisa Anthony, Erik Hayes, Luiza Helena da Silva, and Diana Tetelman.

Slides:



Advertisements
Similar presentations
CS 31003: Compilers Introduction to Phases of Compiler.
Advertisements

Problem Solving and Algorithm Design
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
CPSC Compiler Tutorial 9 Review of Compiler.
Yu-Chen Kuo1 Chapter 1 Introduction to Compiling.
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Team 1 Lisa Anthony Luiza da Silva Erik Hayes Diana Tetelman.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Lecture 2 Phases of Compiler. Preprocessors, Compilers, Assemblers, and Linkers Preprocessor Compiler Assembler Linker Skeletal Source Program Source.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Simple Program Design Third Edition A Step-by-Step Approach
1 On the Criteria To Be Used in Decomposing Systems into Modules by D.L.Parnas Dec presented by Yuanhua Qu for spring 2003 CS5391.
CSE 303 – Software Design and Architecture
Chapter 1. Introduction.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
CSC 338: Compiler design and implementation
On the Criteria to Be Used in Decomposing Systems into Modules Team 3 Nupur Choudhary Aparna Nanjappa Mark Zeits.
SOFTWARE DESIGN.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Key Principles of Software Architecture and Design (I) adapted from Dave Penny’s.
CST320 - Lec 11 Why study compilers? n n Ties lots of things you know together: –Theory (finite automata, grammars) –Data structures –Modularization –Utilization.
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
SE: CHAPTER 7 Writing The Program
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
1.  10% Assignments/ class participation  10% Pop Quizzes  05% Attendance  25% Mid Term  50% Final Term 2.
Compiler design Lecture 1: Compiler Overview Sulaimany University 2 Oct
Chapter 1 Introduction. Chapter 1 - Introduction 2 The Goal of Chapter 1 Introduce different forms of language translators Give a high level overview.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
Introduction to Compilers. Related Area Programming languages Machine architecture Language theory Algorithms Data structures Operating systems Software.
Overview of Previous Lesson(s) Over View  A program must be translated into a form in which it can be executed by a computer.  The software systems.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Chapter 1 Introduction Study Goals: Master: the phases of a compiler Understand: what is a compiler Know: interpreter,compiler structure.
The Software Development Process
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Compiler Introduction 1 Kavita Patel. Outlines 2  1.1 What Do Compilers Do?  1.2 The Structure of a Compiler  1.3 Compilation Process  1.4 Phases.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Introduction to Language Programming Hierarchy of programming lang. Based on machine independences: 1. Machine language 2. Assembly language 3. Higher.
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Systems Development Lifecycle
©SoftMoore ConsultingSlide 1 Structure of Compilers.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Objective of the course Understanding the fundamentals of the compilation technique Assist you in writing you own compiler (or any part of compiler)
Advanced Computer Systems
7. Modular and structured design
Compiler Design (40-414) Main Text Book:
PRINCIPLES OF COMPILER DESIGN
Introduction to Compiler Construction
SOFTWARE DESIGN AND ARCHITECTURE
On the Criteria to Be Used in Decomposing Systems into Modules
-by Nisarg Vasavada (Compiled*)
课程名 编译原理 Compiling Techniques
Chapter 1: Introduction to Compiling (Cont.)
Compiler Construction
Course supervisor: Lubna Siddiqui
Front End vs Back End of a Compilers
Introduction CI612 Compiler Design CI612 Compiler Design.
Compilers B V Sai Aravind (11CS10008).
On the Criteria To Be Used in Decomposing Systems into Modules
On the Criteria To Be Used in Decomposing Systems into Modules D. L
Chapter 1 Introduction.
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Presentation transcript:

On the Criteria to Be Used in Decomposing Systems into Modules Group 1: Lisa Anthony, Erik Hayes, Luiza Helena da Silva, and Diana Tetelman

Summary Modular decomposition should focus more on information hiding than related functionality This formulation should be an early design decision Module interfaces should provide only means to accessing internal information Evaluate decomposition through change assessment Hierarchical and modular breakdown are independent

Compiler Phases/Processes/DataStructures Symbol Table  Data structure containing a record for each identifier, with fields for the attributes of the identifiers. Lexical Analyzer  Reads the characters in the source program and groups them into a stream of tokens in which each token represents a logically cohesive sequence of characters, such as an identifier, and keyword. Uses Symbol Table. Syntax Analyzer  Imposes a hierarchical structure on the token stream, which can be portrayed with a syntax tree. Semantic Analyzer  Checks the syntax tree for semantic errors and gatherstype information for the subsequent code-generation phase. Intermediate Code Generation  Generates an intermediate form of the program. This form is very simple but not as low level as assembly code. Code Optimizer  Optimizes the intermediate form of the program. Code Generator  Generates the actual target code, consisting of assembly code.

Lexical Analyzer Syntax Analyzer Semantic Analyzer Intermediate Code Generator Code Optimizer Code Generator Symbol-table Manager Error Handler Source Program Target Program Decomposition Criterion: Data Flow

Lexical Analyzer SyntaxTree Generator Semantic Analyzer Intermediate Code Code Optimizer Code Generator Symbol-table Manager Syntax Tree Intermediate Code Generator I/O Manager Decomposition Criterion: Data Hiding

Rationale for Data Flow Design In the FLOW diagram design, the break down of the modules is based simply on the data flow. This decomposition criterion creates an architecture that is very similar to the contemporary model of the pipe-and-filter design pattern. Source Program file is fed right into the Lexical Analyzer, and the Target Program file is created directly by the Code Generator.

Rationale for Data Hiding Design In this design, the criterion used was data hiding, much like what Parnas attempted to demonstrate in his second breakdown of the KWIC program. The objects are fairly independent. They also perform their own error handling. Functions that use the same Data Structures were combined under a common object to reinforce the Data Hiding Theme. I/O was combined into an object.

How are they similar? Different? Similarities: –Achieve same end result –Order of execution of processes still predetermined Differences: –Tools operate on internal representation (not text of program) –Hybrid = repository + pipeline (from lecture) –Versions may be identical in execution, but not in changing, documentation, understanding, and maintenance

Design Differences Pipeline –flowchart idea –each module heavily dependent on previous –outdated Hybrid –information hiding –each module has its own design decisions hidden from the others –modularization lends itself to encapsulation/reuse

Why is the Hybrid Better? Changeability Make design decisions based on what is likely to change Hybrid allows changes to: –Data representation/Abstraction (symbol table mechanism/parse tree) –Future flexibility in order of execution? –Reuse of modules for parsers of other languages

Why is the Hybrid Better? Independent Development Reduce interfaces between modules to decrease discussion among developers of different modules about required formatting and function call conventions Hybrid: –Each module depends only on symbol table (pipeline = does not know id of upstream/downstream filters) –Sequence of processing does not affect development of successful modules

Why is the Hybrid Better? Comprehensibility Modules must be able to stand alone New developer/maintainer should not have to learn entire system to change one piece of code Hybrid allows: –Effective minimal interfaces mean learning internal representation of symbol table not necessary for any parse module –Symbol table implementation does not depend on order of execution or other module processing

Historical Content in Present Context Paper is 30 years old, but only some details might make this fact apparent: –Terminology –Previous concerns –Past design processes (flowcharts) –Changing guidelines –Code reuse (not a major point)

Terminology Parnas uses some terms that are not used anymore, or are used nowadays with different meanings, such as: - CORE Then: main memory, general storage space Now: internal functionality, internals - JOB Then: Implied batch processing Now: ??? - Nowadays, we speak of memory in a more abstract way (data structures, etc). “Memory” was more often understood as referring to physical storage (addresses, records…)

Parnas mentions as “major advancements in the area of modular programming”… –The development of ASSEMBLERS Nowadays, we could mention higher level languages, mainly object-oriented languages that better: “(1) allow one module to be written with little knowledge of the code in another module, and (2) allow modules to be reassembled and replaced without reassembly of the whole system” Previous Concerns

Use of flowcharts –When paper was written, the use of flowchart by programmers before was almost mandatory. With a flowchart in hands, the programmer would “move from there to a detailed implementation.” This caused modularizations like the first one to be created. –Parnas could see the problem with this approach and condemned it; A flowchart would work ok for a small system, but not with a larger one. Past Design Processes

“The sequencing of instructions necessary to call a given routine and the routine itself are part of the same module.” This pertain to worries of programmers at the time because they were programming in assembly and other low-level languages. Concerns such as code optimization were very important and involved creating smaller sets of machine instructions for a given task. “The sequence in which certain items will be processed should be hidden within a single module.” It has become irrelevant most times. Changing Guidelines

Code Reuse Parnas does not emphasize code reuse so much in this paper. The reason might be the nature of programs written in assembly or lower-level languages programmers (not very portable/reusable). If the paper were to be reviewed by Parnas, reuse would certainly be a point he would emphasize more. It is important to notice that these points do not disturb the relevance of Parnas’ ideas for us nowadays.

Effects on Current Programming “Fathered” key ideas of OOP: –Information hiding –Encapsulation before functional relations –Easier understandability/maintainability Design more important than implementation –Good design leads to good implementation –Proper design allows for different implementations (easily modifiable)

…Effects Continued Separation of hierarchy and modularization –Hierarchy allows functional layers –Modules do not have to be layers in order to be placed in a hierarchy Evolution of more complex and capable systems