private static PlanBody.BodyType oldToNew(BodyType old) {
        switch (old) {
        case action: return PlanBody.BodyType.action;
        case internalAction: return PlanBody.BodyType.internalAction;
        case achieve: return PlanBody.BodyType.achieve;
        case test: return PlanBody.BodyType.test;
        case addBel: return PlanBody.BodyType.addBel;
        case delBel: return PlanBody.BodyType.delBel;
        case delAddBel: return PlanBody.BodyType.delAddBel;
        case achieveNF: return PlanBody.BodyType.achieveNF;
        case constraint: return PlanBody.BodyType.constraint;
        }
        return PlanBody.BodyType.none;
    }