sbdl 1.18.5__tar.gz → 1.18.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sbdl-1.18.5 → sbdl-1.18.6}/PKG-INFO +1 -1
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.egg-info/PKG-INFO +1 -1
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.py +5 -3
- {sbdl-1.18.5 → sbdl-1.18.6}/setup.py +1 -1
- {sbdl-1.18.5 → sbdl-1.18.6}/csv-to-sbdl.py +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.egg-info/SOURCES.txt +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.egg-info/dependency_links.txt +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.egg-info/requires.txt +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl.egg-info/top_level.txt +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/sbdl_server.py +0 -0
- {sbdl-1.18.5 → sbdl-1.18.6}/setup.cfg +0 -0
|
@@ -215,8 +215,8 @@ _B=None
|
|
|
215
215
|
_A=True
|
|
216
216
|
import argparse,base64,datetime,csv,functools,getpass,hashlib,importlib,io,json,os,pathlib,platform,re,shlex,string,subprocess,sys,tarfile,tempfile,textwrap,time,traceback,types,unittest,urllib.request,urllib.parse,warnings,zlib,zipfile
|
|
217
217
|
__NAME=_j
|
|
218
|
-
__VERSION='1.18.
|
|
219
|
-
__VERSION_DEV='
|
|
218
|
+
__VERSION='1.18.6'
|
|
219
|
+
__VERSION_DEV='9c744d0'
|
|
220
220
|
__VERSION_DSL='25.6'
|
|
221
221
|
__VERSION_REST_API='1.1.0'
|
|
222
222
|
__AUTHOR='contact@sbdl.dev'
|
|
@@ -933,7 +933,7 @@ class SBDL_Parser:
|
|
|
933
933
|
@classmethod
|
|
934
934
|
def mk_type_info_struct(self,cat,desc):return{'category':cat,_P:desc}
|
|
935
935
|
class SBDL_Semantics:
|
|
936
|
-
type_links={SBDL_Parser.Types.mode:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.effect:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.test:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A},SBDL_Parser.Types.cause:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.mode:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.test:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A,SBDL_Parser.Types.event:_A},SBDL_Parser.Types.effect:{SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.aspect:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.using:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.scope:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.customtype:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Types.trace:{SBDL_Parser.Types.cause:_A,SBDL_Parser.Types.mode:_A,SBDL_Parser.Types.effect:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.transition:_A,SBDL_Parser.Types.event:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.test:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.definition:_A,SBDL_Parser.Types.realisation:_A,SBDL_Parser.Types.current_detection:_A},SBDL_Parser.Types.definition:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.usecase:_A,SBDL_Parser.Types.interface:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A},SBDL_Parser.Types.realisation:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.definition:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.function:{SBDL_Parser.Types.event:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.usecase:_A,SBDL_Parser.Types.interface:_A,SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.transition:{SBDL_Parser.Types.state:_A,SBDL_Parser.Types.event:_A},SBDL_Parser.Types.usecase:{SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.interface:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.requirement:{SBDL_Parser.Types.current_control:_A}};global_properties={SBDL_Parser.Attributes.description:_A,SBDL_Parser.Attributes.remark:_A,SBDL_Parser.Attributes.reference:_C,SBDL_Parser.Attributes.tag:_A,SBDL_Parser.Attributes.pragma:_C};type_properties={SBDL_Parser.Types.aspect:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related,SBDL_Parser.Attributes.color},SBDL_Parser.Types.requirement:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related,SBDL_Parser.Attributes.color},SBDL_Parser.Types.mode:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.detectability,SBDL_Parser.Attributes.detectability_post},SBDL_Parser.Types.effect:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.severity},SBDL_Parser.Types.cause:{SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.occurrence,SBDL_Parser.Attributes.occurrence_post},SBDL_Parser.Types.function:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.precondition,SBDL_Parser.Attributes.postcondition,SBDL_Parser.Attributes.invariant,SBDL_Parser.Attributes.input,SBDL_Parser.Attributes.output,SBDL_Parser.Attributes.color},SBDL_Parser.Types.state:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.color},SBDL_Parser.Types.usecase:{SBDL_Parser.Attributes.actor},SBDL_Parser.Types.event:{SBDL_Parser.Attributes.precondition,SBDL_Parser.Attributes.postcondition,SBDL_Parser.Attributes.invariant,SBDL_Parser.Attributes.output,SBDL_Parser.Attributes.condition,SBDL_Parser.Attributes.condition_alternative,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.control_only,SBDL_Parser.Attributes.return_control,SBDL_Parser.Attributes.color},SBDL_Parser.Types.interface:{SBDL_Parser.Attributes.parent}};type_information={SBDL_Parser.Types.aspect:SBDL_Parser.mk_type_info_struct(_n,'Unit of system decomposition. May associate with a variety of perspectives: logical, functional ...'),SBDL_Parser.Types.requirement:SBDL_Parser.mk_type_info_struct(_n,'Requirement (or acceptance criteria) definition. Describes an expected behaviour at the associated level of abstraction.'),SBDL_Parser.Types.mode:SBDL_Parser.mk_type_info_struct(_Q,'Failure Mode. Describes the way in which a failure may occur, from the perspective of a requirement.'),SBDL_Parser.Types.effect:SBDL_Parser.mk_type_info_struct(_Q,'Failure Effect defintion. Describes the consequence of a failure mode.'),SBDL_Parser.Types.cause:SBDL_Parser.mk_type_info_struct(_Q,'Failure Cause. An underlying technical mechanism, scenario or sequence of events that may result in a failure mode.'),SBDL_Parser.Types.current_control:SBDL_Parser.mk_type_info_struct(_Q,'Existing controls which are present to prevent a failure cause either from occurring or leading to its associated failure mode.'),SBDL_Parser.Types.current_detection:SBDL_Parser.mk_type_info_struct(_Q,'Existing detections (tests) which are present to measure (before release) the occurence of a failure mode.'),SBDL_Parser.Types.action_control:SBDL_Parser.mk_type_info_struct(_Q,'Necessary steps that remain to be taken in order to prevent the occurance of a failure cause or mode.'),SBDL_Parser.Types.action_detection:SBDL_Parser.mk_type_info_struct(_Q,'Necessary steps that remain to be taken in order to increase the detectability of a failure mode.'),SBDL_Parser.Types.test:SBDL_Parser.mk_type_info_struct(_Ad,'Instance of a test for a particular part of a design.'),SBDL_Parser.Types.definition:SBDL_Parser.mk_type_info_struct(_Ae,'Prescriptive definition of a particular aspect of design.'),SBDL_Parser.Types.realisation:SBDL_Parser.mk_type_info_struct(_Ae,'Final realisation of a particular aspect of prescriptive design.'),SBDL_Parser.Types.function:SBDL_Parser.mk_type_info_struct(_Af,'Definition of a function.'),SBDL_Parser.Types.event:SBDL_Parser.mk_type_info_struct(_Af,'Definition of a dynamic event. May be a step within a broader function or cause a transition between states. Events may be composed as trees, with an event also entailing all of its children. Decisions can be expressed with the condition property; unmet conditions entail the alternative (property) children instead of default children.'),SBDL_Parser.Types.state:SBDL_Parser.mk_type_info_struct(_Ag,'Definition of a state.'),SBDL_Parser.Types.transition:SBDL_Parser.mk_type_info_struct(_Ag,'Definition of a transition between states. Takes an ordered pair of states (from,to).'),SBDL_Parser.Types.usecase:SBDL_Parser.mk_type_info_struct(_n,'Definition of a usecase within a particular abstraction of a the system.'),SBDL_Parser.Types.interface:SBDL_Parser.mk_type_info_struct(_n,'Definition of an interface exposing behaviour externally from the given abstraction.'),SBDL_Parser.Types.trace:SBDL_Parser.mk_type_info_struct(_Ad,'A dyanmic occurance of element instance (for example, an event or failure cause). Intended to be embedded within log files. Can be used to build and validate dynamic behaviour against the statically defined behaviour model.'),SBDL_Parser.Types.group:SBDL_Parser.mk_type_info_struct(_n,'Syntactic group of model elements. Used only to structure model representation and facilitate filtering; has no semantic implications for the model itself. May parent (contain) any other element type.')};category_descriptions={_n:'Architectural elements are used for specifying system decomposition. Such decompositions may be according to different views/schemes. for example: logical/structural, functional ...',_Q:'Failure Mode and Effect Analysis (FMEA) elements are used to describe risks present in a system, and the controls and actions mitigating them.',_Ae:'Design elements elaborate on the prescription and description of design decisions and their technical concepts.',_Ad:'Testing elements describe the implementation and coverage of tests (including dynamic traces).',_Af:'Dynamic elements describe and structure dynamic system behaviours, such as functions and events.',_Ag:'State elements capture the stateful behaviour of the system by offering a stateful view of dynamic elements.'};property_descriptions={SBDL_Parser.Attributes.description:'[string] Descriptive body of text for the given element.',SBDL_Parser.Attributes.detectability:'[number] Numerical rating on the interval [1(best)..10(worst)] indicating quality of a failure detection.',SBDL_Parser.Attributes.detectability_post:'[number] Numerical rating on the interval [1(best)..10(worst)] indicating quality of a failure detection AFTER realisation of an improvement action.',SBDL_Parser.Attributes.severity:'[number] Numerical rating on the interval [1(least)..10(most)] indicating the severity of a failure effect.',SBDL_Parser.Attributes.occurrence:'[number] Numerical rating on the interval [1(infrequent)..10(always)] indicating the probability of a failure cause occurring.',SBDL_Parser.Attributes.occurrence_post:'[number] Numerical rating on the interval [1(infrequent)..10(always)] indicating the probability of a failure cause occurring AFTER realisation of an improvement action.',SBDL_Parser.Attributes.parent:'[identifier] Hierarchical parent of the given element.',SBDL_Parser.Attributes.child:'[identifier] Hierarchical child of the given element.',SBDL_Parser.Attributes.related:'[identifier] Indicates a related element.',SBDL_Parser.Attributes.remark:'[string] General remark or more extensive information.',SBDL_Parser.Attributes.actor:'[string] Indicates the name of an actor affiliated with the given element.',SBDL_Parser.Attributes.tag:'[string] Comma separated list of tags which indicate some property of the given element.',SBDL_Parser.Attributes.precondition:'[string] Precondition for correct behaviour of the given element.',SBDL_Parser.Attributes.postcondition:"[string] Condition resulting from the given element's behaviour.",SBDL_Parser.Attributes.invariant:'[string] Conditions unaffected by the behaviour of the given element.',SBDL_Parser.Attributes.output:'[string] Output produced by the given element.',SBDL_Parser.Attributes.input:'[string] Input consumed by the given element.',SBDL_Parser.Attributes.condition:'[string] Element is conditional on the specified binary decision.',SBDL_Parser.Attributes.condition_alternative:'[identifier] Specifies an alternative for an unmet condition.',SBDL_Parser.Attributes.color:'[string] Color associated with element.',SBDL_Parser.Attributes.control_only:'[*] Presence indicates control flow only',SBDL_Parser.Attributes.return_control:'[*] Presence indicates immediate return of control flow'};directive_descriptons={SBDL_Parser.Macros.self_element:'[-> SBDL_Element] Element object for the current element (for internal cross-referencing)',SBDL_Parser.Macros.self_reference:'[-> string] Identifier of the current element (when embedded within an element property)',SBDL_Parser.Macros.self_reference_attr:"[-> string] Identifier of the current element's property (when embedded within an element property)",SBDL_Parser.Macros.abort:'[string ->] Abort compilation with error',SBDL_Parser.Macros.message:'[string ->] Show a message (on stdout) during compilation',SBDL_Parser.Macros.msg:'[string -> string] Show a message (on stdout) during compilation and replace occurence with the message inline',SBDL_Parser.Macros.date:"[-> string] Today's date",SBDL_Parser.Macros.add:'[int, ... -> int] Sum of arguments',SBDL_Parser.Macros.sub:'[int, ... -> int] Subtraction of subsequent arguments from the first argument',SBDL_Parser.Macros.equal:'[val, val ->] Raise a compiler error if two value arguments are not equal',SBDL_Parser.Macros.concat:'[string, ... -> string] Concatentate string arguments',SBDL_Parser.Macros.instli:'[string, ... -> string] Index a list of string terms separated by whitespaces',SBDL_Parser.Macros.showall:'[->] Show a message (on stdout) displaying all defined macros',SBDL_Parser.Macros.rmcom:'[string -> string] Remove comments from a string',SBDL_Parser.Macros.mkid:'[string -> string] Make a given string a valid SBDL identifier',SBDL_Parser.Macros.dfp:'[string -> string] Return a string defining a description as the previous line',SBDL_Parser.Macros.requiredsl:'[string ->] Raise a compiler error if the DSL version is not at least equal to the argument',SBDL_Parser.Macros.requiredsl_exact:'[string ->] Raise a compiler error if the DSL version is not exactly equal to the argument',SBDL_Parser.Macros.requirecompiler:'[string ->] Raise a compiler error if the current compiler version is not at least equal to the argument',SBDL_Parser.Macros.path:'[-> string] Path of the current file',SBDL_Parser.Macros.file_name:'[-> string] Name of the current file',SBDL_Parser.Macros.directory:'[-> string] Name of the current directory',SBDL_Parser.Macros.context:'[-> string] Context string (embedded statement)',SBDL_Parser.Macros.curline:'[-> string] Current line (embedded statement)',SBDL_Parser.Macros.preline:'[-> string] Previous line (embedded statement)',SBDL_Parser.Macros.sucline:'[-> string] Next line (embedded statement)',SBDL_Parser.Macros.line:'[-> string] Current line number',SBDL_Parser.Macros.import_sbdl:'[string ->] Import contents of another SBDL file',SBDL_Parser.Macros.import_directive:'[string ->] Import a custom directives file',SBDL_Parser.Macros.load_config:'[string ->] Load a compiler configuration file',SBDL_Parser.Macros.git_commit_hash:"[string -> string] Return the current (or stated path) Git repository's short commit hash",SBDL_Parser.Macros.id_from_prop:'[string, string -> string] Takes a property name and value. Returns the identifier list of elements with matching properties (which may be an empty string)',SBDL_Parser.Macros.define:'[string, string->] Create a key,value pair compiler definition',SBDL_Parser.Macros.define_append:'[string, string ->] Append to a named definition',SBDL_Parser.Macros.define_from_func:'[string, string, string ->] Create a definition from the result of a named compiler function application',SBDL_Parser.Macros.define_from_index:'[string, string, string ->] Create a definition from the result of indexing another name definition',SBDL_Parser.Macros.define_from_file:'[string, string ->] Create a definition from the contents of a named file',SBDL_Parser.Macros.define_from_file_hash:'[string, string ->] Create a definition from the hash of the contents of a named file',SBDL_Parser.Macros.expand_define:"[string -> string] 'Expand' and sanitize a named definition",SBDL_Parser.Macros.parsed_elements:'[->] Set of parsed elements (useable only programatically)',SBDL_Parser.Macros.generated_elements:'[->] Set of output elements generated by other directives (useable only programmatically)',SBDL_Parser.Macros.synthetic_element:'[->] Synthetic object class reference, used to generate elements dynamically (usable only programmatically)',SBDL_Parser.Macros.cross_reference_available:'[-> bool] Indicates whether cross references are available',SBDL_Parser.Macros.extend_cause:'[string, int -> string] In a failure cause to indicate it extends a name higher-level failure cause, args: [higher-cause, detectability] return [failure-mode-identifier]',SBDL_Parser.Macros.cpp_class:'[-> string] Most recently defined C++ Class (embedded statement)',SBDL_Parser.Macros.py_class:'[-> string] Most recently defined Python Class (embedded statement)',SBDL_Parser.Macros.c_func:'[-> string] Most recently defined C/C++ function (embedded statement)',SBDL_Parser.Macros.py_func:'[-> string] Most recently defined Python function (embedded statement)',SBDL_Parser.Macros.prolog_startup:'[->] Startup the Prolog environment (required at least once to use Prolog directives; indempotent)',SBDL_Parser.Macros.prolog_assert:'[string ->] Assert the truth of a Prolog query (throw a compiler error if not)',SBDL_Parser.Macros.prolog_assert_n:'[string ->] Assert a Prolog query as false (throw a compiler error if not)',SBDL_Parser.Macros.prolog_cmd:'[string ->] Issue a Prolog statement',SBDL_Parser.Macros.prolog_trace_file:'[string->] Write all generated Prolog facts, assertions and commands to a named file (for external use in Prolog)',SBDL_Parser.Macros.prolog_result_output:'[->] Output the result of Prolog assertions to stdout'};custom_types={}
|
|
936
|
+
type_links={SBDL_Parser.Types.mode:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.effect:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.test:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A},SBDL_Parser.Types.cause:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.mode:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.test:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A,SBDL_Parser.Types.event:_A},SBDL_Parser.Types.effect:{SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.aspect:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.using:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.scope:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Statements.customtype:dict.fromkeys(vars(SBDL_Parser.Types).values(),_A),SBDL_Parser.Types.trace:{SBDL_Parser.Types.cause:_A,SBDL_Parser.Types.mode:_A,SBDL_Parser.Types.effect:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.transition:_A,SBDL_Parser.Types.event:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.test:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.definition:_A,SBDL_Parser.Types.realisation:_A,SBDL_Parser.Types.current_detection:_A},SBDL_Parser.Types.definition:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.usecase:_A,SBDL_Parser.Types.interface:_A,SBDL_Parser.Types.current_control:_A,SBDL_Parser.Types.current_detection:_A,SBDL_Parser.Types.action_control:_A,SBDL_Parser.Types.action_detection:_A},SBDL_Parser.Types.realisation:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.definition:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.state:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.function:{SBDL_Parser.Types.event:_A,SBDL_Parser.Types.function:_A,SBDL_Parser.Types.usecase:_A,SBDL_Parser.Types.interface:_A,SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.transition:{SBDL_Parser.Types.state:_A,SBDL_Parser.Types.event:_A},SBDL_Parser.Types.usecase:{SBDL_Parser.Types.requirement:_A},SBDL_Parser.Types.interface:{SBDL_Parser.Types.requirement:_A,SBDL_Parser.Types.interface:_A},SBDL_Parser.Types.requirement:{SBDL_Parser.Types.current_control:_A}};global_properties={SBDL_Parser.Attributes.description:_A,SBDL_Parser.Attributes.remark:_A,SBDL_Parser.Attributes.reference:_C,SBDL_Parser.Attributes.tag:_A,SBDL_Parser.Attributes.pragma:_C};type_properties={SBDL_Parser.Types.aspect:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related,SBDL_Parser.Attributes.color},SBDL_Parser.Types.requirement:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related,SBDL_Parser.Attributes.color},SBDL_Parser.Types.mode:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.detectability,SBDL_Parser.Attributes.detectability_post},SBDL_Parser.Types.effect:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.severity},SBDL_Parser.Types.cause:{SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.occurrence,SBDL_Parser.Attributes.occurrence_post},SBDL_Parser.Types.function:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.precondition,SBDL_Parser.Attributes.postcondition,SBDL_Parser.Attributes.invariant,SBDL_Parser.Attributes.input,SBDL_Parser.Attributes.output,SBDL_Parser.Attributes.color},SBDL_Parser.Types.state:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.color},SBDL_Parser.Types.usecase:{SBDL_Parser.Attributes.actor},SBDL_Parser.Types.event:{SBDL_Parser.Attributes.precondition,SBDL_Parser.Attributes.postcondition,SBDL_Parser.Attributes.invariant,SBDL_Parser.Attributes.output,SBDL_Parser.Attributes.condition,SBDL_Parser.Attributes.condition_alternative,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.control_only,SBDL_Parser.Attributes.return_control,SBDL_Parser.Attributes.color},SBDL_Parser.Types.interface:{SBDL_Parser.Attributes.parent},SBDL_Parser.Types.definition:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related},SBDL_Parser.Types.realisation:{SBDL_Parser.Attributes.parent,SBDL_Parser.Attributes.child,SBDL_Parser.Attributes.related}};type_information={SBDL_Parser.Types.aspect:SBDL_Parser.mk_type_info_struct(_n,'Unit of system decomposition. May associate with a variety of perspectives: logical, functional ...'),SBDL_Parser.Types.requirement:SBDL_Parser.mk_type_info_struct(_n,'Requirement (or acceptance criteria) definition. Describes an expected behaviour at the associated level of abstraction.'),SBDL_Parser.Types.mode:SBDL_Parser.mk_type_info_struct(_Q,'Failure Mode. Describes the way in which a failure may occur, from the perspective of a requirement.'),SBDL_Parser.Types.effect:SBDL_Parser.mk_type_info_struct(_Q,'Failure Effect defintion. Describes the consequence of a failure mode.'),SBDL_Parser.Types.cause:SBDL_Parser.mk_type_info_struct(_Q,'Failure Cause. An underlying technical mechanism, scenario or sequence of events that may result in a failure mode.'),SBDL_Parser.Types.current_control:SBDL_Parser.mk_type_info_struct(_Q,'Existing controls which are present to prevent a failure cause either from occurring or leading to its associated failure mode.'),SBDL_Parser.Types.current_detection:SBDL_Parser.mk_type_info_struct(_Q,'Existing detections (tests) which are present to measure (before release) the occurence of a failure mode.'),SBDL_Parser.Types.action_control:SBDL_Parser.mk_type_info_struct(_Q,'Necessary steps that remain to be taken in order to prevent the occurance of a failure cause or mode.'),SBDL_Parser.Types.action_detection:SBDL_Parser.mk_type_info_struct(_Q,'Necessary steps that remain to be taken in order to increase the detectability of a failure mode.'),SBDL_Parser.Types.test:SBDL_Parser.mk_type_info_struct(_Ad,'Instance of a test for a particular part of a design.'),SBDL_Parser.Types.definition:SBDL_Parser.mk_type_info_struct(_Ae,'Prescriptive definition of a particular aspect of design.'),SBDL_Parser.Types.realisation:SBDL_Parser.mk_type_info_struct(_Ae,'Final realisation of a particular aspect of prescriptive design.'),SBDL_Parser.Types.function:SBDL_Parser.mk_type_info_struct(_Af,'Definition of a function.'),SBDL_Parser.Types.event:SBDL_Parser.mk_type_info_struct(_Af,'Definition of a dynamic event. May be a step within a broader function or cause a transition between states. Events may be composed as trees, with an event also entailing all of its children. Decisions can be expressed with the condition property; unmet conditions entail the alternative (property) children instead of default children.'),SBDL_Parser.Types.state:SBDL_Parser.mk_type_info_struct(_Ag,'Definition of a state.'),SBDL_Parser.Types.transition:SBDL_Parser.mk_type_info_struct(_Ag,'Definition of a transition between states. Takes an ordered pair of states (from,to).'),SBDL_Parser.Types.usecase:SBDL_Parser.mk_type_info_struct(_n,'Definition of a usecase within a particular abstraction of a the system.'),SBDL_Parser.Types.interface:SBDL_Parser.mk_type_info_struct(_n,'Definition of an interface exposing behaviour externally from the given abstraction.'),SBDL_Parser.Types.trace:SBDL_Parser.mk_type_info_struct(_Ad,'A dyanmic occurance of element instance (for example, an event or failure cause). Intended to be embedded within log files. Can be used to build and validate dynamic behaviour against the statically defined behaviour model.'),SBDL_Parser.Types.group:SBDL_Parser.mk_type_info_struct(_n,'Syntactic group of model elements. Used only to structure model representation and facilitate filtering; has no semantic implications for the model itself. May parent (contain) any other element type.')};category_descriptions={_n:'Architectural elements are used for specifying system decomposition. Such decompositions may be according to different views/schemes. for example: logical/structural, functional ...',_Q:'Failure Mode and Effect Analysis (FMEA) elements are used to describe risks present in a system, and the controls and actions mitigating them.',_Ae:'Design elements elaborate on the prescription and description of design decisions and their technical concepts.',_Ad:'Testing elements describe the implementation and coverage of tests (including dynamic traces).',_Af:'Dynamic elements describe and structure dynamic system behaviours, such as functions and events.',_Ag:'State elements capture the stateful behaviour of the system by offering a stateful view of dynamic elements.'};property_descriptions={SBDL_Parser.Attributes.description:'[string] Descriptive body of text for the given element.',SBDL_Parser.Attributes.detectability:'[number] Numerical rating on the interval [1(best)..10(worst)] indicating quality of a failure detection.',SBDL_Parser.Attributes.detectability_post:'[number] Numerical rating on the interval [1(best)..10(worst)] indicating quality of a failure detection AFTER realisation of an improvement action.',SBDL_Parser.Attributes.severity:'[number] Numerical rating on the interval [1(least)..10(most)] indicating the severity of a failure effect.',SBDL_Parser.Attributes.occurrence:'[number] Numerical rating on the interval [1(infrequent)..10(always)] indicating the probability of a failure cause occurring.',SBDL_Parser.Attributes.occurrence_post:'[number] Numerical rating on the interval [1(infrequent)..10(always)] indicating the probability of a failure cause occurring AFTER realisation of an improvement action.',SBDL_Parser.Attributes.parent:'[identifier] Hierarchical parent of the given element.',SBDL_Parser.Attributes.child:'[identifier] Hierarchical child of the given element.',SBDL_Parser.Attributes.related:'[identifier] Indicates a related element.',SBDL_Parser.Attributes.remark:'[string] General remark or more extensive information.',SBDL_Parser.Attributes.actor:'[string] Indicates the name of an actor affiliated with the given element.',SBDL_Parser.Attributes.tag:'[string] Comma separated list of tags which indicate some property of the given element.',SBDL_Parser.Attributes.precondition:'[string] Precondition for correct behaviour of the given element.',SBDL_Parser.Attributes.postcondition:"[string] Condition resulting from the given element's behaviour.",SBDL_Parser.Attributes.invariant:'[string] Conditions unaffected by the behaviour of the given element.',SBDL_Parser.Attributes.output:'[string] Output produced by the given element.',SBDL_Parser.Attributes.input:'[string] Input consumed by the given element.',SBDL_Parser.Attributes.condition:'[string] Element is conditional on the specified binary decision.',SBDL_Parser.Attributes.condition_alternative:'[identifier] Specifies an alternative for an unmet condition.',SBDL_Parser.Attributes.color:'[string] Color associated with element.',SBDL_Parser.Attributes.control_only:'[*] Presence indicates control flow only',SBDL_Parser.Attributes.return_control:'[*] Presence indicates immediate return of control flow'};directive_descriptons={SBDL_Parser.Macros.self_element:'[-> SBDL_Element] Element object for the current element (for internal cross-referencing)',SBDL_Parser.Macros.self_reference:'[-> string] Identifier of the current element (when embedded within an element property)',SBDL_Parser.Macros.self_reference_attr:"[-> string] Identifier of the current element's property (when embedded within an element property)",SBDL_Parser.Macros.abort:'[string ->] Abort compilation with error',SBDL_Parser.Macros.message:'[string ->] Show a message (on stdout) during compilation',SBDL_Parser.Macros.msg:'[string -> string] Show a message (on stdout) during compilation and replace occurence with the message inline',SBDL_Parser.Macros.date:"[-> string] Today's date",SBDL_Parser.Macros.add:'[int, ... -> int] Sum of arguments',SBDL_Parser.Macros.sub:'[int, ... -> int] Subtraction of subsequent arguments from the first argument',SBDL_Parser.Macros.equal:'[val, val ->] Raise a compiler error if two value arguments are not equal',SBDL_Parser.Macros.concat:'[string, ... -> string] Concatentate string arguments',SBDL_Parser.Macros.instli:'[string, ... -> string] Index a list of string terms separated by whitespaces',SBDL_Parser.Macros.showall:'[->] Show a message (on stdout) displaying all defined macros',SBDL_Parser.Macros.rmcom:'[string -> string] Remove comments from a string',SBDL_Parser.Macros.mkid:'[string -> string] Make a given string a valid SBDL identifier',SBDL_Parser.Macros.dfp:'[string -> string] Return a string defining a description as the previous line',SBDL_Parser.Macros.requiredsl:'[string ->] Raise a compiler error if the DSL version is not at least equal to the argument',SBDL_Parser.Macros.requiredsl_exact:'[string ->] Raise a compiler error if the DSL version is not exactly equal to the argument',SBDL_Parser.Macros.requirecompiler:'[string ->] Raise a compiler error if the current compiler version is not at least equal to the argument',SBDL_Parser.Macros.path:'[-> string] Path of the current file',SBDL_Parser.Macros.file_name:'[-> string] Name of the current file',SBDL_Parser.Macros.directory:'[-> string] Name of the current directory',SBDL_Parser.Macros.context:'[-> string] Context string (embedded statement)',SBDL_Parser.Macros.curline:'[-> string] Current line (embedded statement)',SBDL_Parser.Macros.preline:'[-> string] Previous line (embedded statement)',SBDL_Parser.Macros.sucline:'[-> string] Next line (embedded statement)',SBDL_Parser.Macros.line:'[-> string] Current line number',SBDL_Parser.Macros.import_sbdl:'[string ->] Import contents of another SBDL file',SBDL_Parser.Macros.import_directive:'[string ->] Import a custom directives file',SBDL_Parser.Macros.load_config:'[string ->] Load a compiler configuration file',SBDL_Parser.Macros.git_commit_hash:"[string -> string] Return the current (or stated path) Git repository's short commit hash",SBDL_Parser.Macros.id_from_prop:'[string, string -> string] Takes a property name and value. Returns the identifier list of elements with matching properties (which may be an empty string)',SBDL_Parser.Macros.define:'[string, string->] Create a key,value pair compiler definition',SBDL_Parser.Macros.define_append:'[string, string ->] Append to a named definition',SBDL_Parser.Macros.define_from_func:'[string, string, string ->] Create a definition from the result of a named compiler function application',SBDL_Parser.Macros.define_from_index:'[string, string, string ->] Create a definition from the result of indexing another name definition',SBDL_Parser.Macros.define_from_file:'[string, string ->] Create a definition from the contents of a named file',SBDL_Parser.Macros.define_from_file_hash:'[string, string ->] Create a definition from the hash of the contents of a named file',SBDL_Parser.Macros.expand_define:"[string -> string] 'Expand' and sanitize a named definition",SBDL_Parser.Macros.parsed_elements:'[->] Set of parsed elements (useable only programatically)',SBDL_Parser.Macros.generated_elements:'[->] Set of output elements generated by other directives (useable only programmatically)',SBDL_Parser.Macros.synthetic_element:'[->] Synthetic object class reference, used to generate elements dynamically (usable only programmatically)',SBDL_Parser.Macros.cross_reference_available:'[-> bool] Indicates whether cross references are available',SBDL_Parser.Macros.extend_cause:'[string, int -> string] In a failure cause to indicate it extends a name higher-level failure cause, args: [higher-cause, detectability] return [failure-mode-identifier]',SBDL_Parser.Macros.cpp_class:'[-> string] Most recently defined C++ Class (embedded statement)',SBDL_Parser.Macros.py_class:'[-> string] Most recently defined Python Class (embedded statement)',SBDL_Parser.Macros.c_func:'[-> string] Most recently defined C/C++ function (embedded statement)',SBDL_Parser.Macros.py_func:'[-> string] Most recently defined Python function (embedded statement)',SBDL_Parser.Macros.prolog_startup:'[->] Startup the Prolog environment (required at least once to use Prolog directives; indempotent)',SBDL_Parser.Macros.prolog_assert:'[string ->] Assert the truth of a Prolog query (throw a compiler error if not)',SBDL_Parser.Macros.prolog_assert_n:'[string ->] Assert a Prolog query as false (throw a compiler error if not)',SBDL_Parser.Macros.prolog_cmd:'[string ->] Issue a Prolog statement',SBDL_Parser.Macros.prolog_trace_file:'[string->] Write all generated Prolog facts, assertions and commands to a named file (for external use in Prolog)',SBDL_Parser.Macros.prolog_result_output:'[->] Output the result of Prolog assertions to stdout'};custom_types={}
|
|
937
937
|
@classmethod
|
|
938
938
|
def get_valid_link_type_for_type_name(self,type_name):
|
|
939
939
|
valid_type_links=[];skip_types=[SBDL_Parser.Statements.using,SBDL_Parser.Statements.scope,_j]
|
|
@@ -1461,9 +1461,11 @@ class SBDL_Aspect(SBDL_Element):
|
|
|
1461
1461
|
class SBDL_Definition(SBDL_Element):
|
|
1462
1462
|
@classmethod
|
|
1463
1463
|
def class_type_name(self):return SBDL_Parser.Types.definition
|
|
1464
|
+
def __init__(self,declaration_statement):super().__init__(declaration_statement);self._gather_links_from_attr_type(SBDL_Parser.Attributes.parent,self._parents);self._gather_links_from_attr_type(SBDL_Parser.Attributes.child,self._children);self._gather_links_from_attr_type(SBDL_Parser.Attributes.related,self._related)
|
|
1464
1465
|
class SBDL_Realisation(SBDL_Element):
|
|
1465
1466
|
@classmethod
|
|
1466
1467
|
def class_type_name(self):return SBDL_Parser.Types.realisation
|
|
1468
|
+
def __init__(self,declaration_statement):super().__init__(declaration_statement);self._gather_links_from_attr_type(SBDL_Parser.Attributes.parent,self._parents);self._gather_links_from_attr_type(SBDL_Parser.Attributes.child,self._children);self._gather_links_from_attr_type(SBDL_Parser.Attributes.related,self._related)
|
|
1467
1469
|
class SBDL_Requirement(SBDL_Element):
|
|
1468
1470
|
@classmethod
|
|
1469
1471
|
def class_type_name(self):return SBDL_Parser.Types.requirement
|
|
File without changes
|
{sbdl-1.18.5 → sbdl-1.18.6}/sbdl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|