static bool MatchesExitPattern( snet_record_t *rec, snet_variant_list_t *exit_patterns, snet_expr_list_t *guards) { int i; snet_variant_t *pattern; LIST_ENUMERATE(exit_patterns, i, pattern) { if (SNetRecPatternMatches(pattern, rec) && SNetEevaluateBool( SNetExprListGet( guards, i), rec)) { return true; } } return false; }
/* Helper function for the feedback-dispatcher * - copied from star.c */ static bool MatchesBackPattern( snet_record_t *rec, snet_variant_list_t *back_patterns, snet_expr_list_t *guards) { snet_expr_t *expr; snet_variant_t *pattern; LIST_ZIP_EACH(guards, back_patterns, expr, pattern) { if (SNetEevaluateBool( expr, rec) && SNetRecPatternMatches(pattern, rec)) { return true; } } return false; }