(************************************************************************* * Copyright (C) * 2019 The University of Exeter * 2018-2019 The University of Paris-Saclay * 2018 The University of Sheffield * * License: * This program can be redistributed and/or modified under the terms * of the 2-clause BSD-style license. * * SPDX-License-Identifier: BSD-2-Clause *************************************************************************) chapter \An Outline of a CENELEC Ontology\ text\ NOTE: An Ontology-Model of a certification standard such as CENELEC or Common Criteria identifies: - notions (conceptual \<^emph>\categories\) having \<^emph>\instances\ (similar to classes and objects), - their \<^emph>\subtype\ relation (eg., a "SRAC" is an "assumption"), - their syntactical structure (for the moment: defined by regular expressions describing the order of category instances in the overall document as a regular language) \ (*<<*) theory CENELEC_50128 imports "Isabelle_DOF.technical_report" begin define_ontology "DOF-CENELEC_50128.sty" (* this is a hack and should go into an own ontology, providing thingsd like: - Assumption* - Hypothesis* - Definition*. (Une redefinition de ce qui se passe dans tech-report, cible a semi-formal “Definitions of terminology” \ ) - Objective" - Claim* - Requirement* *) text\We re-use the class \<^typ>\math_content\, which provides also a framework for semi-formal "math-alike" terminology, which we re-use by this definition.\ doc_class semi_formal_content = math_content + status :: status <= "semiformal" mcc :: math_content_class type_synonym sfc = semi_formal_content doc_class cenelec_term = semi_formal_content + mcc :: math_content_class <= "terminology" text\ in the following, all \<^theory_text>\Definition*\ statements are interpreted as \<^doc_class>\cenelec_term\s, i.e. semi-formal teminological definitions.\ (* ML\ val typ_abbrev = Scan.lift \ ML\ Parse.position: ( Token.T list -> 'a * Token.T list) -> ('a * Position.T) parser; Scan.lift(Parse.position Args.name) ; Args.name_position; Proof_Context.read_typ_abbrev; Args.typ_abbrev : Context.generic * Token.T list -> typ * (Context.generic * Token.T list) ; Proof_Context.read_typ_abbrev; (Args.typ_abbrev >> (fn Type(ss,_) => ss | _ => error "Undefined Class Id")) \ ML\ fun context_position_parser parse_con (ctxt, toks) = let val pos = case toks of a :: _ => Token.pos_of a | _ => @{here} \ \a real hack !\ val (res, (ctxt', toks')) = parse_con (ctxt, toks) in ((res,pos),(ctxt', toks')) end val parse_cid = (context_position_parser Args.typ_abbrev) >> (fn (Type(ss,_),pos) => (pos,ss) |( _,pos) => ISA_core.err "Undefined Class Id" pos); val parse_cid' = Term_Style.parse -- parse_cid fun pretty_cid_style ctxt (style,(pos,cid)) = (*reconversion to term in order to haave access to term print options like: short_names etc...) *) Document_Output.pretty_term ctxt ((AttributeAccess.compute_cid_repr ctxt cid pos)); val _ = Theory.setup (AttributeAccess.basic_entity \<^binding>\Onto_class\ parse_cid' pretty_cid_style) \ text\ \<^Onto_class>\cenelec_term\ \ *) declare[[ Definition_default_class="cenelec_term"]] (*>>*) text\ Excerpt of the BE EN 50128:2011, page 22. \ section\Terms and Definitions\ Definition*[assessment,short_name="''assessment''"] \process of analysis to determine whether software, which may include process, documentation, system, subsystem hardware and/or software components, meets the specified requirements and to form a judgement as to whether the software is fit for its intended purpose. Safety assessment is focused on but not limited to the safety properties of a system.\ Definition*[assessor, short_name="''assessor''"] \entity that carries out an assessment.\ Definition*[COTS, short_name="''commercial off-the-shelf software''"] \software defined by market-driven need, commercially available and whose fitness for purpose has been demonstrated by a broad spectrum of commercial users.\ Definition*[component] \a constituent part of software which has well-defined interfaces and behaviour with respect to the software architecture and design and fulfils the following criteria: \<^enum> it is designed according to “Components” (see Table A.20); \<^enum> it covers a specific subset of software requirements; \<^enum> it is clearly identified and has an independent version inside the configuration management system or is a part of a collection of components (e. g. subsystems) which have an independent version \ typ "sfc" Definition*[CMGR, short_name="''configuration manager''"] \entity that is responsible for implementing and carrying out the processes for the configuration management of documents, software and related tools including \<^emph>\change management\.\ Definition*[customer] \entity which purchases a railway control and protection system including the software.\ Definition*[designer] \entity that analyses and transforms specified requirements into acceptable design solutions which have the required safety integrity level.\ Definition*[entity] \person, group or organisation who fulfils a role as defined in this European Standard.\ declare_reference*[fault::cenelec_term] Definition*[error] \defect, mistake or inaccuracy which could result in failure or in a deviation from the intended performance or behaviour (cf. @{cenelec_term (unchecked) \fault\}).\ Definition*[fault] \defect, mistake or inaccuracy which could result in failure or in a deviation from the intended performance or behaviour (cf @{cenelec_term \error\}).\ Definition*[failure] \unacceptable difference between required and observed performance.\ Definition*[FT, short_name="''fault tolerance''"] \built-in capability of a system to provide continued correct provision of service as specified, in the presence of a limited number of hardware or software faults.\ Definition*[firmware] \software stored in read-only memory or in semi-permanent storage such as flash memory, in a way that is functionally independent of applicative software.\ Definition*[GS,short_name="''generic software''"] \software which can be used for a variety of installations purely by the provision of application-specific data and/or algorithms.\ Definition*[implementer] \entity that transforms specified designs into their physical realisation.\ Definition*[integration] \process of assembling software and/or hardware items, according to the architectural and design specification, and testing the integrated unit.\ Definition*[integrator] \entity that carries out software integration.\ Definition*[PES, short_name="''pre-existing software''"] \software developed prior to the application currently in question, including COTS (commercial off-the shelf) and open source software.\ Definition*[OS, short_name="''open source software''"] \source code available to the general public with relaxed or non-existent copyright restrictions.\ Definition*[PLC, short_name="''programmable logic controller''"] \solid-state control system which has a user programmable memory for storage of instructions to implement specific functions.\ Definition*[PM, short_name="''project management''"] \administrative and/or technical conduct of a project, including safety aspects.\ Definition*[PMGR, short_name="''project manager''"] \entity that carries out \<^cenelec_term>\PM\.\ Definition*[reliability] \ability of an item to perform a required function under given conditions for a given period of time\ Definition*[robustness] \ability of an item to detect and handle abnormal situations\ Definition*[RM, short_name="''requirements management''"] \the process of eliciting, documenting, analysing, prioritising and agreeing on requirements and then controlling change and communicating to relevant stakeholders. It is a continuous process throughout a project\ Definition*[RMGR, short_name="''requirements manager''"] \entity that carries out \<^cenelec_term>\RM\.\ Definition*[risk] \combination of the rate of occurrence of accidents and incidents resulting in harm (caused by a hazard) and the degree of severity of that harm.\ Definition*[safety] \freedom from unacceptable levels of risk of harm to people.\ Definition*[SA, short_name="''safety authority''"] \body responsible for certifying that safety related software or services comply with relevant statutory safety requirements.\ Definition*[SF, short_name="''safety function''"] \a function that implements a part or whole of a safety requirement.\ Definition*[SFRS, short_name= "''safety-related software''"] \software which performs safety functions.\ Definition*[software] \intellectual creation comprising the programs, procedures, rules, data and any associated documentation pertaining to the operation of a system.\ Definition*[SB, short_name="''software baseline''"] \complete and consistent set of source code, executable files, configuration files, installation scripts and documentation that are needed for a software release. Information about compilers, operating systems, preexisting software and dependent tools is stored as part of the baseline. This will enable the organisation to reproduce defined versions and be the input for future releases at enhancements or at upgrade in the maintenance phase.\ Definition*[SD, short_name="''software deployment''"] \transferring, installing and activating a deliverable software baseline that has already been released and assessed.\ Definition*[SWLC, short_name="''software life-cycle''"] \those activities occurring during a period of time that starts when software is conceived and ends when the software is no longer available for use. The software life cycle typically includes a requirements phase, design phase, test phase, integration phase, deployment phase and a maintenance phase.\ Definition*[SWMA, short_name="''software maintainability''"] \capability of the software to be modified; to correct faults, improve performance or other attributes, or adapt it to a different environment\ Definition*[SM, short_name="''software maintenance''"] \ action, or set of actions, carried out on software after deployment functionality performance or other attributes, or adapt it with the aim of enhancing or correcting its behaviour.\ Definition*[SOSIL, short_name="''software safety integrity level''"] \classification number which determines the techniques and measures that have to be applied to software. NOTE: Safety-related software has been classified into five safety integrity levels, where 0 is the lowest and 4 the highest.\ Definition*[supplier] \entity that designs and builds a railway control and protection system including the software or parts thereof\ Definition*[SYSIL, short_name="''system safety integrity level''"] \classification number which indicates the required degree of confidence that an integrated system comprising hardware and software will meet its specified safety requirements\ Definition*[tester]\an entity that carries out testing\ Definition*[testing] \process of executing software under controlled conditions as to ascertain its behaviour and performance compared to the corresponding requirements specification\ Definition*[TCT1, short_name="''tool class T1''"] \generates no outputs which can directly or indirectly contribute to the executable code (including data) of the software NOTE: T1 examples include: a text editor or a requirement or design support tool with no automatic code generation capabilities; configuration control tools.\ Definition*[TCT2,short_name="''tool class T2''"] \supports the test or verification of the design or executable code, where errors in the tool can fail to reveal defects but cannot directly create errors in the executable software NOTE: T2 examples include: a test harness generator; a test coverage measurement tool; a static analysis tool.\ Definition*[TCT3, short_name="''tool class T3''"] \generates outputs which can directly or indirectly contribute to the executable code (including data) of the safety related system NOTE: T3 examples include: a source code compiler, a data/algorithms compiler, a tool to change set-points during system operation; an optimising compiler where the relationship between the source code program and the generated object code is not obvious; a compiler that incorporates an executable run-time package into the executable code. \ Definition*[traceability, short_name="''traceability''"] \degree to which relationship can be established between two or more products of a development process, especially those having a predecessor/successor or master/subordinate relationship to one another.\ Definition*[validation, short_name="''validation''"] \process of analysis followed by a judgment based on evidence to documentation, software or application) fits the user needs,in particular with respect to safety and quality and determine whether an item (e.g. process, with emphasis on the suitability of its operation in accordance to its purpose in its intended environment.\ Definition*[validator, short_name="''validator''"] \entity that is responsible for the validation.\ Definition*[verification, short_name="''verification''"] \process of examination followed by a judgment based on evidence that output items (process, documentation, software or application) of a specific development phase fulfils the requirements of that phase with respect to completeness, correctness and consistency. NOTE: Verification is mostly based on document reviews (design, implementation, test documents etc.). \ Definition*[verifier, short_name="''verifier''"] \entity that is responsible for one or more verification activities.\ chapter\Software Management and Organisation\ text\Representing chapter 5 in @{cite "bsi:50128:2014"}.\ section\Organization, Roles and Responsabilities\ text\See also section \<^emph>\Software management and organization\ and Annex B and C.\ text\REQ role in Table C.1 is assumed to be a typo and should be RQM.\ datatype role = RQM \ \Requirements Manager\ | DES \ \Designer\ | IMP \ \Implementer\ | TST \ \Tester\ | VER \ \Verifier\ | INT \ \Integrator\ | VAL \ \Validator\ | ASR \ \Assessor\ | PM \ \Program Manager\ | CM \ \Configuration Manager\ | No_Role_Defined \ \See Annex C footnote a\ datatype phase = SYSDEV_ext \ \ System Development Phase (external)\ | SPl \ \Software Planning\ | SR \ \Software Requirements\ | SADES \ \Software Architecture and Design\ | SCDES \ \Software Component Design\ | CInT \ \Component Implementation and Testing\ | SI \ \Software Integration\ | SV \ \Overall Software Testing/Final Validation\ | SCADA \ \Systems Configured by Application Data/Algorithms\ | SD \ \Software Deployment\ | SM \ \Software Maintenance\ | SA \ \Software Assessment\ abbreviation software_planning :: "phase" where "software_planning \ SPl" abbreviation software_requirements :: "phase" where "software_requirements \ SR" abbreviation software_architecture_and_design :: "phase" where "software_architecture_and_design \ SADES" abbreviation software_component_design :: "phase" where "software_component_design \ SCDES" abbreviation component_implementation_and_testing :: "phase" where "component_implementation_and_testing \ CInT" abbreviation software_integration :: "phase" where "software_integration \ SI" abbreviation software_validation :: "phase" where "software_validation \ SV" abbreviation systems_configured_application_data_algorithm :: "phase" where "systems_configured_application_data_algorithm \ SCADA" abbreviation software_deployment :: "phase" where "software_deployment \ SD" abbreviation software_maintenance :: "phase" where "software_maintenance \ SM" abbreviation software_assessment :: "phase" where "software_assessment \ SM" term "SR" (* meta-test *) section\Objectives, Conformance and Software Integrity Levels\ datatype sil = SIL0 | SIL1 | SIL2 | SIL3 | SIL4 type_synonym safety_integration_level = sil text\Requirement levels specified Annex A: we use the term \<^emph>\normative level\ to distinguish them from the requirements specified in the standard.\ datatype normative_level = M \ \(Mandatory)\ | HR \ \Highly Recommended\ | R \ \Recommended\ | Any \ \No recommendation\ | NR \ \Not Recommended\ doc_class objective = long_name :: "string option" is_concerned :: "role set" doc_class requirement = text_element + long_name :: "string option" is_concerned :: "role set" text\The following class permits to represent common situations where a set of requirements decomposes a main requirement. The GSN notation favors this particular decomposition style.\ doc_class sub_requirement = decomposes :: requirement relates_to :: "requirement set" doc_class safety_requirement = requirement + formal_definition :: "thm list" text\ The category \<^emph>\hypothesis\ is used for assumptions from the foundational mathematical or physical domain, so for example: \<^item> the Mordell-Lang conjecture holds, \<^item> euklidian geometry is assumed, or \<^item> Newtonian (non-relativistic) physics is assumed, Their acceptance is inherently outside the scope of the model and can only established inside certification process by authority argument. \ datatype hyp_type = physical | mathematical | computational | other typ "CENELEC_50128.requirement" doc_class hypothesis = requirement + hyp_type :: hyp_type <= physical (* default *) text\ The following sub-class of security related hypothesis might comprise, for example: \<^item> \<^term>\P \ NP\, \<^item> or the computational hardness of certain functions relevant for cryptography (like prime-factorization). (* speculation bu, not 50128 *)\ doc_class security_hyp = hypothesis + hyp_type :: hyp_type <= physical (* default *) doc_class FnI = requirement + is_concerned :: "role set" <= "UNIV" type_synonym functions_and_interfaces = FnI text\The category \<^emph>\assumption\ is used for domain-specific assumptions. It has formal, semi-formal and informal sub-categories. They have to be tracked and discharged by appropriate validation procedures within a certification process, by it by test or proof. \ datatype ass_kind = informal | semiformal | formal doc_class assumption = requirement + assumption_kind :: ass_kind <= informal doc_class AC = assumption + is_concerned :: "role set" <= "UNIV" type_synonym application_conditions = AC text\ The category \<^emph>\exported constraint\ (or \<^emph>\EC\ for short) is used for formal application conditions; They represent in particular \<^emph>\derived constraints\, i.e. constraints that arrive as side-conditions during refinement proofs or implementation decisions and must be tracked.\ doc_class EC = AC + assumption_kind :: ass_kind <= (*default *) formal type_synonym exported_constraint = EC text\ The category \<^emph>\safety related application condition\ (or \<^emph>\SRAC\ for short) is used for exported constraints assuring in judgements safety requirements of the system. \ doc_class SRAC = EC + assumption_kind :: ass_kind <= (*default *) formal formal_repr :: "thm list" type_synonym safety_related_application_condition = SRAC doc_class CoAS = requirement + is_concerned :: "role set" <= "UNIV" type_synonym configuration_or_architecture_of_system = CoAS doc_class HtbC = requirement + is_concerned :: "role set" <= "UNIV" type_synonym hazard_to_be_controlled = HtbC doc_class SIR = requirement + is_concerned :: "role set" <= "UNIV" type_synonym safety_integrity_requirement = SIR text\The following class is a bit unclear about usage and seems to be in sfcual mismatch with @{typ objective}: \ doc_class SILA = requirement + is_concerned :: "role set" <= "UNIV" alloc :: "sil" <= "SIL0" type_synonym allocation_of_SIL = SILA doc_class TC = requirement + is_concerned :: "role set" <= "UNIV" type_synonym timing_constraint = TC section\Personal Competence\ text\pp. 20 MORE TO COME\ section\Lifecycle Issues and Documentation\ text\Figure 3 in Chapter 5: Illustrative Development Lifecycle 1\ text\Global Overview\ figure*[fig3::figure, relative_width="100", src="''examples/CENELEC_50128/mini_odo/document/figures/CENELEC-Fig.3-docStructure.png''"] \Illustrative Development Lifecycle 1\ text\Actually, the Figure 4 in Chapter 5: Illustrative Development Lifecycle 2 is more fidele to the remaining document: Software Architecture and Design phases are merged, like in 7.3.\ section\Software Assurance related Entities and Concepts\ text\subcategories are :\ text\Table A.13: \ datatype dyn_ana_kind = boundary_analysis (* -- Test Case Execution from Boundary Analysis *) | error_guessing (* -- Test Case Execution from Error Guessing *) | error_seeding (* -- Test Case Execution from Error Seeding *) | performance_modeling (* -- Performance Modeling *) | equivalence_class_test(* -- Equivalence Classes and Input Partition Testing*) | structure_based_test (* -- Structure-Based Testing *) text\Table A.14: \ datatype fun_test_kind = cause_consequence_diagram (* -- Test Case Execution from Cause Consequence Diagrams *) | prototyping (* -- Prototyping / Animation *) | bounadry_value_analysis (* -- Boundary Value Analysis *) | equivalence_class_test (* -- Equivalence Classes and Input Partition Testing*) | process_simulation (* -- Process Simulation *) text\Table A.5: Verification and Testing\ datatype test_coverage_criterion = allpathk nat nat (* depth, test_coverage_degree *) | mcdc nat (* depth, test_coverage_degree *) | exhaustive | dnf_E_d string nat (* equivalence class testing *) | other string datatype vnt_technique = formal_proof "thm list" | stat_analysis | dyn_analysis dyn_ana_kind | metrics | traceability | sw_error_effect_analysis | test_coverage_for_code test_coverage_criterion | functional_testing fun_test_kind test_coverage_criterion | perf_testing test_coverage_criterion | interface_testing test_coverage_criterion | model_based_testing test_coverage_criterion (* 'modeling' unclear *) type_synonym verification_and_testing_technique = vnt_technique (* modelling example of a table ... *) fun table_A_5 :: "vnt_technique \ sil \ normative_level option" where "table_A_5 (formal_proof _) = Map.empty( SIL1 \ R, SIL2 \ R, SIL3 \ HR,SIL4 \ HR)" |"table_A_5 stat_analysis = Map.empty( SIL1 \ HR,SIL2 \ HR,SIL3 \ HR,SIL4 \ HR)" |"table_A_5 (dyn_analysis _) = Map.empty( SIL1 \ HR,SIL2 \ HR,SIL3 \ HR,SIL4 \ HR)" |"table_A_5 traceability = Map.empty(SIL0 \ R,SIL1 \ HR,SIL2 \ HR,SIL3 \ M ,SIL4 \ M )" text\The objective of software verification is to examine and arrive at a \<^emph>\judgement\ based on \<^emph>\evidence\ that output items (process, documentation, software or application) of a specific development phase fulfil the requirements and plans with respect to completeness, correctness and consistency. \ datatype status = complete | in_complete | reject | unclear | unknown doc_class judgement = refers_to :: requirement evidence :: "vnt_technique list" status :: status is_concerned :: "role set" <= "{VER,ASR,VAL}" section\ A Classification of CENELEC Reports and Documents \ (* should we rename this as "report" ??? bu *) doc_class cenelec_report = text_element + phase :: "phase" sil :: "sil" level :: "int option" <= "Some(0)" nlvl :: "normative_level" \ \Annex A Table A.1\ written_by :: "role option" \ \Annex C Table C.1 \ fst_check :: "role option" \ \Annex C Table C.1\ snd_check :: "role option" \ \Annex C Table C.1\ is_concerned :: "role set" <= "UNIV" accepts "\objective\\<^sup>+||\requirement\\<^sup>+" invariant must_be_chapter :: "text_element.level \ = Some(0)" invariant three_eyes_prcpl:: " written_by \ \ fst_check \ \ written_by \ \ snd_check \" text\see \<^figure>\fig3\ and Fig 4 in Chapter 5: Illustrative Development Lifecycle 2\ doc_class external_specification = phase :: "phase" <= "SYSDEV_ext" doc_class SYSREQS = external_specification + phase :: "phase" <= "SYSDEV_ext" type_synonym system_requirements_specification = SYSREQS doc_class SYSSREQS = external_specification + phase :: "phase" <= "SYSDEV_ext" type_synonym system_safety_requirements_specification = SYSSREQS doc_class SYSAD = external_specification + phase :: "phase" <= "SYSDEV_ext" type_synonym system_architecture_description = SYSAD doc_class SYSS_pl = external_specification + phase :: "phase" <= "SYSDEV_ext" type_synonym system_safety_plan = SYSS_pl (* SYS_VnV_pl exists in Figure 3 but not in Figure 4: surely a typo in Figure 4 *) doc_class SYS_VnV_pl = external_specification + phase :: "phase" <= "SYSDEV_ext" type_synonym system_VnV_plan = SYS_VnV_pl doc_class SQAP = cenelec_report + phase :: "phase" <= "SPl" nlvl :: "normative_level" <= "HR" invariant force_nlvl_sqap :: "nlvl \ = HR" type_synonym software_quality_assurance_plan = SQAP doc_class SQAVR = cenelec_report + phase :: "phase" <= "SPl" nlvl :: "normative_level" <= "HR" invariant force_nlvl_sqavr :: "nlvl \ = HR" type_synonym software_quality_assurance_verfication_report = SQAVR doc_class SCMP = cenelec_report + phase :: "phase" <= "SPl" nlvl :: "normative_level" <= "HR" invariant force_nlvl_scmp :: "nlvl \ = HR" type_synonym software_configuration_management_plan = SCMP doc_class SVP = cenelec_report + phase :: "phase" <= "SPl" nlvl :: "normative_level" <= "HR" invariant force_nlvl_svp :: "nlvl \ = HR" type_synonym software_verification_plan = SVP doc_class SVAP = cenelec_report + phase :: "phase" <= "SPl" nlvl :: "normative_level" <= "HR" invariant force_nlvl_svap :: "nlvl \ = HR" type_synonym software_validation_plan = SVAP doc_class SWRS = cenelec_report + phase :: "phase" <= "SR" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swrs :: "nlvl \ = HR" type_synonym software_requirements_specification = SWRS doc_class OSWTS = cenelec_report + phase :: "phase" <= "SR" nlvl :: "normative_level" <= "HR" invariant force_nlvl_oswts :: "nlvl \ = HR" type_synonym overall_software_test_specification = OSWTS doc_class SWRVR = cenelec_report + phase :: "phase" <= "SR" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swrvr :: "nlvl \ = HR" type_synonym software_requirements_verification_report = SWRVR doc_class SWAS = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swas :: "nlvl \ = HR" type_synonym software_architecture_specification = SWAS doc_class SWDS = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swds :: "nlvl \ = HR" type_synonym software_design_specification = SWDS doc_class SWIS_E = \ \input - output of an operation; alternatives could be channels or public global variables ...\ op_name :: "string" op_args_ty :: "(string \ typ) list \ typ" raises_exn :: "(string \ typ) list" \ \exn name and value\ pre_cond :: "(string \ thm) list" <= "[]" \ \labels and predicates\ post_cond :: "(string \ thm) list" <= "[]" \ \labels and predicates\ boundary_pre_cond :: "thm list" <= "[]" type_synonym software_interface_specification_element = SWIS_E doc_class SWIS = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" written_by :: "role option" <= "Some DES" fst_check :: "role option" <= "Some VER" snd_check :: "role option" <= "Some VAL" components :: "SWIS_E list" invariant force_nlvl_swis :: "nlvl \ = HR" type_synonym software_interface_specifications = SWIS doc_class SWITS = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swits :: "nlvl \ = HR" type_synonym software_integration_test_specification = SWITS doc_class SWHITS = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swhits :: "nlvl \ = HR" type_synonym software_hardware_integration_test_specification = SWHITS doc_class SWADVR = cenelec_report + phase :: "phase" <= "SADES" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swadvr :: "nlvl \ = HR" type_synonym software_architecture_and_design_verification = SWADVR doc_class SWCDS = cenelec_report + phase :: "phase" <= "SCDES" invariant force_nlvl_swcds :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_component_design_specification = SWCDS doc_class SWCTS = cenelec_report + phase :: "phase" <= "SCDES" invariant force_nlvl_swcts :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_component_test_specification = SWCTS doc_class SWCDVR = cenelec_report + phase :: "phase" <= "SCDES" invariant force_nlvl_swcdvr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_component_design_verification = SWCDVR doc_class SWSCD = cenelec_report + phase :: "phase" <= "CInT" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swscd :: "nlvl \ = HR" type_synonym software_source_code_and_documentation = SWSCD doc_class SWCTR = cenelec_report + phase :: "phase" <= "CInT" invariant force_nlvl_swctr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_component_test_report = SWCTR doc_class SWSCVR = cenelec_report + phase :: "phase" <= "CInT" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swscvr :: "nlvl \ = HR" type_synonym software_source_code_verification_report = SWSCVR doc_class SWITR = cenelec_report + phase :: "phase" <= "SI" nlvl :: "normative_level" <= "HR" invariant force_nlvl_switr :: "nlvl \ = HR" type_synonym software_integration_test_report = SWITR doc_class SWHAITR = cenelec_report + phase :: "phase" <= "SI" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swhaitr :: "nlvl \ = HR" type_synonym software_hardware_integration_test_report = SWHAITR doc_class SWIVR = cenelec_report + phase :: "phase" <= "SI" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swivr :: "nlvl \ = HR" type_synonym software_integration_verification_report = SWIVR doc_class OSWTR = cenelec_report + phase :: "phase" <= "SV" nlvl :: "normative_level" <= "HR" invariant force_nlvl_oswtr :: "nlvl \ = HR" type_synonym overall_software_test_report = OSWTR doc_class SWVALR = cenelec_report + phase :: "phase" <= "SV" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swvalr :: "nlvl \ = HR" type_synonym software_validation_report = SWVALR doc_class TVALR = cenelec_report + phase :: "phase" <= "SV" invariant force_nlvl_tvalr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym tools_validation_report = TVALR doc_class SWVRN = cenelec_report + phase :: "phase" <= "SV" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swvrn :: "nlvl \ = HR" type_synonym software_validation_release_note = SWVRN doc_class ARS = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_ars :: "nlvl \ = HR" type_synonym application_requirements_specification = ARS doc_class APP = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_APP :: "nlvl \ = HR" type_synonym application_preparation_plan = APP doc_class ATS = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_ats :: "nlvl \ = HR" type_synonym application_test_specification = ATS doc_class AAD = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_aad :: "nlvl \ = HR" type_synonym application_architecture_design = AAD doc_class APVR = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_apvr :: "nlvl \ = HR" type_synonym application_preparation_verification_report = APVR doc_class ATR = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_atr :: "nlvl \ = HR" type_synonym application_test_report= ATR doc_class SOCOADA = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_socoada :: "nlvl \ = HR" type_synonym source_code_application_data_algorithms = SOCOADA doc_class ADAVR = cenelec_report + phase :: "phase" <= "SCADA" nlvl :: "normative_level" <= "HR" invariant force_nlvl_adavr :: "nlvl \ = HR" type_synonym application_data_algorithms_verification_report= ADAVR doc_class SWRDP = cenelec_report + phase :: "phase" <= "SD" invariant force_nlvl_swrdp :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_release_deployment_plan = SWRDP doc_class SWDM = cenelec_report + phase :: "phase" <= "SD" invariant force_nlvl_swdm :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_deployment_manual = SWDM doc_class SWDRN = cenelec_report + phase :: "phase" <= "SD" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swdrn :: "nlvl \ = HR" type_synonym software_deployment_release_notes = SWDRN doc_class SWDR = cenelec_report + phase :: "phase" <= "SD" invariant force_nlvl_swdr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_deployment_records = SWDR doc_class SWDVR = cenelec_report + phase :: "phase" <= "SD" invariant force_nlvl_swdvr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_deployment_verification_report = SWDVR doc_class SWMP = cenelec_report + phase :: "phase" <= "SM" invariant force_nlvl_swmp :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_maintenance_plan = SWMP doc_class SWCR = cenelec_report + phase :: "phase" <= "SM" nlvl :: "normative_level" <= "HR" invariant force_nlvl_swcr :: "nlvl \ = HR" type_synonym software_change_records = SWCR doc_class SWMR = cenelec_report + phase :: "phase" <= "SM" invariant force_nlvl_swmr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_maintenance_records = SWMR doc_class SWMVR = cenelec_report + phase :: "phase" <= "SM" invariant force_nlvl_swmvr :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_maintenance_verification_report = SWMVR doc_class SWAP = cenelec_report + phase :: "phase" <= "SA" invariant force_nlvl_swap :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_assessment_plan = SWAP doc_class SWAR = cenelec_report + phase :: "phase" <= "SA" invariant force_nlvl_swar :: "if sil \ = SIL0 then nlvl \ = R else nlvl \ = HR" type_synonym software_assessment_report = SWAR text\Table A.1: Lifecycle Issues and Documentation (5.3). The requirement levels of table A.1 is expressed with monitor classes: first the SIL of each class is enforced to be the same as the monitor class SIL, then, when closing the monitor, the normative level (requirement level in CENELEC lingua) of each CENELEC document instance is checked and warning/errors are triggered if they do not respect the monitor class SIL\ doc_class monitor_SIL = sil :: sil doc_class monitor_SIL0 = monitor_SIL + sil :: sil <= SIL0 accepts "\SQAP\ ~~ \SQAVR\ ~~ \SCMP\ ~~ \SVP\ ~~ \SVAP\ ~~ \SWRS\ ~~ \OSWTS\ ~~ \SWRVR\ ~~ \SWAS\ ~~ \SWDS\ ~~ \SWIS\ ~~ \SWITS\ ~~ \SWHITS\ ~~ \SWADVR\ ~~ \SWCDS\ ~~ \SWCTS\ ~~ \SWCDVR\ ~~ \SWSCD\ ~~ \SWCTR\ ~~ \SWSCVR\ ~~ \SWITR\ ~~ \SWHAITR\ ~~ \SWIVR\ ~~ \OSWTR\ ~~ \SWVALR\ ~~ \TVALR\ ~~ \SWVRN\ ~~ \ARS\ ~~ \APP\ ~~ \ATS\ ~~ \AAD\ ~~ \APVR\ ~~ \ATR\ ~~ \SOCOADA\ ~~ \ADAVR\ ~~ \SWRDP\ ~~ \SWDM\ ~~ \SWDRN\ ~~ \SWDR\ ~~ \SWDVR\ ~~ \SWMP\ ~~ \SWCR\ ~~ \SWMR\ ~~ \SWMVR\ ~~ \SWAP\ ~~ \SWAR\" invariant force_sil0 :: "sil \ = SIL0" doc_class monitor_SIL1 = monitor_SIL + sil :: sil <= SIL1 accepts "\SQAP\ ~~ \SQAVR\ ~~ \SCMP\ ~~ \SVP\ ~~ \SVAP\ ~~ \SWRS\ ~~ \OSWTS\ ~~ \SWRVR\ ~~ \SWAS\ ~~ \SWDS\ ~~ \SWIS\ ~~ \SWITS\ ~~ \SWHITS\ ~~ \SWADVR\ ~~ \SWCDS\ ~~ \SWCTS\ ~~ \SWCDVR\ ~~ \SWSCD\ ~~ \SWCTR\ ~~ \SWSCVR\ ~~ \SWITR\ ~~ \SWHAITR\ ~~ \SWIVR\ ~~ \OSWTR\ ~~ \SWVALR\ ~~ \TVALR\ ~~ \SWVRN\ ~~ \ARS\ ~~ \APP\ ~~ \ATS\ ~~ \AAD\ ~~ \APVR\ ~~ \ATR\ ~~ \SOCOADA\ ~~ \ADAVR\ ~~ \SWRDP\ ~~ \SWDM\ ~~ \SWDRN\ ~~ \SWDR\ ~~ \SWDVR\ ~~ \SWMP\ ~~ \SWCR\ ~~ \SWMR\ ~~ \SWMVR\ ~~ \SWAP\ ~~ \SWAR\" invariant force_sil1 :: "sil \ = SIL1" doc_class monitor_SIL2 = monitor_SIL + sil :: sil <= SIL2 accepts "\SQAP\ ~~ \SQAVR\ ~~ \SCMP\ ~~ \SVP\ ~~ \SVAP\ ~~ \SWRS\ ~~ \OSWTS\ ~~ \SWRVR\ ~~ \SWAS\ ~~ \SWDS\ ~~ \SWIS\ ~~ \SWITS\ ~~ \SWHITS\ ~~ \SWADVR\ ~~ \SWCDS\ ~~ \SWCTS\ ~~ \SWCDVR\ ~~ \SWSCD\ ~~ \SWCTR\ ~~ \SWSCVR\ ~~ \SWITR\ ~~ \SWHAITR\ ~~ \SWIVR\ ~~ \OSWTR\ ~~ \SWVALR\ ~~ \TVALR\ ~~ \SWVRN\ ~~ \ARS\ ~~ \APP\ ~~ \ATS\ ~~ \AAD\ ~~ \APVR\ ~~ \ATR\ ~~ \SOCOADA\ ~~ \ADAVR\ ~~ \SWRDP\ ~~ \SWDM\ ~~ \SWDRN\ ~~ \SWDR\ ~~ \SWDVR\ ~~ \SWMP\ ~~ \SWCR\ ~~ \SWMR\ ~~ \SWMVR\ ~~ \SWAP\ ~~ \SWAR\" invariant force_sil2 :: "sil \ = SIL2" doc_class monitor_SIL3 = monitor_SIL + sil :: sil <= SIL3 accepts "\SQAP\ ~~ \SQAVR\ ~~ \SCMP\ ~~ \SVP\ ~~ \SVAP\ ~~ \SWRS\ ~~ \OSWTS\ ~~ \SWRVR\ ~~ \SWAS\ ~~ \SWDS\ ~~ \SWIS\ ~~ \SWITS\ ~~ \SWHITS\ ~~ \SWADVR\ ~~ \SWCDS\ ~~ \SWCTS\ ~~ \SWCDVR\ ~~ \SWSCD\ ~~ \SWCTR\ ~~ \SWSCVR\ ~~ \SWITR\ ~~ \SWHAITR\ ~~ \SWIVR\ ~~ \OSWTR\ ~~ \SWVALR\ ~~ \TVALR\ ~~ \SWVRN\ ~~ \ARS\ ~~ \APP\ ~~ \ATS\ ~~ \AAD\ ~~ \APVR\ ~~ \ATR\ ~~ \SOCOADA\ ~~ \ADAVR\ ~~ \SWRDP\ ~~ \SWDM\ ~~ \SWDRN\ ~~ \SWDR\ ~~ \SWDVR\ ~~ \SWMP\ ~~ \SWCR\ ~~ \SWMR\ ~~ \SWMVR\ ~~ \SWAP\ ~~ \SWAR\" invariant force_sil3 :: "sil \ = SIL3" doc_class monitor_SIL4 = monitor_SIL + sil :: sil <= SIL4 accepts "\SQAP\ ~~ \SQAVR\ ~~ \SCMP\ ~~ \SVP\ ~~ \SVAP\ ~~ \SWRS\ ~~ \OSWTS\ ~~ \SWRVR\ ~~ \SWAS\ ~~ \SWDS\ ~~ \SWIS\ ~~ \SWITS\ ~~ \SWHITS\ ~~ \SWADVR\ ~~ \SWCDS\ ~~ \SWCTS\ ~~ \SWCDVR\ ~~ \SWSCD\ ~~ \SWCTR\ ~~ \SWSCVR\ ~~ \SWITR\ ~~ \SWHAITR\ ~~ \SWIVR\ ~~ \OSWTR\ ~~ \SWVALR\ ~~ \TVALR\ ~~ \SWVRN\ ~~ \ARS\ ~~ \APP\ ~~ \ATS\ ~~ \AAD\ ~~ \APVR\ ~~ \ATR\ ~~ \SOCOADA\ ~~ \ADAVR\ ~~ \SWRDP\ ~~ \SWDM\ ~~ \SWDRN\ ~~ \SWDR\ ~~ \SWDVR\ ~~ \SWMP\ ~~ \SWCR\ ~~ \SWMR\ ~~ \SWMVR\ ~~ \SWAP\ ~~ \SWAR\" invariant force_sil4 :: "sil \ = SIL4" ML\ fun check_sil oid _ ctxt = let val ctxt' = Proof_Context.init_global(Context.theory_of ctxt) val DOF_core.Instance {value = monitor_record_value, ...} = DOF_core.get_instance_global oid (Context.theory_of ctxt) val Const _ $ _ $ monitor_sil $ _ = monitor_record_value val traces = AttributeAccess.compute_trace_ML ctxt oid NONE \<^here> fun check_sil'' [] = true | check_sil'' (x::xs) = let val (_, doc_oid) = x val DOF_core.Instance {value = doc_record_value, ...} = DOF_core.get_instance_global doc_oid (Context.theory_of ctxt) val Const _ $ _ $ _ $ _ $ _ $ cenelec_document_ext = doc_record_value val Const _ $ _ $ _ $ doc_sil $ _ $ _ $ _ $ _ $ _ $ _ = cenelec_document_ext in if doc_sil <> monitor_sil then error(doc_oid ^ " cenelec document SIL must be: " ^ Syntax.string_of_term ctxt' monitor_sil) else check_sil'' xs end in check_sil'' traces end \ setup\ (fn thy => let val ctxt = Proof_Context.init_global thy val binding = DOF_core.binding_from_onto_class_pos "monitor_SIL0" thy in DOF_core.add_ml_invariant binding check_sil thy end) \ text\ A more generic example of check_sil which can be generalized: it is decoupled from the CENELEC current implementation but is much less efficient regarding time computation by relying on Isabelle evaluation mechanism.\ ML\ fun check_sil_slow oid _ ctxt = let val ctxt' = Proof_Context.init_global(Context.theory_of ctxt) val DOF_core.Instance {value = monitor_record_value, ...} = DOF_core.get_instance_global oid (Context.theory_of ctxt) val DOF_core.Instance {cid = monitor_cid, ...} = DOF_core.get_instance_global oid (Context.theory_of ctxt) val monitor_sil_typ = (Syntax.read_typ ctxt' monitor_cid) --> @{typ "sil"} val monitor_sil = Value_Command.value ctxt' (Const("CENELEC_50128.monitor_SIL.sil", monitor_sil_typ) $ monitor_record_value) val traces = AttributeAccess.compute_trace_ML ctxt oid NONE \<^here> fun check_sil' [] = true | check_sil' (x::xs) = let val (doc_cid, doc_oid) = x val DOF_core.Instance {value = doc_record_value, ...} = DOF_core.get_instance_global doc_oid (Context.theory_of ctxt) val doc_sil_typ = (Syntax.read_typ ctxt' doc_cid) --> @{typ "sil"} val doc_sil = Value_Command.value ctxt' (Const ("CENELEC_50128.cenelec_document.sil", doc_sil_typ) $ doc_record_value) in if doc_sil <> monitor_sil then error(doc_oid ^ " cenelec document SIL must be: " ^ Syntax.string_of_term ctxt' monitor_sil) else check_sil' xs end in check_sil' traces end \ (*setup\ (fn thy => let val ctxt = Proof_Context.init_global thy val binding = DOF_core.binding_from_onto_class_pos "monitor_SIL0" thy in DOF_core.add_ml_invariant binding check_sil_slow thy end) \*) (* As traces of monitor instances (docitems) are updated each time an instance is declared (with text*, section*, etc.), invariants checking functions which check the full list of traces must be declared as lazy invariants, to be checked only when closing a monitor, i.e., after all the monitor traces are populated. *) ML\ fun check_required_documents oid _ ctxt = let val ctxt' = Proof_Context.init_global(Context.theory_of ctxt) val DOF_core.Monitor_Info {accepted_cids, ...} = DOF_core.get_monitor_info_global oid (Context.theory_of ctxt) val traces = AttributeAccess.compute_trace_ML ctxt oid NONE \<^here> fun check_required_documents' [] = true | check_required_documents' (cid::cids) = if exists (fn (doc_cid, _) => equal cid doc_cid) traces then check_required_documents' cids else let val ctxt' = Proof_Context.init_global(Context.theory_of ctxt) val DOF_core.Instance {value = monitor_record_value, ...} = DOF_core.get_instance_global oid (Context.theory_of ctxt) val Const _ $ _ $ monitor_sil $ _ = monitor_record_value in error ("A " ^ cid ^ " cenelec document is required with " ^ Syntax.string_of_term ctxt' monitor_sil) end in check_required_documents' accepted_cids end \ setup\ fn thy => let val ctxt = Proof_Context.init_global thy val binding = DOF_core.binding_from_onto_class_pos "monitor_SIL0" thy in DOF_core.add_closing_ml_invariant binding check_required_documents thy end \ (* Test pattern matching for the records of the current CENELEC implementation classes, and used by checking functions. If the test failed, then it means that the CENELEC implementation has changed (the class definitions have been updated) and the checking functions must be updated. *) text*[MonitorPatternMatchingTest::monitor_SIL0]\\ text*[CenelecClassPatternMatchingTest::SQAP, sil = "SIL0"]\\ ML\ val thy = @{theory} val DOF_core.Instance {value = monitor_record_value, ...} = DOF_core.get_instance_global "MonitorPatternMatchingTest" thy val Const _ $ _ $ monitor_sil $ _ = monitor_record_value val DOF_core.Instance {value = doc_record_value, ...} = DOF_core.get_instance_global "CenelecClassPatternMatchingTest" thy val Const _ $ _ $ _ $ _ $ _ $ cenelec_document_ext = doc_record_value val Const _ $ _ $ _ $ doc_sil $ _ $ _ $ _ $ _ $ _ $ _ = cenelec_document_ext \ section\ Software Assurance \ \ \MORE TO COME\ subsection\ Software Testing \ text\Objective: The objective of software testing, as performed by the Tester and/or Integrator, is to ascertain the behaviour or performance of software against the corresponding test specification to the extent achievable by the selected test coverage. \ text\Outputs: \<^enum> @{typ overall_software_test_report} \<^enum> @{typ overall_software_test_specification} Overall Software Test Specification \<^enum> Overall Software Test Report \<^enum> Software Integration Test Specification \<^enum> Software Integration Test Report \<^enum> Software/Hardware Integration Test Specification \<^enum> Software/Hardware Integration Test Report \<^enum> Software Component Test Specification \<^enum> Software Component Test Report \ subsection\ Software Verification \ text\Objective: The objective of software verification is to examine and arrive at a judgement based on evidence that output items (process, documentation, software or application) of a specific development phase fulfil the requirements and plans with respect to completeness, correctness and consistency. These activities are managed by the @{semi_formal_content \verifier\}. \ text\Outputs: \<^enum> Software Verification Plan \<^enum> Software Verification Report(s) \<^enum> Software Quality Assurance Verification Report \ subsection\ Software Validation \ text\Objective: \<^enum>The objective of software validation is to demonstrate that the processes and their outputs are such that the software is of the defined software safety integrity level, fulfils the software requirements and is fit for its intended application. This activity is performed by the Validator. \<^enum>The main validation activities are to demonstrate by analysis and/or testing that all the software requirements are specified, implemented, tested and fulfilled as required by the applicable SIL, and to evaluate the safety criticality of all anomalies and non-conformities based on the results of reviews, analyses and tests. \ text\Output documents: \<^enum> Software Validation Plan \<^enum> Software Validation Report \<^enum> Software Validation Verification Report \ subsection\ Software Assessment \ (* other word for : formal evaluation. *) text\Objective: \<^enum>To evaluate that the lifecycle processes and their outputs are such that the software is of the defined software safety integrity levels 1-4 andis fit for its intended application. \<^enum> For SIL 0 software, requirements of this standard shall be fulfilled but where a certificate stating compliance with EN ISO 9001 is available, no assessment will be required. \ subsection\ Software Quality Assurance \ text\Objectives: To identify, monitor and control all those activities, both technical and managerial, which are necessary to ensure that the software achieves the quality required. This is necessary to provide the required qualitative defence against systematic faults and to ensure that an audit trail can be established to allow verification and validation activities to be undertaken effectively.\ (* So : pretty much META *) (* DEATH ZONE FROM HERE ... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *) section\ Design related Categories \ doc_class design_item = description :: string datatype design_kind = unit | module | protocol doc_class interface = design_item + kind :: design_kind section\ Requirements-Analysis related Categories \ doc_class test_item = nn :: "string option" doc_class test_specification = test_item + short_goal :: string doc_class test_case = test_item + descr :: string doc_class test_result = test_item + verdict :: bool remarks :: string covvrit :: test_coverage_criterion datatype test_environment_kind = hardware_in_the_loop ("hil") | simulated_hardware_in_the_loop ("shil") doc_class test_environment = test_item + descr :: string kind :: test_environment_kind <= shil doc_class test_tool = test_item + descr :: string doc_class test_requirement = test_item + descr :: string doc_class test_adm_role = test_item + name :: string doc_class test_documentation = (* OUTDATED ? *) no :: "nat" accepts "test_specification ~~ \test_case~~test_result\\<^sup>+ ~~ \test_environment||test_tool\\<^sup>+ ~~ \test_requirement\ ~~ test_adm_role" section\Global Documentation Structure\ doc_class global_documentation_structure = text_element + level :: "int option" <= "Some(-1::int)" \ \document must be a chapter\ accepts "SYSREQS ~~ \ \system_requirements_specification\ SYSSREQS ~~ \ \system_safety_requirements_specification\ SYSAD ~~ \ \system_architecture description\ SYSS_pl ~~ \ \system safety plan\ (SWRS || OSWTS) " \ \software requirements specification OR overall software test specification\ (* MORE TO COME : *) section\ META : Testing and Validation \ text\Test : @{semi_formal_content \COTS\}\ ML \ DOF_core.get_onto_class_name_global "requirement" @{theory}; DOF_core.get_onto_class_name_global "SRAC" @{theory}; DOF_core.get_onto_class_global "SRAC" @{theory}; DOF_core.get_onto_class_global "EC" @{theory}; \ ML \ DOF_core.is_subclass @{context} "CENELEC_50128.EC" "CENELEC_50128.EC"; DOF_core.is_subclass @{context} "CENELEC_50128.SRAC" "CENELEC_50128.EC"; DOF_core.is_subclass @{context} "CENELEC_50128.EC" "CENELEC_50128.SRAC"; DOF_core.is_subclass @{context} "CENELEC_50128.EC" "CENELEC_50128.test_requirement"; \ ML \ val ref_tab = DOF_core.get_instances \<^context> val docclass_tab = DOF_core.get_onto_classes @{context}; Name_Space.dest_table ref_tab; Name_Space.dest_table docclass_tab; \ ML \ val internal_data_of_SRAC_definition = DOF_core.get_attributes_local "SRAC" @{context} \ ML \ DOF_core.get_onto_class_name_global "requirement" @{theory}; Syntax.parse_typ @{context} "requirement"; val Type(t,_) = Syntax.parse_typ @{context} "requirement" handle ERROR _ => dummyT; Syntax.read_typ @{context} "hypothesis" handle _ => dummyT; Proof_Context.init_global; \ end