Skip to content

需求图

¥Requirement Diagram

需求图提供了需求及其相互之间以及其他记录元素之间的联系的可视化。建模规范遵循 SysML v1.6 定义的规范。

¥A Requirement diagram provides a visualization for requirements and their connections, to each other and other documented elements. The modeling specs follow those defined by SysML v1.6.

渲染要求很简单。

¥Rendering requirements is straightforward.

语法

¥Syntax

需求图包含三种类型的组件:要求、要素和关系。

¥There are three types of components to a requirement diagram: requirement, element, and relationship.

用于定义每个的语法定义如下。尖括号中表示的单词(例如 <word>)是枚举关键字,其选项在表格中详细说明。user_defined_... 用于任何需要用户输入的地方。

¥The grammar for defining each is defined below. Words denoted in angle brackets, such as <word>, are enumerated keywords that have options elaborated in a table. user_defined_... is use in any place where user input is expected.

关于用户文本的重要说明:所有输入都可以用引号引起来,也可以不用引号引起来。例如,Id: "here is an example"Id: here is an example 都有效。但是,用户必须小心未加引号的输入。如果检测到另一个关键字,解析器将失败。

¥An important note on user text: all input can be surrounded in quotes or not. For example, both Id: "here is an example" and Id: here is an example are both valid. However, users must be careful with unquoted input. The parser will fail if another keyword is detected.

要求

¥Requirement

需求定义包含需求类型、名称、ID、文本、风险和验证方法。语法如下:

¥A requirement definition contains a requirement type, name, id, text, risk, and verification method. The syntax follows:

<type> user_defined_name {
    id: user_defined_id
    text: user_defined text
    risk: <risk>
    verifymethod: <method>
}

类型、风险和方法是 SysML 中定义的枚举。

¥Type, risk, and method are enumerations defined in SysML.

关键词选项
类型需求、功能需求、接口需求、性能需求、物理需求、设计约束
风险低中高
验证方法分析、检验、测试、演示

元素

¥Element

元素定义包含元素名称、类型和文档引用。这三个都是用户定义的。元素功能旨在轻量级,但允许将需求连接到其他文档的部分。

¥An element definition contains an element name, type, and document reference. These three are all user defined. The element feature is intended to be lightweight but allow requirements to be connected to portions of other documents.

element user_defined_name {
    type: user_defined_type
    docref: user_defined_ref
}

关系

¥Relationship

关系由源节点、目标节点和关系类型组成。

¥Relationships are comprised of a source node, destination node, and relationship type.

每个都遵循以下定义格式

¥Each follows the definition format of

{name of source} - <type> -> {name of destination}

or

{name of destination} <- <type> - {name of source}

"来源名称" 和 "目的地名称" 应该是在其他地方定义的需求或元素节点的名称。

¥"name of source" and "name of destination" should be names of requirement or element nodes defined elsewhere.

关系类型可以是包含、复制、派生、满足、验证、细化或跟踪之一。

¥A relationship type can be one of contains, copies, derives, satisfies, verifies, refines, or traces.

每个关系都在图中进行了标记。

¥Each relationship is labeled in the diagram.

更大的例子

¥Larger Example

此示例使用了该图的所有功能。

¥This example uses all features of the diagram.