<commit_before>= MASL exporter emits warnings for core types

xtUML Project Implementation Note

:sectnums:

== Abstract

Benign but confusing warnings are being issued during the export of MASL.
This work resolves the root cause and simplifies the way BridgePoint
manages MASL-specific data types.

== Introduction and Background

When Raven was originally developed, MC-3020 was not able to process
UUIDs and 128 integers; now, MC-302 can.  This opens an option for linking
imported MASL types to BridgePoint more naturally.

== Requirements

=== Eliminate warnings emitted due to unbound types.
=== Bind Global types in `m2x`.

== Work Required

=== Detect Unbound Types More Accurately in `x2m`
First, check if the type is based on 'MASLtype'.  If it is, this is a
type reference type and should never be qualified with the containing
domain name.

Second, check if the package is directly off the system.  In this case,
it is assumed that the user understands that the package is not contained
by a component, so it will _not_ be qualified.  A special case that is
important for this check is the 'types' package which contains MASL core
types and is generated directly off the system.  This check prevents types
in this package from ever being qualified.

=== Instance-Dump String UUIDs
Now that MC-3020 understands UUIDs both as integers and as strings, dump
the string version from the instance dumper.  This allows the xtUML Model
importer to link types the with no special processing (by IDLINK).

=== Link Globals
=== Link Referentials (R114)
Instead of linking via IDLINK, ...

== Implementation Comments

== Unit Test

== User Documentation

No documentation are required for this change.

== Code Changes

- fork/repository:  cortlandstarrett/mc
- branch:  10195_typewarn

```
 arc/q.sys.populate.arc                                            |   3 +-
 bin/masl2xtuml                                                    |   4 +-
 doc/process/templates/int_template.adoc                           |  12 ++-
 mcmc/arlan/o.oal                                                  |   3 +-
 model/escher/gen/ooaofooa.c                                       |  15 ++--
 model/escher/gen/ooaofooa_c_orig                                  |  17 ++--
 model/escher/models/escher/mcmc/afun/afun.xtuml                   |   3 +-
 model/maslin/gen/IDLINK_bridge.c                                  | 140 -----------------------------
 model/maslin/gen/domain.mark                                      |   1 +
 model/maslin/gen/masl2xtuml_O_ATTR_class.c                        | 273 --------------------------------------
 model/maslin/gen/masl2xtuml_S_UDT_class.c                         | 138 ----------------------------
 model/maslin/gen/sys_user_co.c                                    |  42 +++++++--
 model/maslin/gen/sys_user_co.h                                    |   4 +-
 model/maslin/models/maslin/lib/masl2xtuml/masl2xtuml.xtuml        |  25 +++++-
 model/maslin/models/maslin/m2x/m2x.xtuml                          | 176 ++++++------------------------------
 model/maslin/models/maslin/m2x/ooapopulation/ooapopulation.xtuml  | 177 +++++++++++++++++++++++-------------
 model/maslout/models/maslout/lib/xtuml2masl/maslout/maslout.xtuml |  47 +++++-----
 schema/Globals.xtuml                                              | 260 ++++++++++++++++++++++++++++++++++++++
 18 files changed, 518 insertions(+), 822 deletions(-)
```

== Document References

In this section, list all the documents that the reader may need to refer to.
Give the full path to reference a file.

. [[dr-1]] https://support.onefact.net/issues/10195[10195 - MASL exporter emits warnings for core types]

---

This work is licensed under the Creative Commons CC0 License

---
<commit_msg>job:  #10195  updating note while continuing to work on testing<commit_after>= MASL exporter emits warnings for core types

xtUML Project Implementation Note

:sectnums:

== Abstract

Benign but confusing warnings are being issued during the export of MASL.
This work resolves the root cause and simplifies the way BridgePoint
manages MASL-specific data types.

== Introduction and Background

When Raven was originally developed, MC-3020 was not able to process
UUIDs and 128 integers; now, MC-3020 can.  This opens an option for
linking imported MASL types to BridgePoint types more naturally.

A change is introduced in how xtUML native types are introduced in the MASL
to xtUML conversion.  Background to the present way of working is supplied
here.  "Global" types (native xtUML core data types) had been created as-needed
in the masl2xtuml processing.  Identifiers were supplied with patterns that
could be matched and dumped in a way that BridgePoint proper could load
them correctly.

== Requirements

=== Eliminate warnings emitted due to unbound types.
=== Bind Global types in `m2x`.

== Work Required

=== Detect Unbound Types More Accurately in `x2m`
First, check if the type is based on 'MASLtype'.  If it is, this is a
type reference type and should never be qualified with the containing
domain name.

Second, check if the package is directly off the system.  In this case,
it is assumed that the user understands that the package is not contained
by a component, so it will _not_ be qualified.  A special case that is
important for this check is the 'types' package which contains MASL core
types and is generated directly off the system.  This check prevents types
in this package from ever being qualified.

=== Instance-Dump String UUIDs
Now that MC-3020 understands UUIDs both as integers and as strings, dump
the string version from the instance dumper.  This allows the xtUML Model
importer to link types with no special processing (e.g. help of IDLINK).

=== Load and Link Globals
As stated in <<Introduction and Background>>, Global types were supplied
by `m2x` in a special-purpose manner.  A Better Way is now provided that
utilizes the existing Globals definition of BridgePoint (`Globals.xtuml`).
`m2x` now loads the `Globals.xtuml` file containing instance definitions
of the core data types.  A command line option '-g' is added to `m2x` to
pass in the path to the globals file.  After being loaded, the types can
be linked to the model elements appropriately.

An initialization function, `initialize_globals` is introduced to run
immediately after start-up and loading of the global data types.  This
routine creates a package for the global types and links the types into it.

CDS NOTE:  it looks like it fails to link in the package correctly leaving
a PE_PE instance dangling.
// create a new package for the global types
create object instance pe_pe of PE_PE;
create object instance ep_pkg of EP_PKG;
ep_pkg.Name = "_globals";


=== Link Referentials (R114)
?? after...
// resolve referential attribute types

== Implementation Comments

== Unit Test

=== MASL Round Trip
See `masl_round_trip` report clean results.

== User Documentation

No documentation are required for this change.

== Code Changes

- fork/repository:  cortlandstarrett/mc
- branch:  10195_typewarn

```
 arc/q.sys.populate.arc                                            |   3 +-
 bin/mac/mcmc                                                      | Bin 1604832 -> 1604832 bytes
 bin/masl2xtuml                                                    |   4 +-
 bin/mcmc                                                          | Bin 2447320 -> 2447320 bytes
 bin/win/mcmc.exe                                                  | Bin 1746617 -> 1746746 bytes
 doc/notes/10195_typewarn_int.adoc                                 | 121 +++++++++++++++++++++++++
 doc/process/templates/int_template.adoc                           |  12 ++-
 mcmc/arlan/o.oal                                                  |   3 +-
 model/escher/gen/ooaofooa.c                                       |  15 ++--
 model/escher/gen/ooaofooa_c_orig                                  |  17 ++--
 model/escher/models/escher/mcmc/afun/afun.xtuml                   |   3 +-
 model/maslin/gen/IDLINK_bridge.c                                  | 140 -----------------------------
 model/maslin/gen/domain.mark                                      |   1 +
 model/maslin/gen/masl2xtuml_O_ATTR_class.c                        | 273 ------------------------------------------
 model/maslin/gen/masl2xtuml_S_UDT_class.c                         | 138 ----------------------------
 model/maslin/gen/sys_user_co.c                                    |  42 +++++++--
 model/maslin/gen/sys_user_co.h                                    |   4 +-
 model/maslin/models/maslin/lib/masl2xtuml/masl2xtuml.xtuml        |  25 +++++-
 model/maslin/models/maslin/m2x/m2x.xtuml                          | 176 ++++++------------------------------
 model/maslin/models/maslin/m2x/ooapopulation/ooapopulation.xtuml  | 177 +++++++++++++++++++++++-------------
 model/maslout/models/maslout/lib/xtuml2masl/maslout/maslout.xtuml |  47 +++++-----
 schema/Globals.xtuml                                              | 260 ++++++++++++++++++++++++++++++++++++++++++
 22 files changed, 639 insertions(+), 822 deletions(-)
```

== Document References

. [[dr-1]] https://support.onefact.net/issues/10195[10195 - MASL exporter emits warnings for core types]

---

This work is licensed under the Creative Commons CC0 License

---

{'fraction_non_alphanumeric': 0.11591250268067768, 'fraction_numerical': 0.025520051469011366, 'mean_word_length': 2.0480392156862743, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 41, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6180576', 'n_tokens_mistral': 2704, 'n_tokens_neox': 2484, 'n_words': 927}