objectionary / speco

Object Specialization for EO Programs
MIT License
6 stars 4 forks source link

rules 4 and 7 are incorrect #89

Closed advasileva closed 1 year ago

advasileva commented 1 year ago

TL;DR need to specialize next-as-tuple to avoid its polymorphism

According to rule 7, we must call one of the with-* attributes in the next-as-tuple attribute. According to rule 4, we have only one next-as-tuple. Also, we cannot create an analog of monitoring function (this requires reflection). Therefore, we cannot specialize more than one type in such conditions.

I suggest creating specialized versions of the next-as-tuple-* attribute, similar to with-*. This requires changing rules 4 (add specialization), 5 (we need to know the type of the argument) and 7 (to be more specific).

advasileva commented 1 year ago

Update: there is nothing wrong with these rules, probably a bug in the implementation of rule 5