UniFormal / MMT

The MMT Language and System
https://uniformal.github.io/
Other
68 stars 23 forks source link

LinkInverter (Generalizer) cannot handle included theories #479

Open ComFreek opened 5 years ago

ComFreek commented 5 years ago

I noticed that the linkinverter, at least in the IntelliJ plugin GUI, does simply nothing (not even throw an exception, at least none which bubbles up to IntelliJ) in some cases with inclusions.

Namely, if T from the commutative square includes another theory besides S, e.g. Other. The following minimal example should cause the failure, albeit I haven't tested this:

theory R =
❚

theory Other =
❚

theory S =
❚

theory T =
  include ?R ❙
  include ?Other ❙
❚

view phi : R -> S =
❚

Dirty fix: Just manually flatten the inclusion of Other, i.e. replace include ?Other by contents of Other. Repeat until totally flattened.