sbdl 1.18.4__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.6/PKG-INFO +9 -0
- sbdl-1.18.6/sbdl.egg-info/PKG-INFO +9 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl.py +8 -6
- {sbdl-1.18.4 → sbdl-1.18.6}/setup.py +1 -1
- sbdl-1.18.4/PKG-INFO +0 -23
- sbdl-1.18.4/sbdl.egg-info/PKG-INFO +0 -23
- {sbdl-1.18.4 → sbdl-1.18.6}/csv-to-sbdl.py +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl.egg-info/SOURCES.txt +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl.egg-info/dependency_links.txt +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl.egg-info/requires.txt +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl.egg-info/top_level.txt +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/sbdl_server.py +0 -0
- {sbdl-1.18.4 → sbdl-1.18.6}/setup.cfg +0 -0
sbdl-1.18.6/PKG-INFO
ADDED
|
@@ -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
|
|
@@ -2889,8 +2891,8 @@ def main(arguments):
|
|
|
2889
2891
|
aggregate_methods={_An:OpenFMEA.aggregate_all_parser_elements_from_files,A:OpenFMEA.aggregate_all_parser_elements_from_quickshare,C:OpenFMEA.aggregate_all_parser_elements_from_files,B:OpenFMEA.aggregate_all_parser_elements_from_quickshare,_AG:aggregate_all_parser_elements_from_json,_Aw:aggregate_all_parser_elements_from_yaml,_AH:aggregate_all_parser_elements_from_csv};aggregation_method=aggregate_all_parser_elements_from_files if not arguments.mode in aggregate_methods else aggregate_methods[arguments.mode];parser_elements,read_errors=aggregation_method([fix_wsl_path(x)for x in arguments.source_files],arguments.recurse,arguments.hidden,print_l);check_step('File reading',read_errors);sbdl_ast=SBDL_AST(parser_elements);check_step('Parsing',sbdl_ast.check_parsing(print_l))
|
|
2890
2892
|
for pre_hook in get_config_value(_BE):check_step('Pre Hook: {}'.format(pre_hook.__name__),pre_hook(sbdl_ast,print_l))
|
|
2891
2893
|
sbdl_elements,statement_errors=sbdl_ast.elements(print_l);check_step('Element instantiation',statement_errors)
|
|
2892
|
-
if arguments.
|
|
2893
|
-
if arguments.
|
|
2894
|
+
if arguments.filter_related!=_B:sbdl_ast.add_filter_element_set_connected(arguments.filter_related,arguments.filter_depth)
|
|
2895
|
+
if arguments.filter_related_x!=_B:sbdl_ast.add_filter_element_set_linked(arguments.filter_related_x,arguments.filter_depth)
|
|
2894
2896
|
if arguments.filter_parents!=_B:sbdl_ast.add_filter_element_set_parents(arguments.filter_parents,arguments.filter_depth)
|
|
2895
2897
|
if arguments.filter_children!=_B:sbdl_ast.add_filter_element_set_children(arguments.filter_children,arguments.filter_depth)
|
|
2896
2898
|
if arguments.filter_group!=_B:sbdl_ast.add_filter_element_set_children(arguments.filter_group,arguments.filter_depth);sbdl_ast.add_filter_element_set_id('(?!{})'.format(arguments.filter_group))
|
|
@@ -2902,7 +2904,7 @@ def main(arguments):
|
|
|
2902
2904
|
if arguments.trace:trace_elements,trace_errors=aggregate_all_parser_elements_from_files(arguments.trace,arguments.recurse,arguments.hidden,print_l);_,trace_process_errors=sbdl_ast.process_trace_elements(trace_elements,print_l);trace_errors+=trace_process_errors;check_step('Tracing',trace_errors)
|
|
2903
2905
|
for post_hook in get_config_value(_k):check_step('Post Hook: {}'.format(post_hook.__name__),post_hook(sbdl_ast,print_l))
|
|
2904
2906
|
print_l('Mode: {}'.format(arguments.mode));print_l('Writing: {}'.format(arguments.output));check_step('Output writing',operations[arguments.mode](sbdl_ast,arguments.output,open_output_file,arguments,print_l));print_l('C_DEF GLOBALS: {}'.format(get_config_value(_T)),debug=_A);print_l(f"All operations complete [{time.time()-start_time_point:.3f}s]");return total_errors if not arguments.skip_errors else 0
|
|
2905
|
-
def handle_arguments(args_l):F='append';E='config_file';D='normal';C='output_file';B='element_identifier';A='store_true';operating_modes={_Ak:'Parse all specified input files, gather SBDL elements, validate model, apply filters, write SBDL-formatted output','query':'Compile inputs, then pretty print the results (after filtering)',_AE:'Compile inputs, then write a CSV-formatted representation of the SBDL elements to the output',_AF:'Compile inputs, then write a JSON-formatted representation of the SBDL elements to the output',_Al:'Compile inputs, then write a YAML-formatted representation of the SBDL elements to the output',_AH:'Read SBDL-schema CSV-matrix inputs and write SBDL-formatted output',_AG:'Read SBDL-schema JSON-tree inputs and write SBDL-formatted output',_Aw:'Read SBDL-schema YAML-tree inputs and write SBDL-formatted output',_AD:'Compile inputs, then write the FMEA-related content to an OpenFMEA-formatted ouput',_Am:'Compile inputs, then write the FMEA-related content to an OpenFMEA Portfolio-formatted ouput, organised by aspect hierarchy',_An:'Read OpenFMEA-formatted input and write SBDL-formatted output',_CN:'Compile inputs, then write the FMEA-related content to a CSV-formatted ouput',_Ar:'Compile inputs, then write a PNG-formatted output, visually representing the network of SBDL elements',_Aq:'Compile inputs, then write a SysML-style requirements diagram to rendering-backend-formatted output',_Ao:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (simplified, aspects only)',_Ap:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (detailed, with properties and relations)',_As:'Compile inputs, then write a SysML-style sequence diagram to rendering-backend-formatted output',_At:'Compile inputs, then write a SysML-style activity diagram to rendering-backend-formatted output',_Au:'Compile inputs, then write a SysML-style state diagram to rendering-backend-formatted output',_Av:'Compile inputs, then write a SysML-style use-case diagram to rendering-backend-formatted output',_CO:"Compile inputs, then provide an object, 'sbdl', in a Jinja parsing environment and apply it to the specified template file",'rpc':'Compile inputs, then transmit to the RPC server for processing by the specified RPC (see --rpc)'};parser=argparse.ArgumentParser(description='{}\n\n{} Version {} (DSL Version {}). System Behaviour Description Language (SBDL) compiler.\nWWW: {}. Author: {}.'.format(logo(),name().upper(),version(),version_dsl(),url(),author()),epilog='e.g. "'+os.path.basename(sys.argv[0])+' <file 1> <file 2> <file n>"\n\n---------------\nOperating Modes\n---------------\n{}'.format(_D.join(['{}: {}'.format(x.rjust(25),operating_modes[x])for x in operating_modes])),formatter_class=argparse.RawDescriptionHelpFormatter);parser._positionals.title='Base Arguments';parser._optionals.title='Optional Arguments';parser.add_argument('source_files',help='List of files to compile ["-" implies stdin]',nargs=_O);parser.add_argument(_F,'--mode',metavar='operating_mode',help='Specify the mode of operation',default=_Ak);parser.add_argument(_E,'--output',metavar=C,help='Specify the name of the output file',default=_V);parser.add_argument('--version',help='Print the current version',action=A,default=_C);parser.add_argument('--debug',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('-W','-w','--warning',help='Set warning level',choices=[D,'all'],default=D);parser.add_argument('--hidden',help='Include hidden files when recursing',action=A,default=_C);parser.add_argument('-i','--identifier',help='Include element identifiers in applicable output formats',action=A,default=_C);parser.add_argument('-s','--source',help='Include source reference in applicable output formats',action=A,default=_C);parser.add_argument('-r','--recurse',help='Recurse on directories specified in the input list',action=A,default=_C);parser.add_argument('--skip-errors',help='Do not stop for errors (emit warning instead)',action=A,default=_C);parser.add_argument('--skip-validation',help='Do not validate model elements and relations',action=A,default=_C);parser.add_argument('--already-processed',help='Disables certain processing actions (implies --skip-validation). Useful when input has already been processed',action=A,default=_C);parser.add_argument('--title',help='Provide a default title for certain output formats',default='');parser.add_argument('-v','--verbose',help='Enable verbose output during execution',action=A,default=_C);parser.add_argument('--dumpaffinitygraph',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--dumplanginfo',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--run_tests','--run-tests',action=A,help=argparse.SUPPRESS);parser.add_argument('--rest-api-ping',action=A,help=argparse.SUPPRESS);parser.add_argument('--manual',help='Show extensive {} manual page'.format(name().upper()),action=A);parser.add_argument('--dump-config','--dumpconfig',metavar=E,help='Dump the internal configuration to a named JSON file',action=_B);parser.add_argument('--load-config','--loadconfig',metavar=E,help='Load the internal configuration from a named JSON file',default=_B);parser.add_argument('--list-config','--listconfig',help='List internal configuration options',action=A,default=_C);parser.add_argument('--set-config','--setconfig',metavar=('config_option','config_value'),help='Set a named configuration option',action=F,nargs=2);parser.add_argument('-D','--define',metavar=('name','value'),help='Specify a named global definition',action=F,nargs=2);parser.add_argument('--trace',metavar='trace_files',help='Provide a trace file to be processed',default=_B,nargs=_O);parser.add_argument('--template',metavar='template_file',help="Specify a template file for the 'template-fill' mode",default=_B);parser.add_argument('-
|
|
2907
|
+
def handle_arguments(args_l):F='append';E='config_file';D='normal';C='output_file';B='element_identifier';A='store_true';operating_modes={_Ak:'Parse all specified input files, gather SBDL elements, validate model, apply filters, write SBDL-formatted output','query':'Compile inputs, then pretty print the results (after filtering)',_AE:'Compile inputs, then write a CSV-formatted representation of the SBDL elements to the output',_AF:'Compile inputs, then write a JSON-formatted representation of the SBDL elements to the output',_Al:'Compile inputs, then write a YAML-formatted representation of the SBDL elements to the output',_AH:'Read SBDL-schema CSV-matrix inputs and write SBDL-formatted output',_AG:'Read SBDL-schema JSON-tree inputs and write SBDL-formatted output',_Aw:'Read SBDL-schema YAML-tree inputs and write SBDL-formatted output',_AD:'Compile inputs, then write the FMEA-related content to an OpenFMEA-formatted ouput',_Am:'Compile inputs, then write the FMEA-related content to an OpenFMEA Portfolio-formatted ouput, organised by aspect hierarchy',_An:'Read OpenFMEA-formatted input and write SBDL-formatted output',_CN:'Compile inputs, then write the FMEA-related content to a CSV-formatted ouput',_Ar:'Compile inputs, then write a PNG-formatted output, visually representing the network of SBDL elements',_Aq:'Compile inputs, then write a SysML-style requirements diagram to rendering-backend-formatted output',_Ao:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (simplified, aspects only)',_Ap:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (detailed, with properties and relations)',_As:'Compile inputs, then write a SysML-style sequence diagram to rendering-backend-formatted output',_At:'Compile inputs, then write a SysML-style activity diagram to rendering-backend-formatted output',_Au:'Compile inputs, then write a SysML-style state diagram to rendering-backend-formatted output',_Av:'Compile inputs, then write a SysML-style use-case diagram to rendering-backend-formatted output',_CO:"Compile inputs, then provide an object, 'sbdl', in a Jinja parsing environment and apply it to the specified template file",'rpc':'Compile inputs, then transmit to the RPC server for processing by the specified RPC (see --rpc)'};parser=argparse.ArgumentParser(description='{}\n\n{} Version {} (DSL Version {}). System Behaviour Description Language (SBDL) compiler.\nWWW: {}. Author: {}.'.format(logo(),name().upper(),version(),version_dsl(),url(),author()),epilog='e.g. "'+os.path.basename(sys.argv[0])+' <file 1> <file 2> <file n>"\n\n---------------\nOperating Modes\n---------------\n{}'.format(_D.join(['{}: {}'.format(x.rjust(25),operating_modes[x])for x in operating_modes])),formatter_class=argparse.RawDescriptionHelpFormatter);parser._positionals.title='Base Arguments';parser._optionals.title='Optional Arguments';parser.add_argument('source_files',help='List of files to compile ["-" implies stdin]',nargs=_O);parser.add_argument(_F,'--mode',metavar='operating_mode',help='Specify the mode of operation',default=_Ak);parser.add_argument(_E,'--output',metavar=C,help='Specify the name of the output file',default=_V);parser.add_argument('--version',help='Print the current version',action=A,default=_C);parser.add_argument('--debug',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('-W','-w','--warning',help='Set warning level',choices=[D,'all'],default=D);parser.add_argument('--hidden',help='Include hidden files when recursing',action=A,default=_C);parser.add_argument('-i','--identifier',help='Include element identifiers in applicable output formats',action=A,default=_C);parser.add_argument('-s','--source',help='Include source reference in applicable output formats',action=A,default=_C);parser.add_argument('-r','--recurse',help='Recurse on directories specified in the input list',action=A,default=_C);parser.add_argument('--skip-errors',help='Do not stop for errors (emit warning instead)',action=A,default=_C);parser.add_argument('--skip-validation',help='Do not validate model elements and relations',action=A,default=_C);parser.add_argument('--already-processed',help='Disables certain processing actions (implies --skip-validation). Useful when input has already been processed',action=A,default=_C);parser.add_argument('--title',help='Provide a default title for certain output formats',default='');parser.add_argument('-v','--verbose',help='Enable verbose output during execution',action=A,default=_C);parser.add_argument('--dumpaffinitygraph',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--dumplanginfo',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--run_tests','--run-tests',action=A,help=argparse.SUPPRESS);parser.add_argument('--rest-api-ping',action=A,help=argparse.SUPPRESS);parser.add_argument('--manual',help='Show extensive {} manual page'.format(name().upper()),action=A);parser.add_argument('--dump-config','--dumpconfig',metavar=E,help='Dump the internal configuration to a named JSON file',action=_B);parser.add_argument('--load-config','--loadconfig',metavar=E,help='Load the internal configuration from a named JSON file',default=_B);parser.add_argument('--list-config','--listconfig',help='List internal configuration options',action=A,default=_C);parser.add_argument('--set-config','--setconfig',metavar=('config_option','config_value'),help='Set a named configuration option',action=F,nargs=2);parser.add_argument('-D','--define',metavar=('name','value'),help='Specify a named global definition',action=F,nargs=2);parser.add_argument('--trace',metavar='trace_files',help='Provide a trace file to be processed',default=_B,nargs=_O);parser.add_argument('--template',metavar='template_file',help="Specify a template file for the 'template-fill' mode",default=_B);parser.add_argument('-fr','--filter-related',metavar=B,help='Filter everything but those elements with a direct or indirect relation to the specified element identifier (regex) [INCLUDES: parents/children]',default=_B);parser.add_argument('-frx','--filter-related-x',metavar=B,help='Filter everything but those elements with a direct or indirect connection to the specified element identifier (regex) [EXCLUDES: parents/children]',default=_B);parser.add_argument('-fch','--filter-children',metavar=B,help='Filter everything but those elements which are children of the specified element identifier (regex)',default=_B);parser.add_argument('-fpa','--filter-parents',metavar=B,help='Filter everything but those elements which are parental ancestors of the specified element identifier (regex)',default=_B);parser.add_argument('-fd','--filter-depth',metavar='filter_depth',help='Maximum depth for filters which pursue links (natural number)',type=int,default=_B);parser.add_argument('-ft','--filter-type',metavar='element_type',help='Filter everything but those elements which are of the specified element type (regex)',default=_B);parser.add_argument('-fi','--filter-identifier',metavar=B,help='Filter everything but those elements whose identifiers match the specified string (regex)',default=_B);parser.add_argument('-fpr','--filter-property',metavar=('property_name','property_value'),help='Filter everything but those elements possessing a named property matching the specified string (regex)',default=_B,nargs=2);parser.add_argument('-fg','--filter-group',metavar='group_identifier',help='Shortcut filter for everything but those elements which are children of the specified group identifier (regex) -- excludes the group element itself',default=_B);parser.add_argument(_CP,metavar='compiler_definitions',help='Specify a file path defining custom compiler directives',default=[],nargs=_O);parser.add_argument(_CQ,'--custom_mode',metavar='mode_definitions',help='Specify a file path containing custom compiler modes',default=[],nargs=_O);parser.add_argument('--rpc',help='Remote Procedure Call to be used by RPC-based modes',default=_B);parser.add_argument('--update',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--update-force',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--install-deps',help=argparse.SUPPRESS,action=A,default=_C);help_tmp=io.StringIO();parser.print_help(file=help_tmp);help_tmp.seek(0);global __HELP_TEXT;__HELP_TEXT=help_tmp.read();return parser.parse_args(args_l)
|
|
2906
2908
|
def show_manual(_):
|
|
2907
2909
|
B='----------------------\n';A='===========================================================\n';manual_text=A;manual_text+=' {} Manual\n'.format(name().upper());manual_text+=A;manual_text+=help_text()+_D;manual_text+=B;manual_text+='Model Type Information\n';manual_text+=B
|
|
2908
2910
|
def add_manual(strcon=''):nonlocal manual_text;manual_text+=strcon+_D
|
sbdl-1.18.4/PKG-INFO
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sbdl
|
|
3
|
-
Version: 1.18.4
|
|
4
|
-
Summary: System Behaviour Description Language (Compiler)
|
|
5
|
-
Home-page: https://sbdl.dev
|
|
6
|
-
Author: Michael A. Hicks
|
|
7
|
-
Author-email: michael@mahicks.org
|
|
8
|
-
License: Proprietary
|
|
9
|
-
Requires-Python: >=3.6
|
|
10
|
-
Requires-Dist: networkx
|
|
11
|
-
Requires-Dist: matplotlib
|
|
12
|
-
Requires-Dist: docx2txt
|
|
13
|
-
Requires-Dist: pandas
|
|
14
|
-
Requires-Dist: openpyxl
|
|
15
|
-
Requires-Dist: docxtpl
|
|
16
|
-
Requires-Dist: jinja2
|
|
17
|
-
Dynamic: author
|
|
18
|
-
Dynamic: author-email
|
|
19
|
-
Dynamic: home-page
|
|
20
|
-
Dynamic: license
|
|
21
|
-
Dynamic: requires-dist
|
|
22
|
-
Dynamic: requires-python
|
|
23
|
-
Dynamic: summary
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sbdl
|
|
3
|
-
Version: 1.18.4
|
|
4
|
-
Summary: System Behaviour Description Language (Compiler)
|
|
5
|
-
Home-page: https://sbdl.dev
|
|
6
|
-
Author: Michael A. Hicks
|
|
7
|
-
Author-email: michael@mahicks.org
|
|
8
|
-
License: Proprietary
|
|
9
|
-
Requires-Python: >=3.6
|
|
10
|
-
Requires-Dist: networkx
|
|
11
|
-
Requires-Dist: matplotlib
|
|
12
|
-
Requires-Dist: docx2txt
|
|
13
|
-
Requires-Dist: pandas
|
|
14
|
-
Requires-Dist: openpyxl
|
|
15
|
-
Requires-Dist: docxtpl
|
|
16
|
-
Requires-Dist: jinja2
|
|
17
|
-
Dynamic: author
|
|
18
|
-
Dynamic: author-email
|
|
19
|
-
Dynamic: home-page
|
|
20
|
-
Dynamic: license
|
|
21
|
-
Dynamic: requires-dist
|
|
22
|
-
Dynamic: requires-python
|
|
23
|
-
Dynamic: summary
|
|
File without changes
|
{sbdl-1.18.4 → 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
|