Skip to content

Commit 5a6b4e9

Browse files
committed
Add recommendations for the identifier format
These are additions to the general recommendations for the MEF users and tools to use and process identifiers in a portable way. The recommendations are the same as proposed at the workshop and taken from the experience with SCRAM. To increase portability (especially, internationalization), the suggestions are based on W3 XML schema datatype specifications. The identifier specification is based on the XML NCName. It is worth noting that the name specification prohibits "period" because the MEF "references" specification relies on "period" as a scope resolution operator. The rest of suggestions are based on how most modern XML libraries and tools can handle the XML input, so it should not cause any issues for modern software to provide these guarantees/conformance.
1 parent b1435d7 commit 5a6b4e9

2 files changed

Lines changed: 64 additions & 16 deletions

File tree

en_us.ascii.add.spl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,12 @@ textwidth
106106
tfrac
107107
erf
108108
parametrization
109+
datatype
110+
datatypes
111+
Datatypes
112+
NCName
113+
org
114+
TR
115+
UTF
116+
www
117+
xmlschema

mef/fault_tree_layer.rst

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -491,23 +491,62 @@ Recommendations
491491
---------------
492492

493493
Layered Models
494-
In PSA models, fault trees are in general layered,
495-
i.e., arguments of connectives (and, or, etc.)
496-
are always either variables or negations of variables.
497-
Although there is no reason to force such a condition,
498-
it is recommended to obey it for the sake of clarity.
494+
~~~~~~~~~~~~~~
495+
496+
In PSA models, fault trees are in general layered,
497+
i.e., arguments of connectives (and, or, etc.)
498+
are always either variables or negations of variables.
499+
Although there is no reason to force such a condition,
500+
it is recommended to obey it for the sake of clarity.
501+
499502

500503
Use Portable Identifiers
501-
In the XML description of fault trees,
502-
we intentionally did not define identifiers.
503-
In many fault tree tools, identifiers can be any string.
504-
It is, however, strongly recommended for portability issues to use non problematic identifiers,
505-
like those of programming languages,
506-
and to add a description of elements as a comment.
507-
This means
508-
not using lexical entities, such as spaces, tabulations, "." or "/", in names of elements,
509-
as well as realizing that some old tools cannot differentiate between capital and small letters.
504+
~~~~~~~~~~~~~~~~~~~~~~~~
505+
506+
In the XML description of fault trees,
507+
we intentionally did not define identifiers.
508+
In many fault tree tools, identifiers can be any string.
509+
It is, however, strongly recommended for portability issues to use non problematic identifiers,
510+
like those of programming languages,
511+
and to add a description of elements as a comment.
512+
This means
513+
not using lexical entities, such as spaces, tabulations, "." or "/", in names of elements,
514+
as well as realizing that some old tools cannot differentiate between capital and small letters.
515+
516+
The following is a general, recommended format
517+
that is likely to produce portable identifiers.
518+
519+
- Consistent with XML NCName datatype
520+
(XML Schema Part 2: Datatypes Second Edition, Derived datatypes, `Section 3.3.7`__)
521+
522+
* The first character must be alphabetic.
523+
* May contain alphanumeric characters and special characters like ``_``, ``-``.
524+
* No whitespace or other special characters like ``:``, ``,``, ``/``, etc.
525+
526+
- No double dashes ``--``
527+
- No trailing dash
528+
- No periods ``.`` (reserved for references)
529+
530+
.. __: https://www.w3.org/TR/xmlschema-2/#NCName
531+
532+
References to constructs, such as gates, events, and parameters,
533+
may include names of fault trees or components to access public or private members.
534+
This feature requires a period ``.`` between names;
535+
thus references may follow the pattern ``fault_tree.component.event``.
536+
537+
In addition to the identifier format,
538+
the following is a set of recommendations for conforming tools
539+
to maximize the input acceptability:
540+
541+
- Avoid restricting the word character set (e.g., ASCII-only, English-only)
542+
- Support popular character encodings (e.g., UTF-8, UTF-16)
543+
- Provide case-sensitive identifier processing (e.g., no capital-letters-only restrictions)
544+
- Sanitize input leading and trailing whitespace characters
545+
(i.e., insensitive to noise)
546+
510547

511548
Role of Parameters, House Events, and Basic Events
512-
Parameters, house events, and basic events should be always public,
513-
in order to facilitate their portability from one tool to another.
549+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550+
551+
Parameters, house events, and basic events should be always public,
552+
in order to facilitate their portability from one tool to another.

0 commit comments

Comments
 (0)