You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we want to filter the errors we're producing, we're currently (e.g. in the flow analysis) doing this by passing down some flags saying whether to produce an error or not. We could avoid all this flag-passing and simplify some logic by instead always producing those errors and filtering them out at the top.
To avoid running analyses that we don't want to run, for performance or circularity reasons, we need to be able to skip entire sublists; this suggests that maybe errors should be something like:
nonterminal Analysis;
annotation analysisName :: String occurs on Analysis;
annotation analysisMessages :: [Message] occurs on Analysis;
production analysis
top::Analysis ::=
{}
synthesized attribute errors :: [Analysis];
Each contribution to errors would probably look something like
Then, at the top, we can filter out analyses we didn't want to be run, and laziness should do the right thing for us.
I think it's a separate question as to how to use this for circularity; plausibly, we could bubble up a set of edges about which analyses are allowed to depend on which others? Honestly, having a helper like
function hasErrorsFrom
errors occurs on a =>
Boolean ::= tree::Decorated a analysisName::String
{ return !null(concat(filter(\a -> a.analysisName == analysisName, tree.errors))); }
and using that locally might be enough.
The text was updated successfully, but these errors were encountered:
If we want to filter the errors we're producing, we're currently (e.g. in the flow analysis) doing this by passing down some flags saying whether to produce an error or not. We could avoid all this flag-passing and simplify some logic by instead always producing those errors and filtering them out at the top.
To avoid running analyses that we don't want to run, for performance or circularity reasons, we need to be able to skip entire sublists; this suggests that maybe errors should be something like:
Each contribution to errors would probably look something like
Then, at the top, we can filter out analyses we didn't want to be run, and laziness should do the right thing for us.
I think it's a separate question as to how to use this for circularity; plausibly, we could bubble up a set of edges about which analyses are allowed to depend on which others? Honestly, having a helper like
and using that locally might be enough.
The text was updated successfully, but these errors were encountered: