diff --git a/src/main/java/tmltranslator/TMLChannel.java b/src/main/java/tmltranslator/TMLChannel.java
index b0d84eb043642033bcc5c6851541ee26919c0111..07c0ef025dd64f4c7b8afe5c2313f621df3cba23 100755
--- a/src/main/java/tmltranslator/TMLChannel.java
+++ b/src/main/java/tmltranslator/TMLChannel.java
@@ -64,9 +64,11 @@ public class TMLChannel extends TMLCommunicationElement {
     private int size; // width of the channel i.e. nb of bytes of each sample
     private int type;
     private int max; // Maximum number of samples
-    public TMLCPrimitivePort port;
+
+
+    public TMLPortWithSecurityInformation port;
     //public TMLCPrimitivePort port2;
-    public ArrayList<TMLCPrimitivePort> ports;
+    public ArrayList<TMLPortWithSecurityInformation> ports;
 
     // Used on for 1 -> 1 channel
     protected TMLTask originTask, destinationTask;
@@ -98,7 +100,7 @@ public class TMLChannel extends TMLCommunicationElement {
         destinationTasks = new ArrayList<TMLTask>();
         originPorts = new ArrayList<TMLPort>();
         destinationPorts = new ArrayList<TMLPort>();
-        ports = new ArrayList<TMLCPrimitivePort>();
+        ports = new ArrayList<TMLPortWithSecurityInformation>();
         checkConf = false;
     }
 
diff --git a/src/main/java/tmltranslator/TMLModeling.java b/src/main/java/tmltranslator/TMLModeling.java
index 2c5f4e294cdfec1c242c603a0df9c84d15176cd4..a3c0d096f00d5c343f8901d3966d3dface10468c 100755
--- a/src/main/java/tmltranslator/TMLModeling.java
+++ b/src/main/java/tmltranslator/TMLModeling.java
@@ -51,11 +51,8 @@ import proverifspec.ProVerifOutputAnalyzer;
 import proverifspec.ProVerifQueryAuthResult;
 import proverifspec.ProVerifQueryResult;
 import proverifspec.ProVerifResultTrace;
-import ui.TAttribute;
-import ui.tmlcompd.TMLCPrimitiveComponent;
-import ui.tmlcompd.TMLCPrimitivePort;
+//import ui.tmlcompd.TMLCPrimitivePort;
 import ui.TGComponent;
-import ui.tmlcompd.TMLPragma;
 
 import java.util.*;
 
@@ -130,51 +127,6 @@ public class  TMLModeling<E> {
         tmlmapping = new TMLMapping<>(this, new TMLArchitecture(), false);
         tmlmapping.makeMinimumMapping();
         return tmlmapping;
-
-        /*TMLArchitecture tmla = new TMLArchitecture();
-          TMLTask t;
-          TMLChannel ch;
-
-
-
-          HwCPU cpu = new HwCPU("defaultCPU");
-          cpu.byteDataSize = 4;
-          cpu.pipelineSize = 1;
-          cpu.goIdleTime = 0;
-          cpu.taskSwitchingTime = 1;
-          cpu.branchingPredictionPenalty = 0;
-          cpu.execiTime = 1;
-          tmla.addHwNode(cpu);
-
-          ListIterator iterator;
-
-          HwMemory mem = new HwMemory("defaultMemory");
-          tmla.addHwNode(mem);
-
-          HwBus bus = new HwBus("defaultBus");
-          tmla.addHwNode(bus);
-
-          HwLink link0 = new HwLink("CPU_bus");
-          link0.bus = bus;
-          link0.hwnode = cpu;
-          tmla.addHwLink(link0);
-
-          HwLink link1 = new HwLink("Mem_bus");
-          link1.bus = bus;
-          link1.hwnode = mem;
-          tmla.addHwLink(link1);
-
-
-
-          // Channels
-          iterator = getChannels().listIterator();
-          while(iterator.hasNext()) {
-          ch = (TMLChannel)(iterator.next());
-          tmlmapping.addCommToHwCommNode(ch, bus);
-          tmlmapping.addCommToHwCommNode(ch, mem);
-          }
-
-          return tmlmapping;*/
     }
 
     private void init() {
@@ -863,13 +815,13 @@ public class  TMLModeling<E> {
             	if (!found){
             		invalidate=true;
             	}
-                for (TMLCPrimitivePort port:channel.ports){
-                    if (port.checkConf && !invalidate){
-                        port.checkConfStatus = r;
-                        port.mappingName= mappingName;
+                for (TMLPortWithSecurityInformation port: channel.ports){
+                    if (port.getCheckConf() && !invalidate){
+                        port.setConfStatus(r);
+                        port.setMappingName(mappingName);
                         //Add Result Trace also
                         ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        if (trace !=null && port.isOrigin){
+                        if (trace !=null && port.isOrigin()){
                         	port.setResultTrace(trace);
                         	port.setPragmaString(pragma.toString());
                         }
@@ -878,10 +830,10 @@ public class  TMLModeling<E> {
             }
             TMLRequest req = getRequestByName(attr.getName().replaceAll("_reqData",""));
             if (req !=null){
-                for (TMLCPrimitivePort port: req.ports){
-                    if (port.checkConf){
-                        port.checkConfStatus = r;
-                        port.mappingName= mappingName;
+                for (TMLPortWithSecurityInformation port: req.ports){
+                    if (port.getCheckConf()){
+                        port.setConfStatus(r);
+                        port.setMappingName(mappingName);
                     }
                 }
             }
@@ -902,27 +854,16 @@ public class  TMLModeling<E> {
                 for (String channelName: channels) {
                     channel = getChannelByShortName(channelName);
                     if (channel!=null){
-                        for (TMLCPrimitivePort port:channel.ports){
-                            if (port.checkConf){
-                                port.checkSecConfStatus = r;
-                                port.secName= attr.getName();
+                        for (TMLPortWithSecurityInformation port:channel.ports){
+                            if (port.getCheckConf()){
+                                port.setConfStatus(r);
+                                port.setSecName(attr.getName());
                             }
                         }
                     }
                 }
             }
-            /*for (TMLTask t:getTasks()){
-                if (t.getReferenceObject()==null){
-                    continue;
-                }
-                if (t.getReferenceObject() instanceof TMLCPrimitiveComponent && t.getName().equals(attr.getBlock().getName())){
-                    TMLCPrimitiveComponent comp = (TMLCPrimitiveComponent) t.getReferenceObject();
-                    comp.mappingName=mappingName;
-                    for (TAttribute a: comp.getAttributeList ())
-                        if (a.getId().equals(attr.getName()))
-                            a.setConfidentialityVerification(result.isSatisfied() ? TAttribute.CONFIDENTIALITY_OK : TAttribute.CONFIDENTIALITY_KO);
-                }
-            }*/
+
         }
         //
     }
@@ -955,12 +896,12 @@ public class  TMLModeling<E> {
                 	channel= getChannelByDestinationPortName(signalName);
                 }
                 if (channel!=null){
-                    for (TMLCPrimitivePort port:channel.ports){
-                        if (port.checkAuth){
-                            port.checkStrongAuthStatus = 3;
-                            port.mappingName= mappingName;
+                    for (TMLPortWithSecurityInformation port:channel.ports){
+                        if (port.getCheckAuth()){
+                            port.setStrongAuthStatus(3);
+                            port.setMappingName(mappingName);
                             ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        	if (trace !=null && !port.isOrigin){
+                        	if (trace !=null && !port.isOrigin()){
                         		port.setResultTrace(trace);
                         		port.setPragmaString(pragma.toString());
                         	}
@@ -975,10 +916,10 @@ public class  TMLModeling<E> {
                 }
                 TMLRequest req = getRequestByName(signalName);
                 if (req !=null){
-                    for (TMLCPrimitivePort port: req.ports){
-                        if (port.checkAuth){
-                            port.checkStrongAuthStatus = 3;
-                            port.mappingName= mappingName;
+                    for (TMLPortWithSecurityInformation port: req.ports) {
+                        if (port.getCheckAuth()){
+                            port.setStrongAuthStatus(3);
+                            port.setMappingName(mappingName);
                         }
                     }
                 }
@@ -1001,18 +942,18 @@ public class  TMLModeling<E> {
                 }
 
                 signalName = s.split("__decrypt")[0];
-                List<String> channels=secChannelMap.get(signalName);
-                if (channels!=null){
+                List<String> channels = secChannelMap.get(signalName);
+                if (channels != null){
                     for (String channelName:channels){
                         channel = getChannelByShortName(channelName);
-                        if (channel!=null){
-                            for (TMLCPrimitivePort port:channel.ports){
-                                if (port.checkAuth && port.checkStrongAuthStatus==1){
-                                    port.checkStrongAuthStatus = 3;
+                        if (channel != null){
+                            for (TMLPortWithSecurityInformation port: channel.ports){
+                                if (port.getCheckAuth() && port.getCheckStrongAuthStatus() == 1){
+                                    port.setStrongAuthStatus(3);
                                     TraceManager.addDev("not verified " + signalName);
-                                    port.secName= signalName;
+                                    port.setSecName(signalName);
                                     ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        			if (trace !=null && !port.isOrigin){
+                        			if (trace !=null && !port.isOrigin()){
                         				port.setResultTrace(trace);
                         				port.setPragmaString(pragma.toString());
                         			}
@@ -1025,8 +966,8 @@ public class  TMLModeling<E> {
                 //In case of HSM
                 signalName = s.split("__decrypt")[0];
                 signalName = signalName.split("__")[1];
-                channels=secChannelMap.get(signalName);
-                if (channels!=null){
+                channels = secChannelMap.get(signalName);
+                if (channels != null){
                     for (String channelName: channels){
                         if (channelName.contains("retData_") || channelName.contains("data_")){
                             channelName=channelName.replaceAll("retData_","").replaceAll("data_","");
@@ -1038,15 +979,15 @@ public class  TMLModeling<E> {
                             }
                             channel = getChannelByShortName(channelName);
                             if (channel!=null){
-                                for (TMLCPrimitivePort port:channel.ports){
-                                    if (port.checkAuth){
-                                        port.checkWeakAuthStatus = 3;
-                                        port.secName= signalName;
+                                for (TMLPortWithSecurityInformation port: channel.ports){
+                                    if (port.getCheckAuth()) {
+                                        port.setWeakAuthStatus(3);
+                                        port.setSecName(signalName);
                                         ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        				if (trace !=null && !port.isOrigin){
+                        				if (trace !=null && !port.isOrigin()) {
                         					port.setResultTrace(trace);
                         					port.setPragmaString(pragma.toString());
-  					                      }
+                        				}
                                     }
                                 }
                             }
@@ -1060,13 +1001,13 @@ public class  TMLModeling<E> {
                     String signalName = s.split("_chData")[0];
                     signalName = signalName.split("__")[1];
                     TMLChannel channel = getChannelByShortName(signalName);
-                    if (channel!=null){
-                        for (TMLCPrimitivePort port:channel.ports){
-                            if (port.checkAuth){
-                                port.checkWeakAuthStatus = 2;
-                                port.mappingName= mappingName;
+                    if (channel != null){
+                        for (TMLPortWithSecurityInformation port: channel.ports){
+                            if (port.getCheckAuth()){
+                                port.setWeakAuthStatus(2);
+                                port.setMappingName(mappingName);
                                 ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        		if (trace !=null && !port.isOrigin){
+                        		if (trace !=null && !port.isOrigin()){
                         			port.setResultTrace(trace);
                         			port.setPragmaString(pragma.toString());
                         		}
@@ -1081,10 +1022,10 @@ public class  TMLModeling<E> {
                     }
                     TMLRequest req = getRequestByName(signalName);
                     if (req !=null){
-                        for (TMLCPrimitivePort port: req.ports){
-                            if (port.checkAuth){
-                                port.checkWeakAuthStatus = 2;
-                                port.mappingName= mappingName;
+                        for (TMLPortWithSecurityInformation port: req.ports){
+                            if (port.getCheckAuth()){
+                                port.setWeakAuthStatus(2);
+                                port.setMappingName(mappingName);
                             }
                         }
                     }
@@ -1095,7 +1036,7 @@ public class  TMLModeling<E> {
                         }
                     }
                     TMLEvent ev = getEventByName(signalName);
-                    if (ev !=null){
+                    if (ev != null){
                         if (ev.port.checkAuth){
                             ev.port.checkWeakAuthStatus=2;
                             ev.port2.mappingName= mappingName;
@@ -1118,12 +1059,12 @@ public class  TMLModeling<E> {
                         for (String channelName:channels){
                             channel = getChannelByShortName(channelName);
                             if (channel!=null){
-                                for (TMLCPrimitivePort port:channel.ports){
-                                    if (port.checkAuth){
-                                        port.checkWeakAuthStatus = 2;
-                                        port.secName= signalName;
+                                for (TMLPortWithSecurityInformation port:channel.ports){
+                                    if (port.getCheckAuth()){
+                                        port.setWeakAuthStatus(2);
+                                        port.setSecName(signalName);
                                         ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        				if (trace !=null && !port.isOrigin){
+                        				if (trace != null && !port.isOrigin()){
                         					port.setResultTrace(trace);
                 				        	port.setPragmaString(pragma.toString());
  				                       }
@@ -1136,8 +1077,8 @@ public class  TMLModeling<E> {
                     //In case of HSM
                     signalName = s.split("__decrypt")[0];
                     signalName = signalName.split("__")[1];
-                    channels=secChannelMap.get(signalName);
-                    if (channels!=null){
+                    channels = secChannelMap.get(signalName);
+                    if (channels != null){
                         for (String channelName: channels){
                             if (channelName.contains("retData_") || channelName.contains("data_")){
                                 channelName=channelName.replaceAll("retData_","").replaceAll("data_","");
@@ -1149,12 +1090,12 @@ public class  TMLModeling<E> {
                                 }
                                 channel = getChannelByShortName(channelName);
                                 if (channel!=null){
-                                    for (TMLCPrimitivePort port:channel.ports){
-                                        if (port.checkAuth){
-                                            port.checkWeakAuthStatus = 2;
-                                            port.secName= signalName;
+                                    for (TMLPortWithSecurityInformation port: channel.ports){
+                                        if (port.getCheckAuth()){
+                                            port.setWeakAuthStatus(2);
+                                            port.setSecName(signalName);
                                             ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                       						if (trace !=null && !port.isOrigin){
+                       						if (trace != null && !port.isOrigin()){
                         						port.setResultTrace(trace);
                         						port.setPragmaString(pragma.toString());
                         					}
@@ -1176,12 +1117,12 @@ public class  TMLModeling<E> {
                 signalName = signalName.split("__")[1];
                 TMLChannel channel = getChannelByShortName(signalName);
                 if (channel!=null){
-                    for (TMLCPrimitivePort port:channel.ports){
-                        if (port.checkAuth){
-                            port.checkStrongAuthStatus = 2;
-                            port.mappingName= mappingName;
+                    for (TMLPortWithSecurityInformation port: channel.ports){
+                        if (port.getCheckAuth()) {
+                            port.setStrongAuthStatus(2);
+                            port.setMappingName(mappingName);
                             ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        	if (trace !=null && !port.isOrigin){
+                        	if (trace !=null && !port.isOrigin()){
                         		port.setResultTrace(trace);
                         		port.setPragmaString(pragma.toString());
                         	}
@@ -1196,10 +1137,10 @@ public class  TMLModeling<E> {
                 }
                 TMLRequest req = getRequestByName(signalName);
                 if (req !=null){
-                    for (TMLCPrimitivePort port: req.ports){
-                        if (port.checkAuth){
-                            port.checkStrongAuthStatus = 2;
-                            port.mappingName= mappingName;
+                    for (TMLPortWithSecurityInformation port: req.ports){
+                        if (port.getCheckAuth()){
+                            port.setStrongAuthStatus(2);
+                            port.setMappingName(mappingName);
                         }
                     }
                 }
@@ -1227,21 +1168,21 @@ public class  TMLModeling<E> {
                   signalName = signalName.replace(t.getName()+"__","");
                   }
                   }*/
-                signalName=signalName.split("__")[1];
+                signalName = signalName.split("__")[1];
              //   TraceManager.addDev("secpattern " + signalName);
-                List<String> channels=secChannelMap.get(signalName);
+                List<String> channels = secChannelMap.get(signalName);
                // TraceManager.addDev("secpattern channels " + channels);
-                if (channels!=null) {
+                if (channels != null) {
                     for (String channelName: channels) {
                         channel = getChannelByShortName(channelName);
                         if (channel!=null){
-                            for (TMLCPrimitivePort port:channel.ports){
+                            for (TMLPortWithSecurityInformation port: channel.ports){
                              //   TraceManager.addDev("adding to port " + channelName);
-                            	if (port.checkAuth){
-                                    port.checkStrongAuthStatus = 2;
-                                    port.secName= signalName;
+                            	if (port.getCheckAuth()){
+                                    port.setStrongAuthStatus(2);
+                                    port.setSecName(signalName);
                                     ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        			if (trace !=null && !port.isOrigin){
+                        			if (trace !=null && !port.isOrigin()){
                         				port.setResultTrace(trace);
                         				port.setPragmaString(pragma.toString());
                         			}
@@ -1267,13 +1208,13 @@ public class  TMLModeling<E> {
                                 }
                             }
                             channel = getChannelByShortName(channelName);
-                            if (channel!=null){
-                                for (TMLCPrimitivePort port:channel.ports){
-                                    if (port.checkAuth){
-                                        port.checkStrongAuthStatus = 2;
-                                        port.secName= signalName;
+                            if (channel != null){
+                                for (TMLPortWithSecurityInformation port:channel.ports){
+                                    if (port.getCheckAuth()){
+                                        port.setStrongAuthStatus(2);
+                                        port.setSecName(signalName);
                         				ProVerifResultTrace trace = pvoa.getResults().get(pragma).getTrace();
-                        				if (trace !=null && !port.isOrigin){
+                        				if (trace !=null && !port.isOrigin()){
                         					port.setResultTrace(trace);
                         					port.setPragmaString(pragma.toString());
                         				}                                        
@@ -1288,34 +1229,37 @@ public class  TMLModeling<E> {
         }
     }
 
-    public void clearBacktracing(){
+    public void clearBacktracing() {
+
         for (TMLChannel channel: getChannels()){
-            for (TMLCPrimitivePort port:channel.ports){
-                if (port.checkConfStatus>1){
-                    port.checkConfStatus=1;
-                    port.mappingName="???";
-                    port.secName="";
+            for (TMLPortWithSecurityInformation port: channel.ports){
+                if (port.getConfStatus() > 1){
+                    port.setConfStatus(1);
+                    port.setMappingName("???");
+                    port.setSecName("");
                 }
-                if (port.checkStrongAuthStatus>1 || port.checkWeakAuthStatus>1){
-                    port.checkStrongAuthStatus = 1;
-                    port.checkWeakAuthStatus=1;
+                if (port.getCheckStrongAuthStatus() > 1 || port.getCheckWeakAuthStatus() > 1){
+                    port.setStrongAuthStatus(1);
+                    port.setWeakAuthStatus(1);
                 }
                 port.setResultTrace(null);
                 port.setPragmaString("");
             }
         }
+
         for (TMLRequest req: getRequests()){
-            for (TMLCPrimitivePort port:req.ports){
-                if (port.checkConfStatus>1){
-                    port.checkConfStatus=1;
-                    port.mappingName="???";
+            for (TMLPortWithSecurityInformation port: req.ports) {
+                if (port.getConfStatus() > 1){
+                    port.setConfStatus(1);
+                    port.setMappingName("???");
                 }
-                if (port.checkStrongAuthStatus>1 || port.checkWeakAuthStatus>1){
-                    port.checkStrongAuthStatus = 1;
-                    port.checkWeakAuthStatus=1;
+                if (port.getCheckStrongAuthStatus() > 1 || port.getCheckWeakAuthStatus() > 1){
+                    port.setStrongAuthStatus(1);
+                    port.setWeakAuthStatus(1);
                 }
             }
         }
+
         for (TMLEvent evt: getEvents()){
             if (evt.port!=null && evt.port2!=null){
                 if (evt.port.checkConfStatus>1){
diff --git a/src/main/java/tmltranslator/toavatar/FullTML2Avatar.java b/src/main/java/tmltranslator/toavatar/FullTML2Avatar.java
index 03545a6e83513e872362da477a31919a13bc3d7a..02a4feb15a9d0d5bfae8c10b5754fec9191825d5 100644
--- a/src/main/java/tmltranslator/toavatar/FullTML2Avatar.java
+++ b/src/main/java/tmltranslator/toavatar/FullTML2Avatar.java
@@ -41,7 +41,7 @@ import avatartranslator.*;
 import myutil.TraceManager;
 import tmltranslator.*;
 import ui.TGComponent;
-import ui.tmlcompd.TMLCPrimitivePort;
+//import ui.tmlcompd.TMLCPrimitivePort;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -60,7 +60,6 @@ import java.util.regex.Pattern;
 public class FullTML2Avatar {
     private final static String NOTIFIED = "_NOTIFIED";
 
-
     //private TMLMapping<?> tmlmap;
     private TMLModeling<?> tmlmodel;
 
@@ -106,9 +105,6 @@ public class FullTML2Avatar {
 
     public AvatarSpecification generateAvatarSpec(String _loopLimit) {
 
-        //TraceManager.addDev("security patterns " + tmlmodel.secPatterns);
-        //TraceManager.addDev("keys " + tmlmap.mappedSecurity);
-
 
         //TODO: Make state names readable
         //TODO: Put back numeric guards
@@ -121,7 +117,6 @@ public class FullTML2Avatar {
         attrsToCheck.clear();
         tmlmodel.removeForksAndJoins();
 
-//        System.out.println("MODIFIED model " + tmlmodel);
 
         for (TMLChannel chan : tmlmodel.getChannels()) {
             //System.out.println("chan " + chan);
@@ -142,9 +137,9 @@ public class FullTML2Avatar {
         }
 
         for (TMLChannel channel : tmlmodel.getChannels()) {
-            for (TMLCPrimitivePort p : channel.ports) {
-                channel.checkConf = channel.checkConf || p.checkConf;
-                channel.checkAuth = channel.checkAuth || p.checkAuth;
+            for (TMLPortWithSecurityInformation p : channel.ports) {
+                channel.checkConf = channel.checkConf || p.getCheckConf();
+                channel.checkAuth = channel.checkAuth || p.getCheckAuth();
             }
         }
 
diff --git a/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java b/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java
index aa269b8f4d1227dd8664840deb56fbe7633290b7..b72976af12e6c04fe99ca3c568b52c7ef01caa57 100644
--- a/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java
+++ b/src/main/java/tmltranslator/toavatarsec/TML2Avatar.java
@@ -1538,9 +1538,9 @@ public class TML2Avatar {
             loopLimit = Integer.valueOf(_loopLimit);
         }
         for (TMLChannel channel : tmlmodel.getChannels()) {
-            for (TMLCPrimitivePort p : channel.ports) {
-                channel.checkConf = channel.checkConf || p.checkConf;
-                channel.checkAuth = channel.checkAuth || p.checkAuth;
+            for (TMLPortWithSecurityInformation p : channel.ports) {
+                channel.checkConf = channel.checkConf || p.getCheckConf();
+                channel.checkAuth = channel.checkAuth || p.getCheckAuth();
             }
         }
 
diff --git a/src/main/java/ui/SecurityGeneration.java b/src/main/java/ui/SecurityGeneration.java
index 770ea98b76335bd1e3a83c0f576152d978eb95c9..909ee328058592183bc69f2c327a21cc70682f35 100644
--- a/src/main/java/ui/SecurityGeneration.java
+++ b/src/main/java/ui/SecurityGeneration.java
@@ -21,11 +21,7 @@ import proverifspec.ProVerifOutputAnalyzer;
 import proverifspec.ProVerifQueryAuthResult;
 import proverifspec.ProVerifQueryResult;
 import proverifspec.ProVerifSpec;
-import tmltranslator.TMLChannel;
-import tmltranslator.TMLMapping;
-import tmltranslator.TMLModeling;
-import tmltranslator.TMLPort;
-import tmltranslator.TMLTask;
+import tmltranslator.*;
 import tmltranslator.toavatarsec.TML2Avatar;
 import ui.tmlad.TGConnectorTMLAD;
 import ui.tmlad.TMLADChoice;
@@ -278,9 +274,9 @@ public class SecurityGeneration implements Runnable {
 		TMLModeling<TGComponent> tmlmodel = map.getTMLModeling();
 		List<TMLChannel> channels = tmlmodel.getChannels();
 		for (TMLChannel channel : channels) {
-			for (TMLCPrimitivePort p : channel.ports) {
-				channel.checkConf = channel.checkConf || p.checkConf;
-				channel.checkAuth = channel.checkAuth || p.checkAuth;
+			for (TMLPortWithSecurityInformation p : channel.ports) {
+				channel.checkConf = channel.checkConf || p.getCheckConf();
+				channel.checkAuth = channel.checkAuth || p.getCheckAuth();
 			}
 		}
 
diff --git a/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java b/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
index 5303d0c6d8afb0dc83867409ba788ea0fca89eb8..7fe489c5a44153568706dfec73a00d795e70c5a5 100755
--- a/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
+++ b/src/main/java/ui/tmlcompd/TMLCPrimitivePort.java
@@ -43,6 +43,7 @@ import myutil.TraceManager;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import tmltranslator.TMLPortWithSecurityInformation;
 import ui.*;
 import ui.util.IconManager;
 import ui.window.JDialogTMLCompositePort;
@@ -81,7 +82,9 @@ import java.util.Vector;
  * @version 1.0 12/03/2008
  * @author Ludovic APVRILLE
  */
-public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent implements SwallowedTGComponent, LinkedReference, WithAttributes {
+public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent implements SwallowedTGComponent, LinkedReference, WithAttributes,
+        TMLPortWithSecurityInformation {
+
     protected Color myColor;
     protected int orientation;
     protected int oldx, oldy;
@@ -131,7 +134,7 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
     public int checkConfStatus;
 
     public int checkSecConfStatus;
-    public String secName="";
+    public String secName = "";
 
     public int checkWeakAuthStatus;
     public int checkStrongAuthStatus;
@@ -1221,4 +1224,45 @@ public abstract class TMLCPrimitivePort extends TGCScalableWithInternalComponent
             typePort = 2;
         return typePort;
     }
+
+    public int getConfStatus() {
+        return checkConfStatus;
+    }
+    public boolean getCheckConf() {
+        return checkConf;
+    }
+
+    public boolean getCheckAuth() {
+        return checkAuth;
+    }
+
+    public int getCheckStrongAuthStatus() {
+        return checkStrongAuthStatus;
+    }
+
+    public int getCheckWeakAuthStatus() {
+        return checkWeakAuthStatus;
+    }
+
+    public void setConfStatus(int _status) {
+        checkConfStatus= _status;
+    }
+
+    public void setMappingName(String _mappingName) {
+        mappingName = _mappingName;
+    }
+
+    public void setSecName(String _secName) {
+        secName = _secName;
+    }
+
+
+    public void setStrongAuthStatus(int _status) {
+        checkStrongAuthStatus = _status;
+    }
+    public void setWeakAuthStatus(int _status) {
+        checkWeakAuthStatus = _status;
+    }
+
+
 }
diff --git a/ttool/src/test/java/ui/ComparisonOfsimulationTracesInXML/ComparisonOfSimulationTracesTest.java b/ttool/src/test/java/ui/ComparisonOfsimulationTracesInXML/ComparisonOfSimulationTracesTest.java
index 5f0f8197067aa05a9db1ed225bb78e9b82a94f8c..1e1534d33218718c781d8abbca1c0cb1cb580eb7 100644
--- a/ttool/src/test/java/ui/ComparisonOfsimulationTracesInXML/ComparisonOfSimulationTracesTest.java
+++ b/ttool/src/test/java/ui/ComparisonOfsimulationTracesInXML/ComparisonOfSimulationTracesTest.java
@@ -1,4 +1,5 @@
 package ui.ComparisonOfsimulationTracesInXML;
+
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
@@ -15,6 +16,8 @@ import ui.AbstractUITest;
 import ui.SimulationTrace;
 import ui.interactivesimulation.JFrameShowLatencyDetails;
 import ui.simulationtraceanalysis.JFrameCompareSimulationTraces;
+
+
 public class ComparisonOfSimulationTracesTest extends AbstractUITest {
     protected static SimulationTrace selectedST1;
     protected static SimulationTrace selectedST2;
@@ -25,6 +28,7 @@ public class ComparisonOfSimulationTracesTest extends AbstractUITest {
     private static JFrameShowLatencyDetails showLatencyDetails;
     private static final String PATH1 = "/ui/xmlCompare/input/simple.xml";
     private static final String PATH2 = "/ui/xmlCompare/input/simplifiedWithSecurity.xml";
+
     @BeforeClass
     public static void setUpBeforeClass() throws Exception {
         STfilePath1 = getBaseResourcesDir() + PATH1;
@@ -32,11 +36,13 @@ public class ComparisonOfSimulationTracesTest extends AbstractUITest {
         selectedST1 = new SimulationTrace("simple.xml", 6, STfilePath1);
         selectedST2 = new SimulationTrace("simplifiedWithSecurity.xml", 6, STfilePath2);
     }
+
     @Test
     public void loadTest() {
         assertNotNull(selectedST1);
         assertNotNull(selectedST2);
     }
+
     @Test
     public void parseXMLTest() throws SAXException, IOException, ParserConfigurationException {
         cSimTrace = new JFrameCompareSimulationTraces(mainGUI, "Compare Simulation simulation", selectedST1, false);
@@ -45,16 +51,12 @@ public class ComparisonOfSimulationTracesTest extends AbstractUITest {
         assertNotNull(cSimTrace.getTransFile1());
         assertNotNull(cSimTrace.getTransFile2());
     }
+
     @Test
     public void diffTest() throws SAXException, IOException, ParserConfigurationException {
         newContentPane = new CompareSimulationTrace();
         newContentPane.JPanelCompareXmlGraph(cSimTrace.getTransFile1(), cSimTrace.getTransFile2());
         assertTrue(newContentPane.getTable().getRowCount() > 0);
     }
-  /*  public void latencyTest() throws SAXException, IOException, ParserConfigurationException {
-        JFrameShowLatencyDetails showLatencyDetails = new JFrameShowLatencyDetails(cSimTrace.getTransFile1(), cSimTrace.getTransFile2(), "CPU1_1",
-                "Request SmartCard", "CPU1_1", "Send end", false);
-        showLatencyDetails.setVisible(false);
-        assertTrue(showLatencyDetails.getTable11().getRowCount() > 0);
-    }*/
+
 }
\ No newline at end of file