@Override
	public String transalte(BaseSMVSourceFormatter formatter) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		sb.append("MODULE ").append(this.getId()).append('\n');

		Map<String, List<BreezeEvent>> portSendEventMap = new HashMap<String, List<BreezeEvent>>();
		Map<String, BreezeEvent> eventMap = new HashMap<String, BreezeEvent>();
		for (BreezeModeTransition trans : this.transition) {
			BreezeEvent event = trans.getTrigger();
			eventMap.put(event.getId(), event);

			BreezePort bp = trans.getPort();

			if (!BreezeModeTransition.TRIGGER_TYPE_SEND.equals(trans.getTriggerType()))
				continue;

			List<BreezeEvent> evtList = portSendEventMap.get(bp.getId());

			if (evtList == null) {
				evtList = new LinkedList<BreezeEvent>();
				portSendEventMap.put(bp.getId(), evtList);
			}
			boolean dup = false;
			for (BreezeEvent evt : evtList)
				if (evt.getId().equals(event.getId())) {
					dup = true;
					break;
				}
			if (!dup)
				evtList.add(event);
			bp.setProperty(bp.getSmvOutName(), evtList.size());
		}

		Map<String, List<BreezeEvent>> outerEventMap = this.getOuterEvents(eventMap);

		this.addDefinePart(sb, eventMap);

		this.addRandVar(sb);

		this.addVarPortPart(sb, portSendEventMap, outerEventMap);

		BreezeMode initState = this.addVarModePart(sb);

		// value assign
		this.addAssignPart(sb, initState, outerEventMap);
		TranslationEvent translationEvent = new TranslationEvent();
		translationEvent.targetObject = this;
		translationEvent.translationBuffer = sb;
		translationEvent.formatter = formatter;
		for (TranslationListener listener : this.specificationListeners) {
			listener.handleTranslation(translationEvent);
		}

		return sb.toString();
	}