quint icon indicating copy to clipboard operation
quint copied to clipboard

Consider corner cases in namespace manipulation for flattening

Open bugarela opened this issue 1 year ago • 0 comments

From https://github.com/informalsystems/quint/pull/1109#discussion_r1298194884

I think the solution here is to change the importedFrom field to a list, keep track of the path of imports there, get rid of namespaces, and then find out the namespaces for a definition from the list of importedFrom field.

An example (and perhaps the only) scenario where we need the startsWith check is:

  1. We have a qualified instance
  2. The namespace for the instance is then myModule::A1
  3. The name for some definition referencing the instance is A1::foo
  4. When we add namespaces ['A1', 'myModule'] to A1::foo, I'd like it[^1] to become myModule::A1::foo.

Hopefully this will be trivial to solve when everything else is in place and I can test the interaction of changes in namespace manipulation and flattening on our set of examples.

[^1]: I'd like it in the sense that we probably don't need to, but it is more cognitively consistent and easier to explain if it behaves like this.

bugarela avatar Aug 21 '23 18:08 bugarela