4. The process specification (プロセス仕様) You will learn: (次の内容を学び) The concept of process specification (プロセス 仕様の概念) Notations for process specification (プロセス.

Slides:



Advertisements
Similar presentations
Chapter 11 Describing Process Specifications and Structured Decisions
Advertisements

Section 10Data Dictionary - Process Descriptors 1 10 THE DATA DICTIONARY : Process Descriptors And Franchise Colleges By MANSHA NAWAZ.
CSC 123 Systems Analysis & Design
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Chapter 7 Structuring System Process Requirements
Software Design Deriving a solution which satisfies software requirements.
SYSTEM ANALYSIS & DESIGN (DCT 2013)
Systems Analysis and Design 9th Edition
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
System Concepts for Process Modeling  Process Concepts  Process Logic  Decomposition diagrams and data flow diagrams will prove very effective tools.
Detailed Design Kenneth M. Anderson Lecture 21
Chapter 9 Describing Process Specifications and Structured Decisions
Chapter 9 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall & Kendall Sixth Edition © 2005 Pearson Prentice.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Chapter 9 Describing Process Specifications and Structured Decisions
Axiomatic Semantics Dr. M Al-Mulhem ICS
Program Design and Development
© Love Ekenberg The Algorithm Concept, Big O Notation, and Program Verification Love Ekenberg.
Computer Science 1620 Programming & Problem Solving.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
© Copyright 2011 John Wiley & Sons, Inc.
Describing Syntax and Semantics
Systems Analysis and Design in a Changing World, 6th Edition
Pseudocode.
Pseudocode.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Adapted from slides by Marie desJardins
Chapter 6: The Traditional Approach to Requirements
System Analysis Overview Document functional requirements by creating models Two concepts help identify functional requirements in the traditional approach.
Systems Analysis and Design in a Changing World, Fifth Edition
The Traditional Approach to Requirements
Chapter 6 The Traditional Approach to Requirements
Info 361: Systems Analysis and Design
Systems Analysis and Design in a Changing World, Fifth Edition
3/5/2009Computer systems1 Describing Process Specifications and Structured Decisions 1. Process specifications sometimes called mini-specs 2. Structured.
Chapter 9 Describing Process Specifications and Structured Decisions
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Chapter 11 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall and Kendall Fifth Edition.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Dr. Andy Seddon Staffordshire UNIVERSITY School of Computing Code Design (The use of pseudo code for Elementary Process Descriptions)
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
Pseudocode Simple Program Design Third Edition A Step-by-Step Approach 2.
Selection Relational Expressions A condition or logical expression is an expression that can only take the values true or false. A.
Chapter 4 enterprise modeling
Chapter 3 Part II Describing Syntax and Semantics.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
INTRODUCTION TO PROGRAMMING. Program Development Life Cycle The program development life cycle is a model that describes the stages involved in a program.
Systems Analysis and Design 8th Edition
An Object-Oriented Approach to Programming Logic and Design Chapter 5 Making Decisions.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Fundamentals of Algorithms MCS - 2 Lecture # 3. Representation of Algorithms.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
 Problem Analysis  Coding  Debugging  Testing.
Systems Analysis and Design in a Changing World, Fourth Edition
© 2012 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be different from the U.S.
Process Specifications and Structured Decisions
GC211Data Structure Lecture2 Sara Alhajjam.
Introduction To Flowcharting
Chapter 11 Describing Process Specifications and Structured Decisions
Flowcharts and Pseudo Code
Basic Concepts of Algorithm
Presentation transcript:

4. The process specification (プロセス仕様) You will learn: (次の内容を学び) The concept of process specification (プロセス 仕様の概念) Notations for process specification (プロセス 仕様記法)

4.1 What is process specification? (プロセス仕様とは) (1) The problem: (問題点) Processes in a DFD are not defined in detail. Therefore, it is almost impossible to understand the meaning of the DFD precisely and accurately. ( DFD では、プロセス の機能を定義していない) (2) The definition of process specification: (プロセス仕 様の定義) Description: a process specification is a document for the process that specifies what to do in transforming its inputs to outputs. (プロセス仕様とは、入力データ フローを出力データフローへの変換に何をすると いうことを明確に定義する文書である)

(3) What kinds of processes need to be specified? (どんな プロセスに仕様を書く必要があるか) Only the lowest level processes that do not have decompositions in a hierarchy of DFDs need to be specified, because they have no definitions in the DFD hierarchy at all. (階層的 DFD のなかで分解されていな いプロセスだけに仕様を書く必要がある) Processes that are decomposed into lower level DFDs do not need to be specified, because they are actually defined by their decompositions. (分解されたプロセスに対し て、分解された DFD によるそのプロセスを定義され ているので、仕様を書く必要がない) For example, in the following DFD hierarchy, processes 2 and 3 do not need a specification, whereas processes 3.1, 2.2.1, 2.2.2, 2.2.3, and so on need to be defined.

4.2 Notations for process specification (プロセス仕様記法) We introduce the following most commonly used notations: (次の三つの仕様記法を紹介する) Pre and post-condition notation (事前条件と事 後条件の記法) Structured English (構造化英語) Decision table (意思決定表)

4.2.1 Pre and post-condition notation (事前条件と事後条件の記法) The primary idea of writing process specification using pre and post- condition notation: (事前条件と事後条件の記法の基本的な考 えかた) A process can be defined by giving a pre-condition and post-condition. The pre-condition describes a constraint on the input data flows before the execution of the process, while the post-condition provides a constraint on the output data flows after the execution. (プロセスの機能を事前条 件 と事後条件により定義できる。事前条件は、プロセス の入 力に対しての制限であり、事後条件は、プロセスの出 力に 対しての制限である)

Syntax for a process specification: this notation is a simplified version of process specification notation used in the SOFL specification language. (プロセス 仕様の文法。 SOFL 仕様言語のプロセス仕様記法を使 う) SOFL stands for Structured Object-oriented Formal Language. ( SOFL は、 Structured Object-oriented Formal Language と意味する) process processName(input data flows) output data flows ext stores pre condition1 post condition2 end_process

For example, let’s take the three processes in the following DFD as an example to show how the pre and post-condition notation is used to define processes: (次の DFD のプロセス仕様を考え よ)

process Provide-Month() month pre true post month = a month number obtained from the input device. end_process; process Find-All-Related-Items(total-exp, month) items-list ext expenses-file pre total-exp command is available and 1 <= month <= 12 post items-list = all of the items that are purchased within the requested month, obtained from the expenses-file. end_process;

process Calculate-Total-Expense(items-list) total-amount pre true post total-amount = add up all of the prices for all of the items recorded in items-list. end_process;

4.2.2 Structured English (構造化英語) Structured English is English with structure. That is, it is basically English, but there are restrictions on the structure of sentences. The goal of applying such restrictions is to achieve a reasonable balance between the precision of formal programming languages and the casual informality and readability of the English texts. (構造化英語は、構造が明確である英語の表現であ る) Structured English includes two kinds of sentences: (構 造化英語は、次の二つの語句を含む) Basic sentences (基本語句) Compound sentences (複合語句)

Basic sentences (基本語句) A basic sentence may be one of the following three kinds: (基本語句 は、次の三つの種類の語句を含む) An algebraic equation. (代数方程式) For example, x = (y * z) / (q + 4) a = b ** 2 + d/2 A simple imperative sentence consisting of a verb and object. There is no restriction on verbs and objects. (動詞と目的語から形成さ れた命令語句) For example, Calculate total-amount Input x A mixture of the both. (以上の二種類の語句の組合せ) For example, Compute total-amount = item1.price + itme2.price + item3.price

A list of verbs that are often used in Structured English: (次の動詞は、構造化英語に良く使われる) Get (or Accept or Read) Put (or Display or Write) Find (or Search or Locate) Add Subtract Multiply Divide Compute Delete Validate Move Replace, Set, Sort

Compound sentences ( 複合な語句) A compound sentence is one of the following: (複 合な語句は、次の種類を含む) Sequence of sentences (順序語句) Block sentence (ブロック 語句) Conditional sentences (条件語句) Multiple choice sentence (多数選択語句) Iteration sentences (反復語句)

(1) Sequence of sentences (順序語 句) Syntax: (文法) S1; S2; S3; Example: a function to register an item data in the expenses-file: ( expenses-file に一つの データ項目を登録する構造化英語) Get item-d; Register item-d in expenses-file; Add item-d.price to total-expense;

(2) Block sentence (ブロック 語 句) Block sentence is used to group a sequence of sentences into a single sentence. Syntax: (文法) begin sentence-1; sentence-2; sentence-3 end; Example, (例え) begin Get item-d; Register item-d in expenses-file; Add item-d.price to total-expense; end;

(3) Conditional sentences (条件語句) Conditional sentences include if-then and if-then-else sentences: Syntax: (文法) if condition then sentence; end-if; or if condition then sentence-1 else sentence-2 end-if;

Example: (例え) (1) if 1<= month <= 12 then Display items-d purchased in this month end-if; (2) if 1<= month <= 12 then Display items-d purchased in this month else Display warning message end-if;

(4) Multiple choice sentence (多数選択語句) Syntax: (文法) do case variable value-1, value-2: sentence-1; value-3, value-4: sentence-2; …… value-9, value-10: sentence-10; otherwise: sentence; end-case;

Example: (例え) do case input /* to the Personal Expenses Management System */ item-reg: Register item-d; single-item-d: Display all of the items of this kind; total-exp: Output the total expense; all-item-d: Display all of the items data in expenses-file; otherwise: Give warning message; end-case;

(5) Iteration sentences (反復語 句) Iteration sentences include while-do and do-while sentences. Syntax: (文法) while condition do do sentence-1 sentence-1 end-while; while condition end-while; In both while-do and do-while sentences, sentence-1 is executed until the condition becomes false. The only difference between them is that sentence-1 is firstly executed after evaluating the condition as true in while-do sentence, whereas the first execution of sentence-1 in do-while sentence is done before evaluating the condition.

Examples: (例え) while items-list <> empty do begin Get next item-d; Display item-d end end-while; do begin Read item-d; Register item-d in expenses-file end while item-d.name <> “end” end-while;

4.2.3 Decision table Decision table describes that actions are taken based on a combination of certain conditions or values. Decision table is in particular effective in defining processes that produce some output or take actions based on complex conditions. General format of a decision table:

Each column shows a rule, indicating what actions are taken under what conditions.

Example of decision table

This decision table can be translated into the equivalent Structured English: if Presence >= 10 and Exam-grade = C and Project-grade >= 60 then Get credit else if Presence >= 10 and Exam-grade = B and Project-grade < 60 then Get credit else if Presence = 60 then Get no credit else if Presence >= 10 and Exam-grade = A and Project-grade >= 60 then begin Get credit; Recommend award end end-if;

Advantages of decision table The designer can concentrate on one rule at a time. The decision table does not imply any particular form of implementation. This will give the programmer freedom in choosing most efficient implementation strategy. The decision table can be automatically transformed into a program structure. However, whether the program is executable or not depends on if all of the involved conditions can be evaluated and all of the actions can be executed automatically.

Exercise 4 1.Write the process specifications for the processes Receive-Request, Check-Password, Withdraw, and Show-Balance given in Exercise 2.1, using the following three notations, respectively. (1) Pre and post-condition notation (2) Structured English (3) Decision table 2. Use structured English to describe the following decision table.

3. Translate the following Structured English expression into a decision table. if x > 5 and y > x + 1 and z > x + y then begin Compute sum = x + y + z; Output sum; end else begin Compute sum = x * y * z; Output sum; end;

Small project 1.3 Use Structured English to write process specifications for all the three processes involved in the hierarchical DFDs resulted from small project 1.1.