if (solved) throw new ErrorFatal("Cannot alter the k->pos mapping since solve() has completed.");
if (formula==null || expr==null || k2pos.containsKey(formula)) return formula;
k2pos.put(formula, expr);
if (formula instanceof BinaryFormula) {
BinaryFormula b = (BinaryFormula)formula;
if (b.op() == FormulaOperator.AND) { k2pos(b.left(), expr); k2pos(b.right(), expr); }
}
return formula;
}
/** Associates the Kodkod formula to a particular Alloy Pos (if the Kodkod formula is not already associated with an Alloy Expr or Alloy Pos) */