75 lines
1.9 KiB
Plaintext
75 lines
1.9 KiB
Plaintext
|
|
let c = import "adr-constraints.ncl" in
|
||
|
|
|
||
|
|
let status_type = [| 'Proposed, 'Accepted, 'Superseded, 'Deprecated |] in
|
||
|
|
let severity_type = [| 'Hard, 'Soft |] in
|
||
|
|
let verdict_type = [| 'Safe, 'RequiresJustification |] in
|
||
|
|
|
||
|
|
let rationale_entry_type = {
|
||
|
|
claim | String,
|
||
|
|
detail | String,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let alternative_type = {
|
||
|
|
option | String,
|
||
|
|
why_rejected | String,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let constraint_type = {
|
||
|
|
id | String,
|
||
|
|
claim | String,
|
||
|
|
scope | String,
|
||
|
|
severity | severity_type,
|
||
|
|
check_hint | String,
|
||
|
|
rationale | String,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let ontology_check_type = {
|
||
|
|
decision_string | String,
|
||
|
|
invariants_at_risk | Array String,
|
||
|
|
verdict | verdict_type,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let invariant_justification_type = {
|
||
|
|
invariant | String,
|
||
|
|
claim | String,
|
||
|
|
mitigation | String,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let consequences_type = {
|
||
|
|
positive | Array String,
|
||
|
|
negative | Array String,
|
||
|
|
} in
|
||
|
|
|
||
|
|
let adr_type = {
|
||
|
|
id | String | c.AdrIdFormat,
|
||
|
|
title | String,
|
||
|
|
status | status_type,
|
||
|
|
date | String,
|
||
|
|
|
||
|
|
context | String,
|
||
|
|
decision | String,
|
||
|
|
rationale | Array rationale_entry_type,
|
||
|
|
consequences | consequences_type,
|
||
|
|
alternatives_considered | Array alternative_type,
|
||
|
|
|
||
|
|
constraints | Array constraint_type | c.NonEmptyConstraints,
|
||
|
|
ontology_check | ontology_check_type,
|
||
|
|
|
||
|
|
related_adrs | Array String | default = [],
|
||
|
|
supersedes | String | optional,
|
||
|
|
superseded_by | String | optional,
|
||
|
|
invariant_justification | invariant_justification_type | optional,
|
||
|
|
} in
|
||
|
|
|
||
|
|
{
|
||
|
|
AdrStatus = status_type,
|
||
|
|
Severity = severity_type,
|
||
|
|
Verdict = verdict_type,
|
||
|
|
Constraint = constraint_type,
|
||
|
|
RationaleEntry = rationale_entry_type,
|
||
|
|
Alternative = alternative_type,
|
||
|
|
OntologyCheck = ontology_check_type,
|
||
|
|
InvariantJustification = invariant_justification_type,
|
||
|
|
Adr = adr_type,
|
||
|
|
}
|