troeger/fuzzed

Name format for Fuzzed elements

rakhimov opened this issue · 1 comments

Fuzzed doesn't seem to restrict the Name string for elements (e.g., events, fault trees, fuzz trees).
There's also unique numeric ID per element,
which seems to follow namespaceID.elementID format.

This convention causes a bit of trouble upon convertion to the Open-PSA MEF format #69.
I suggest adopting the MEF identifier format recommendations.

In short, Name must be treated as a token (like in programming languages),
and it must be unique per type within a namespace (public, private).
That is, the current Fuzzed numeric ID may be redundant.

The name must be short and meaningfully encoded,
for example, with the scheme in NASA Handbook.

These Name requirements can be enforced by the UI and validation schemas (provided by the MEF).

Meanwhile, the existing input (GraphML, Fuzzed XML) may be converted into/from MEF
with the best-effort normalization of Name strings:

  • Remove non-word (^\w) characters.
  • If the name starts with a non-alpha character,
    prepend the name with some special alpha character (e.g., 'N').
  • Normalize dash (-) characters if any to follow the MEF format.

These are all valid arguments, but the issue is too big to be handled as one thing.

I would propose to split it up into:

  • Support for element name restrictions in the notations file
  • Consideration of these restrictions by the front-end JS code
  • Consideration of these restrictions by the import functionality
  • Conversion solution for existing graphs that violate these restrictions