diff --git a/Makefile b/Makefile
index 2430b01b7a16cb50ae2dc8bfee8197a52a6637a8..1ae1b132af6775c440fd0877cb687957bb1c6252 100755
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ GZIP = gzip -9 -f
 DEBUG  = -g
 CLASSPATH = -classpath
 CLASSPATH = -sourcepath
-PACKAGE = avatartranslator avatartranslator/directsimulation avatartranslator/tocppsim avatartranslator/touppaal avatartranslator/toturtle avatartranslator/toproverif automata compiler/tmlparser vcd nc ddtranslator launcher myutil tpndescription sddescription sdtranslator translator tmltranslator tmltranslator/toautomata tmltranslator/tosystemc  tmltranslator/tomappingsystemc tmltranslator/tomappingsystemc2 tmltranslator/touppaal tmltranslator/toturtle translator/tojava translator/tosimujava translator/totpn translator/touppaal  ui ui/avatarbd ui/avatarsmd ui/avatarrd ui/ad ui/cd ui/oscd ui/osad ui/dd ui/ebrdd ui/file ui/graph ui/iod ui/ncdd ui/procsd ui/prosmdui/prosmd/util ui/tmlad ui/tmlcd ui/tmldd ui/tmlcomp ui/req ui/sd ui/tree ui/ucd ui/window tmltranslator tmltranslator/toturtle req/ebrdd tmltranslator/tosystemc tmatrix proverifspec uppaaldesc fr/inria/oasis/vercors/cttool/model remotesimulation
+PACKAGE = avatartranslator avatartranslator/directsimulation avatartranslator/tocppsim avatartranslator/touppaal avatartranslator/toturtle avatartranslator/toproverif automata compiler/tmlparser vcd nc ddtranslator launcher myutil tpndescription sddescription sdtranslator tepe translator tmltranslator tmltranslator/toautomata tmltranslator/tosystemc  tmltranslator/tomappingsystemc tmltranslator/tomappingsystemc2 tmltranslator/touppaal tmltranslator/toturtle translator/tojava translator/tosimujava translator/totpn translator/touppaal  ui ui/avatarbd ui/avatarsmd ui/avatarrd ui/ad ui/cd ui/oscd ui/osad ui/dd ui/ebrdd ui/file ui/graph ui/iod ui/ncdd ui/procsd ui/prosmdui/prosmd/util ui/tmlad ui/tmlcd ui/tmldd ui/tmlcomp ui/req ui/sd ui/tree ui/ucd ui/window tmltranslator tmltranslator/toturtle req/ebrdd tmltranslator/tosystemc tmatrix proverifspec uppaaldesc fr/inria/oasis/vercors/cttool/model remotesimulation
 BUILDER = builder.jar
 BUILD_INFO = build.txt
 BUILD_TO_MODIFY = src/ui/DefaultText.java
@@ -86,7 +86,7 @@ basic:
 ttooljar_std:
 	rm -f $(TTOOL_BIN)/$(TTOOL_BINARY)
 	cp $(TTOOL_SRC)/ui/images/$(STD_LOGO) $(TTOOL_SRC)/ui/images/$(LOGO) 
-	cd $(TTOOL_SRC);  $(JAR) cmf $(TTOOL_JAR_TXT) $(TTOOL_BIN)/$(TTOOL_BINARY) Main.class vcd/*.class avatartranslator/*.class avatartranslator/directsimulation/*.class avatartranslator/touppaal/*.class avatartranslator/toproverif/*.class avatartranslator/*.class avatartranslator/toturtle/*.java automata/*.class compiler/tmlparser/*.class nc/*.class  tmltranslator/*.class tmltranslator/toautomata/*.class tmatrix/*.class tmltranslator/toturtle/*.class tmltranslator/touppaal/*.class tmltranslator/tosystemc/*.class tmltranslator/tomappingsystemc/*.class tmltranslator/tomappingsystemc2/*.class  tpndescription/*.class ddtranslator/*.class launcher/*.class myutil/*.class sddescription/*.class sdtranslator/*.class translator/*.class translator/tojava/*.class  translator/tosimujava/*.class translator/touppaal/*.class translator/totpn/*.class req/ebrdd/*.java ui/*.class ui/*/*.class ui/*/*/*.class proverifspec/*.class uppaaldesc/*.class ui/images/*.* ui/images/toolbarButtonGraphics/general/*.gif ui/images/toolbarButtonGraphics/media/*.gif $(TTOOL_BIN)/$(LAUNCHER_BINARY) RTLLauncher.class launcher/*.class fr/inria/oasis/vercors/cttool/model/*.class remotesimulation/*.class
+	cd $(TTOOL_SRC);  $(JAR) cmf $(TTOOL_JAR_TXT) $(TTOOL_BIN)/$(TTOOL_BINARY) Main.class vcd/*.class avatartranslator/*.class avatartranslator/directsimulation/*.class avatartranslator/touppaal/*.class avatartranslator/toproverif/*.class avatartranslator/*.class avatartranslator/toturtle/*.java automata/*.class compiler/tmlparser/*.class nc/*.class  tepe.* tmltranslator/*.class tmltranslator/toautomata/*.class tmatrix/*.class tmltranslator/toturtle/*.class tmltranslator/touppaal/*.class tmltranslator/tosystemc/*.class tmltranslator/tomappingsystemc/*.class tmltranslator/tomappingsystemc2/*.class  tpndescription/*.class ddtranslator/*.class launcher/*.class myutil/*.class sddescription/*.class sdtranslator/*.class translator/*.class translator/tojava/*.class  translator/tosimujava/*.class translator/touppaal/*.class translator/totpn/*.class req/ebrdd/*.java ui/*.class ui/*/*.class ui/*/*/*.class proverifspec/*.class uppaaldesc/*.class ui/images/*.* ui/images/toolbarButtonGraphics/general/*.gif ui/images/toolbarButtonGraphics/media/*.gif $(TTOOL_BIN)/$(LAUNCHER_BINARY) RTLLauncher.class launcher/*.class fr/inria/oasis/vercors/cttool/model/*.class remotesimulation/*.class
 
 
 launcher:
@@ -141,6 +141,7 @@ stdrelease:
 	mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/ebrdd
 	mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/evt
 	mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
+	mkdir -p $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
 	mkdir -p $(TTOOL_TARGET)/simulators/c++2/lib
 	cp  $(TTOOL_SIMULATORS)/c++2/lib/README $(TTOOL_TARGET)/simulators/c++2/lib/
 	cp  $(TTOOL_SIMULATORS)/c++2/Makefile $(TTOOL_TARGET)/simulators/c++2
@@ -158,6 +159,8 @@ stdrelease:
 	cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/evt/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/evt
 	cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
 	cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/sim/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/sim
+#	cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.cpp $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
+	cp  $(TTOOL_SIMULATORS)/c++2/src_simulator/TEPE/*.h $(TTOOL_TARGET)/simulators/c++2/src_simulator/TEPE
 # Licenses
 	cd $(TTOOL_DOC); cp $(RELEASE_STD_FILES_LICENSES) $(TTOOL_TARGET)
 # Main readme
@@ -188,12 +191,12 @@ stdrelease:
 	cp $(TTOOL_DOC)/README_bin $(TTOOL_TARGET)/bin
 	cp $(TTOOL_BIN)/configuration.gcf $(TTOOL_TARGET)/bin
 	cp -R $(TTOOL_BIN)/$(TTOOL_LOTOS_H).h $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.h $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.t  $(TTOOL_BIN)/$(TTOOL_LOTOS_H)_?.f $(TTOOL_TARGET)/bin
-	cp $(TTOOL_BIN)/$(TTOOL_BINARY) $(TTOOL_BIN)/$(LAUNCHER_BINARY) $(TTOOL_BIN)/$(TIFTRANSLATOR_BINARY) $(TTOOL_BIN)/$(TMLTRANSLATOR_BINARY) $(TTOOL_BIN)/$(TTOOL_CONFIG_SRC) $(TTOOL_BIN)/$(RELEASE_STD_FILES_UNIX_EXE)$(TTOOL_BIN)/$(RELEASE_STD_FILES_WINDOWS_EXE)    $(TTOOL_TARGET)/bin
+	cp $(TTOOL_BIN)/$(TTOOL_BINARY) $(TTOOL_BIN)/$(LAUNCHER_BINARY) $(TTOOL_BIN)/$(TIFTRANSLATOR_BINARY) $(TTOOL_BIN)/$(TMLTRANSLATOR_BINARY) $(TTOOL_BIN)/$(TTOOL_CONFIG_SRC) $(TTOOL_TARGET)/bin
 
 # Basic release
 	cd $(TTOOL_TARGET_RELEASE);$(TAR) cfv $(TTOOL_STD_RELEASE)/release.tar *; $(GZIP) -9 $(TTOOL_STD_RELEASE)/release.tar; mv $(TTOOL_STD_RELEASE)/release.tar.gz $(TTOOL_STD_RELEASE)/release.tgz
 # Advanced release
-	$(JAVADOC) $(CLASSPATH) $(TTOOL_SRC) -d $(TTOOL_TARGET)/doc/srcdoc $(TTOOL_SRC)/*.java $(TTOOL_SRC)/*/*.java $(TTOOL_SRC)/*/*/*.java $(TTOOL_SRC)/fr/inria/oasis/vercors/cttool/model/*.java
+	$(JAVADOC) -J-Xmx256m $(CLASSPATH) $(TTOOL_SRC) -d $(TTOOL_TARGET)/doc/srcdoc $(TTOOL_SRC)/*.java $(TTOOL_SRC)/*/*.java $(TTOOL_SRC)/*/*/*.java $(TTOOL_SRC)/fr/inria/oasis/vercors/cttool/model/*.java
 	mkdir -p $(TTOOL_TARGET)/src
 	cp -R $(TTOOL_SRC)/* $(TTOOL_TARGET)/src
 	find $(TTOOL_TARGET)/src -type f -not \( -name '*.java' -o -name '*.gif' -o -name '*.jjt' -o -name '*.txt' \) -a -exec rm -f {} \;
diff --git a/src/avatartranslator/AvatarBlock.java b/src/avatartranslator/AvatarBlock.java
index fd08e80161e0639e07895b1344c135818f35637c..11cf82c7cbf9fc88d56cd38e59c1665a19e44e1c 100644
--- a/src/avatartranslator/AvatarBlock.java
+++ b/src/avatartranslator/AvatarBlock.java
@@ -108,6 +108,7 @@ public class AvatarBlock extends AvatarElement {
 	}
 	
 	public String toString() {
+		//Thread.currentThread().dumpStack();
 		StringBuffer sb = new StringBuffer("block:" + getName() + " ID=" + getID() + " \n");
 		if (getFather() != null) {
 			sb.append("  subblock of: " + getFather().getName() + " ID=" + getFather().getID()+ "\n"); 
@@ -214,20 +215,20 @@ public class AvatarBlock extends AvatarElement {
 	public boolean isAValidMethodCall(String _s) {
 		int i;
 		
-		TraceManager.addDev("****** method=" + _s);
+		//TraceManager.addDev("****** method=" + _s);
 		String all = _s;
 		
 		int indexeq = _s.indexOf('=');
 		
 		if (indexeq != -1) {
 			_s = _s.substring(indexeq + 1, _s.length()).trim();
-			TraceManager.addDev("****** cut method: " + _s);
+			//TraceManager.addDev("****** cut method: " + _s);
 		}
 		
 		int index0 = _s.indexOf("(");
 		int index1 = _s.indexOf(")");
 		if ((index0 == -1) || (index1 == -1) || (index1 < index0)) {
-			TraceManager.addDev("No parenthesis");
+			//TraceManager.addDev("No parenthesis");
 			return false;
 		}
 		
@@ -235,12 +236,12 @@ public class AvatarBlock extends AvatarElement {
 		
 		AvatarMethod am = getAvatarMethodWithName(method);
 		if (am == null) {
-			TraceManager.addDev("Method not found");
+			//TraceManager.addDev("Method not found");
 			return false;
 		}
 		
 		String params = _s.substring(index0+1, index1).trim();
-		TraceManager.addDev("params=" + params);
+		//TraceManager.addDev("params=" + params);
 		if (params.length() == 0) {
 			if (am.getListOfAttributes().size() == 0) {
 				return true;
@@ -248,7 +249,7 @@ public class AvatarBlock extends AvatarElement {
 				return false;
 			}
 		}
-		TraceManager.addDev("params=" + params);
+		//TraceManager.addDev("params=" + params);
 		String [] actions = params.split(",");
 		if (am.getListOfAttributes().size() != actions.length) {
 			return false;
@@ -256,23 +257,23 @@ public class AvatarBlock extends AvatarElement {
 		
 		AvatarAttribute aa;
 		for(i=0; i<actions.length; i++) {
-			TraceManager.addDev("params=" + params +  " actions=" + actions[i]);
+			//TraceManager.addDev("params=" + params +  " actions=" + actions[i]);
 			aa = getAvatarAttributeWithName(actions[i].trim());
 			if (aa == null) {
-				TraceManager.addDev("Failed for attribute " + actions[i]);
+				//TraceManager.addDev("Failed for attribute " + actions[i]);
 				return false;
 			}
 		}
 		
 		// Checking for return attributes
 		if (indexeq != -1) {
-			TraceManager.addDev("Checking for return params");
+			//TraceManager.addDev("Checking for return params");
 			String retparams = all.substring(0, indexeq).trim();
 			
 			// multiple params
 			if (retparams.charAt(0) == '(') {
 				if (retparams.charAt(retparams.length()-1) != ')') {
-					TraceManager.addDev("Bad format for return params: " + retparams);
+					//TraceManager.addDev("Bad format for return params: " + retparams);
 					return false;
 				}
 				
@@ -283,10 +284,10 @@ public class AvatarBlock extends AvatarElement {
 				}
 				
 				for(i=0; i<actions.length; i++) {
-					TraceManager.addDev("params=" + retparams +  " actions=" + actions[i]);
+					//TraceManager.addDev("params=" + retparams +  " actions=" + actions[i]);
 					aa = getAvatarAttributeWithName(actions[i].trim());
 					if (aa == null) {
-						TraceManager.addDev("Failed for attribute " + actions[i]);
+						//TraceManager.addDev("Failed for attribute " + actions[i]);
 						return false;
 					}
 				}
@@ -295,18 +296,18 @@ public class AvatarBlock extends AvatarElement {
 				// Only one param.
 				aa = getAvatarAttributeWithName(retparams);
 				if (aa == null) {
-					TraceManager.addDev("Failed for return attribute " + retparams);
+					//TraceManager.addDev("Failed for return attribute " + retparams);
 					return false;
 				}
 				
 				if (am.getListOfReturnAttributes().size() != 1) {
-					TraceManager.addDev("Wrong number of return parameters in :" + retparams);
+					//TraceManager.addDev("Wrong number of return parameters in :" + retparams);
 					return false;
 				}
 			}
 			
 		}
-		TraceManager.addDev("Ok for method " + _s);
+		//TraceManager.addDev("Ok for method " + _s);
 		
 		return true;
 		
diff --git a/src/avatartranslator/AvatarSpecification.java b/src/avatartranslator/AvatarSpecification.java
index 6c5f3510c596aa59f235828009f4196305b2d685..07405824c381ba39efd544e290fcc9c4561463a9 100644
--- a/src/avatartranslator/AvatarSpecification.java
+++ b/src/avatartranslator/AvatarSpecification.java
@@ -103,6 +103,7 @@ public class AvatarSpecification extends AvatarElement {
 	}
 	
 	public String toString() {
+		//Thread.currentThread().dumpStack();
 		StringBuffer sb = new StringBuffer("Blocks:\n");
 		for(AvatarBlock block: blocks) {
 			sb.append("*** " + block.toString()+"\n");
diff --git a/src/avatartranslator/AvatarStateMachine.java b/src/avatartranslator/AvatarStateMachine.java
index 6e6d7b9e5b9a3be58be663694c8e0a77658cf716..292e8a197f624c5eff84c91c1306b96103b33ee6 100644
--- a/src/avatartranslator/AvatarStateMachine.java
+++ b/src/avatartranslator/AvatarStateMachine.java
@@ -122,7 +122,7 @@ public class AvatarStateMachine extends AvatarElement {
 			removeElement(asme);
 		}
 		
-		TraceManager.addDev(_block.toString());
+		//TraceManager.addDev(_block.toString());
 		
 		removeAllSuperStates();
 	}
diff --git a/src/avatartranslator/directsimulation/AvatarSimulationBlock.java b/src/avatartranslator/directsimulation/AvatarSimulationBlock.java
index 4bd59daac434d047538237847ffa79fb1c8a4675..66d3e2b00db6beee119bad654068d33f0a8fe49a 100644
--- a/src/avatartranslator/directsimulation/AvatarSimulationBlock.java
+++ b/src/avatartranslator/directsimulation/AvatarSimulationBlock.java
@@ -389,7 +389,7 @@ public class AvatarSimulationBlock  {
 							}
 							_aspt.linkedTransaction.parameters = parameters;
 						} else if ((!(_aspt.isSending))  && (_aspt.parameters != null)){
-							TraceManager.addDev("Reading value " + aaos);
+							//TraceManager.addDev("Reading value " + aaos);
 							// Synchronous Receiving
 							String myAction = "";
 							for(i=0; i<aaos.getNbOfValues(); i++) {
@@ -461,7 +461,7 @@ public class AvatarSimulationBlock  {
 								if (index != -1) {
 									attributeValues.remove(index);
 									attributeValues.add(index, param);
-									TraceManager.addDev("Reading value:" + param);
+									//TraceManager.addDev("Reading value:" + param);
 									if (myAction.length() == 0) {
 										myAction += "" + param;
 									} else {
@@ -526,7 +526,7 @@ public class AvatarSimulationBlock  {
 				s = params[i].trim();
 				if (s.length() > 0) {
 					indexAtt = block.getIndexOfAvatarAttributeWithName(s);
-					TraceManager.addDev("indexAtt=" + indexAtt + " s=" + s);
+					//TraceManager.addDev("indexAtt=" + indexAtt + " s=" + s);
 					if (indexAtt > -1) {
 						if (cpt>0) {
 							parameters += ", ";
@@ -550,12 +550,12 @@ public class AvatarSimulationBlock  {
 		nameOfVar= _action.substring(0, ind).trim();
 		act = _action.substring(ind+1, _action.length());
 		
-		TraceManager.addDev("1- Working on attribute =" + nameOfVar + " action=" + _action);
+		//TraceManager.addDev("1- Working on attribute =" + nameOfVar + " action=" + _action);
 		
 		
 		
 		// Variable
-		TraceManager.addDev("2- Working on attribute =" + nameOfVar);
+		//TraceManager.addDev("2- Working on attribute =" + nameOfVar);
 		int indexVar = block.getIndexOfAvatarAttributeWithName(nameOfVar);
 		if (indexVar != -1) {
 			// int or bool???
diff --git a/src/avatartranslator/directsimulation/AvatarSpecificationSimulation.java b/src/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
index 86f67a6b738f586b9912141bda061518d1235617..49324d2e30d9b45e5eccfeef09db09c657219d6a 100644
--- a/src/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
+++ b/src/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
@@ -195,7 +195,7 @@ public class AvatarSpecificationSimulation  {
 			}
 		}
 		setMode(TERMINATED);
-		//TraceManager.addDev("Simulation finished at time: " + clockValue + "\n--------------------------------------");
+		TraceManager.addDev("Simulation finished at time: " + clockValue + "\n--------------------------------------");
 		
 		//printExecutedTransactions();
 	}
@@ -258,11 +258,11 @@ public class AvatarSpecificationSimulation  {
 				}
 			}
 			pendingTransactions = ll;
-			TraceManager.addDev("At least on logical transition");
+			//TraceManager.addDev("At least on logical transition");
 			return;
 		}
 		
-		TraceManager.addDev("No logical transition -> temporal transitions?");
+		//TraceManager.addDev("No logical transition -> temporal transitions?");
 		// Resolving time constraints
 		int indexMin = -1;
 		int minMin = Integer.MAX_VALUE;
@@ -274,11 +274,11 @@ public class AvatarSpecificationSimulation  {
 				if (aspt.myMinDuration < minMin) {
 					minMin = aspt.myMinDuration;
 					indexMin = ll.size();
-					TraceManager.addDev("Setting min duration = " +  minMin);
+					//TraceManager.addDev("Setting min duration = " +  minMin);
 				}
 				if (aspt.myMaxDuration < maxDuration) {
 					maxDuration = aspt.myMaxDuration;
-					TraceManager.addDev("Setting max Duration = " +  maxDuration);
+					//TraceManager.addDev("Setting max Duration = " +  maxDuration);
 				}
 			}
 			ll.add(aspt);
@@ -290,12 +290,12 @@ public class AvatarSpecificationSimulation  {
 		
 		// Temporal transitions
 		if ((pendingTransactions.size() > 0) && (indexMin > -1)) {
-			TraceManager.addDev("At least one temporal trans");
+			//TraceManager.addDev("At least one temporal trans");
 			// Must compute the min index, and the max duration
 			// We put in ll all transactions that are between the min and the max of the selected index
 			AvatarSimulationPendingTransaction aspt_tmp = pendingTransactions.get(indexMin);
 			for(AvatarSimulationPendingTransaction 	aspt1: pendingTransactions) {
-				TraceManager.addDev("aspt1 min=" + aspt1.myMinDuration + " max autre=" + aspt_tmp.myMaxDuration);
+				//TraceManager.addDev("aspt1 min=" + aspt1.myMinDuration + " max autre=" + aspt_tmp.myMaxDuration);
 				if (aspt1.myMinDuration <= aspt_tmp.myMaxDuration) {
 					ll.add(aspt1);
 					aspt1.maxDuration = maxDuration;
@@ -501,7 +501,7 @@ public class AvatarSpecificationSimulation  {
 			if (_aspt.linkedTransaction != null) {
 				if (_aspt.durationOnCurrent) {
 					_aspt.selectedDuration = _aspt.myMinDuration + (int)(Math.floor(Math.random()*(_aspt.maxDuration-_aspt.myMinDuration)));
-					TraceManager.addDev("Selected duration:" + _aspt.selectedDuration + " myMinDuration=" + _aspt.myMinDuration + " maxDuration=" + _aspt.maxDuration);
+					//TraceManager.addDev("Selected duration:" + _aspt.selectedDuration + " myMinDuration=" + _aspt.myMinDuration + " maxDuration=" + _aspt.maxDuration);
 					if (_aspt.durationOnOther) {
 						_aspt.linkedTransaction.durationSelected = true;
 						_aspt.linkedTransaction.selectedDuration = _aspt.selectedDuration;
@@ -511,7 +511,7 @@ public class AvatarSpecificationSimulation  {
 				}
 			} else {
 				_aspt.selectedDuration = _aspt.myMinDuration + (int)(Math.floor(Math.random()*(_aspt.maxDuration-_aspt.myMinDuration)));
-				TraceManager.addDev("Selected duration:" + _aspt.selectedDuration + " myMinDuration=" + _aspt.myMinDuration + " maxDuration=" + _aspt.maxDuration);
+				//TraceManager.addDev("Selected duration:" + _aspt.selectedDuration + " myMinDuration=" + _aspt.myMinDuration + " maxDuration=" + _aspt.maxDuration);
 			}
 		}
 	}
diff --git a/src/myutil/BoolExpressionEvaluator.java b/src/myutil/BoolExpressionEvaluator.java
index e9d23cbc39800587eba503010abaad35ad51aeaa..54f7d691fe7ddeb7436efd630752eb2624512584 100755
--- a/src/myutil/BoolExpressionEvaluator.java
+++ b/src/myutil/BoolExpressionEvaluator.java
@@ -96,7 +96,9 @@ public class BoolExpressionEvaluator {
 		_expr = Conversion.replaceAllString(_expr, "and", "&").trim();
 		_expr = Conversion.replaceAllString(_expr, "==", "=").trim();
 		
-		tokens = new java.util.StringTokenizer(_expr," \t\n\r+-*/()!=&|",true);
+		//TraceManager.addDev("Computing:" + _expr);
+		
+		tokens = new java.util.StringTokenizer(_expr," \t\n\r+-*/()!=&|<>",true);
 		
 		computeNextToken();
 		int result =  (int)(parseExpression());
@@ -234,18 +236,9 @@ public class BoolExpressionEvaluator {
 				if (errorMessage != null) return result;
 				
 				resulttmp = parseRootexp();
-				//intresult = (int)(resulttmp);
-				//intresult2 = (int)(result);
 				
 				if (errorMessage != null) return result;
 				
-				/*if ((intresult2 != TRUE_VALUE) && (intresult2 != FALSE_VALUE)) {
-					errorMessage = "Expression on the left is not a boolean (result=" + intresult2 + ")";
-				}
-				if ((intresult != TRUE_VALUE) && (intresult != FALSE_VALUE)) {
-					errorMessage = "Expression on the right is not a boolean (result=" + intresult + ")";
-				}*/
-				
 				if (result < resulttmp) {
 					return TRUE_VALUE;
 				} else {
@@ -257,18 +250,9 @@ public class BoolExpressionEvaluator {
 				if (errorMessage != null) return result;
 				
 				resulttmp = parseRootexp();
-				//intresult = (int)(resulttmp);
-				//intresult2 = (int)(result);
 				
 				if (errorMessage != null) return result;
 				
-				/*if ((intresult2 != TRUE_VALUE) && (intresult2 != FALSE_VALUE)) {
-					errorMessage = "Expression on the left is not a boolean (result=" + intresult2 + ")";
-				}
-				if ((intresult != TRUE_VALUE) && (intresult != FALSE_VALUE)) {
-					errorMessage = "Expression on the right is not a boolean (result=" + intresult + ")";
-				}*/
-				
 				if (result > resulttmp) {
 					return TRUE_VALUE;
 				} else {
diff --git a/src/myutil/IntExpressionEvaluator.java b/src/myutil/IntExpressionEvaluator.java
index b503b15a099c8fdd8c056d98d2626d7441591a5d..e9e9df887abaf3881f8007592dc68561b388a3ee 100755
--- a/src/myutil/IntExpressionEvaluator.java
+++ b/src/myutil/IntExpressionEvaluator.java
@@ -74,6 +74,7 @@ public class IntExpressionEvaluator {
    }
    
    public double getResultOf(String _expr) {
+	   //TraceManager.addDev("Computing:" + _expr);
 	   tokens = new java.util.StringTokenizer(_expr," \t\n\r+-*/()",true);
 	   
 	   computeNextToken();
@@ -239,7 +240,6 @@ public class IntExpressionEvaluator {
         try {
           currentValue = Integer.valueOf(s).intValue();
           currentType = NUMBER_TOKEN;
-		  System.out.println("value:" + s);
         }
         catch (NumberFormatException x) {
           errorMessage = "Illegal format for a number.";
diff --git a/src/tepe/TEPE.java b/src/tepe/TEPE.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b25875c5928b35522122431d63cf0ceeb86d86b
--- /dev/null
+++ b/src/tepe/TEPE.java
@@ -0,0 +1,74 @@
+/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+
+ludovic.apvrille AT enst.fr
+
+This software is a computer program whose purpose is to allow the 
+edition of TURTLE analysis, design and deployment diagrams, to 
+allow the generation of RT-LOTOS or Java code from this diagram, 
+and at last to allow the analysis of formal validation traces 
+obtained from external tools, e.g. RTL from LAAS-CNRS and CADP 
+from INRIA Rhone-Alpes.
+
+This software is governed by the CeCILL  license under French law and
+abiding by the rules of distribution of free software.  You can  use, 
+modify and/ or redistribute the software under the terms of the CeCILL
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info". 
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability. 
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL license and that you accept its terms.
+
+/**
+ * Class TEPE
+ * Creation: 15/02/2011
+ * @version 1.0 15/02/2011
+ * @author Ludovic APVRILLE
+ * @see
+ */
+
+package tepe;
+
+import java.util.*;
+
+import myutil.*;
+
+public class TEPE extends Vector<TEPEComponent> {
+    private String name;
+	private Object referenceObject;
+    
+    public TEPE(String _name, Object _referenceObject) {
+		name = _name;
+		referenceObject = _referenceObject;
+    }
+    
+   
+	public String getName() {
+		return name;
+	}
+    
+	public TEPEComponent getTEPEComponent(int index) {
+		return get(index);
+	}
+	
+	public Object getReferenceObject() {
+		return referenceObject;
+	}
+	
+}
diff --git a/src/tepe/TEPEComponent.java b/src/tepe/TEPEComponent.java
new file mode 100644
index 0000000000000000000000000000000000000000..db3074f379693adb607f4e0f6c509213d34bb187
--- /dev/null
+++ b/src/tepe/TEPEComponent.java
@@ -0,0 +1,79 @@
+/**Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+
+ludovic.apvrille AT enst.fr
+
+This software is a computer program whose purpose is to allow the 
+edition of TURTLE analysis, design and deployment diagrams, to 
+allow the generation of RT-LOTOS or Java code from this diagram, 
+and at last to allow the analysis of formal validation traces 
+obtained from external tools, e.g. RTL from LAAS-CNRS and CADP 
+from INRIA Rhone-Alpes.
+
+This software is governed by the CeCILL  license under French law and
+abiding by the rules of distribution of free software.  You can  use, 
+modify and/ or redistribute the software under the terms of the CeCILL
+license as circulated by CEA, CNRS and INRIA at the following URL
+"http://www.cecill.info". 
+
+As a counterpart to the access to the source code and  rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty  and the software's author,  the holder of the
+economic rights,  and the successive licensors  have only  limited
+liability. 
+
+In this respect, the user's attention is drawn to the risks associated
+with loading,  using,  modifying and/or developing or reproducing the
+software by the user in light of its specific status of free software,
+that may mean  that it is complicated to manipulate,  and  that  also
+therefore means  that it is reserved for developers  and  experienced
+professionals having in-depth computer knowledge. Users are therefore
+encouraged to load and test the software's suitability as regards their
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
+
+The fact that you are presently reading this means that you have had
+knowledge of the CeCILL license and that you accept its terms.
+
+/**
+ * Class TEPEComponent
+ * Creation: 15/02/2011
+ * @version 1.0 15/02/2011
+ * @author Ludovic APVRILLE
+ * @see
+ */
+
+package tepe;
+
+import java.util.*;
+
+import myutil.*;
+
+public class TEPEComponent  {
+	private static int ID = 0;
+	
+    private String name;
+	private Object referenceObject;
+	private int id;
+    
+    public TEPEComponent(String _name, Object _referenceObject) {
+		name = _name;
+		referenceObject = _referenceObject;
+		id = ID;
+		ID ++;
+    }
+    
+   
+	public String getName() {
+		return name;
+	}
+	
+	public Object getReferenceObject() {
+		return referenceObject;
+	}
+	
+	public static void reinitID() {
+		ID = 0;
+	}
+    
+}
diff --git a/src/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java b/src/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java
index 8c57cc8cfe41a492808b2023bb5db32b044bed2c..50a6ec741075382168d64d28543bf942fafc766d 100755
--- a/src/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java
+++ b/src/tmltranslator/tomappingsystemc2/TML2MappingSystemC.java
@@ -50,6 +50,7 @@ import java.util.*;
 import tmltranslator.*;
 import myutil.*;
 import req.ebrdd.*;
+import tepe.*;
 
 
 public class TML2MappingSystemC {
@@ -71,6 +72,7 @@ public class TML2MappingSystemC {
 	private ArrayList<MappedSystemCTask> tasks;
 	
 	private ArrayList<EBRDD> ebrdds;
+	private ArrayList<TEPE> tepes;
 	private ArrayList<SystemCEBRDD> systemCebrdds = new ArrayList<SystemCEBRDD>();
     
 	public TML2MappingSystemC(TMLModeling _tmlm) {
@@ -83,13 +85,13 @@ public class TML2MappingSystemC {
 		tmlmapping.makeMinimumMapping();
  	}
 
-	public TML2MappingSystemC(TMLModeling _tmlm, ArrayList<EBRDD> _ebrdds) {
+	public TML2MappingSystemC(TMLModeling _tmlm, ArrayList<EBRDD> _ebrdds, ArrayList<TEPE> _tepes) {
 		tmlmodeling = _tmlm;
 		ebrdds = _ebrdds;
 		tmlmapping = tmlmodeling.getDefaultMapping();
 	}
 	
-	public TML2MappingSystemC(TMLMapping _tmlmapping, ArrayList<EBRDD> _ebrdds) {
+	public TML2MappingSystemC(TMLMapping _tmlmapping, ArrayList<EBRDD> _ebrdds, ArrayList<TEPE> _tepes) {
         tmlmapping = _tmlmapping;
 		ebrdds = _ebrdds;
 		tmlmapping.makeMinimumMapping();
diff --git a/src/ui/AvatarDesignPanel.java b/src/ui/AvatarDesignPanel.java
index 3fea637ebdbb4a315f83d675977ce114c8ed9470..9d1317103fd48056541eac7f9290e65c722e94ed 100644
--- a/src/ui/AvatarDesignPanel.java
+++ b/src/ui/AvatarDesignPanel.java
@@ -165,10 +165,9 @@ public class AvatarDesignPanel extends TURTLEPanel {
     }
 	
 	public void resetMetElements() {
-		TraceManager.addDev("Reset met elements");
+		//TraceManager.addDev("Reset met elements");
 		TGComponent tgc;
 		
-		
 		for(int i=0; i<panels.size(); i++) {
 			ListIterator iterator = ((TDiagramPanel)(panels.get(i))).getComponentList().listIterator();
 			while(iterator.hasNext()) {
diff --git a/src/ui/AvatarDesignPanelTranslator.java b/src/ui/AvatarDesignPanelTranslator.java
index bc370e3697081260cfb7c0c4a8d5b07dae62de28..4b9f9a84d71e0b12be5a1ebf1bb5a56d287f9208 100644
--- a/src/ui/AvatarDesignPanelTranslator.java
+++ b/src/ui/AvatarDesignPanelTranslator.java
@@ -976,7 +976,7 @@ public class AvatarDesignPanelTranslator {
 								s = modifyString(s.trim());
 								// Variable assignation or method call?
 								
-								TraceManager.addDev("IsAVariable Assignation: " + s + " -> " + isAVariableAssignation(s));
+								//TraceManager.addDev("IsAVariable Assignation: " + s + " -> " + isAVariableAssignation(s));
 								
 								if (!isAVariableAssignation(s)) {
 									// Method call
@@ -1068,7 +1068,7 @@ public class AvatarDesignPanelTranslator {
 				block1 = port.getAvatarBDBlock1();
 				block2 = port.getAvatarBDBlock2();
 				
-				TraceManager.addDev("Searching block with name " + block1.getBlockName());
+				//TraceManager.addDev("Searching block with name " + block1.getBlockName());
 				b1 = _as.getBlockWithName(block1.getBlockName());
 				b2 = _as.getBlockWithName(block2.getBlockName());
 				
@@ -1082,7 +1082,7 @@ public class AvatarDesignPanelTranslator {
 					for(i=0; i<l1.size(); i++) {
 						name1 = AvatarSignal.getSignalNameFromFullSignalString(l1.get(i));
 						name2 = AvatarSignal.getSignalNameFromFullSignalString(l2.get(i));
-						TraceManager.addDev("Searching signal with name " + name1 +  " in block " + b1.getName());
+						//TraceManager.addDev("Searching signal with name " + name1 +  " in block " + b1.getName());
 						atas1 = b1.getAvatarSignalWithName(name1);
 						atas2 = b2.getAvatarSignalWithName(name2);
 						if ((atas1 != null) && (atas2 != null)) {
@@ -1139,7 +1139,7 @@ public class AvatarDesignPanelTranslator {
 			return _input;
 		}
 		
-		TraceManager.addDev("-> -> Analyzing method call " + s);
+		//TraceManager.addDev("-> -> Analyzing method call " + s);
 		TAttribute ta, tatmp; 
 		
 		String [] actions = s.split(",");
@@ -1198,7 +1198,7 @@ public class AvatarDesignPanelTranslator {
 			}
 		}
 		
-		TraceManager.addDev("-> -> Returning method call " + s);
+		//TraceManager.addDev("-> -> Returning method call " + s);
 		
 		return s;
 	}
@@ -1219,7 +1219,7 @@ public class AvatarDesignPanelTranslator {
 		
 		tmp = tmp.substring(0, index);
 		
-		TraceManager.addDev("rest= >" + tmp + "<");
+		//TraceManager.addDev("rest= >" + tmp + "<");
 		int length = tmp.length();
 		tmp = tmp.trim();
 		if (tmp.length() != length) {
diff --git a/src/ui/AvatarMethod.java b/src/ui/AvatarMethod.java
index c8a5beef8f3be422f8a0c17eff407aa78a6886bf..39ae7fe53d7c92fbffb372d051f90fc68333e519 100644
--- a/src/ui/AvatarMethod.java
+++ b/src/ui/AvatarMethod.java
@@ -89,7 +89,7 @@ public class AvatarMethod {
 	// Returns null in case the method is not valid
 	public static AvatarMethod isAValidMethod(String _method) {
 		
-		TraceManager.addDev("Is a valid method? " + _method);
+		//TraceManager.addDev("Is a valid method? " + _method);
 		
 		String method, tmp, id;
 		String rt = ""; 
@@ -117,8 +117,8 @@ public class AvatarMethod {
 					TraceManager.addDev("Unvalid type: " + rt);
 					return null;
 				} 
-				TraceManager.addDev("Found a return type: " + rt);
-				TraceManager.addDev("Now working with method: " + method);
+				//TraceManager.addDev("Found a return type: " + rt);
+				//TraceManager.addDev("Now working with method: " + method);
 			}
 		}
 		
@@ -218,7 +218,7 @@ public class AvatarMethod {
 					TraceManager.addDev("Unvalid id of parameter " + splitted[i+1]);
 					return null;
 				} 
-				TraceManager.addDev("Adding parameter: " + splitted[i] + " " + splitted[i+1]);
+				//TraceManager.addDev("Adding parameter: " + splitted[i] + " " + splitted[i+1]);
 				types[i/2] = splitted[i];
 				typeIds[i/2] = splitted[i+1];
 			}
@@ -227,7 +227,7 @@ public class AvatarMethod {
 			return null;
 		}
 		
-		TraceManager.addDev("Returning method");
+		//TraceManager.addDev("Returning method");
 		
 		return new AvatarMethod(id, types, typeIds, rt);
 	}
diff --git a/src/ui/AvatarRequirementPanel.java b/src/ui/AvatarRequirementPanel.java
index a08074a824ca4d9a71220016b050ea9da7cbe3c2..d510c308c91bf7771fe1ee074f9fc394b0ba599d 100755
--- a/src/ui/AvatarRequirementPanel.java
+++ b/src/ui/AvatarRequirementPanel.java
@@ -190,13 +190,13 @@ public class AvatarRequirementPanel extends TURTLEPanel {
         return true;
     }*/
 	
-	/*public void addAllEBRDDPanels(ArrayList<EBRDDPanel> _al) {
+	public void addAllAvatarPDPanels(ArrayList<AvatarPDPanel> _al) {
 		for(int i=0; i<panels.size(); i++) {
-			if (panelAt(i) instanceof EBRDDPanel) {
-				_al.add(((EBRDDPanel)panelAt(i)));
+			if (panelAt(i) instanceof AvatarPDPanel) {
+				_al.add(((AvatarPDPanel)panelAt(i)));
 			}
 		}
-	}*/
+	}
     
 
 }
\ No newline at end of file
diff --git a/src/ui/GTURTLEModeling.java b/src/ui/GTURTLEModeling.java
index 568b12768ac6640d43d75ab95f720ca958911928..2f48c78076d3e10fced4304f29586a808ca052fe 100755
--- a/src/ui/GTURTLEModeling.java
+++ b/src/ui/GTURTLEModeling.java
@@ -3621,9 +3621,9 @@ public class GTURTLEModeling {
 		makeXMLConnectors(elt.getElementsByTagName("CONNECTOR"), tdp);
 		//TraceManager.addDev("Subcomponents");
 		makeXMLComponents(elt.getElementsByTagName("SUBCOMPONENT"), tdp);
-		TraceManager.addDev("RealPoints");
+		//TraceManager.addDev("RealPoints");
 		connectConnectorsToRealPoints(tdp);
-		TraceManager.addDev("Structure changed");
+		//TraceManager.addDev("Structure changed");
 		tdp.structureChanged();
 		//TraceManager.addDev("Post loading");
 		makePostLoading(tdp, 0);
@@ -3678,7 +3678,7 @@ public class GTURTLEModeling {
 		String name;
 
 		name = elt.getAttribute("name");
-		TraceManager.addDev("Loading SMD of:" + name);
+		//TraceManager.addDev("Loading SMD of:" + name);
 		AvatarSMDPanel asmdp = mgui.getAvatarSMDPanel(indexDesign, name);
 
 		if (asmdp == null) {
diff --git a/src/ui/MainGUI.java b/src/ui/MainGUI.java
index 03fe79e4f8274744b818d45cf4eac6cc29b7faa9..34d4fdba67e2fa280ec8d1a801f1ff73fec417df 100755
--- a/src/ui/MainGUI.java
+++ b/src/ui/MainGUI.java
@@ -3238,7 +3238,7 @@ public	class MainGUI implements ActionListener, WindowListener, KeyListener {
     public void generateSystemC() {
         TURTLEPanel tp = getCurrentTURTLEPanel();
 		if (tp instanceof AvatarDesignPanel) {
-			TraceManager.addDev("AVATAR Simulation");
+			//TraceManager.addDev("AVATAR Simulation");
 			/*JDialogAvatarSimulationGeneration jgen = new JDialogAvatarSimulationGeneration(frame, this, "Simulation code generation and compilation", ConfigurationTTool.AVATARSimulationHost, ConfigurationTTool.AVATARCPPSIMCodeDirectory, ConfigurationTTool.AVATARCPPSIMCompileCommand, ConfigurationTTool.AVATARCPPSIMCodeExecuteCommand, ConfigurationTTool.AVATARCPPSIMInteractiveExecuteCommand);
 			jgen.setSize(500, 750);
 			GraphicLib.centerOnParent(jgen);
@@ -4212,6 +4212,20 @@ public	class MainGUI implements ActionListener, WindowListener, KeyListener {
 		return al;
 	}
 	
+	public ArrayList<AvatarPDPanel> getAllAvatarPDPanels() {
+		TURTLEPanel tp;
+		ArrayList<AvatarPDPanel> al = new ArrayList<AvatarPDPanel>();
+		//System.out.println("global search for: " + name);
+		for(int i=0; i<tabs.size(); i++) {
+			tp = (TURTLEPanel)(tabs.elementAt(i));
+			if (tp instanceof AvatarRequirementPanel) {
+				((AvatarRequirementPanel)tp).addAllAvatarPDPanels(al);
+			}
+		}
+		
+		return al;
+	}
+	
 	
 	
 	public LinkedList getAllTMLComponents() {
diff --git a/src/ui/avatarbd/AvatarBDBlock.java b/src/ui/avatarbd/AvatarBDBlock.java
index 89e556ef14490394d6ea6a2a47832906153fa4d5..2b522c094e52c511b2b651e8a088de83bccdb0c4 100644
--- a/src/ui/avatarbd/AvatarBDBlock.java
+++ b/src/ui/avatarbd/AvatarBDBlock.java
@@ -684,7 +684,7 @@ public class AvatarBDBlock extends TGCScalableWithInternalComponent implements S
                                     valueAtt = "";
                                 }
                                 if ((TAttribute.isAValidId(id, false, false)) && (TAttribute.isAValidInitialValue(type, valueAtt))) {
-                                    TraceManager.addDev("Adding attribute " + id + " typeOther=" + typeOther);
+                                    //TraceManager.addDev("Adding attribute " + id + " typeOther=" + typeOther);
                                     TAttribute ta = new TAttribute(access, id, valueAtt, type, typeOther);
                                     myAttributes.addElement(ta);
                                 }
diff --git a/src/ui/avatarbd/AvatarBDPanel.java b/src/ui/avatarbd/AvatarBDPanel.java
index c2d94c42032070c3de4b19cc123d27a0dd13c135..8c1df818268992c80a22a304a3d9177de9291f9a 100644
--- a/src/ui/avatarbd/AvatarBDPanel.java
+++ b/src/ui/avatarbd/AvatarBDPanel.java
@@ -82,7 +82,7 @@ public class AvatarBDPanel extends TDiagramPanel {
         //System.out.println("Action on add!");
         if (tgc instanceof AvatarBDBlock) {
             AvatarBDBlock abdb = (AvatarBDBlock)(tgc);
-            TraceManager.addDev(" *** add Avatar block *** name=" + abdb.getBlockName());
+            //TraceManager.addDev(" *** add Avatar block *** name=" + abdb.getBlockName());
             mgui.addAvatarBlock(tp, abdb.getBlockName());
             return true;
         } 
diff --git a/src/ui/avatarbd/AvatarBDPortConnector.java b/src/ui/avatarbd/AvatarBDPortConnector.java
index 74844641b88533e157373f17936470221f462ed9..9b0768fc456c425af0d0d3783ea25df3e098782b 100644
--- a/src/ui/avatarbd/AvatarBDPortConnector.java
+++ b/src/ui/avatarbd/AvatarBDPortConnector.java
@@ -563,7 +563,7 @@ public  class AvatarBDPortConnector extends TGConnector implements ScalableTGCom
 			int index;
 			for(int i=0; i<v.size(); i++) {
 				assoc = (String)(v.get(i));
-				TraceManager.addDev("assoc=" + assoc);
+				//TraceManager.addDev("assoc=" + assoc);
 				as1 = block1.getSignalNameBySignalDef(getFirstSignalOfSignalAssociation(assoc));
 				as2 = block2.getSignalNameBySignalDef(getSecondSignalOfSignalAssociation(assoc));
 				
@@ -577,7 +577,7 @@ public  class AvatarBDPortConnector extends TGConnector implements ScalableTGCom
 						outSignalsAtDestination.add(as2.toString());
 					}
 				} else {
-					TraceManager.addDev("null signals: removing assoc");
+					//TraceManager.addDev("null signals: removing assoc");
 				}
 			}
 		} catch (Exception e) {
diff --git a/src/ui/window/JDialogSystemCGeneration.java b/src/ui/window/JDialogSystemCGeneration.java
index 8725ea659c958ff76e6d409a849cd5bf830a46b6..1a84eb83de3caad174b68bcd4b3e1813400b1099 100755
--- a/src/ui/window/JDialogSystemCGeneration.java
+++ b/src/ui/window/JDialogSystemCGeneration.java
@@ -57,8 +57,10 @@ import ui.interactivesimulation.*;
 import tmltranslator.tomappingsystemc.*;
 import tmltranslator.tomappingsystemc2.*;
 import ui.*;
-import ui.ebrdd.*;
+import ui.avatarpd.*;
+//import ui.ebrdd.*;
 import req.ebrdd.*;
+import tepe.*;
 
 import launcher.*;
 
@@ -108,7 +110,7 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
 	protected JComboBox versionSimulator;
 	
 	//EBRDD
-	private static Vector validated, ignored;
+	/*private static Vector validated, ignored;
 	private Vector val, ign;
 	private JList listIgnored;
     private JList listValidated;
@@ -116,7 +118,22 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
     private JButton addOneValidated;
     private JButton addOneIgnored;
     private JButton allIgnored;
-	private JPanel panele1, panele2, panele3, panele4, panel5, panel6;
+	private JPanel panele1, panele2, panele3, panele4, panel5, panel6;*/
+	
+	
+	//TEPED
+	private static Vector validatedTepe, ignoredTepe;
+	private Vector valTepe, ignTepe;
+	private JList listIgnoredTepe;
+    private JList listValidatedTepe;
+    private JButton allValidatedTepe;
+    private JButton addOneValidatedTepe;
+    private JButton addOneIgnoredTepe;
+    private JButton allIgnoredTepe;
+	private JPanel panele1Tepe, panele2Tepe, panele3Tepe, panele4Tepe, panel5Tepe, panel6Tepe;
+	
+	
+	
     
     private Thread t;
     private boolean go = false;
@@ -163,24 +180,24 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
     }
 	
 	protected void makeLists() {
-		if (validated == null) {
-			validated = new Vector();
+		if (validatedTepe == null) {
+			validatedTepe = new Vector();
 		}
 		
-		if (ignored == null) {
-			ignored = new Vector();
+		if (ignoredTepe == null) {
+			ignoredTepe = new Vector();
 		}
 		
-		val = new Vector();
-		ign = new Vector();
+		valTepe = new Vector();
+		ignTepe = new Vector();
 		
-		ArrayList<EBRDDPanel> al = mgui.getAllEBRDDPanels();
+		ArrayList<AvatarPDPanel> al = mgui.getAllAvatarPDPanels();
 		
-		for(EBRDDPanel panel: al) {
-			if(ignored.contains(panel)) {
-				ign.add(panel);
+		for(AvatarPDPanel panel: al) {
+			if(ignoredTepe.contains(panel)) {
+				ignTepe.add(panel);
 			} else {
-				val.add(panel);
+				valTepe.add(panel);
 			}
 		}
 	}
@@ -277,35 +294,35 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
         jp01.add(new JLabel(" "), c01);
         
 		//EBRDDs
-		panele1 = new JPanel();
-        panele1.setLayout(new BorderLayout());
-        panele1.setBorder(new javax.swing.border.TitledBorder("EBRDDs ignored"));
-        listIgnored = new JList(ign);
+		panele1Tepe = new JPanel();
+        panele1Tepe.setLayout(new BorderLayout());
+        panele1Tepe.setBorder(new javax.swing.border.TitledBorder("Ignored TEPE Diagrams"));
+        listIgnoredTepe = new JList(ignTepe);
         //listIgnored.setPreferredSize(new Dimension(200, 250));
-        listIgnored.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
-        listIgnored.addListSelectionListener(this);
-        JScrollPane scrollPane1 = new JScrollPane(listIgnored);
-        panele1.add(scrollPane1, BorderLayout.CENTER);
-        panele1.setPreferredSize(new Dimension(200, 250));
+        listIgnoredTepe.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
+        listIgnoredTepe.addListSelectionListener(this);
+        JScrollPane scrollPane1 = new JScrollPane(listIgnoredTepe);
+        panele1Tepe.add(scrollPane1, BorderLayout.CENTER);
+        panele1Tepe.setPreferredSize(new Dimension(200, 250));
         
         // validated list
-        panele2 = new JPanel();
-        panele2.setLayout(new BorderLayout());
-        panele2.setBorder(new javax.swing.border.TitledBorder("EBRDDs taken into account"));
-        listValidated = new JList(val);
+        panele2Tepe = new JPanel();
+        panele2Tepe.setLayout(new BorderLayout());
+        panele2Tepe.setBorder(new javax.swing.border.TitledBorder("EBRDDs taken into account"));
+        listValidatedTepe = new JList(valTepe);
         //listValidated.setPreferredSize(new Dimension(200, 250));
-        listValidated.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
-        listValidated.addListSelectionListener(this);
-        JScrollPane scrollPane2 = new JScrollPane(listValidated);
-        panele2.add(scrollPane2, BorderLayout.CENTER);
-        panele2.setPreferredSize(new Dimension(200, 250));
+        listValidatedTepe.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
+        listValidatedTepe.addListSelectionListener(this);
+        JScrollPane scrollPane2 = new JScrollPane(listValidatedTepe);
+        panele2Tepe.add(scrollPane2, BorderLayout.CENTER);
+        panele2Tepe.setPreferredSize(new Dimension(200, 250));
  
         
         // central buttons
-        panele3 = new JPanel();
+        panele3Tepe = new JPanel();
 		GridBagLayout gridbage1 = new GridBagLayout();
         GridBagConstraints ce1 = new GridBagConstraints();
-        panele3.setLayout(gridbage1);
+        panele3Tepe.setLayout(gridbage1);
         
         ce1.weighty = 1.0;
         ce1.weightx = 1.0;
@@ -313,40 +330,40 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
         ce1.fill = GridBagConstraints.HORIZONTAL;
         ce1.gridheight = 1;
         
-        allValidated = new JButton(IconManager.imgic50);
-        allValidated.setPreferredSize(new Dimension(50, 25));
-        allValidated.addActionListener(this);
-        allValidated.setActionCommand("allValidated");
-        panele3.add(allValidated, ce1);
-        
-        addOneValidated = new JButton(IconManager.imgic48);
-        addOneValidated.setPreferredSize(new Dimension(50, 25));
-        addOneValidated.addActionListener(this);
-        addOneValidated.setActionCommand("addOneValidated");
-        panele3.add(addOneValidated, ce1);
-        
-        panele3.add(new JLabel(" "), ce1);
-        
-        addOneIgnored = new JButton(IconManager.imgic46);
-        addOneIgnored.addActionListener(this);
-        addOneIgnored.setPreferredSize(new Dimension(50, 25));
-        addOneIgnored.setActionCommand("addOneIgnored");
-        panele3.add(addOneIgnored, ce1);
-        
-        allIgnored = new JButton(IconManager.imgic44);
-        allIgnored.addActionListener(this);
-        allIgnored.setPreferredSize(new Dimension(50, 25));
-        allIgnored.setActionCommand("allIgnored");
-        panele3.add(allIgnored, ce1);
+        allValidatedTepe = new JButton(IconManager.imgic50);
+        allValidatedTepe.setPreferredSize(new Dimension(50, 25));
+        allValidatedTepe.addActionListener(this);
+        allValidatedTepe.setActionCommand("allValidatedTepe");
+        panele3Tepe.add(allValidatedTepe, ce1);
+        
+        addOneValidatedTepe = new JButton(IconManager.imgic48);
+        addOneValidatedTepe.setPreferredSize(new Dimension(50, 25));
+        addOneValidatedTepe.addActionListener(this);
+        addOneValidatedTepe.setActionCommand("addOneValidatedTepe");
+        panele3Tepe.add(addOneValidatedTepe, ce1);
+        
+        panele3Tepe.add(new JLabel(" "), ce1);
+        
+        addOneIgnoredTepe = new JButton(IconManager.imgic46);
+        addOneIgnoredTepe.addActionListener(this);
+        addOneIgnoredTepe.setPreferredSize(new Dimension(50, 25));
+        addOneIgnoredTepe.setActionCommand("addOneIgnoredTepe");
+        panele3Tepe.add(addOneIgnoredTepe, ce1);
+        
+        allIgnoredTepe = new JButton(IconManager.imgic44);
+        allIgnoredTepe.addActionListener(this);
+        allIgnoredTepe.setPreferredSize(new Dimension(50, 25));
+        allIgnoredTepe.setActionCommand("allIgnoredTepe");
+        panele3Tepe.add(allIgnoredTepe, ce1);
 		
 		
-		panele4 = new JPanel();
-		panele4.setLayout(new BorderLayout());
-		panele4.add(panele1, BorderLayout.WEST);
-		panele4.add(panele2, BorderLayout.EAST);
-		panele4.add(panele3, BorderLayout.CENTER);
+		panele4Tepe = new JPanel();
+		panele4Tepe.setLayout(new BorderLayout());
+		panele4Tepe.add(panele1Tepe, BorderLayout.WEST);
+		panele4Tepe.add(panele2Tepe, BorderLayout.EAST);
+		panele4Tepe.add(panele3Tepe, BorderLayout.CENTER);
 		
-		jp01.add(panele4, c01);
+		jp01.add(panele4Tepe, c01);
         jp1.add("Generate code", jp01);
         
         // Panel 02
@@ -463,14 +480,14 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
             stopProcess();
         } else if (command.equals("Close")) {
             closeDialog();
-        } else if (command.equals("addOneIgnored")) {
-            addOneIgnored();
-        } else if (command.equals("addOneValidated")) {
-            addOneValidated();
-        } else if (command.equals("allValidated")) {
-            allValidated();
-        } else if (command.equals("allIgnored")) {
-            allIgnored();
+        } else if (command.equals("addOneIgnoredTepe")) {
+            addOneIgnoredTepe();
+        } else if (command.equals("addOneValidatedTepe")) {
+            addOneValidatedTepe();
+        } else if (command.equals("allValidatedTepe")) {
+            allValidatedTepe();
+        } else if (command.equals("allIgnoredTepe")) {
+            allIgnoredTepe();
         } else if (evt.getSource() == versionSimulator) {
 			selectedItem = versionSimulator.getSelectedIndex();
 		}
@@ -594,7 +611,7 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
 						if (mgui.gtm.getArtificialTMLMapping() == null) {
 							tml2systc = new tmltranslator.tomappingsystemc.TML2MappingSystemC(mgui.gtm.getTMLModeling());
 						} else {
-							System.out.println("Using artifical mapping");
+							TraceManager.addDev("Using artifical mapping");
 							tml2systc = new tmltranslator.tomappingsystemc.TML2MappingSystemC(mgui.gtm.getArtificialTMLMapping());
 						}
 					} else {
@@ -617,7 +634,8 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
 					
 					// Making EBRDDs
 					ArrayList<EBRDD> al = new ArrayList<EBRDD>();
-					EBRDDTranslator ebrddt;
+					ArrayList<TEPE> alTepe = new ArrayList<TEPE>();
+					/*EBRDDTranslator ebrddt;
 					EBRDDPanel ep;
 					EBRDD ebrdd;
 					
@@ -634,18 +652,18 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
 							jta.append("No Syntax error: EBRDD taken into account\n\n");
 							al.add(ebrdd);
 						}
-					}
+					}*/
 					
 					// Generating code
 					if (mgui.gtm.getTMLMapping() == null) {
 						if (mgui.gtm.getArtificialTMLMapping() == null) {
-							tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getTMLModeling(), al);
+							tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getTMLModeling(), al, alTepe);
 						} else {
-							System.out.println("Using artifical mapping");
-							tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getArtificialTMLMapping(), al);
+							TraceManager.addDev("Using artifical mapping");
+							tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getArtificialTMLMapping(), al, alTepe);
 						}
 					} else {
-						tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getTMLMapping(), al);
+						tml2systc = new tmltranslator.tomappingsystemc2.TML2MappingSystemC(mgui.gtm.getTMLMapping(), al, alTepe);
 					}
 					tml2systc.generateSystemC(debugmode.isSelected(), optimizemode.isSelected());
 					testGo();
@@ -798,95 +816,95 @@ public class JDialogSystemCGeneration extends javax.swing.JDialog implements Act
     }
 	
 	private void setList() {
-        int i1 = listIgnored.getSelectedIndex();
-        int i2 = listValidated.getSelectedIndex();
+        int i1 = listIgnoredTepe.getSelectedIndex();
+        int i2 = listValidatedTepe.getSelectedIndex();
         
         if (i1 == -1) {
-            addOneValidated.setEnabled(false);
+            addOneValidatedTepe.setEnabled(false);
         } else {
-            addOneValidated.setEnabled(true);
+            addOneValidatedTepe.setEnabled(true);
             //listValidated.clearSelection();
         }
         
         if (i2 == -1) {
-            addOneIgnored.setEnabled(false);
+            addOneIgnoredTepe.setEnabled(false);
         } else {
-            addOneIgnored.setEnabled(true);
+            addOneIgnoredTepe.setEnabled(true);
             //listIgnored.clearSelection();
         }
         
-        if (ign.size() ==0) {
-            allValidated.setEnabled(false);
+        if (ignTepe.size() ==0) {
+            allValidatedTepe.setEnabled(false);
         } else {
-            allValidated.setEnabled(true);
+            allValidatedTepe.setEnabled(true);
         }
         
-        if (val.size() ==0) {
-            allIgnored.setEnabled(false);
+        if (valTepe.size() ==0) {
+            allIgnoredTepe.setEnabled(false);
         } else {
-            allIgnored.setEnabled(true);
+            allIgnoredTepe.setEnabled(true);
         }
     }
 	
-	private void addOneIgnored() {
-        int [] list = listValidated.getSelectedIndices();
+	private void addOneIgnoredTepe() {
+        int [] list = listValidatedTepe.getSelectedIndices();
         Vector v = new Vector();
         Object o;
         for (int i=0; i<list.length; i++){
-            o = val.elementAt(list[i]);
-            ign.addElement(o);
+            o = valTepe.elementAt(list[i]);
+            ignTepe.addElement(o);
             v.addElement(o);
         }
         
-        val.removeAll(v);
-        listIgnored.setListData(ign);
-        listValidated.setListData(val);
+        valTepe.removeAll(v);
+        listIgnoredTepe.setListData(ignTepe);
+        listValidatedTepe.setListData(valTepe);
         setList();
     }
     
-    private void addOneValidated() {
-        int [] list = listIgnored.getSelectedIndices();
+    private void addOneValidatedTepe() {
+        int [] list = listIgnoredTepe.getSelectedIndices();
         Vector v = new Vector();
         Object o;
         for (int i=0; i<list.length; i++){
-            o = ign.elementAt(list[i]);
-            val.addElement(o);
+            o = ignTepe.elementAt(list[i]);
+            valTepe.addElement(o);
             v.addElement(o);
         }
         
-        ign.removeAll(v);
-        listIgnored.setListData(ign);
-        listValidated.setListData(val);
+        ignTepe.removeAll(v);
+        listIgnoredTepe.setListData(ignTepe);
+        listValidatedTepe.setListData(valTepe);
         setList();
     }
     
-    private void allValidated() {
-        val.addAll(ign);
-        ign.removeAllElements();
-        listIgnored.setListData(ign);
-        listValidated.setListData(val);
+    private void allValidatedTepe() {
+        valTepe.addAll(ignTepe);
+        ignTepe.removeAllElements();
+        listIgnoredTepe.setListData(ignTepe);
+        listValidatedTepe.setListData(valTepe);
         setList();
     }
     
-    private void allIgnored() {
-        ign.addAll(val);
-        val.removeAllElements();
-        listIgnored.setListData(ign);
-        listValidated.setListData(val);
+    private void allIgnoredTepe() {
+        ignTepe.addAll(valTepe);
+        valTepe.removeAllElements();
+        listIgnoredTepe.setListData(ignTepe);
+        listValidatedTepe.setListData(valTepe);
         setList();
     }
 	
 	private void updateStaticList() {
-		validated = new Vector();
-		ignored = new Vector();
+		validatedTepe = new Vector();
+		ignoredTepe = new Vector();
 		int i;
 		
-		for(i=0; i<ign.size(); i++) {
-			ignored.add(ign.get(i));
+		for(i=0; i<ignTepe.size(); i++) {
+			ignoredTepe.add(ignTepe.get(i));
 		}
 		
-		for(i=0;i<val.size(); i++) {
-			validated.add(val.get(i));
+		for(i=0;i<valTepe.size(); i++) {
+			validatedTepe.add(valTepe.get(i));
 		}
 	}
 }