+ try {\r
+ createAdmittance(nbExec);\r
+ }\r
+ catch(Exception e) {\r
+ cout << "cannot create admittance" << endl;\r
+ throw(e);\r
+ }\r
+ \r
+ int clock = 0; // index in IP \r
+ int i = 0; // index in AP \r
+ while ((clock < lengthIP) && (i < lengthAP)) {\r
+ \r
+ // if AP is a valid group, search for the next valid group in IP\r
+ if (isValidDataGroup(admittance,i)) {\r
+ while ((clock < lengthIP) && (! isValidDataGroup(inputPattern,clock))) clock++;\r
+ if (clock == lengthIP) {\r
+ cerr << "Abnormal case: end of IP has been reached without finding a valid group" << endl;\r
+ throw(Exception(IP_END_NULLCOL)); \r
+ }\r
+ } \r
+ /* at that point 2 cases of compat : IP(clock) and AP(i) are equal valid group, or\r
+ are both null columns\r
+ */\r
+ if (! samePatterns(inputPattern,clock,admittance,i)) {\r
+ cout << "AP(" << i << ") and IP(" << clock << ") are not equal" << endl;\r
+ throw(Exception(IP_AP_NOTCOMPAT)); // IP and AP not compatible\r
+ }\r
+ clock++;\r
+ i++;\r
+ }\r
+ if (clock < lengthIP) {\r
+ throw(Exception(AP_TOO_SHORT));\r
+ cerr << "Abnormal case: AP is to short" << endl; \r
+ } \r