sclass NLAMappedProp { L proposition; NLABlock.Line metBy; toString { ret "prop (" + renderFragments(proposition) + ") " + (metBy == null ? "unmet" : "met by (" + renderFragments(metBy.proposition) + ")"); } } sclass NLAMapping { NLABlock src, dest; Map entityMap; Map propositionMap; } static L nla_partialMappingsWithFailures(NLABlock b1, NLABlock b2) { Map propsB = b2.propositionIndex(); new L out; loop: for (Map map : nla_allPossibleMappings(b1, b2)) { new NLAMapping mapping; mapping.src = b1; mapping.dest = b2; mapping.entityMap = map; mapping.propositionMap = new Map; for (NLABlock.Line line : b1.propositionLines()) { new NLAMappedProp mp; mp.proposition = nla_translateLine(line, map); mp.metBy = propsB.get(mp.proposition); mapping.propositionMap.put(line, mp); } out.add(mapping); } ret out; }