When I generate java code with DynSem (master, b8f541a212dc2953995806590fd22daf254d58ed) for the Green Marl compiler (greenmarl2015, bf97d6b2b26d5b24af1bf59a2dd1de117a57a727) and then build, I get these errors from java like:

33. ERROR in /[...]/greenmarl/Green-Marl/editor/java/ds/generated/interpreter/NoOutArgs_0.java (at line 60)
 	return new R_newTv_List_SimpleType_(result_out1510);
 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 The constructor R_newTv_List_SimpleType_(NIL) is undefined

This is the simplest example I could find of the issue. It’s generated from this DynSem rule if I’m not mistaken:

NoOutArgs() -newTv-> []

The only defined constructor takes a L_I_SimpleType, whereas the least upper bound between NIL and L_I_SimpleType is INodeList.

Submitted by Jeff Smits on 21 April 2015 at 02:38

On 21 April 2015 at 10:06 Vlad Vergu commented:

Yes, this i a known limitation of the type inference in DynSem. For now the workaround would be to write the rule causing the problem with type annotation:

NoOutArgs() -newTv-> [] : List(SimpleType)

This should give enough information to the type analysis. This kind of error typically happens when you create an empty list literal [].


On 21 April 2015 at 10:10 Vlad Vergu commented:

Also Jeff, it would be great if you would use the master branch of DynSem as that’s where i’m pushing updates. DynSem is still new and things change quite quickly.


On 21 April 2015 at 19:06 Jeff Smits commented:

Thanks for the workaround. That error is solved now.
I am on the master branch. I pulled, rebuild DynSem and checked if the problem still occurred before I filed this issue. I just added the commit hash to make extra clear which version of DynSem I was using. But I guess that made it less clear..

Log in to post comments