本文已参与「新人创作礼」活动,一起开启掘金创作之路。
介绍
本文主要介绍了EMV2.aadl这个文件的基本内容,一方面更加深入的学习emv2的功能,另一方面为自己编写一个annex做准备
附录文件头部
- 作为一个附录,第一句话,要说明这事一个属性集,格式参照如下,表明这是一个叫做EMV2的附录
property set EMV2
is
OccurrenceDistribution
- OccurrenceDistribution表示发生概率
- 对部分MEV2的关键字赋予OccurrenceDistribution特性,该特性的格式为DistributionSpecification
OccurrenceDistribution : EMV2::DistributionSpecification
applies to ({emv2}**error propagation, {emv2}**error flow, {emv2}**error behavior event
,{emv2}**error behavior state,{emv2}**error type,{emv2}**type set);
DistributionSpecification
- DistributionSpecification定义了十种概率分配规格,具体使用哪种规格全看实际需要,这些规格只是名字不同,其他地方没有什么不同
DistributionSpecification : type record (
ProbabilityValue : aadlreal;
OccurrenceRate : aadlreal;
MeanValue : aadlreal;
StandardDeviation : aadlreal;
ShapeParameter : aadlreal;
ScaleParameter : aadlreal;
SuccessCount : aadlreal;
SampleCount : aadlreal;
Probability : aadlreal;
Distribution : EMV2::DistributionFunction;);
DistributionFunction
- DistributionFunction表示概率表达方式
- Fixed表示一个固定的分布,并接受单个参数发生率或概率值。
- Poisson或 Exponential表示一个指数分布,并取一个单一的参数出现率或概率值。
- Normal或Gauss表示一个具有明确指定的均值和标准偏差的分布。
- Weibull表示一个具有形状参数和尺度参数的形状分布。
- Binominal表示表示具有成功计数、样本计数和概率参数的离散分布。
DistributionFunction : type enumeration (Fixed, Poisson, Exponential, Normal, Gauss, Weibull, Binominal);
ExposurePeriod
- ExposurePeriod 表示暴露周期
- 对部分MEV2的关键字赋予ExposurePeriod 特性,该特性的格式为aadlreal
ExposurePeriod : aadlreal
applies to ({emv2}**error propagation, {emv2}**error flow, {emv2}**error behavior event
,{emv2}**error behavior state,{emv2}**error type,{emv2}**type set);
DurationDistributionSpecification
- DurationDistributionSpecification表示期间和概率规格
- 期间规格定义为AADL自带的Time_Range
- 概率规格定义为DistributionFunction
DurationDistributionSpecification : type record (
Duration : Time_Range;
Distribution : EMV2::DistributionFunction;
);
DurationDistribution
- 对部分MEV2的关键字赋予DurationDistribution 特性,该特性的格式为DurationDistributionSpecification
DurationDistribution : EMV2::DurationDistributionSpecification applies to ({emv2}**Repair Event, {emv2}**Recover Event,
{emv2}**Error Behavior Transition);
PropagationTimeDelay
- PropagationTimeDelay表示传播时间延迟,指在一段时间间隔内传播和出错分布的延迟。
- 例如,作为与连接相关联的属性,它指示错误传播的时间延迟。
PropagationTimeDelay: EMV2::DurationDistributionSpecification
applies to (connection, {emv2}**propagation path);
TransientFailureRatio和RecoveryFailureRatio
- 用于参数化预声明错误行为状态机中的转换分支的属性
- 只有 Error Behavior Transition具有该属性,且属性类别为aadlreal
TransientFailureRatio: aadlreal applies to ({EMV2}** Error Behavior Transition);
RecoveryFailureRatio: aadlreal applies to ({EMV2}** Error Behavior Transition);
StateKind
- 状态类别
- 只有 Error Behavior Transition具有该属性,该属性有Working, NonWorking两种enumeration类型的值
- 表示是否可以检测到错误类型
StateKind : EMV2::StateKindEnum
applies to ({emv2}**error behavior state);
StateKindEnum: type enumeration (Working, NonWorking);
FaultKind
- 错误类别
- error event、error type等类型的变量具有该属性,该属性可以是Design,或Operational
- FaultKind属性允许用户指定错误源,即故障激活或传播的发生是设计故障还是操作故障导致。
- 如果是设计故障导致的错误,那么设计故障是可以在指定错误源时消除错误
- 操作故障是指在操作过程中固有发生的故障,应在操作过程中进行检测和管理。
FaultKind : EMV2::FaultKindEnum
applies to ( {emv2}**error event, {emv2}**error propagation, {emv2}**error source, {emv2}**error type, {emv2}**type set);
FaultKindEnum: type enumeration (Design, Operational);
Persistence
- 持久性
- Persistence属性允许用户指定错误是永久的Permanent、暂时的Transient、单个的Singleton。
- 永久性错误通常需要对出现故障的组件进行修复。
- 暂时错误持续时间有限,通常需要采取恢复措施。
- 在离散事件系统中,暂时错误可能持续几个离散事件,例如,损坏的消息可能在多个周期内发送。
- 单个错误发生在单个离散事件的上下文中。例如,除以零误差可能特定于特定输入的计算。
Persistence : EMV2::PersistenceEnum
applies to ({emv2}**error type, {emv2}**type set, {emv2}**error behavior state,
{emv2}**error behavior event, {emv2}**error propagation);
PersistenceEnum: type enumeration (Permanent, Transient, Singleton);
Severity
- 危险的严重性
- Severity属性值表示危险的严重性,范围从1(高)到5(低)。
- MIL-STD 882D将其称为严重类别,等效描述性标签为严重级别。
- 用MILSTD882限定这些标签(灾难性、严重、边缘、可忽略):
- ARP 4761使用描述性标签调用此严重性分类:(灾难、危险、重大、轻微、无效)(符合ARP4761::)。
Severity : inherit EMV2::SeverityRange applies to ({emv2}**error type, {emv2}**type set, {emv2}**error behavior state,
{emv2}**error propagation, {emv2}**error event, {emv2}**error flow);
SeverityRange: type aadlinteger 1 .. 5;
ProbabilityRange: type aadlreal 0.0 .. 1.0;
Likelihood
- 危险的可能性
- Likelihood属性值表示从A(高)到F(低)范围内的危险可能性。
- MIL-STD 882E使用描述性标签(频繁、可能、偶然、遥远、不可能、消除)(参见属性集MILSTD882)。
- ARP 4761使用描述性标签(频繁、可能、远程、极远程、极不可能)(参见属性集ARP 4761)。
Likelihood : inherit EMV2::LikelihoodLabels applies to ({emv2}**error type, {emv2}**type set, {emv2}**error behavior state,
{emv2}**error propagation, {emv2}**error event, {emv2}**error flow);
LikelihoodLabels: type enumeration (A, B, C, D, E, F);
DALLabels
- 运行保障水平
- Developmen tAssurance Level,简称DAL
DALLabels: type enumeration (A,B,C,D,E);
Hazards
- 危险属性
- 描述了一个error type、error set等类型的错误变量可以具有的属性
Hazards: list of record
(
CrossReference : aadlstring; -- 对外部文档的交叉引用
HazardTitle : aadlstring; -- 危险的简短描述短语
Description : aadlstring; -- 危险描述(与hazardtitle类似)
Failure : aadlstring; -- 导致故障影响的系统偏差
FailureEffect : aadlstring; -- 故障影响的描述(模式)
Phases : list of aadlstring; -- 与危险相关的操作阶段
Environment : aadlstring; -- 操作环境描述
Mishap : aadlstring; -- 导致以下情况的事件(系列)描述
-- 意外、死亡等。(MILSTD882)
FailureCondition : aadlstring; -- 导致以下情况的事件(系列)描述
-- 意外、死亡等。(ARP4761)
Risk : aadlstring; -- 风险描述。风险的特点是
-- 严重性、可能性和发生概率
Severity : EMV2::SeverityRange ; -- 作为严重程度的实际风险
Likelihood : EMV2::LikelihoodLabels; -- 作为可能性/概率的实际风险
Probability: EMV2::ProbabilityRange; -- 发生危险的可能性
TargetSeverity : EMV2::SeverityRange; -- 严重程度可接受的风险
TargetLikelihood : EMV2::LikelihoodLabels; -- 作为可能性/问题的可接受风险
DevelopmentAssuranceLevel : EMV2::DALLabels; -- 开发保证的严格程度 (ARP4761)
VerificationMethod : aadlstring; -- 解决危险的验证方法
SafetyReport : aadlstring; -- 危险分析/评估
Comment : aadlstring;
)
applies to ({emv2}**error type, {emv2}**type set, {emv2}**error behavior state,
{emv2}**error propagation, {emv2}**error event, {emv2}**error flow);
Description : aadlstring applies to (all);
Description
- 描述、备注
- 该属性应用于全部关键字
Description : aadlstring applies to (all);
HazardAllocation
- 危险分配
- 内含三个属性
- 假设概率
- 发生时间
- 备注
HazardAllocation: record (
AssumedProbability : aadlreal;
ExposureTime : Time;
Notes : aadlstring;
) applies to (all);