Skip to content

Commit

Permalink
Provide a MODEL concept for attaching different interpretations of RA…
Browse files Browse the repository at this point in the history
…CK data (#299)

Add MODEL class and requirement subtypes
  • Loading branch information
glguy committed Mar 15, 2021
1 parent 55edd52 commit b25d076
Show file tree
Hide file tree
Showing 11 changed files with 274 additions and 50 deletions.
40 changes: 28 additions & 12 deletions GrammaTech-Ontology/OwlModels/GrammaTech.owl
Expand Up @@ -10,21 +10,19 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xml:base="http://arcos.acert/GrammaTech">
<owl:Ontology rdf:about="">
<owl:imports rdf:resource="http://arcos.rack/REQUIREMENTS"/>
<owl:imports rdf:resource="http://arcos.rack/MODEL"/>
<owl:imports rdf:resource="http://sadl.org/sadlimplicitmodel"/>
<owl:imports rdf:resource="http://sadl.org/builtinfunctions"/>
<owl:imports rdf:resource="http://arcos.rack/SOFTWARE"/>
<owl:imports rdf:resource="http://arcos.rack/DOCUMENT"/>
<owl:imports rdf:resource="http://arcos.rack/TESTING"/>
<owl:imports rdf:resource="http://sadl.org/builtinfunctions"/>
<owl:imports rdf:resource="http://sadl.org/sadlimplicitmodel"/>
<owl:imports rdf:resource="http://sadl.org/sadlbasemodel"/>
<rdfs:comment xml:lang="en">This ontology was created from a SADL file 'GrammaTech.sadl' and should not be directly edited.</rdfs:comment>
<owl:imports rdf:resource="http://sadl.org/sadlbasemodel"/>
<owl:imports rdf:resource="http://arcos.rack/DOCUMENT"/>
<owl:imports rdf:resource="http://arcos.rack/REQUIREMENTS"/>
</owl:Ontology>
<owl:Class rdf:ID="AcertTestResult">
<rdfs:subClassOf rdf:resource="http://arcos.rack/TESTING#TEST_RESULT"/>
</owl:Class>
<owl:Class rdf:ID="AcertRequirement">
<rdfs:subClassOf rdf:resource="http://arcos.rack/REQUIREMENTS#REQUIREMENT"/>
</owl:Class>
<owl:Class rdf:ID="FailureReason">
<owl:equivalentClass>
<owl:Class>
Expand All @@ -47,11 +45,24 @@
<rdfs:comment xml:lang="en">High-level reasons for ACERT test result failure</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://arcos.rack/PROV-S#THING"/>
</owl:Class>
<owl:Class rdf:ID="AcertRequirementModel">
<rdfs:subClassOf rdf:resource="http://arcos.rack/MODEL#MODEL"/>
</owl:Class>
<owl:ObjectProperty rdf:ID="failureReason">
<rdfs:comment xml:lang="en">reason for failure, e.g.: timeout, crash, bad output</rdfs:comment>
<rdfs:range rdf:resource="#FailureReason"/>
<rdfs:domain rdf:resource="#AcertTestResult"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="thenText">
<rdfs:comment xml:lang="en">specifies what should hold by this requirement if the requirement conditions are met</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="givenText">
<rdfs:comment xml:lang="en">optional part that can be used to set certain conditions apart from other conditions in the ifText part</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="failureDetails">
<rdfs:comment xml:lang="en">Additional detail describing the failure reason</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
Expand All @@ -60,12 +71,17 @@
<owl:DatatypeProperty rdf:ID="givenTextConfidence">
<rdfs:comment xml:lang="en">confidence that this was the given-portion of the text</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
<rdfs:domain rdf:resource="#AcertRequirement"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="textConfidence">
<rdfs:comment xml:lang="en">confidence that this was requirement text</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
<rdfs:domain rdf:resource="#AcertRequirement"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="ifText">
<rdfs:comment xml:lang="en">conditions under which this requirement holds</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="memory">
<rdfs:comment xml:lang="en">maximum bytes of resident memory used by test execution</rdfs:comment>
Expand All @@ -80,11 +96,11 @@
<owl:DatatypeProperty rdf:ID="thenTextConfidence">
<rdfs:comment xml:lang="en">confidence that this was the then-portion of the text</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
<rdfs:domain rdf:resource="#AcertRequirement"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="ifTextConfidence">
<rdfs:comment xml:lang="en">confidence that this was the if-portion of the text</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
<rdfs:domain rdf:resource="#AcertRequirement"/>
<rdfs:domain rdf:resource="#AcertRequirementModel"/>
</owl:DatatypeProperty>
</rdf:RDF>
21 changes: 16 additions & 5 deletions GrammaTech-Ontology/ontology/GrammaTech.sadl
Expand Up @@ -4,17 +4,28 @@ import "http://arcos.rack/TESTING".
import "http://arcos.rack/DOCUMENT".
import "http://arcos.rack/SOFTWARE".
import "http://arcos.rack/REQUIREMENTS".
import "http://arcos.rack/MODEL".

/* ACERT requirements have confidence parameters on text extraction */
AcertRequirement is a type of REQUIREMENT.
AcertRequirementModel is a type of MODEL.

textConfidence (note "confidence that this was requirement text")
describes AcertRequirement with values of type double.
describes AcertRequirementModel with values of type double.

ifText (note "conditions under which this requirement holds")
describes AcertRequirementModel with values of type string.
ifTextConfidence (note "confidence that this was the if-portion of the text")
describes AcertRequirement with values of type double.
describes AcertRequirementModel with values of type double.

thenText (note "specifies what should hold by this requirement if the requirement conditions are met")
describes AcertRequirementModel with values of type string.
thenTextConfidence (note "confidence that this was the then-portion of the text")
describes AcertRequirement with values of type double.
describes AcertRequirementModel with values of type double.

givenText (note "optional part that can be used to set certain conditions apart from other conditions in the ifText part")
describes AcertRequirementModel with values of type string.
givenTextConfidence (note "confidence that this was the given-portion of the text")
describes AcertRequirement with values of type double.
describes AcertRequirementModel with values of type double.

AcertTestResult is a type of TEST_RESULT.
failureReason (note "reason for failure, e.g.: timeout, crash, bad output")
Expand Down
37 changes: 37 additions & 0 deletions RACK-Ontology/OwlModels/MODEL.owl
@@ -0,0 +1,37 @@
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:provs="http://arcos.rack/PROV-S#"
xmlns:M="http://arcos.rack/MODEL#"
xmlns:builtinfunctions="http://sadl.org/builtinfunctions#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:sadlimplicitmodel="http://sadl.org/sadlimplicitmodel#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:sadlbasemodel="http://sadl.org/sadlbasemodel#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xml:base="http://arcos.rack/MODEL">
<owl:Ontology rdf:about="">
<owl:imports rdf:resource="PROV-S"/>
<owl:imports rdf:resource="http://sadl.org/builtinfunctions"/>
<owl:imports rdf:resource="http://sadl.org/sadlimplicitmodel"/>
<owl:imports rdf:resource="http://sadl.org/sadlbasemodel"/>
<rdfs:comment xml:lang="en">This ontology was created from a SADL file 'MODEL.sadl' and should not be directly edited.</rdfs:comment>
</owl:Ontology>
<owl:Class rdf:ID="MODEL">
<rdfs:subClassOf>
<owl:Restriction>
<owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int"
>1</owl:cardinality>
<owl:onProperty>
<owl:ObjectProperty rdf:ID="models"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:comment xml:lang="en">A physical, mathematical, or otherwise logical representation of a system, entity, phenomenon, or process</rdfs:comment>
<rdfs:subClassOf rdf:resource="PROV-S#ENTITY"/>
</owl:Class>
<owl:ObjectProperty rdf:about="#models">
<rdfs:comment xml:lang="en">The thing being modeled</rdfs:comment>
<rdfs:range rdf:resource="PROV-S#THING"/>
<rdfs:domain rdf:resource="#MODEL"/>
</owl:ObjectProperty>
</rdf:RDF>
27 changes: 6 additions & 21 deletions RACK-Ontology/OwlModels/REQUIREMENTS.owl
Expand Up @@ -28,18 +28,18 @@
<rdfs:comment xml:lang="en">Defines some conceptual data that may be collected somewhere and used somewhere else</rdfs:comment>
<rdfs:subClassOf rdf:resource="PROV-S#ENTITY"/>
</owl:Class>
<owl:ObjectProperty rdf:ID="mitigates">
<rdfs:subPropertyOf rdf:resource="PROV-S#wasImpactedBy"/>
<rdfs:comment xml:lang="en">ENTITY(s) (e.g. HAZARD) that is being mitigated by this REQUIREMENT</rdfs:comment>
<rdfs:range rdf:resource="PROV-S#ENTITY"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="consumedBy">
<rdfs:subPropertyOf rdf:resource="PROV-S#wasImpactedBy"/>
<rdfs:comment xml:lang="en">ENTITY(s) (e.g. REQUIREMENT) that consumes this information</rdfs:comment>
<rdfs:range rdf:resource="PROV-S#ENTITY"/>
<rdfs:domain rdf:resource="#DATA_DICTIONARY_TERM"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="mitigates">
<rdfs:subPropertyOf rdf:resource="PROV-S#wasImpactedBy"/>
<rdfs:comment xml:lang="en">ENTITY(s) (e.g. HAZARD) that is being mitigated by this REQUIREMENT</rdfs:comment>
<rdfs:range rdf:resource="PROV-S#ENTITY"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="author">
<rdfs:subPropertyOf rdf:resource="PROV-S#wasAssociatedWith"/>
<rdfs:comment xml:lang="en">AGENT(s) responsible for producing a REQUIREMENT</rdfs:comment>
Expand Down Expand Up @@ -90,19 +90,4 @@
<rdfs:range rdf:resource="PROV-S#ENTITY"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="thenText">
<rdfs:comment xml:lang="en">specifies what should hold by this requirement if the requirement conditions are met</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="ifText">
<rdfs:comment xml:lang="en">conditions under which this requirement holds</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="givenText">
<rdfs:comment xml:lang="en">optional part that can be used to set certain conditions apart from other conditions in the ifText part</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#REQUIREMENT"/>
</owl:DatatypeProperty>
</rdf:RDF>
1 change: 1 addition & 0 deletions RACK-Ontology/OwlModels/import.yaml
Expand Up @@ -9,6 +9,7 @@ files:
- DOCUMENT.owl
- FILE.owl
- HAZARD.owl
- MODEL.owl
- PROCESS.owl
- PROV-S.owl
- REQUIREMENTS.owl
Expand Down
25 changes: 25 additions & 0 deletions RACK-Ontology/ontology/MODEL.sadl
@@ -0,0 +1,25 @@
/* Copyright (c) 2021, General Electric Company, Galois, Inc.
*
* All Rights Reserved
*
* This material is based upon work supported by the Defense Advanced Research
* Projects Agency (DARPA) under Contract No. FA8750-20-C-0203.
*
* Any opinions, findings and conclusions or recommendations expressed in this
* material are those of the author(s) and do not necessarily reflect the views
* of the Defense Advanced Research Projects Agency (DARPA).
*/

/************** edit history *****************
*
* em - 12 Feb 2021 - Initial revision
*
*********************************************/


uri "http://arcos.rack/MODEL" alias M.
import "http://arcos.rack/PROV-S".

MODEL (note "A physical, mathematical, or otherwise logical representation of a system, entity, phenomenon, or process")
is a type of ENTITY.
models (note "The thing being modeled") describes MODEL with a single value of type THING.
14 changes: 2 additions & 12 deletions RACK-Ontology/ontology/REQUIREMENTS.sadl
Expand Up @@ -21,22 +21,12 @@
uri "http://arcos.rack/REQUIREMENTS" alias Rq.
import "http://arcos.rack/HAZARD".

// The natural language text of a requirement can be captured in the
// *description* property common to all RACK data.
REQUIREMENT
(note "Captures (both high- and low-level) properties of a process or artifact that are to be assessed")
is a type of ENTITY.

// The "text" string can optionally be subdivided into sub-parts : givenText, ifText, thenText
// This corresponds to how rules are defined in SADL and note that in a SADL rule whatever is in
// givenText can simply be included in the ifText part.
// Note that modulo naming changes this structure also matches the structure
// that GrammaTech had which was : Given, When, Then parts.
// The structure of requirements in ASSERT subsume this structure of requirements.
givenText (note "optional part that can be used to set certain conditions apart from other conditions in the ifText part") describes REQUIREMENT with values of type string.

ifText (note "conditions under which this requirement holds") describes REQUIREMENT with values of type string.

thenText (note "specifies what should hold by this requirement if the requirement conditions are met") describes REQUIREMENT with values of type string.

governs (note "ENTITY(s) that are the subject of the requirement") describes REQUIREMENT with values of type ENTITY.
governs is a type of wasImpactedBy.

Expand Down
10 changes: 10 additions & 0 deletions STR-Ontology/OwlModels/STR.owl
Expand Up @@ -9,6 +9,7 @@
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xml:base="http://arcos.arbiter/STR">
<owl:Ontology rdf:about="">
<owl:imports rdf:resource="http://arcos.rack/MODEL"/>
<owl:imports rdf:resource="http://arcos.rack/SOFTWARE"/>
<owl:imports rdf:resource="http://arcos.rack/SYSTEM"/>
<owl:imports rdf:resource="http://sadl.org/builtinfunctions"/>
Expand Down Expand Up @@ -41,6 +42,10 @@
<rdfs:comment xml:lang="en">The communication interface of a concrete software component.</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://arcos.rack/PROV-S#ENTITY"/>
</owl:Class>
<owl:Class rdf:ID="StrEarsModel">
<rdfs:comment xml:lang="en">A requirement statement written in the Easy Approach to Requirements Syntax language.</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://arcos.rack/MODEL#MODEL"/>
</owl:Class>
<owl:Class rdf:ID="StrComponent">
<rdfs:comment xml:lang="en">A concrete software component with an explicitly identified input/output interface</rdfs:comment>
<rdfs:subClassOf rdf:resource="http://arcos.rack/SOFTWARE#SWCOMPONENT"/>
Expand Down Expand Up @@ -70,6 +75,11 @@
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#StrPort"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty rdf:ID="earsStatement">
<rdfs:comment xml:lang="en">Text of statement written in the EARS requirements language.</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#StrEarsModel"/>
</owl:DatatypeProperty>
<owl:FunctionalProperty rdf:ID="portType">
<rdfs:comment xml:lang="en">The type of information communicated over this port</rdfs:comment>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
Expand Down
7 changes: 7 additions & 0 deletions STR-Ontology/ontology/STR.sadl
Expand Up @@ -2,6 +2,7 @@ uri "http://arcos.arbiter/STR" alias Arbiter.

import "http://arcos.rack/SYSTEM".
import "http://arcos.rack/SOFTWARE".
import "http://arcos.rack/MODEL".

StrSystem (note "A component of the logical system with a concept of sequencing dependency")
is a type of SYSTEM.
Expand Down Expand Up @@ -32,3 +33,9 @@ StrComponent (note "A concrete software component with an explicitly identified
describes StrComponent with values of type StrOutPort.
recvsVia (note "Links a component to its incoming interface")
describes StrComponent with values of type StrInPort.

StrEarsModel (note "A requirement statement written in the Easy Approach to Requirements Syntax language.")
is a type of MODEL.

earsStatement (note "Text of statement written in the EARS requirements language.")
describes StrEarsModel with values of type string.

0 comments on commit b25d076

Please sign in to comment.