面向目标的需求工程方法
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
面向目标的需求工程方法 G l O i t d RE Goal-Oriented
刘璘
Course for MSE Students @ School of Software, Tsinghua U
目标 标 Goal G l
A goal is an objective the system under consideration should h ld achieve h Goal formulation refers to intended properties to be ensured They y are optative p statements, as opposed pp to indicative ones, and bounded by the subject matter
15
SystemGoal Achieve [BookRequestSatisfied] InstanceOf SatisfactionGoal %declaration of goal category% Concerns Borrower, Book, Borrowing, ... FormalDef (∀ bor: Borrower, b: Book, lib: Library) Requesting q g ( (bor, , b) ) ∧ b.subject j ∈ lib.coverageArea g ⇒ ◊ (∃ bc: BookCopy ) (Copy(bc, b) ∧ Borrowing(bor, bc))
目标定义为系统想要达到的状态或条件,是对系统 目标定义为系统想要达到的状态或条件 是对系统 设计意图的一种说明和陈述,隐含地表达了期望系 统所体现出的行为 以及要满足的约束 统所体现出的行为,以及要满足的约束。
2
目标分类
Байду номын сангаас
3
基于目标的方法 G l b Goal-based dA Approaches h
Obstacle Analysis
目标障碍关系
Can this goal be obstructed, if so how? 该目标的实现可能发生何种阻碍,如何阻碍? What are the consequences of obstructing it? 目标受阻的后果是什么?
10
KAOS
11
KAOS
Approach pp
Method focuses on goal elaboration 关注目标的求精与细化
define initial set of high level goals & objects they refer to 定义初始的高层目标与目标所指的对象 define initial set of agents and actions they are capable of 定义一组初始的主体以及它们所能进行的操作
MeetingPlanned , …
InformalDefinition “每个会议都将在所有预期与会人参加的情况下召开 每个会议都将在所有预期与会人参加的情况下召开” FormalDef ∀ m: Meeting: m.Requested m.Holds ∧ (∀ p: Participant): Intended (p, m) →Participates (p,m)
Requirements
Types
Obstacles & constraints
障碍与约束
Obstacles are behaviors that prevent achievement of a given goal 障碍是妨碍某个目标达成的行为 Constraints are conditions on the achievement of goals 约束是达成某个目标所需满足的条件
Approach
Method focuses on goal elaboration 关 关注目标的求精与细化 标的求精与
define initial set of high level goals & objects they refer to 定义初始的高层目标与目标所指的对象 define initial set of agents and actions they are capable of 定义一组初始的主体以及它们所能进行的操作
Approach
Focus on why systems are constructed 重点放在为什么要建立一个系统 Express the ‘why’ as a set of stakeholder goals 将建立系统的原因表示为干系人要实现的目标集合 Use goal refinement to arrive at specific requirements 进行目标精化得到具体的需求 Goal analysis 目标分析 document, organize and classify goals 对目标进行组织、分类、建立文档 Goal evolution 目标演化 refine, elaborate, and operationalize goals 对目标求精、细化、操作化
12
KAOS 元模型 KAOS meta meta-model model
13
运用基于目标的方法 U i a goal-based Using l b d approach h
Goals
目标:用于表示企业或组织的目的 需求:描述如何通过新的系统实现目的 目标类型
high level objectives of the business or organisation specify how a goal is to be accomplished by the new system Achievement goals ——成就型目标 Maintenance goals ——保持型目标 Soft goals ——软目标
16
P P P P ♦P P PQ ≤ku P ≤d P @P PW Q PU Q 刻为真 刻为真。
表示“下一个状态下,性质P成立”; 表示“当前或未来某一状态下,性质 表示 当前或未来某 状态下,性质P成立 成立”; ; 当前以及未来所有状态下,性质P成立; 前一个状态下,性质P成立; 当前或从前某 状态下 性质P成立; 当前或从前某一状态下,性质 成立 当前和从前所有状态下,性质P成立; 在所有未来状态下,性质P成立则性质Q成立; 在k个时间单位u以内的未来某一状态下,性质P成立; 在截止时刻d到达前的未来所有状态下,性质P成立; 在当前状态下性质P成立,在上一个状态下 成立 在上一个状态下P不成立; 不成立 在所有未来状态下,性质P成立直到Q成立,允许Q恒假; 在所有未来状态下性质P成立直到Q成立,Q必须在未来某一时
Disadvantages d
缺点
目标的演化难于处理
Hard to cope with evolution of goals
C regress forever Can f up (or ( d down) ) th the goal l hi hierarchy h 在目标层次结构上往复运行,无法终止
14
“每个会议都将在所有预期与会人参加 的情况下召开” ”
Goal Achieve [ConvenientMeetingHeld] InstanceOf InformationGoal Concerns Meeting, Participant, Schedule, … RefinedTo MeetingRequested, ConstraintsKnown,
Goal hierarchies show refinement and obstacle relationships between goals l 运用目标层次结构表示目标间的精化及阻碍关系 次 构表 间的精 关系
4
目标在需求分析中主要有下面的作用
目标指导需求获取 目标能够表达和分析非功能性需求 目标能够把需求和组织业务环境联系起来 目标便于表达和处理冲突需求 目标能够驱动后续的设计过程
7
目标建模 Modelling M d lli G Goals l
8
目标分析 Goal G l Analysis l i
Goal Elaboration 目标求精
“Why” questions explore hi h goals higher l (context) ( t t) 通过问“为什么”来探求高级 目标 (环境、上下文的要求)
5
基于目标的方法 G l b Goal-based d Approaches h
Advantages
优点
Reasonably y intuitive u 比较直观 Explicit declaration of goals provides sound basis for conflict resolution 目标可作为冲突解决的可靠依据
“How” questions explore lower goals (operations) 通过问“怎样”来探求低层目 通过问 怎样 来探求低层目 标 (操作方式)
“How else” questions explore alternatives 通过问“其它怎样”来探求其 它的候选方案
9
6
运用基于目标的方法 U i a goal-based Using l b d approach h
Tips
Multiple s sources urces yield better goals als 多方采集所得到的目标更为精确 Associate stakeholders with each goal (reveals viewpoints and conflict) 将各个目标与干系人联系起来,以强调不同人的观点和冲突 U scenarios Use i to explore l how h goals l can be b met 运用情景描述如何来实现目标 Explicit consideration of obstacles helps to elicit exceptions 考虑障碍有助于明确可能的例外情况
Background g
Developed in the early 90’s
Two parts:
first major teleological requirements modeling language 主要的目的论需求建模语言之 主要的目的论需求建模语言之一 full tool support available 具有全面的工具支持 has been applied to a number of industrial case studies 运用多个工业实例 Informal goal structuring model 非形式化的目标结构模型 Formal definitions for each entity in temporal logic 对每个实体给出形式化的定义
Then iteratively 之后反复执行以下步骤
refine goals using AND/OR decomposition 对目标进行与/或分解 id identify if obstacles b l to goals, l and d goal l conflicts fli 找出目标障碍,即目标冲突 operationalize goals into constraints that can be assigned to individual agents t 将目标操作化为约束,并分配给主体 refine & formalize definitions of objects & actions 对对象及动作求精并形式化
目标分析 Goal G l Analysis l i
Dependency Analysis
分析目标依赖关系
Precedence ordering – must achieve goals in a particular order 目标实现的先后次序 Obligation – achieving one goal requires achievement of another 目标实现的制约关系 Thwarting – achieving one goal prevents achievement of another 目标实现的阻碍关系
刘璘
Course for MSE Students @ School of Software, Tsinghua U
目标 标 Goal G l
A goal is an objective the system under consideration should h ld achieve h Goal formulation refers to intended properties to be ensured They y are optative p statements, as opposed pp to indicative ones, and bounded by the subject matter
15
SystemGoal Achieve [BookRequestSatisfied] InstanceOf SatisfactionGoal %declaration of goal category% Concerns Borrower, Book, Borrowing, ... FormalDef (∀ bor: Borrower, b: Book, lib: Library) Requesting q g ( (bor, , b) ) ∧ b.subject j ∈ lib.coverageArea g ⇒ ◊ (∃ bc: BookCopy ) (Copy(bc, b) ∧ Borrowing(bor, bc))
目标定义为系统想要达到的状态或条件,是对系统 目标定义为系统想要达到的状态或条件 是对系统 设计意图的一种说明和陈述,隐含地表达了期望系 统所体现出的行为 以及要满足的约束 统所体现出的行为,以及要满足的约束。
2
目标分类
Байду номын сангаас
3
基于目标的方法 G l b Goal-based dA Approaches h
Obstacle Analysis
目标障碍关系
Can this goal be obstructed, if so how? 该目标的实现可能发生何种阻碍,如何阻碍? What are the consequences of obstructing it? 目标受阻的后果是什么?
10
KAOS
11
KAOS
Approach pp
Method focuses on goal elaboration 关注目标的求精与细化
define initial set of high level goals & objects they refer to 定义初始的高层目标与目标所指的对象 define initial set of agents and actions they are capable of 定义一组初始的主体以及它们所能进行的操作
MeetingPlanned , …
InformalDefinition “每个会议都将在所有预期与会人参加的情况下召开 每个会议都将在所有预期与会人参加的情况下召开” FormalDef ∀ m: Meeting: m.Requested m.Holds ∧ (∀ p: Participant): Intended (p, m) →Participates (p,m)
Requirements
Types
Obstacles & constraints
障碍与约束
Obstacles are behaviors that prevent achievement of a given goal 障碍是妨碍某个目标达成的行为 Constraints are conditions on the achievement of goals 约束是达成某个目标所需满足的条件
Approach
Method focuses on goal elaboration 关 关注目标的求精与细化 标的求精与
define initial set of high level goals & objects they refer to 定义初始的高层目标与目标所指的对象 define initial set of agents and actions they are capable of 定义一组初始的主体以及它们所能进行的操作
Approach
Focus on why systems are constructed 重点放在为什么要建立一个系统 Express the ‘why’ as a set of stakeholder goals 将建立系统的原因表示为干系人要实现的目标集合 Use goal refinement to arrive at specific requirements 进行目标精化得到具体的需求 Goal analysis 目标分析 document, organize and classify goals 对目标进行组织、分类、建立文档 Goal evolution 目标演化 refine, elaborate, and operationalize goals 对目标求精、细化、操作化
12
KAOS 元模型 KAOS meta meta-model model
13
运用基于目标的方法 U i a goal-based Using l b d approach h
Goals
目标:用于表示企业或组织的目的 需求:描述如何通过新的系统实现目的 目标类型
high level objectives of the business or organisation specify how a goal is to be accomplished by the new system Achievement goals ——成就型目标 Maintenance goals ——保持型目标 Soft goals ——软目标
16
P P P P ♦P P PQ ≤ku P ≤d P @P PW Q PU Q 刻为真 刻为真。
表示“下一个状态下,性质P成立”; 表示“当前或未来某一状态下,性质 表示 当前或未来某 状态下,性质P成立 成立”; ; 当前以及未来所有状态下,性质P成立; 前一个状态下,性质P成立; 当前或从前某 状态下 性质P成立; 当前或从前某一状态下,性质 成立 当前和从前所有状态下,性质P成立; 在所有未来状态下,性质P成立则性质Q成立; 在k个时间单位u以内的未来某一状态下,性质P成立; 在截止时刻d到达前的未来所有状态下,性质P成立; 在当前状态下性质P成立,在上一个状态下 成立 在上一个状态下P不成立; 不成立 在所有未来状态下,性质P成立直到Q成立,允许Q恒假; 在所有未来状态下性质P成立直到Q成立,Q必须在未来某一时
Disadvantages d
缺点
目标的演化难于处理
Hard to cope with evolution of goals
C regress forever Can f up (or ( d down) ) th the goal l hi hierarchy h 在目标层次结构上往复运行,无法终止
14
“每个会议都将在所有预期与会人参加 的情况下召开” ”
Goal Achieve [ConvenientMeetingHeld] InstanceOf InformationGoal Concerns Meeting, Participant, Schedule, … RefinedTo MeetingRequested, ConstraintsKnown,
Goal hierarchies show refinement and obstacle relationships between goals l 运用目标层次结构表示目标间的精化及阻碍关系 次 构表 间的精 关系
4
目标在需求分析中主要有下面的作用
目标指导需求获取 目标能够表达和分析非功能性需求 目标能够把需求和组织业务环境联系起来 目标便于表达和处理冲突需求 目标能够驱动后续的设计过程
7
目标建模 Modelling M d lli G Goals l
8
目标分析 Goal G l Analysis l i
Goal Elaboration 目标求精
“Why” questions explore hi h goals higher l (context) ( t t) 通过问“为什么”来探求高级 目标 (环境、上下文的要求)
5
基于目标的方法 G l b Goal-based d Approaches h
Advantages
优点
Reasonably y intuitive u 比较直观 Explicit declaration of goals provides sound basis for conflict resolution 目标可作为冲突解决的可靠依据
“How” questions explore lower goals (operations) 通过问“怎样”来探求低层目 通过问 怎样 来探求低层目 标 (操作方式)
“How else” questions explore alternatives 通过问“其它怎样”来探求其 它的候选方案
9
6
运用基于目标的方法 U i a goal-based Using l b d approach h
Tips
Multiple s sources urces yield better goals als 多方采集所得到的目标更为精确 Associate stakeholders with each goal (reveals viewpoints and conflict) 将各个目标与干系人联系起来,以强调不同人的观点和冲突 U scenarios Use i to explore l how h goals l can be b met 运用情景描述如何来实现目标 Explicit consideration of obstacles helps to elicit exceptions 考虑障碍有助于明确可能的例外情况
Background g
Developed in the early 90’s
Two parts:
first major teleological requirements modeling language 主要的目的论需求建模语言之 主要的目的论需求建模语言之一 full tool support available 具有全面的工具支持 has been applied to a number of industrial case studies 运用多个工业实例 Informal goal structuring model 非形式化的目标结构模型 Formal definitions for each entity in temporal logic 对每个实体给出形式化的定义
Then iteratively 之后反复执行以下步骤
refine goals using AND/OR decomposition 对目标进行与/或分解 id identify if obstacles b l to goals, l and d goal l conflicts fli 找出目标障碍,即目标冲突 operationalize goals into constraints that can be assigned to individual agents t 将目标操作化为约束,并分配给主体 refine & formalize definitions of objects & actions 对对象及动作求精并形式化
目标分析 Goal G l Analysis l i
Dependency Analysis
分析目标依赖关系
Precedence ordering – must achieve goals in a particular order 目标实现的先后次序 Obligation – achieving one goal requires achievement of another 目标实现的制约关系 Thwarting – achieving one goal prevents achievement of another 目标实现的阻碍关系