gsdlab/clafer

Optimize away navigation paths to clafers with global cardinality <= 1

Opened this issue · 0 comments

Often in models with deeply nested structures, referring to a nested clafer requires long navigation paths, which contain costly . operations. However, when the referred clafer has global cardinality <= 1, then he path can be omitted and the clafer can be referred to globally.

For example

a
   xor b ?
      c 
      d
           e
[ a.b.d.e ]

can be optimized to

[ e ]

that is, e can be accessed the same way as a top-level clafer (e.g., a).