static Collection getCodeFragmentSafety(S code) { SS map = codeAnalysis_identifierSafetyMap(); Set identifiers = tok_allIdentifiers(code); Collection tags = treeSet(); for (S id : identifiers) { S tag; if (codeAnalysis_isSafeIdentifier(id)) tag = "safe"; // dangerous functions don't start with $ else tag = or2(map.get(id), "?"); tags.addAll(tokSplitAtComma(tag)); } tags = simplifySafetyTags(tags); if (empty(tags)) tags.add("safe"); ret tags; }