symphonytool / symphony

The Symphony IDE
5 stars 4 forks source link

Parser/TC: Crash on nested mu actions #301

Closed ldcouto closed 9 years ago

ldcouto commented 9 years ago

If we have a mu action inside another mu action, the type checker will crash and produce an "Unknown" error in the tool.

Here is a minimal example, cut down from a SysML generated model

process Test = begin
@ mu X @ (
    act1;
    mu X @ 
      (act2))
end

If you run this model in the tool, act1 will correctly produce a "not in scope" error. The next error is Unknown and no error appears regarding act2 (see figure).

screenshot from 2014-09-04 09 42 02

The crash occurs in overture.core.typechecker.Environment line 111 where a null location is produced. It's possible that this is a parser error and locations are not being set properly for nested mu actions.

ldcouto commented 9 years ago

Fixed. For reference, the larger SysML-generated model does not crash the TC anymore either. It does have type errors, though.