esl / ice

Apache License 2.0
2 stars 4 forks source link

Solve possible calc value returned by evaluation of var id #46

Closed lucafavatella closed 10 years ago

lucafavatella commented 10 years ago

The cache semantics (as specified in the Feb 2013 paper) is wrong as it does not guarantee that rule (9) (i.e. eval) returns a value (or list of missing dimensions) - it could return a calc! (... that would blow up the rule that called this rule)

The problem is that in rule (9) there is a separate final call to beta.find, that assumes that the chain just written by rule (10) and, ultimately, by rule (11) was not garbage collected (this assumption is wrong for concurrency among threads in the interaction with the cache).

The solution is modifying rule (9):

This solution implies that when the chain of a variable is being computed by rule (10), i.e. eval1, the chain will be built only using the subset of the context that is known.

lucafavatella commented 10 years ago

Rebased on current master.