// returns comments static LS gazelle_proposeCalculationFunctions(S ruleText, ai_gazelle_analyzeStatementsForRule_Data data) { PairS rule = splitAtDoubleArrow_pair(ruleText); S var1 = firstIntAsString(rule.a), var2 = secondIntAsString(rule.a); S var3 = firstIntAsString(rule.b); if (var1 == null || var2 == null || var3 == null) ret emptyList(); LS functions = ai_numberCalculationFunctions(); for (SS map : data.completeGoodMappings) { if (empty(functions)) null; functions = filter(functions, func(S f) -> bool { ai_checkNumberCalculationFunction1(f, ll(parseDouble(getOrKeep(map, var1)), parseDouble(getOrKeep(map, var2))), parseDouble(getOrKeep(map, var3))) }); print("Remaining functions: " + functions); } ret ll(format("compute var " + quote(outVar) + " from " + var1 + " and " + var2 + " using *", first(functions))); }