diff --git a/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script b/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script index 1506608b83d9c9a05948c942857b680d13bac226..7e214d34cd865b17580ba026c2f54b5d42e72e5b 100644 --- a/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script +++ b/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script @@ -2364,98 +2364,2335 @@ error: Type mismatch: The type of the operand should be a component type instead <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_210305_alive_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from alive is applied to single component > + +<COMPILE> + +<MODULE TTCN NegSem_210305_alive_operation_001 NegSem_210305_alive_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210305_alive_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210305_alive_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := any from v_ptc.alive; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The operand of operation `alive': Type mismatch: component array reference was expected instead of `@NegSem_210305_alive_operation_001.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210305_alive_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from alive is applied to 1D array and index target has wrong type > + +<COMPILE> + +<MODULE TTCN NegSem_210305_alive_operation_003 NegSem_210305_alive_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210305_alive_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function f_done() runs on GeneralComp {} + + testcase TC_NegSem_210305_alive_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].start(f_done()); } //quick done components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of component arrays can only be redirected to an integer, an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210305_alive_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from alive index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_210305_alive_operation_004 NegSem_210305_alive_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210305_alive_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function f_done() runs on GeneralComp {} + + testcase TC_NegSem_210305_alive_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].start(f_done()); } //quick done components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the component array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210305_alive_operation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from alive index redirection for multi-D arrays requires arrays > + +<COMPILE> + +<MODULE TTCN NegSem_210305_alive_operation_005 NegSem_210305_alive_operation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that any from alive index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210305_alive_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function f_done() runs on GeneralComp {} + + testcase TC_NegSem_210305_alive_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].start(f_done()); } //quick done components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + v_isAlive := any from v_ptc.alive -> @index value v_index; + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210305_alive_operation_005(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of multi-dimensional component arrays can only be redirected to an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210305_alive_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in component.alive operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210305_alive_operation_001 NegSyn_210305_alive_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := v_ptc.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210305_alive_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in any component.alive operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210305_alive_operation_002 NegSyn_210305_alive_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in any component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := any component.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210305_alive_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in all component.alive operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210305_alive_operation_003 NegSyn_210305_alive_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in all component.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210305_alive_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isAlive := all component.alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210305_alive_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in function instance.alive operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210305_alive_operation_004 NegSyn_210305_alive_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.5, Verify that error occurs when using index redirection in function instance.alive operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210305_alive_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function initComp() return GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + return v_ptc; + } + + testcase TC_NegSyn_210305_alive_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isAlive; + var integer v_index; + v_isAlive := initComp().alive -> @index value v_index; + if(v_isAlive){ + setverdict(pass); + } else { + setverdict(fail, "The any from alive operation didn't find alive components"); + } + } + + control { + execute(TC_NegSyn_210305_alive_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210306_running_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from running is applied to single component > + +<COMPILE> + +<MODULE TTCN NegSem_210306_running_operation_001 NegSem_210306_running_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210306_running_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := any from v_ptc.running; + + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The operand of operation `component running': Type mismatch: component array reference was expected instead of `@NegSem_210306_running_operation_001.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210306_running_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from running is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_210306_running_operation_002 NegSem_210306_running_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210306_running_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + v_isRunning := any from v_ptc.running -> @index value v_index; + + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of one-dimensional component arrays can only be redirected to an integer +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210306_running_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from running is applied to 1D array and index target has wrong type > + +<COMPILE> + +<MODULE TTCN NegSem_210306_running_operation_003 NegSem_210306_running_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when any from running is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210306_running_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + v_isRunning := any from v_ptc.running -> @index value v_index; + + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of component arrays can only be redirected to an integer, an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210306_running_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from running index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_210306_running_operation_004 NegSem_210306_running_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210306_running_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + v_isRunning := any from v_ptc.running -> @index value v_index; + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the component array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210306_running_operation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from running index redirection for multi-D arrays requires arrays > + +<COMPILE> + +<MODULE TTCN NegSem_210306_running_operation_005 NegSem_210306_running_operation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that any from running index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210306_running_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210306_running_operation_005() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + v_isRunning := any from v_ptc.running -> @index value v_index; + + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index incorrectly assigned"); + } + } + + control { + execute(TC_NegSem_210306_running_operation_005(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of multi-dimensional component arrays can only be redirected to an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210306_running_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in component.running operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210306_running_operation_001 NegSyn_210306_running_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_001() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := v_ptc.running -> @index value v_index; + + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210306_running_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in any component.running operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210306_running_operation_002 NegSyn_210306_running_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in any component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_002() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := any component.running -> @index value v_index; + + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210306_running_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in all component.running operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210306_running_operation_003 NegSyn_210306_running_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in all component.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210306_running_operation_003() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + v_isRunning := all component.running -> @index value v_index; + + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210306_running_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in function instance.running operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210306_running_operation_004 NegSyn_210306_running_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.6, Verify that error occurs when using index redirection in function instance.running operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210306_running_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + function initComp() return GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + return v_ptc; + } + + testcase TC_NegSyn_210306_running_operation_004() runs on GeneralComp system GeneralComp { + var boolean v_isRunning; + var integer v_index; + v_isRunning := initComp().running -> @index value v_index; + + if(v_isRunning){ + setverdict(pass); + } else { + setverdict(fail, "The any from running operation didn't find running components"); + } + } + + control { + execute(TC_NegSyn_210306_running_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected -> +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_210307_done_operation_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - Ensure that done operator can be used only for ptcs. > +<TC - Ensure that done operator can be used only for ptcs. > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_001 NegSem_210307_done_operation_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Ensure that done operator can be used only for ptcs. + ** @verdict pass reject + *****************************************************************/ +// Done operator can be used only for ptcs, not for mtcs. + +module NegSem_210307_done_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_NegSem_210307_done_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + + GeneralComp.done; // not allowed. Done only allowed for ptcs. + + } + + control { + execute(TC_NegSem_210307_done_operation_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of type `@NegSem_210307_done_operation_001.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from done is applied to single component > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_002 NegSem_210307_done_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210307_done_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any from v_ptc.done { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: The type of the operand should be a component array type instead of `@NegSem_210307_done_operation_002.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from done is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_003 NegSem_210307_done_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210307_done_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_003() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of one-dimensional component arrays can only be redirected to an integer +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from done is applied to 1D array and index target has wrong type > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_004 NegSem_210307_done_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when any from done is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210307_done_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of component arrays can only be redirected to an integer, an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from done index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_005 NegSem_210307_done_operation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210307_done_operation_005 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_005(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the component array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from done index redirection for multi-D arrays requires arrays > + +<COMPILE> + +<MODULE TTCN NegSem_210307_done_operation_006 NegSem_210307_done_operation_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that any from done index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction f: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210307_done_operation_006 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210307_done_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + alt + { + [] any from v_ptc.done -> @index value v_index + { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSem_210307_done_operation_006(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of multi-dimensional component arrays can only be redirected to an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210307_done_operation_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - partially initialized array in any from ComponentArrayRef.done > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_210307_done_operation_010 NegSem_210307_done_operation_010.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, partially initialized array in any from ComponentArrayRef.done + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210307_done_operation_010 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_NegSem_210307_done_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + var verdicttype v_verdict; + v_ptcs[0] := GeneralComp.create; + v_ptcs[0].start(f()); + alt { + [] any from v_ptcs.done { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_210307_done_operation_010(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Performing done operation on an unbound component reference. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210307_done_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in component.done operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210307_done_operation_001 NegSyn_210307_done_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_001() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] v_ptc.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Index redirect cannot be used without the 'any from' clause +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210307_done_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in any component.done operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210307_done_operation_002 NegSyn_210307_done_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in any component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_002() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any component.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected ->, expecting '{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210307_done_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in all component.done operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210307_done_operation_003 NegSyn_210307_done_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in all component.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210307_done_operation_003() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] all component.done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected ->, expecting '{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210307_done_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in function instance.done operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210307_done_operation_004 NegSyn_210307_done_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, Verify that error occurs when using index redirection in function instance.done operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210307_done_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + function f_getComp(GeneralComp p_ptc) return GeneralComp { + return p_ptc; + } + + testcase TC_NegSyn_210307_done_operation_004() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + alt + { + [] any from f_getComp(v_ptc).done -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from done operation didn't find done components"); } + } + } + + control { + execute(TC_NegSyn_210307_done_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: The type of the operand should be a component array type instead of `@NegSyn_210307_done_operation_004.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Ensure that killed operator is only valid for ptcs. > + +<COMPILE> + +<MODULE TTCN NegSem_210308_killed_operation_001 NegSem_210308_killed_operation_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Ensure that killed operator is only valid for ptcs. + ** @verdict pass reject + *****************************************************************/ +// killed operator is not allowed for mtc check. + +module NegSem_210308_killed_operation_001 { + + type component GeneralComp {} + function f1 ( ) runs on GeneralComp {} + + testcase TC_NegSem_210308_killed_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp ptc; + var GeneralComp ptc2; + ptc:=GeneralComp.create alive; + ptc2:=GeneralComp.create alive; + + ptc.start(f1()); + + mtc.killed; // not allowed. killed only allowed for ptcs. + + alt { + [] any component.killed {setverdict(pass);} + } + } + + control { + execute(TC_NegSem_210308_killed_operation_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `killed': syntax error, unexpected DotKilledKeyword, expecting DotKillKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from killed is applied to single component > + +<COMPILE> + +<MODULE TTCN NegSem_210308_killed_operation_002 NegSem_210308_killed_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to single component + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction b +// The ComponentArrayRef shall be a reference to a component array variable identifier. +module NegSem_210308_killed_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.kill; + alt + { + [] any from v_ptc.killed { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: The type of the operand should be a component array type instead of `@NegSem_210308_killed_operation_002.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from killed is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_210308_killed_operation_003 NegSem_210308_killed_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210308_killed_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_003() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of one-dimensional component arrays can only be redirected to an integer +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from killed is applied to 1D array and index target has wrong type > <COMPILE> -<MODULE TTCN NegSem_210307_done_operation_001 NegSem_210307_done_operation_001.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_210308_killed_operation_004 NegSem_210308_killed_operation_004.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:21.3.7, Ensure that done operator can be used only for ptcs. + ** @purpose 1:21.3.8, Verify that error occurs when any from killed is applied to 1D array and index target has wrong type ** @verdict pass reject *****************************************************************/ -// Done operator can be used only for ptcs, not for mtcs. +// The following requirements are tested: +// Restriction d +// If the index redirection is used for single-dimensional component arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_210308_killed_operation_004 { -module NegSem_210307_done_operation_001 { + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_004() runs on GeneralComp system GeneralComp { + const integer c_size := 4; + var GeneralComp v_ptc[c_size]; + var float v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + v_ptc[i] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices + else { v_ptc[i].start(f());} // activate v_ptc + } + + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of component arrays can only be redirected to an integer, an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from killed index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_210308_killed_operation_005 NegSem_210308_killed_operation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that any from killed index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210308_killed_operation_005 { type component GeneralComp {} - function f1 ( ) runs on GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } - testcase TC_NegSem_210307_done_operation_001() runs on GeneralComp system GeneralComp { - var GeneralComp ptc; - var GeneralComp ptc2; - ptc:=GeneralComp.create alive; - ptc2:=GeneralComp.create alive; - - ptc.start(f1()); - - GeneralComp.done; // not allowed. Done only allowed for ptcs. - + testcase TC_NegSem_210308_killed_operation_005() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index[1]; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index[0] == 1 and v_index[1] == 0){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } } control { - execute(TC_NegSem_210307_done_operation_001()); + execute(TC_NegSem_210308_killed_operation_005(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of type `@NegSem_210307_done_operation_001.GeneralComp' +error: Size of integer array is invalid: the component array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_210308_killed_operation_001 negative test +:h3. NegSem_210308_killed_operation_006 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - Ensure that killed operator is only valid for ptcs. > +<TC - Verify that any from killed index redirection for multi-D arrays requires arrays > <COMPILE> -<MODULE TTCN NegSem_210308_killed_operation_001 NegSem_210308_killed_operation_001.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_210308_killed_operation_006 NegSem_210308_killed_operation_006.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:21.3.8, Ensure that killed operator is only valid for ptcs. + ** @purpose 1:21.3.8, Verify that any from killed index redirection for multi-D arrays requires arrays ** @verdict pass reject *****************************************************************/ -// killed operator is not allowed for mtc check. +// The following requirements are tested: +// Restriction e: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_210308_killed_operation_006 { -module NegSem_210308_killed_operation_001 { + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_NegSem_210308_killed_operation_006() runs on GeneralComp system GeneralComp { + const integer c_size := 3; + var GeneralComp v_ptc[c_size][c_size]; + var integer v_index; + + for (var integer i := 0; i < c_size; i := i + 1) { + for (var integer j := 0; j < c_size; j := j + 1) { + v_ptc[i][j] := GeneralComp.create; // created components are inactive + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i][j].kill; } // kill components on even i or odd j + else { v_ptc[i][j].start(f());} // activate v_ptc + } + } + + alt + { + [] any from v_ptc.killed -> @index value v_index + { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Invalid index value"); + } + setverdict(pass); + } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSem_210308_killed_operation_006(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of multi-dimensional component arrays can only be redirected to an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_210308_killed_operation_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - partially initialized array in any from ComponentArrayRef.killed > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_210308_killed_operation_010 NegSem_210308_killed_operation_010.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.7, partially initialized array in any from ComponentArrayRef.killed + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The ComponentArrayRef shall be a reference to a completely initialized component array. + +module NegSem_210308_killed_operation_010 { type component GeneralComp {} - function f1 ( ) runs on GeneralComp {} + + function f() runs on GeneralComp { + setverdict(pass); + } - testcase TC_NegSem_210308_killed_operation_001() runs on GeneralComp system GeneralComp { - var GeneralComp ptc; - var GeneralComp ptc2; - ptc:=GeneralComp.create alive; - ptc2:=GeneralComp.create alive; - - ptc.start(f1()); - - mtc.killed; // not allowed. killed only allowed for ptcs. - + testcase TC_NegSem_210308_killed_operation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[2]; + var verdicttype v_verdict; + v_ptcs[0] := GeneralComp.create; + v_ptcs[0].start(f()); alt { - [] any component.killed {setverdict(pass);} + [] any from v_ptcs.killed { + setverdict(pass); + } } } control { - execute(TC_NegSem_210308_killed_operation_001()); + execute(TC_NegSem_210308_killed_operation_010(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `killed': syntax error, unexpected DotKilledKeyword, expecting DotKillKeyword +Dynamic test case error: Performing killed operation on an unbound component reference. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210308_killed_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in component.killed operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210308_killed_operation_001 NegSyn_210308_killed_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_001 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_001() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] v_ptc.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected ->, expecting '{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210308_killed_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in any component.killed operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210308_killed_operation_002 NegSyn_210308_killed_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in any component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_002 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_002() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] any component.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected ->, expecting '{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210308_killed_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in all component.killed operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210308_killed_operation_003 NegSyn_210308_killed_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in all component.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_003 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + testcase TC_NegSyn_210308_killed_operation_003() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f()); + alt + { + [] all component.killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `->': syntax error, unexpected ->, expecting '{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_210308_killed_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in function instance.killed operation > + +<COMPILE> + +<MODULE TTCN NegSyn_210308_killed_operation_004 NegSyn_210308_killed_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.3.8, Verify that error occurs when using index redirection in function instance.killed operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction c +// The index redirection shall only be used when the operation is used on an any from +// component array construct. +module NegSyn_210308_killed_operation_004 { + + type component GeneralComp {} + + function f() runs on GeneralComp { + timer t := 1.0; + t.start; + t.timeout; + } + + function f_getComp(GeneralComp p_ptc) return GeneralComp { + return p_ptc; + } + + testcase TC_NegSyn_210308_killed_operation_004() runs on GeneralComp system GeneralComp { + var integer v_index; + var GeneralComp v_ptc := GeneralComp.create; + alt + { + [] any from f_getComp(v_ptc).killed -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from killed operation didn't find killed components"); } + } + } + + control { + execute(TC_NegSyn_210308_killed_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: The type of the operand should be a component array type instead of `@NegSyn_210308_killed_operation_004.GeneralComp' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/negative_tests/22_communication_operations.script b/conformance_test/core_language_tests/negative_tests/22_communication_operations.script index 13cd5d08215c6c9e08a8b42c030892cfdd32db97..4bc66f87b34d20d04e1c346288d5753e2b564a67 100644 --- a/conformance_test/core_language_tests/negative_tests/22_communication_operations.script +++ b/conformance_test/core_language_tests/negative_tests/22_communication_operations.script @@ -1606,6 +1606,222 @@ Dynamic test case error: The second argument of connect operation contains the n <END_RESULT> +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220202_ReceiveOperation_017 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - index redirection in standard port.receive > + +<COMPILE> + +<MODULE TTCN NegSem_220202_ReceiveOperation_017 NegSem_220202_ReceiveOperation_017.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.2, index redirection in standard port.receive + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. + +module NegSem_220202_ReceiveOperation_017 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + testcase TC_NegSem_220202_ReceiveOperation_017() runs on GeneralComp { + var integer v_int; + connect(self:p, self:p); + + p.send(10); + p.receive(integer:?) -> @index value v_int; + + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_017(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Index redirect cannot be used without the 'any from' clause +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220202_ReceiveOperation_019 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - insufficient value range of variable in index redirection > + +<COMPILE> + +<MODULE TTCN NegSem_220202_ReceiveOperation_019 NegSem_220202_ReceiveOperation_019.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for single-dimensional port arrays, the type of the +// integer variable shall allow storing the highest index of the respective array. + +module NegSem_220202_ReceiveOperation_019 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p[10]; + } + + testcase TC_NegSem_220202_ReceiveOperation_019() runs on GeneralComp { + var RestrInt v_int; + + connect(self:p[5], self:p[5]); + p[5].send(100); + any from p.receive(integer:?) -> @index value v_int; + + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_019(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: 3 is not a valid value for type `integer' which has subtype \(0..2\) +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220202_ReceiveOperation_020 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - insufficient array dimension of variable in index redirection > + +<COMPILE> + +<MODULE TTCN NegSem_220202_ReceiveOperation_020 NegSem_220202_ReceiveOperation_020.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient array dimension of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220202_ReceiveOperation_020 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p[3][2][3]; + } + + testcase TC_NegSem_220202_ReceiveOperation_020() runs on GeneralComp { + var integer v_indices[2]; + connect(self:p[0][1][2],self:p[0][1][2]); + p[0][1][2].send(100); + any from p.receive(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_020(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the port array has 3 dimensions, but the integer array has 2 elements +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220202_ReceiveOperation_021 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - insufficient array dimension of variable in index redirection > + +<COMPILE> + +<MODULE TTCN NegSem_220202_ReceiveOperation_021 NegSem_220202_ReceiveOperation_021.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.2, insufficient element value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220202_ReceiveOperation_021 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p[4][2][3]; + } + + testcase TC_NegSem_220202_ReceiveOperation_021() runs on GeneralComp { + var RestrInt v_indices[3]; + + connect(self:p[3][1][2],self:p[3][1][2]); + + p[3][1][2].send(100); + any from p.receive(integer:?) -> @index value v_indices; + + setverdict(pass); + } + + control { + execute(TC_NegSem_220202_ReceiveOperation_021(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: 3 is not a valid value for type `integer' which has subtype \(0..2\) +<END_RESULT> + <END_TC> :exmp @@ -2544,154 +2760,365 @@ Dynamic test case error: The second argument of connect operation contains the n :exmp *---------------------------------------------------------------------* -:h3. NegSem_220203_TriggerOperation_022 negative test +:h3. NegSem_220203_TriggerOperation_019 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - incompatible from and sender clause > +<TC - insufficient value range of variable in index redirection > <COMPILE> -<MODULE TTCN NegSem_220203_TriggerOperation_022 NegSem_220203_TriggerOperation_022.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220203_TriggerOperation_019 NegSem_220203_TriggerOperation_019.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.2.3, incompatible from and sender clause + ** @purpose 1:22.2.3, insufficient value range of variable in index redirection ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// If the trigger operation contains both from and sender clause, the variable or parameter -// referenced in the sender clause shall be type compatible with the template in the from -// clause. - -module NegSem_220203_TriggerOperation_022 { +// If the index redirection is used for single-dimensional port arrays, the type of the +// integer variable shall allow storing the highest index of the respective array. - type integer address; - - type port P message { +module NegSem_220203_TriggerOperation_019 { + type integer RestrInt(0..2); + type port P message { inout integer; } with {extension "internal"} type component GeneralComp { - port P p; + port P p[10]; } - testcase TC_NegSem_220203_TriggerOperation_022() runs on GeneralComp { - var address v_addr; + testcase TC_NegSem_220203_TriggerOperation_019() runs on GeneralComp { + var RestrInt v_int; - connect(self:p, self:p); - p.send(100); - alt { - [] p.trigger(integer:?) from GeneralComp:? -> sender v_addr { } - [else] {} - } + connect(self:p[5], self:p[5]); + p[5].send(100); + any from p.trigger(integer:?) -> @index value v_int; setverdict(pass); } control { - execute(TC_NegSem_220203_TriggerOperation_022(), 5.0); + execute(TC_NegSem_220203_TriggerOperation_019(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: The type of the variable should be a component type instead of `integer' +error: 3 is not a valid value for type `integer' which has subtype \(0..2\) <END_RESULT> - <END_TC> :exmp *---------------------------------------------------------------------* -:h2. 2203_procedure_based_communication folder -.*---------------------------------------------------------------------* - -*---------------------------------------------------------------------* -:h3. NegSem_220301_CallOperation_001 negative test +:h3. NegSem_220203_TriggerOperation_017 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - Ensure that the IUT correctly handles procedure call operations > +<TC - index redirection in standard port.trigger > <COMPILE> -<MODULE TTCN NegSem_220301_CallOperation_001 NegSem_220301_CallOperation_001.ttcn > -/*************************************************** +<MODULE TTCN NegSem_220203_TriggerOperation_017 NegSem_220203_TriggerOperation_017.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.1, Ensure that the IUT correctly handles procedure call operations + ** @purpose 1:22.2.3, index redirection in standard port.trigger ** @verdict pass reject - ***************************************************/ + *****************************************************************/ -module NegSem_220301_CallOperation_001 { +// The following requirements are tested: +// The index redirection shall only be used when the operation is used on an any from port +// array construct. - type port loopbackPort message { - inout integer - } with {extension "internal"} - +module NegSem_220203_TriggerOperation_017 { + type port P message { + inout integer; + } with {extension "internal"} + type component GeneralComp { - port loopbackPort messagePort - } - - testcase TC_NegSem_220301_CallOperation_001() runs on GeneralComp { - - connect(self:messagePort, self:messagePort); - - messagePort.call(2); //cannot use call on a message based port + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_017() runs on GeneralComp { + var integer v_int; - alt { - [] messagePort.receive { - setverdict(pass); - } - [] messagePort.receive { - setverdict(fail); - } - } + connect(self:p, self:p); + p.send(10); + p.trigger(integer:?) -> @index value v_int; + setverdict(pass); } - control{ - execute(TC_NegSem_220301_CallOperation_001()); + control { + execute(TC_NegSem_220203_TriggerOperation_017(), 5.0); } - } <END_MODULE> <RESULT COUNT 1> -error: Procedure-based operation `call' is not applicable to a message-based port of type `@NegSem_220301_CallOperation_001.loopbackPort' +error: Index redirect cannot be used without the 'any from' clause <END_RESULT> - <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220301_CallOperation_002 negative test +:h3. NegSem_220203_TriggerOperation_020 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - Ensure that the IUT correctly procedure calls > +<TC - insufficient array dimension of variable in index redirection > <COMPILE> -<MODULE TTCN NegSem_220301_CallOperation_002 NegSem_220301_CallOperation_002.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220203_TriggerOperation_020 NegSem_220203_TriggerOperation_020.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.1, Ensure that the IUT correctly procedure calls + ** @purpose 1:22.2.3, insufficient array dimension of variable in index redirection ** @verdict pass reject *****************************************************************/ -module NegSem_220301_CallOperation_002 { +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. - /** - * @desc testing of inline return template for remote procedure call - * @param p_par1 only input parameter - * @param p_par2 must have value 4 at return - * @param p_par3 must have value 5 at return - * @return must return value 1 - */ - signature p_NegSem_220301_CallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; +module NegSem_220203_TriggerOperation_020 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p[3][2][3]; + } + + testcase TC_NegSem_220203_TriggerOperation_020() runs on GeneralComp { + var integer v_indices[2]; - template p_NegSem_220301_CallOperation_002 s_returnTemplate := { + connect(self:p[0][1][2], self:p[0][1][2]); + p[0][1][2].send(100); + any from p.trigger(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_020(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the port array has 3 dimensions, but the integer array has 2 elements +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220203_TriggerOperation_021 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - insufficient element value range of variable in index redirection > + +<COMPILE> + +<MODULE TTCN NegSem_220203_TriggerOperation_021 NegSem_220203_TriggerOperation_0201ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.3, insufficient element value range of variable in index redirection + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the index redirection is used for multi-dimensional port arrays, the size of the +// integer array or record of integer type shall exactly be the same as the dimension of +// the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. + +module NegSem_220203_TriggerOperation_021 { + type integer RestrInt(0..2); + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p[4][2][3]; + } + + testcase TC_NegSem_220203_TriggerOperation_021() runs on GeneralComp { + var RestrInt v_indices[3]; + + connect(self:p[3][1][2], self:p[3][1][2]); + p[3][1][2].send(100); + any from p.trigger(integer:?) -> @index value v_indices; + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_021(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: 3 is not a valid value for type `integer' which has subtype \(0..2\) +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220203_TriggerOperation_022 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - incompatible from and sender clause > + +<COMPILE> + +<MODULE TTCN NegSem_220203_TriggerOperation_022 NegSem_220203_TriggerOperation_022.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.2.3, incompatible from and sender clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the trigger operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220203_TriggerOperation_022 { + + type integer address; + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220203_TriggerOperation_022() runs on GeneralComp { + var address v_addr; + + connect(self:p, self:p); + p.send(100); + alt { + [] p.trigger(integer:?) from GeneralComp:? -> sender v_addr { } + [else] {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_022(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The type of the variable should be a component type instead of `integer' +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h2. 2203_procedure_based_communication folder +.*---------------------------------------------------------------------* + +*---------------------------------------------------------------------* +:h3. NegSem_220301_CallOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Ensure that the IUT correctly handles procedure call operations > + +<COMPILE> + +<MODULE TTCN NegSem_220301_CallOperation_001 NegSem_220301_CallOperation_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly handles procedure call operations + ** @verdict pass reject + ***************************************************/ + +module NegSem_220301_CallOperation_001 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_220301_CallOperation_001() runs on GeneralComp { + + connect(self:messagePort, self:messagePort); + + messagePort.call(2); //cannot use call on a message based port + + alt { + [] messagePort.receive { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_220301_CallOperation_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Procedure-based operation `call' is not applicable to a message-based port of type `@NegSem_220301_CallOperation_001.loopbackPort' +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220301_CallOperation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Ensure that the IUT correctly procedure calls > + +<COMPILE> + +<MODULE TTCN NegSem_220301_CallOperation_002 NegSem_220301_CallOperation_002.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, Ensure that the IUT correctly procedure calls + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220301_CallOperation_002 { + + /** + * @desc testing of inline return template for remote procedure call + * @param p_par1 only input parameter + * @param p_par2 must have value 4 at return + * @param p_par3 must have value 5 at return + * @return must return value 1 + */ + signature p_NegSem_220301_CallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220301_CallOperation_002 s_returnTemplate := { p_par1 := -, p_par2 := 4, p_par3 := 5 @@ -3204,26 +3631,24 @@ error: Parameter redirect cannot be used without signature template :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_009 negative test +:h3. NegSem_220302_GetcallOperation_004 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - null component in the from clause of the getcall operation > +<TC - Verify that error occurs when any from getcall is applied to single port > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_009 NegSem_220302_GetcallOperation_009.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_004 NegSem_220302_GetcallOperation_004.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, null component in the from clause of the getcall operation + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to single port ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. - -module NegSem_220302_GetcallOperation_009 { +// Restriction g +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220302_GetcallOperation_004 { signature S(); @@ -3237,668 +3662,1898 @@ module NegSem_220302_GetcallOperation_009 { function f() runs on GeneralComp { - var GeneralComp v_compRef := null; - connect(self:p, v_compRef:p); - - alt { - [] p.getcall(S:{}) from v_compRef { setverdict(pass, "first branch");} // error expected - [] p.getcall(S:{}) { setverdict(fail, "second branch"); } - } + var integer v_index; + alt + { + [] any from p.getcall { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } } - testcase TC_NegSem_220302_GetcallOperation_009() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220302_GetcallOperation_004() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); p.call(S:{}, nowait); v_ptc.start(f()); v_ptc.done; - setverdict(pass); } control { - execute(TC_NegSem_220302_GetcallOperation_009(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_004(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +error: Reference to a port array was expected instead of a port <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_011 negative test +:h3. NegSem_220302_GetcallOperation_005 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - applying @decoded to a forbidden field > +<TC - Verify that error occurs when any from getcall is applied to 1D array and index target is array > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_011 NegSem_220302_GetcallOperation_011.ttcn > +<MODULE TTCN NegSem_220302_GetcallOperation_005 NegSem_220302_GetcallOperation_005.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, applying @decoded to a forbidden field + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target is array ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// When assigning individual fields of a message, encoded payload fields can be -// decoded prior to assignment using the @decoded modifier. In this case, the -// referenced field on the right hand sided of the assignment shall be one of the -// bitstring, hexstring, octetstring, charstring or universal charstring types. It -// shall be decoded into a value of the same type as the variable on the left hand -// side of the assignment. +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220302_GetcallOperation_005 { -module NegSem_220302_GetcallOperation_011 { - type record of integer RoI (0..255); - - signature S(RoI p_par); - + signature S(); + type port P procedure { inout S; - } with {extension "internal"} + } + const integer c_portCount := 4; + type component GeneralComp { - port P p; + port P p[c_portCount]; } - - function f_server() runs on GeneralComp { - var integer v_res; - alt { - [] p.getcall(S: {p_par := ?} ) -> param (v_res := @decoded p_par) { - setverdict (pass); - } - [] p.getcall { setverdict(fail); } - } - } - - testcase TC_NegSem_220302_GetcallOperation_011() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - p.call(S:{ p_par := { 0, 0, 0, 0 } }, nowait); - v_ptc.done; - setverdict(pass); + + function f() runs on GeneralComp + { + var integer v_index[1]; + alt + { + [] any from p.getcall(S:{}) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{}, nowait); } + } + v_ptc.start(f()); + v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_011(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_005(), 5.0); } -} with {encode "RAW"} +} <END_MODULE> -<RESULT COUNT> -error: The '@decoded' modifier is only available to parameter redirects of string types. +<RESULT COUNT 1> +error: Indices of one-dimensional port arrays can only be redirected to an integer <END_RESULT> <END_TC> :exmp - *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_012 negative test +:h3. NegSem_220302_GetcallOperation_006 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - decoding error in @decoded redirect assignment > +<TC - Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_012 NegSem_220302_GetcallOperation_012.ttcn > +<MODULE TTCN NegSem_220302_GetcallOperation_006 NegSem_220302_GetcallOperation_006.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, decoding error in @decoded redirect assignment + ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Failure of this decoding shall cause a test case error. - -module NegSem_220302_GetcallOperation_012 { - signature S(charstring p_par); +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220302_GetcallOperation_006 { - type integer I with { variant "32 bit"}; - + signature S(); + type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 4; + type component GeneralComp { - port P p; + port P p[c_portCount]; } - - function f_server() runs on GeneralComp { - var I v_res; - alt { - [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded p_par) { - setverdict (pass); - } - [] p.getcall { setverdict(pass); } - } - } - testcase TC_NegSem_220302_GetcallOperation_012() runs on GeneralComp system GeneralComp { - var I v_src := 1953719668; - var charstring v_str := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij"; - - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{ p_par := v_str }, nowait); - - v_ptc.done; - setverdict(pass); + function f() runs on GeneralComp + { + var float v_index; + alt + { + [] any from p.getcall(S:{}) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + if (i mod 2 > 0) { p[i].call(S:{}, nowait); } + } + v_ptc.start(f()); + v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_012(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_006(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT> -Dynamic test case error: Parameter redirect \(for parameter 'p__par'\) failed, because the buffer was not empty after decoding. Remaining octets: 9. +<RESULT COUNT 1> +error: Indices of port arrays can only be redirected to an integer, an integer array or a record of integers <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_013 negative test +:h3. NegSem_220302_GetcallOperation_007 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - invalid format value in @decoded redirect assignment > +<TC - Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_013 NegSem_220302_GetcallOperation_013.ttcn > +<MODULE TTCN NegSem_220302_GetcallOperation_007 NegSem_220302_GetcallOperation_007.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, invalid format value in @decoded redirect assignment + ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Any other value shall cause an error. - -module NegSem_220302_GetcallOperation_013 { - signature S(universal charstring p_par); +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220302_GetcallOperation_007 { - type integer I with { variant "32 bit"}; - + signature S(integer p_par); + type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 3; type component GeneralComp { - port P p; + port P p[c_portCount][c_portCount]; } - - function f_server() runs on GeneralComp { - var I v_res; - alt { - [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded("proprietary") p_par) { - setverdict(pass); - } - [] p.getcall { setverdict(pass); } - } - } - testcase TC_NegSem_220302_GetcallOperation_013() runs on GeneralComp system GeneralComp { - var I v_src := 1953719668; - var universal charstring v_str := encvalue_unichar(v_src); - - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{ p_par := v_str }, nowait); - v_ptc.done; - - setverdict(pass); + function f() runs on GeneralComp + { + var integer v_index[1], v_parValue; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + + testcase TC_NegSem_220302_GetcallOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].call(S:{ p_par := i + 1 }, nowait); } + } + } + v_ptc.start(f()); + v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_013(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_007(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: 'proprietary' is not a valid encoding format +<RESULT COUNT 1> +error: Size of integer array is invalid: the port array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_014 negative test +:h3. NegSem_220302_GetcallOperation_008 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - value of wrong type in @decoded redirect assignment > +<TC - Verify that any from getcall index redirection for multi-D arrays requires arrays > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_014 NegSem_220302_GetcallOperation_014.ttcn > +<MODULE TTCN NegSem_220302_GetcallOperation_008 NegSem_220302_GetcallOperation_008.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, value of wrong type in @decoded redirect assignment + ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Any other value shall cause an error. +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220302_GetcallOperation_008 { -module NegSem_220302_GetcallOperation_014 { - signature S(universal charstring p_par); - - type integer I with { variant "32 bit"}; - + signature S(integer p_par); + type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 3; type component GeneralComp { - port P p; + port P p[c_portCount][c_portCount]; } - - function f_server() runs on GeneralComp { - var I v_res, v_enc := 32; - alt { - [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded(v_enc) p_par) { - setverdict (pass); - } - [] p.getcall { setverdict(pass); } - } - } - testcase TC_NegSem_220302_GetcallOperation_014() runs on GeneralComp system GeneralComp { - var I v_src := 1953719668; - var universal charstring v_str := encvalue_unichar(v_src); - - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{ p_par := v_str }, nowait); - v_ptc.done; - - setverdict(pass); + function f() runs on GeneralComp + { + var integer v_index, v_parValue; + var GeneralComp v_src; + alt + { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { + if(v_index == 1 and v_parValue == v_index + 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].call(S:{ p_par := i + 1 }, nowait); } + } + } + v_ptc.start(f()); + v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_014(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_008(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: Type mismatch: a value of type `charstring' was expected instead of `integer' +<RESULT COUNT 1> +error: Indices of multi-dimensional port arrays can only be redirected to an integer array or a record of integers <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_015 negative test +:h3. NegSem_220302_GetcallOperation_009 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - encoding parameter of @decoded redirect assignment applied to incorrect type > +<TC - null component in the from clause of the getcall operation > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_015 NegSem_220302_GetcallOperation_015.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_009 NegSem_220302_GetcallOperation_009.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @purpose 1:22.3.2, null component in the from clause of the getcall operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// In case the referenced field is not a universal charstring, the optional -// parameter shall not be present. +// No AddressRef shall contain the special value null at the time of the operation. -module NegSem_220302_GetcallOperation_015 { - signature S(octetstring p_par); +module NegSem_220302_GetcallOperation_009 { - type charstring CS with { variant ""}; - + signature S(); + type port P procedure { inout S; } with {extension "internal"} type component GeneralComp { port P p; - } - - function f_server() runs on GeneralComp { - var CS v_res; - alt { - [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded("UTF-8") p_par) { - setverdict(pass); - } - [] p.getcall { setverdict(pass); } - } - } + } - testcase TC_NegSem_220302_GetcallOperation_015() runs on GeneralComp system GeneralComp { - var CS v_src := "abc"; - var octetstring v_os := bit2oct(encvalue(v_src)); - - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{ p_par := v_os }, nowait); - v_ptc.done; + function f() runs on GeneralComp + { + var GeneralComp v_compRef := null; + connect(self:p, v_compRef:p); + alt { + [] p.getcall(S:{}) from v_compRef { setverdict(pass, "first branch");} // error expected + [] p.getcall(S:{}) { setverdict(fail, "second branch"); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; setverdict(pass); } control { - execute(TC_NegSem_220302_GetcallOperation_015(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_009(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: The encoding format parameter for the '@decoded' modifier is only available to parameter redirects of universal charstrings +<RESULT COUNT 1> +Dynamic test case error: The second argument of connect operation contains the null component reference. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_016 negative test +:h3. NegSem_220302_GetcallOperation_011 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - incompatible from and sender clause in getcall operation > +<TC - applying @decoded to a forbidden field > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_016 NegSem_220302_GetcallOperation_016.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_011 NegSem_220302_GetcallOperation_011.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, incompatible from and sender clause in getcall operation + ** @purpose 1:22.3.2, applying @decoded to a forbidden field ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// If the getcall operation contains both from and sender clause, the variable or parameter -// referenced in the sender clause shall be type compatible with the template in the from -// clause. - -module NegSem_220302_GetcallOperation_016 { +// When assigning individual fields of a message, encoded payload fields can be +// decoded prior to assignment using the @decoded modifier. In this case, the +// referenced field on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. - signature S(); - +module NegSem_220302_GetcallOperation_011 { + type record of integer RoI (0..255); + + signature S(RoI p_par); + type port P procedure { inout S; } with {extension "internal"} type component GeneralComp { - var integer vc_int; port P p; } - type component AltComp { - var charstring vc_str; - port P px; - } - - function f() runs on GeneralComp { - var GeneralComp v_compRef := null; + function f_server() runs on GeneralComp { + var integer v_res; alt { - [] p.getcall(S:{}) from AltComp:? -> sender v_compRef { } // error expected - [] p.getcall(S:{}) { } - } - setverdict (pass); - } - - testcase TC_NegSem_220302_GetcallOperation_016() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create; - connect(self:p, v_ptc:p); - p.call(S:{}, nowait); - v_ptc.start(f()); - v_ptc.done; + [] p.getcall(S: {p_par := ?} ) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(fail); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{ p_par := { 0, 0, 0, 0 } }, nowait); + v_ptc.done; setverdict(pass); } control { - execute(TC_NegSem_220302_GetcallOperation_016(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_011(), 5.0); } -} +} with {encode "RAW"} <END_MODULE> -<RESULT COUNT 1> -error: The types in `from' clause and `sender' redirect are not the same: `@NegSem_220302_GetcallOperation_016.AltComp' was expected instead of `@NegSem_220302_GetcallOperation_016.GeneralComp' +<RESULT COUNT> +error: The '@decoded' modifier is only available to parameter redirects of string types. <END_RESULT> <END_TC> :exmp + *---------------------------------------------------------------------* -:h3. NegSem_220303_ReplyOperation_001 negative test +:h3. NegSem_220302_GetcallOperation_012 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - Ensure that reply operations are only used on procedure based ports > +<TC - decoding error in @decoded redirect assignment > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220303_ReplyOperation_001 NegSem_220303_ReplyOperation_001.ttcn > -/*************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_012 NegSem_220302_GetcallOperation_012.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.3, Ensure that reply operations are only used on procedure based ports + ** @purpose 1:22.3.2, decoding error in @decoded redirect assignment ** @verdict pass reject - ***************************************************/ + *****************************************************************/ -module NegSem_220303_ReplyOperation_001 { +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. - type port loopbackPort message { - inout integer +module NegSem_220302_GetcallOperation_012 { + signature S(charstring p_par); + + type integer I with { variant "32 bit"}; + + type port P procedure { + inout S; } with {extension "internal"} + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var I v_res; + alt { + [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_012() runs on GeneralComp system GeneralComp { + var I v_src := 1953719668; + var charstring v_str := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij"; - type component GeneralComp { - port loopbackPort messagePort - } - - testcase TC_NegSem_220303_ReplyOperation_001() runs on GeneralComp { - - connect(self:messagePort, self:messagePort); - - messagePort.send(2); + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); - alt { - [] messagePort.receive(2) { - messagePort.reply(3); //cannot use reply on a message based port - setverdict(pass); - } - [] messagePort.receive { - setverdict(fail); - } - } - } + p.call(S:{ p_par := v_str }, nowait); - control{ - execute(TC_NegSem_220303_ReplyOperation_001()); - } + v_ptc.done; + setverdict(pass); + } -} + control { + execute(TC_NegSem_220302_GetcallOperation_012(), 5.0); + } +} with { encode "RAW"} <END_MODULE> -<RESULT COUNT 1> -error: Procedure-based operation `reply' is not applicable to a message-based port of type `@NegSem_220303_ReplyOperation_001.loopbackPort' -<END_RESULT> -<RESULT COUNT 1> -error: The type of parameter is `integer', which is not a signature +<RESULT COUNT> +Dynamic test case error: Parameter redirect \(for parameter 'p__par'\) failed, because the buffer was not empty after decoding. Remaining octets: 9. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220303_ReplyOperation_002 negative test +:h3. NegSem_220302_GetcallOperation_013 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - null component in the to clause of the reply operation > +<TC - invalid format value in @decoded redirect assignment > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220303_ReplyOperation_002 NegSem_220303_ReplyOperation_002.ttcn > -/*************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_013 NegSem_220302_GetcallOperation_013.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.3, null component in the to clause of the reply operation + ** @purpose 1:22.3.2, invalid format value in @decoded redirect assignment ** @verdict pass reject - ***************************************************/ + *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. - -module NegSem_220303_ReplyOperation_002 { - - - signature S(); +// Any other value shall cause an error. - type port P procedure { - inout S; - } with {extension "internal"} +module NegSem_220302_GetcallOperation_013 { + signature S(universal charstring p_par); + type integer I with { variant "32 bit"}; + + type port P procedure { + inout S; + } with {extension "internal"} + type component GeneralComp { - port P p; - } - + port P p; + } + function f_server() runs on GeneralComp { - var GeneralComp v_compRef := null; - connect(self:p, v_compRef:p); - p.getcall(S:{}); - p.reply(S:{}) to v_compRef; + var I v_res; + alt { + [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded("proprietary") p_par) { + setverdict(pass); + } + [] p.getcall { setverdict(pass); } + } } - - testcase TC_NegSem_220303_ReplyOperation_002() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create("PTC"); + + testcase TC_NegSem_220302_GetcallOperation_013() runs on GeneralComp system GeneralComp { + var I v_src := 1953719668; + var universal charstring v_str := encvalue_unichar(v_src); + + var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); - p.call(S:{}, 1.0) { - [] p.getreply(S:{}) { } - [] p.catch(timeout) { } - } + + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + setverdict(pass); } - control{ - execute(TC_NegSem_220303_ReplyOperation_002(), 5.0); + control { + execute(TC_NegSem_220302_GetcallOperation_013(), 5.0); } - -} +} with { encode "RAW"} <END_MODULE> -<RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +<RESULT COUNT > +error: 'proprietary' is not a valid encoding format <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_006 negative test +:h3. NegSem_220302_GetcallOperation_014 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - null component in the from clause of the getreply operation > +<TC - value of wrong type in @decoded redirect assignment > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220304_getreply_operation_006 NegSem_220304_getreply_operation_006.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220302_GetcallOperation_014 NegSem_220302_GetcallOperation_014.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, null component in the from clause of the getreply operation + ** @purpose 1:22.3.2, value of wrong type in @decoded redirect assignment ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// Any other value shall cause an error. -module NegSem_220304_getreply_operation_006 { +module NegSem_220302_GetcallOperation_014 { + signature S(universal charstring p_par); - signature S(); - + type integer I with { variant "32 bit"}; + type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp - { + type component GeneralComp { port P p; } + + function f_server() runs on GeneralComp { + var I v_res, v_enc := 32; + alt { + [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded(v_enc) p_par) { + setverdict (pass); + } + [] p.getcall { setverdict(pass); } + } + } - function f() runs on GeneralComp - { - p.getcall(S:{}); - p.reply(S:{}); - } + testcase TC_NegSem_220302_GetcallOperation_014() runs on GeneralComp system GeneralComp { + var I v_src := 1953719668; + var universal charstring v_str := encvalue_unichar(v_src); + + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := v_str }, nowait); + v_ptc.done; + + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_014(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: Type mismatch: a value of type `charstring' was expected instead of `integer' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_015 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - encoding parameter of @decoded redirect assignment applied to incorrect type > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_015 NegSem_220302_GetcallOperation_015.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220302_GetcallOperation_015 { + signature S(octetstring p_par); + + type charstring CS with { variant ""}; + + type port P procedure { + inout S; + } with {extension "internal"} - testcase TC_NegSem_220304_getreply_operation_006() runs on GeneralComp system GeneralComp { + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var CS v_res; + alt { + [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded("UTF-8") p_par) { + setverdict(pass); + } + [] p.getcall { setverdict(pass); } + } + } + + testcase TC_NegSem_220302_GetcallOperation_015() runs on GeneralComp system GeneralComp { + var CS v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := v_os }, nowait); + v_ptc.done; + + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_015(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: The encoding format parameter for the '@decoded' modifier is only available to parameter redirects of universal charstrings +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_016 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - incompatible from and sender clause in getcall operation > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_016 NegSem_220302_GetcallOperation_016.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, incompatible from and sender clause in getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the getcall operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. + +module NegSem_220302_GetcallOperation_016 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + var integer vc_int; + port P p; + } + + type component AltComp { + var charstring vc_str; + port P px; + } + + function f() runs on GeneralComp { var GeneralComp v_compRef := null; + alt { + [] p.getcall(S:{}) from AltComp:? -> sender v_compRef { } // error expected + [] p.getcall(S:{}) { } + } + setverdict (pass); + } + + testcase TC_NegSem_220302_GetcallOperation_016() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); - connect(self:p, v_compRef:p); - + p.call(S:{}, nowait); v_ptc.start(f()); - p.call(S:{}) { - [] p.getreply(S:{}) from v_compRef {} // error expected - [] p.getreply(S:{}) {} - } + v_ptc.done; setverdict(pass); } control { - execute(TC_NegSem_220304_getreply_operation_006(), 5.0); + execute(TC_NegSem_220302_GetcallOperation_016(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +error: The types in `from' clause and `sender' redirect are not the same: `@NegSem_220302_GetcallOperation_016.AltComp' was expected instead of `@NegSem_220302_GetcallOperation_016.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_220302_GetcallOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in port.getcall operation > + +<COMPILE> + +<MODULE TTCN NegSyn_220302_GetcallOperation_001 NegSyn_220302_GetcallOperation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, Verify that error occurs when using index redirection in port.getcall operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220302_GetcallOperation_001 { + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + var integer v_index; + alt + { + [] p.getcall -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } + } + } + + testcase TC_NegSyn_220302_GetcallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + } + + control { + execute(TC_NegSyn_220302_GetcallOperation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Index redirect cannot be used without the 'any from' clause +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220303_ReplyOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Ensure that reply operations are only used on procedure based ports > + +<COMPILE> + +<MODULE TTCN NegSem_220303_ReplyOperation_001 NegSem_220303_ReplyOperation_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.3, Ensure that reply operations are only used on procedure based ports + ** @verdict pass reject + ***************************************************/ + +module NegSem_220303_ReplyOperation_001 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_220303_ReplyOperation_001() runs on GeneralComp { + + connect(self:messagePort, self:messagePort); + + messagePort.send(2); + + alt { + [] messagePort.receive(2) { + messagePort.reply(3); //cannot use reply on a message based port + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Procedure-based operation `reply' is not applicable to a message-based port of type `@NegSem_220303_ReplyOperation_001.loopbackPort' +<END_RESULT> +<RESULT COUNT 1> +error: The type of parameter is `integer', which is not a signature +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220303_ReplyOperation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - null component in the to clause of the reply operation > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220303_ReplyOperation_002 NegSem_220303_ReplyOperation_002.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.3, null component in the to clause of the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220303_ReplyOperation_002 { + + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var GeneralComp v_compRef := null; + connect(self:p, v_compRef:p); + p.getcall(S:{}); + p.reply(S:{}) to v_compRef; + } + + testcase TC_NegSem_220303_ReplyOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + p.call(S:{}, 1.0) { + [] p.getreply(S:{}) { } + [] p.catch(timeout) { } + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_002(), 5.0); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: The second argument of connect operation contains the null component reference. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from getreply is applied to single port > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_001 NegSem_220304_getreply_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to single port + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction e +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220304_getreply_operation_001 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.getreply { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a port array was expected instead of a port +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from getreply is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_002 NegSem_220304_getreply_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to 1D array and index target is array + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220304_getreply_operation_002 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + + testcase TC_NegSem_220304_getreply_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index[1]; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.getreply(S:{}) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of one-dimensional port arrays can only be redirected to an integer +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when any from getreply is applied to 1D array and index target has wrong type > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_003 NegSem_220304_getreply_operation_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that error occurs when any from getreply is applied to 1D array and index target has wrong type + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction g +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220304_getreply_operation_003 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + const integer c_portCount := 4; + type component GeneralComp + { + port P p[c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].reply(S:{}) }; + } + } + + testcase TC_NegSem_220304_getreply_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var float v_index; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.getreply(S:{}) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_003(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of port arrays can only be redirected to an integer, an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from getreply index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_004 NegSem_220304_getreply_operation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply index redirection for multi-D arrays requires arrays of correct size + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220304_getreply_operation_004 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:{}); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } + } + } + } + + + testcase TC_NegSem_220304_getreply_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[1]; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.getreply(S:{}) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_004(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Size of integer array is invalid: the port array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that any from getreply index redirection for multi-D arrays requires arrays > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_005 NegSem_220304_getreply_operation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, Verify that any from getreply index redirection for multi-D arrays requires arrays + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220304_getreply_operation_005 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + const integer c_portCount := 3; + type component GeneralComp + { + port P p[c_portCount][c_portCount]; + } + + function f() runs on GeneralComp + { + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:{}); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } + } + } + } + + testcase TC_NegSem_220304_getreply_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.getreply(S:{}) -> @index value v_index { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_005(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Indices of multi-dimensional port arrays can only be redirected to an integer array or a record of integers +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - null component in the from clause of the getreply operation > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220304_getreply_operation_006 NegSem_220304_getreply_operation_006.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, null component in the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220304_getreply_operation_006 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + connect(self:p, v_compRef:p); + + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from v_compRef {} // error expected + [] p.getreply(S:{}) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_006(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: The second argument of connect operation contains the null component reference. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_007 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - null component in the multicast list of the from clause of the getreply operation > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220304_getreply_operation_007 NegSem_220304_getreply_operation_007.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, null component in the multicast list of the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef shall contain the special value null at the time of the operation. + +module NegSem_220304_getreply_operation_007 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + connect(self:p, v_compRef:p); + + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from (mtc, v_compRef) {} // error expected + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_007(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: The second argument of connect operation contains the null component reference. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_008 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - applying @decoded to a forbidden parameter field > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_008 NegSem_220304_getreply_operation_008.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, applying @decoded to a forbidden parameter field + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// When assigning individual fields of a reply, encoded parameters can be decoded +// prior to assignment using the @decoded modifier. In this case, the referenced +// parameter on the right hand sided of the assignment shall be one of the +// bitstring, hexstring, octetstring, charstring or universal charstring types. It +// shall be decoded into a value of the same type as the variable on the left hand +// side of the assignment. + +module NegSem_220304_getreply_operation_008 { + type record of integer RoI (0..255); + + signature S(out RoI p_par); + + type integer I with { variant "32 bit" }; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall(S:{ p_par := {} }); + p.reply(S:{ p_par := { 0, 0, 0, 0 } }); + } + + testcase TC_NegSem_220304_getreply_operation_008() runs on GeneralComp system GeneralComp { + var I v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := { 0, 0, 0, 0 } }) { + [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(fail); } + + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_008(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: The '@decoded' modifier is only available to parameter redirects of string types. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_009 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - decoding error in @decoded redirect parameter assignment > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220304_getreply_operation_009 NegSem_220304_getreply_operation_009.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, decoding error in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Failure of this decoding shall cause a test case error. + +module NegSem_220304_getreply_operation_009 { + signature S(out charstring p_par); + + type integer I with { variant "32 bit"}; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var I v_src := 1953719668; + var charstring v_str := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij"; + p.getcall( S: { p_par := ?} ); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_009() runs on GeneralComp system GeneralComp { + var I v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := - }) { + [] p.getreply(S: { p_par := ?}) -> param (v_res := @decoded p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + } + + control { + execute(TC_NegSem_220304_getreply_operation_009(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +Dynamic test case error: Parameter redirect \(for parameter 'p__par'\) failed, because the buffer was not empty after decoding. Remaining octets: 9. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - invalid format value in @decoded redirect parameter assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_010 NegSem_220304_getreply_operation_010.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, invalid format value in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_010 { + signature S(out universal charstring p_par); + + type integer I with { variant "32 bit"}; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var I v_src := 1953719668; + var universal charstring v_str := encvalue_unichar(v_src); + p.getcall(S: {p_par := ?}); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_010() runs on GeneralComp system GeneralComp { + var I v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := - }) { + [] p.getreply(S: { p_par := ? }) -> param (v_res := @decoded("proprietary") p_par) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_010(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: 'proprietary' is not a valid encoding format +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_011 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - value of wrong type in @decoded redirect parameter assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_011 NegSem_220304_getreply_operation_011.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, value of wrong type in @decoded redirect parameter assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220304_getreply_operation_011 { + signature S(out universal charstring p_par); + + type integer I with { variant "32 bit"}; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var I v_src := 1953719668; + var universal charstring v_str := encvalue_unichar(v_src); + p.getcall(S: {p_par := ?}); + p.reply(S:{ p_par := v_str }); + } + + testcase TC_NegSem_220304_getreply_operation_011() runs on GeneralComp system GeneralComp { + var I v_res, v_enc := 32; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := - }) { + [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded(v_enc) p_par) { + setverdict (pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_011(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: Type mismatch: a value of type `charstring' was expected instead of `integer' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_012 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - encoding parameter of @decoded redirect parameter assignment applied to incorrect type > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_012 NegSem_220304_getreply_operation_012.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, encoding parameter of @decoded redirect parameter assignment applied to incorrect type + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case the referenced field is not a universal charstring, the optional +// parameter shall not be present. + +module NegSem_220304_getreply_operation_012 { + signature S(out octetstring p_par); + + type charstring CS with { variant ""}; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var CS v_src := "abc"; + var octetstring v_os := bit2oct(encvalue(v_src)); + p.getcall(S: {p_par := ?}); + p.reply(S:{ p_par := v_os }); + } + + testcase TC_NegSem_220304_getreply_operation_012() runs on GeneralComp system GeneralComp { + var CS v_res; + var GeneralComp v_ptc := GeneralComp.create("PTC"); + + connect(self:p, v_ptc:p); + v_ptc.start(f_server()); + + p.call(S:{ p_par := - }) { + [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded("UTF-8") p_par) { + setverdict(pass); + } + [] p.getreply { setverdict(pass); } + } + + } + + control { + execute(TC_NegSem_220304_getreply_operation_012(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: The encoding format parameter for the '@decoded' modifier is only available to parameter redirects of universal charstrings <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_007 negative test +:h3. NegSem_220304_getreply_operation_013 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - null component in the multicast list of the from clause of the getreply operation > +<TC - incompatible from and sender clause in getreply operation > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220304_getreply_operation_007 NegSem_220304_getreply_operation_007.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_013 NegSem_220304_getreply_operation_013.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, null component in the multicast list of the from clause of the getreply operation + ** @purpose 1:22.3.4, incompatible from and sender clause in getreply operation ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// If the getreply operation contains both from and sender clause, the variable or parameter +// referenced in the sender clause shall be type compatible with the template in the from +// clause. -module NegSem_220304_getreply_operation_007 { +module NegSem_220304_getreply_operation_013 { signature S(); @@ -3907,42 +5562,46 @@ module NegSem_220304_getreply_operation_007 { } with {extension "internal"} type component GeneralComp { + var integer vc_int; port P p; } + + type component AltComp { + var charstring vc_str; + port P px; + } function f() runs on GeneralComp { p.getcall(S:{}); p.reply(S:{}); } - testcase TC_NegSem_220304_getreply_operation_007() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_013() runs on GeneralComp system GeneralComp { var GeneralComp v_compRef := null; var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); - connect(self:p, v_compRef:p); - - v_ptc.start(f()); p.call(S:{}) { - [] p.getreply(S:{}) from (mtc, v_compRef) {} // error expected + [] p.getreply(S:{}) from AltComp:? -> sender v_compRef { } // error expected + [] p.getreply(S:{}) { } } setverdict(pass); } control { - execute(TC_NegSem_220304_getreply_operation_007(), 5.0); + execute(TC_NegSem_220304_getreply_operation_013(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +error: The types in `from' clause and `sender' redirect are not the same: `@NegSem_220304_getreply_operation_013.AltComp' was expected instead of `@NegSem_220304_getreply_operation_013.GeneralComp' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_008 negative test +:h3. NegSem_220304_getreply_operation_015 negative test .*---------------------------------------------------------------------* :xmp tab=0. @@ -3950,7 +5609,7 @@ Dynamic test case error: The second argument of connect operation contains the n <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_008 NegSem_220304_getreply_operation_008.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_015 NegSem_220304_getreply_operation_015.ttcn > /****************************************************************************** ** @version 0.0.1 ** @purpose 1:22.3.4, applying @decoded to a forbidden parameter field @@ -3965,12 +5624,15 @@ Dynamic test case error: The second argument of connect operation contains the n // shall be decoded into a value of the same type as the variable on the left hand // side of the assignment. -module NegSem_220304_getreply_operation_008 { - type record of integer RoI (0..255); +module NegSem_220304_getreply_operation_015 { + type record R { + integer id, + record of integer payload(0..255) + } - signature S(out RoI p_par); + signature S() return R; - type integer I with { variant "32 bit" }; + type integer I with {variant "32 bit"}; type port P procedure { inout S; @@ -3981,18 +5643,20 @@ module NegSem_220304_getreply_operation_008 { } function f_server() runs on GeneralComp { - p.getcall(S:{ p_par := {} }); - p.reply(S:{ p_par := { 0, 0, 0, 0 } }); + var R v_rec := { id := 6, payload := { 0, 0, 0, 0 }} + p.getcall(S: {}); + p.reply(S:{} value v_rec); } - testcase TC_NegSem_220304_getreply_operation_008() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_015() runs on GeneralComp system GeneralComp { var I v_res; var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); v_ptc.start(f_server()); - p.call(S:{ p_par := { 0, 0, 0, 0 } }) { - [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded p_par) { + p.call(S:{}) { + [] p.getreply(S: {} value R:?) -> value (v_res := @decoded payload) { setverdict (pass); } [] p.getreply { setverdict(fail); } @@ -4001,42 +5665,47 @@ module NegSem_220304_getreply_operation_008 { } control { - execute(TC_NegSem_220304_getreply_operation_008(), 5.0); + execute(TC_NegSem_220304_getreply_operation_015(), 5.0); } } with { encode "RAW"} <END_MODULE> <RESULT COUNT > -error: The '@decoded' modifier is only available to parameter redirects of string types. +error: The '@decoded' modifier is only available to value redirects of string types. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_009 negative test +:h3. NegSem_220304_getreply_operation_016 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - decoding error in @decoded redirect parameter assignment > +<TC - decoding error in @decoded redirect value assignment > <COMPILE> <EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220304_getreply_operation_009 NegSem_220304_getreply_operation_009.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_016 NegSem_220304_getreply_operation_016.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, decoding error in @decoded redirect parameter assignment + ** @purpose 1:22.3.4, decoding error in @decoded redirect value assignment ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // Failure of this decoding shall cause a test case error. -module NegSem_220304_getreply_operation_009 { - signature S(out charstring p_par); +module NegSem_220304_getreply_operation_016 { + type record R { + integer id, + charstring payload + } + + signature S() return R; - type integer I with { variant "32 bit"}; + type integer I with {variant "32 bit"}; type port P procedure { inout S; @@ -4048,20 +5717,20 @@ module NegSem_220304_getreply_operation_009 { function f_server() runs on GeneralComp { var I v_src := 1953719668; - var charstring v_str := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij"; - p.getcall( S: { p_par := ?} ); - p.reply(S:{ p_par := v_str }); + var R v_rec := { id := 4, payload := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij" }; + p.getcall(S:{}); + p.reply(S:{} value v_rec); } - testcase TC_NegSem_220304_getreply_operation_009() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_016() runs on GeneralComp system GeneralComp { var I v_res; var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); - p.call(S:{ p_par := - }) { - [] p.getreply(S: { p_par := ?}) -> param (v_res := @decoded p_par) { + p.call(S:{}) { + [] p.getreply(S: {} value R:?) -> value (v_res := @decoded payload) { setverdict (pass); } [] p.getreply { setverdict(pass); } @@ -4069,41 +5738,46 @@ module NegSem_220304_getreply_operation_009 { } control { - execute(TC_NegSem_220304_getreply_operation_009(), 5.0); + execute(TC_NegSem_220304_getreply_operation_016(), 5.0); } } with { encode "RAW"} <END_MODULE> <RESULT COUNT > -Dynamic test case error: Parameter redirect \(for parameter 'p__par'\) failed, because the buffer was not empty after decoding. Remaining octets: 9. +Dynamic test case error: Value redirect #1 failed, because the buffer was not empty after decoding. Remaining octets: 9. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_010 negative test +:h3. NegSem_220304_getreply_operation_017 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - invalid format value in @decoded redirect parameter assignment > +<TC - invalid format value in @decoded redirect value assignment > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_010 NegSem_220304_getreply_operation_010.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_017 NegSem_220304_getreply_operation_017.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, invalid format value in @decoded redirect parameter assignment + ** @purpose 1:22.3.4, invalid format value in @decoded redirect value assignment ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // Any other value shall cause an error. -module NegSem_220304_getreply_operation_010 { - signature S(out universal charstring p_par); +module NegSem_220304_getreply_operation_017 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; - type integer I with { variant "32 bit"}; + type integer I with {variant "32 bit"}; type port P procedure { inout S; @@ -4115,20 +5789,20 @@ module NegSem_220304_getreply_operation_010 { function f_server() runs on GeneralComp { var I v_src := 1953719668; - var universal charstring v_str := encvalue_unichar(v_src); - p.getcall(S: {p_par := ?}); - p.reply(S:{ p_par := v_str }); + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S: {}); + p.reply(S:{} value v_rec); } - testcase TC_NegSem_220304_getreply_operation_010() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_017() runs on GeneralComp system GeneralComp { var I v_res; var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); - p.call(S:{ p_par := - }) { - [] p.getreply(S: { p_par := ? }) -> param (v_res := @decoded("proprietary") p_par) { + p.call(S:{}) { + [] p.getreply(S: {} value R:?) -> value (v_res := @decoded("proprietary") payload) { setverdict(pass); } [] p.getreply { setverdict(pass); } @@ -4138,41 +5812,46 @@ module NegSem_220304_getreply_operation_010 { } control { - execute(TC_NegSem_220304_getreply_operation_010(), 5.0); + execute(TC_NegSem_220304_getreply_operation_017(), 5.0); } } with { encode "RAW"} <END_MODULE> <RESULT COUNT > -error: 'proprietary' is not a valid encoding format + error: 'proprietary' is not a valid encoding format <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_011 negative test +:h3. NegSem_220304_getreply_operation_018 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - value of wrong type in @decoded redirect parameter assignment > +<TC - value of wrong type in @decoded redirect value assignment > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_011 NegSem_220304_getreply_operation_011.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_018 NegSem_220304_getreply_operation_018.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, value of wrong type in @decoded redirect parameter assignment + ** @purpose 1:22.3.4, value of wrong type in @decoded redirect value assignment ** @verdict pass reject *****************************************************************/ // The following requirements are tested: // Any other value shall cause an error. -module NegSem_220304_getreply_operation_011 { - signature S(out universal charstring p_par); +module NegSem_220304_getreply_operation_018 { + type record R { + integer id, + universal charstring payload + } + + signature S() return R; - type integer I with { variant "32 bit"}; + type integer I with {variant "32 bit"}; type port P procedure { inout S; @@ -4184,20 +5863,18 @@ module NegSem_220304_getreply_operation_011 { function f_server() runs on GeneralComp { var I v_src := 1953719668; - var universal charstring v_str := encvalue_unichar(v_src); - p.getcall(S: {p_par := ?}); - p.reply(S:{ p_par := v_str }); + var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; + p.getcall(S: {}); + p.reply(S:{} value v_rec); } - testcase TC_NegSem_220304_getreply_operation_011() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_018() runs on GeneralComp system GeneralComp { var I v_res, v_enc := 32; var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); v_ptc.start(f_server()); - - p.call(S:{ p_par := - }) { - [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded(v_enc) p_par) { + p.call(S:{}) { + [] p.getreply(S: {} value R:?) -> value (v_res := @decoded(v_enc) payload) { setverdict (pass); } [] p.getreply { setverdict(pass); } @@ -4206,9 +5883,9 @@ module NegSem_220304_getreply_operation_011 { } control { - execute(TC_NegSem_220304_getreply_operation_011(), 5.0); + execute(TC_NegSem_220304_getreply_operation_018(), 5.0); } -} with { encode "RAW"} +} with { encode "RAW"} <END_MODULE> <RESULT COUNT > @@ -4219,18 +5896,18 @@ error: Type mismatch: a value of type `charstring' was expected instead of `inte :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_012 negative test +:h3. NegSem_220304_getreply_operation_019 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - encoding parameter of @decoded redirect parameter assignment applied to incorrect type > +<TC - encoding parameter of @decoded redirect value assignment applied to incorrect type > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_012 NegSem_220304_getreply_operation_012.ttcn > +<MODULE TTCN NegSem_220304_getreply_operation_019 NegSem_220304_getreply_operation_019.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, encoding parameter of @decoded redirect parameter assignment applied to incorrect type + ** @purpose 1:22.3.4, encoding parameter of @decoded redirect value assignment applied to incorrect type ** @verdict pass reject *****************************************************************/ @@ -4238,10 +5915,15 @@ error: Type mismatch: a value of type `charstring' was expected instead of `inte // In case the referenced field is not a universal charstring, the optional // parameter shall not be present. -module NegSem_220304_getreply_operation_012 { - signature S(out octetstring p_par); +module NegSem_220304_getreply_operation_019 { + type record R { + integer id, + octetstring payload + } + + signature S() return R; - type charstring CS with { variant ""}; + type charstring CS with {variant ""}; type port P procedure { inout S; @@ -4253,20 +5935,20 @@ module NegSem_220304_getreply_operation_012 { function f_server() runs on GeneralComp { var CS v_src := "abc"; - var octetstring v_os := bit2oct(encvalue(v_src)); - p.getcall(S: {p_par := ?}); - p.reply(S:{ p_par := v_os }); + var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; + p.getcall(S: {}); + p.reply(S:{} value v_rec); } - testcase TC_NegSem_220304_getreply_operation_012() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220304_getreply_operation_019() runs on GeneralComp system GeneralComp { var CS v_res; var GeneralComp v_ptc := GeneralComp.create("PTC"); connect(self:p, v_ptc:p); v_ptc.start(f_server()); - p.call(S:{ p_par := - }) { - [] p.getreply(S: {p_par := ?}) -> param (v_res := @decoded("UTF-8") p_par) { + p.call(S:{}) { + [] p.getreply(S:{} value R:?) -> value (v_res := @decoded("UTF-8") payload) { setverdict(pass); } [] p.getreply { setverdict(pass); } @@ -4275,483 +5957,434 @@ module NegSem_220304_getreply_operation_012 { } control { - execute(TC_NegSem_220304_getreply_operation_012(), 5.0); + execute(TC_NegSem_220304_getreply_operation_019(), 5.0); } } with { encode "RAW"} <END_MODULE> <RESULT COUNT > -error: The encoding format parameter for the '@decoded' modifier is only available to parameter redirects of universal charstrings +error: The encoding format parameter for the '@decoded' modifier is only available to value redirects of universal charstrings <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_013 negative test +:h3. NegSyn_220304_getreply_operation_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - incompatible from and sender clause in getreply operation > +<TC - Verify that error occurs when using index redirection in port.getreply operation > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_013 NegSem_220304_getreply_operation_013.ttcn > -/***************************************************************** +<MODULE TTCN NegSyn_220304_getreply_operation_001 NegSyn_220304_getreply_operation_001.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, incompatible from and sender clause in getreply operation + ** @purpose 1:22.3.4, Verify that error occurs when using index redirection in port.getreply operation ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// If the getreply operation contains both from and sender clause, the variable or parameter -// referenced in the sender clause shall be type compatible with the template in the from -// clause. - -module NegSem_220304_getreply_operation_013 { - +// Restriction f +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220304_getreply_operation_001 { signature S(); type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp { - var integer vc_int; + type component GeneralComp + { port P p; } - - type component AltComp { - var charstring vc_str; - port P px; - } - function f() runs on GeneralComp { - p.getcall(S:{}); - p.reply(S:{}); + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.reply(S:{}); } - testcase TC_NegSem_220304_getreply_operation_013() runs on GeneralComp system GeneralComp { - var GeneralComp v_compRef := null; + testcase TC_NegSyn_220304_getreply_operation_001() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; connect(self:p, v_ptc:p); - p.call(S:{}) { - [] p.getreply(S:{}) from AltComp:? -> sender v_compRef { } // error expected - [] p.getreply(S:{}) { } - } - setverdict(pass); - } + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] p.getreply -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } + } + } control { - execute(TC_NegSem_220304_getreply_operation_013(), 5.0); + execute(TC_NegSyn_220304_getreply_operation_001(), 5.0); } } <END_MODULE> -<RESULT COUNT 1> -error: The types in `from' clause and `sender' redirect are not the same: `@NegSem_220304_getreply_operation_013.AltComp' was expected instead of `@NegSem_220304_getreply_operation_013.GeneralComp' +<RESULT COUNT > +error: Index redirect cannot be used without the 'any from' clause <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_015 negative test +:h3. NegSem_220305_raise_operation_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - applying @decoded to a forbidden parameter field > +<TC - raised exception type not in the list of available exceptions > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_015 NegSem_220304_getreply_operation_015.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220305_raise_operation_001 NegSem_220305_raise_operation_001.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, applying @decoded to a forbidden parameter field + ** @purpose 1:22.3.5, raised exception type not in the list of available exceptions ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// When assigning individual fields of a reply, encoded parameters can be decoded -// prior to assignment using the @decoded modifier. In this case, the referenced -// parameter on the right hand sided of the assignment shall be one of the -// bitstring, hexstring, octetstring, charstring or universal charstring types. It -// shall be decoded into a value of the same type as the variable on the left hand -// side of the assignment. - -module NegSem_220304_getreply_operation_015 { - type record R { - integer id, - record of integer payload(0..255) - } - - signature S() return R; +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template or be the value resulting from an expression (which of course can be +// an explicit value). The optional type field in the value specification to the raise +// operation shall be used in cases where it is necessary to avoid any ambiguity of the type +// of the value being sent. - type integer I with {variant "32 bit"}; - +module NegSem_220305_raise_operation_001 { + signature S() exception(charstring, octetstring); + type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp { + type component GeneralComp + { port P p; } - - function f_server() runs on GeneralComp { - var R v_rec := { id := 6, payload := { 0, 0, 0, 0 }} - p.getcall(S: {}); - p.reply(S:{} value v_rec); - } - - testcase TC_NegSem_220304_getreply_operation_015() runs on GeneralComp system GeneralComp { - var I v_res; - var GeneralComp v_ptc := GeneralComp.create("PTC"); - - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{}) { - [] p.getreply(S: {} value R:?) -> value (v_res := @decoded payload) { - setverdict (pass); - } - [] p.getreply { setverdict(fail); } - - } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); + // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; } control { - execute(TC_NegSem_220304_getreply_operation_015(), 5.0); + execute(TC_NegSem_220305_raise_operation_001(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: The '@decoded' modifier is only available to value redirects of string types. +<RESULT COUNT 1> +error: Type `integer' is not present on the exception list of signature `@NegSem_220305_raise_operation_001.S' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_016 negative test +:h3. NegSem_220305_raise_operation_002 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - decoding error in @decoded redirect value assignment > +<TC - exception raised for a signature with no exception list > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220304_getreply_operation_016 NegSem_220304_getreply_operation_016.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220305_raise_operation_002 NegSem_220305_raise_operation_002.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, decoding error in @decoded redirect value assignment + ** @purpose 1:22.3.5, exception raised for a signature with no exception list ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// Failure of this decoding shall cause a test case error. - -module NegSem_220304_getreply_operation_016 { - type record R { - integer id, - charstring payload - } - - signature S() return R; +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template or be the value resulting from an expression (which of course can be +// an explicit value). The optional type field in the value specification to the raise +// operation shall be used in cases where it is necessary to avoid any ambiguity of the type +// of the value being sent. - type integer I with {variant "32 bit"}; - +module NegSem_220305_raise_operation_002 { + signature S(); + type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp { + type component GeneralComp + { port P p; } - - function f_server() runs on GeneralComp { - var I v_src := 1953719668; - var R v_rec := { id := 4, payload := oct2char(bit2oct(encvalue(v_src))) & "abcdefgij" }; - p.getcall(S:{}); - p.reply(S:{} value v_rec); - } - testcase TC_NegSem_220304_getreply_operation_016() runs on GeneralComp system GeneralComp { - var I v_res; - var GeneralComp v_ptc := GeneralComp.create("PTC"); - - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{}) { - [] p.getreply(S: {} value R:?) -> value (v_res := @decoded payload) { - setverdict (pass); - } - [] p.getreply { setverdict(pass); } - } + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); + // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; } control { - execute(TC_NegSem_220304_getreply_operation_016(), 5.0); + execute(TC_NegSem_220305_raise_operation_002(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -Dynamic test case error: Value redirect #1 failed, because the buffer was not empty after decoding. Remaining octets: 9. +<RESULT COUNT 1> +error: Signature `@NegSem_220305_raise_operation_002.S' does not have exceptions <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_017 negative test +:h3. NegSem_220305_raise_operation_003 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - invalid format value in @decoded redirect value assignment > +<TC - raised exception type is ambiguous > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_017 NegSem_220304_getreply_operation_017.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220305_raise_operation_003 NegSem_220305_raise_operation_003.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, invalid format value in @decoded redirect value assignment + ** @purpose 1:22.3.5, raised exception type is ambiguous ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// Any other value shall cause an error. - -module NegSem_220304_getreply_operation_017 { - type record R { - integer id, - universal charstring payload - } - - signature S() return R; +// Exceptions are specified as types. Therefore the exception value may either be derived +// from a template or be the value resulting from an expression (which of course can be +// an explicit value). The optional type field in the value specification to the raise +// operation shall be used in cases where it is necessary to avoid any ambiguity of the type +// of the value being sent. - type integer I with {variant "32 bit"}; +module NegSem_220305_raise_operation_003 { + type integer MyInt1 (1..10); + type integer MyInt2 (1..20); + signature S() exception(MyInt1, MyInt2); + type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp { + type component GeneralComp + { port P p; } - - function f_server() runs on GeneralComp { - var I v_src := 1953719668; - var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; - p.getcall(S: {}); - p.reply(S:{} value v_rec); - } - testcase TC_NegSem_220304_getreply_operation_017() runs on GeneralComp system GeneralComp { - var I v_res; - var GeneralComp v_ptc := GeneralComp.create("PTC"); - - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{}) { - [] p.getreply(S: {} value R:?) -> value (v_res := @decoded("proprietary") payload) { - setverdict(pass); - } - [] p.getreply { setverdict(pass); } - } - v_ptc.done; + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, 1); setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); + // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; } control { - execute(TC_NegSem_220304_getreply_operation_017(), 5.0); + execute(TC_NegSem_220305_raise_operation_003(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > - error: 'proprietary' is not a valid encoding format +<RESULT COUNT 1> +error: Type of the exception is ambiguous: `integer' is compatible with more than one exception types of signature `@NegSem_220305_raise_operation_003.S' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_018 negative test +:h3. NegSem_220305_raise_operation_004 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - value of wrong type in @decoded redirect value assignment > +<TC - missing to clause in case of 1 to n connection > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220304_getreply_operation_018 NegSem_220304_getreply_operation_018.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220305_raise_operation_004 NegSem_220305_raise_operation_004.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, value of wrong type in @decoded redirect value assignment + ** @purpose 1:22.3.5, missing to clause in case of 1 to n connection ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Any other value shall cause an error. - -module NegSem_220304_getreply_operation_018 { - type record R { - integer id, - universal charstring payload - } - - signature S() return R; +// In case of one-to-one connections, the to clause may be omitted, because the receiving +// entity is uniquely identified by the system structure. - type integer I with {variant "32 bit"}; - +module NegSem_220305_raise_operation_004 { + signature S() exception(integer); + type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp { + type component GeneralComp + { port P p; } - - function f_server() runs on GeneralComp { - var I v_src := 1953719668; - var R v_rec := { id := 5, payload := encvalue_unichar(v_src) }; - p.getcall(S: {}); - p.reply(S:{} value v_rec); - } - testcase TC_NegSem_220304_getreply_operation_018() runs on GeneralComp system GeneralComp { - var I v_res, v_enc := 32; - var GeneralComp v_ptc := GeneralComp.create("PTC"); - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); + function f(integer p_expected) runs on GeneralComp + { p.call(S:{}) { - [] p.getreply(S: {} value R:?) -> value (v_res := @decoded(v_enc) payload) { - setverdict (pass); - } - [] p.getreply { setverdict(pass); } - } - + [] p.catch(S, p_expected) { setverdict(pass); } + [] p.catch { setverdict(fail); } + } + } + + testcase TC_NegSem_220305_raise_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, v_ptc2 := GeneralComp.create; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f(1)); + v_ptc2.start(f(1)); + p.getcall(S:{}); + p.getcall(S:{}); // call from both components expected + p.raise(S, 1); // missing to clause: error expected + all component.done; + setverdict(pass); } control { - execute(TC_NegSem_220304_getreply_operation_018(), 5.0); + execute(TC_NegSem_220305_raise_operation_004(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: Type mismatch: a value of type `charstring' was expected instead of `integer' +<RESULT COUNT 1> +Dynamic test case error: Port p has more than one active connections. Message can be sent on it only with explicit addressing. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220304_getreply_operation_019 negative test +:h3. NegSem_220305_raise_operation_005 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - encoding parameter of @decoded redirect value assignment applied to incorrect type > +<TC - exception on a message port > <COMPILE> -<MODULE TTCN NegSem_220304_getreply_operation_019 NegSem_220304_getreply_operation_019.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220305_raise_operation_005 NegSem_220305_raise_operation_005.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.4, encoding parameter of @decoded redirect value assignment applied to incorrect type + ** @purpose 1:22.3.5, exception on a message port ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// In case the referenced field is not a universal charstring, the optional -// parameter shall not be present. - -module NegSem_220304_getreply_operation_019 { - type record R { - integer id, - octetstring payload - } - - signature S() return R; +// An exception shall only be raised at a procedure-based port. An exception is a reaction +// to an accepted procedure call the result of which leads to an exceptional event. - type charstring CS with {variant ""}; - - type port P procedure { +module NegSem_220305_raise_operation_005 { + signature S() exception(integer); + + type port PSig procedure { inout S; } with {extension "internal"} + + type port PMsg message { + inout integer; + } with {extension "internal"} - type component GeneralComp { - port P p; + type component GeneralComp + { + port PSig p1; + port PMsg p2; } - - function f_server() runs on GeneralComp { - var CS v_src := "abc"; - var R v_rec := { id := 3, payload := bit2oct(encvalue(v_src)) }; - p.getcall(S: {}); - p.reply(S:{} value v_rec); - } - testcase TC_NegSem_220304_getreply_operation_019() runs on GeneralComp system GeneralComp { - var CS v_res; - var GeneralComp v_ptc := GeneralComp.create("PTC"); - - connect(self:p, v_ptc:p); - v_ptc.start(f_server()); - - p.call(S:{}) { - [] p.getreply(S:{} value R:?) -> value (v_res := @decoded("UTF-8") payload) { - setverdict(pass); - } - [] p.getreply { setverdict(pass); } - } - + function f() runs on GeneralComp + { + p1.getcall(S:{}); + p2.raise(S, 1); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p1, v_ptc:p1); + connect(self:p2, v_ptc:p2); + v_ptc.start(f()); + p1.call(S:{}, nowait); + // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; } control { - execute(TC_NegSem_220304_getreply_operation_019(), 5.0); + execute(TC_NegSem_220305_raise_operation_005(), 5.0); } -} with { encode "RAW"} +} <END_MODULE> -<RESULT COUNT > -error: The encoding format parameter for the '@decoded' modifier is only available to value redirects of universal charstrings +<RESULT COUNT 1> +error: Procedure-based operation `raise' is not applicable to a message-based port of type `@NegSem_220305_raise_operation_005.PMsg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_001 negative test +:h3. NegSem_220305_raise_operation_006 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - raised exception type not in the list of available exceptions > +<TC - exception procedure signature not in the port list > <COMPILE> -<MODULE TTCN NegSem_220305_raise_operation_001 NegSem_220305_raise_operation_001.ttcn > +<MODULE TTCN NegSem_220305_raise_operation_006 NegSem_220305_raise_operation_006.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, raised exception type not in the list of available exceptions + ** @purpose 1:22.3.5, exception procedure signature not in the port list ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Exceptions are specified as types. Therefore the exception value may either be derived -// from a template or be the value resulting from an expression (which of course can be -// an explicit value). The optional type field in the value specification to the raise -// operation shall be used in cases where it is necessary to avoid any ambiguity of the type -// of the value being sent. +// The type definition of the port shall include in its list of accepted procedure calls the +// name of the procedure to which the exception belongs. -module NegSem_220305_raise_operation_001 { - signature S() exception(charstring, octetstring); +module NegSem_220305_raise_operation_006 { + signature S1() exception(integer); + signature S2() exception(integer); type port P procedure { - inout S; + inout S1; } with {extension "internal"} type component GeneralComp @@ -4761,58 +6394,54 @@ module NegSem_220305_raise_operation_001 { function f() runs on GeneralComp { - p.getcall(S:{}); - p.raise(S, 1); + p.getcall(S1:{}); + p.raise(S2, 1); setverdict(pass); } - testcase TC_NegSem_220305_raise_operation_001() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220305_raise_operation_006() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); v_ptc.start(f()); - p.call(S:{}, nowait); + p.call(S1:{}, nowait); // no processing of the exception to avoid possible errors in the catch operation v_ptc.done; } control { - execute(TC_NegSem_220305_raise_operation_001(), 5.0); + execute(TC_NegSem_220305_raise_operation_006(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Type `integer' is not present on the exception list of signature `@NegSem_220305_raise_operation_001.S' +error: Signature `@NegSem_220305_raise_operation_006.S2' is not present on the incoming list of port type `@NegSem_220305_raise_operation_006.P' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_002 negative test +:h3. NegSem_220305_raise_operation_007 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - exception raised for a signature with no exception list > +<TC - value of incorrect type in the to clause of the raise operation > <COMPILE> -<MODULE TTCN NegSem_220305_raise_operation_002 NegSem_220305_raise_operation_002.ttcn > +<MODULE TTCN NegSem_220305_raise_operation_007 NegSem_220305_raise_operation_007.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, exception raised for a signature with no exception list + ** @purpose 1:22.3.5, value of incorrect type in the to clause of the raise operation ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Exceptions are specified as types. Therefore the exception value may either be derived -// from a template or be the value resulting from an expression (which of course can be -// an explicit value). The optional type field in the value specification to the raise -// operation shall be used in cases where it is necessary to avoid any ambiguity of the type -// of the value being sent. +// AddressRef shall be of type address, component or of the type provided in the address +// declaration of the port type of the port instance referenced in the raise operation. -module NegSem_220305_raise_operation_002 { - signature S(); +module NegSem_220305_raise_operation_007 { + signature S() exception(integer); type port P procedure { inout S; @@ -4823,15 +6452,17 @@ module NegSem_220305_raise_operation_002 { port P p; } + const charstring c_ptcName := "PTC"; + function f() runs on GeneralComp { p.getcall(S:{}); - p.raise(S, 1); + p.raise(S, 1) to c_ptcName; setverdict(pass); } - testcase TC_NegSem_220305_raise_operation_002() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create; + testcase TC_NegSem_220305_raise_operation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create(c_ptcName); connect(self:p, v_ptc:p); v_ptc.start(f()); p.call(S:{}, nowait); @@ -4840,46 +6471,39 @@ module NegSem_220305_raise_operation_002 { } control { - execute(TC_NegSem_220305_raise_operation_002(), 5.0); + execute(TC_NegSem_220305_raise_operation_007(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Signature `@NegSem_220305_raise_operation_002.S' does not have exceptions +error: A component reference was expected as operand <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_003 negative test +:h3. NegSem_220305_raise_operation_008 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - raised exception type is ambiguous > +<TC - null in the to clause of the raise operation > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220305_raise_operation_003 NegSem_220305_raise_operation_003.ttcn > +<MODULE TTCN NegSem_220305_raise_operation_008 NegSem_220305_raise_operation_008.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, raised exception type is ambiguous + ** @purpose 1:22.3.5, null in the to clause of the raise operation ** @verdict pass reject *****************************************************************/ - // The following requirements are tested: -// Exceptions are specified as types. Therefore the exception value may either be derived -// from a template or be the value resulting from an expression (which of course can be -// an explicit value). The optional type field in the value specification to the raise -// operation shall be used in cases where it is necessary to avoid any ambiguity of the type -// of the value being sent. +// No AddressRef shall contain the special value null at the time of the operation. -module NegSem_220305_raise_operation_003 { - type integer MyInt1 (1..10); - type integer MyInt2 (1..20); - - signature S() exception(MyInt1, MyInt2); +module NegSem_220305_raise_operation_008 { + signature S() exception(integer); type port P procedure { inout S; @@ -4892,12 +6516,14 @@ module NegSem_220305_raise_operation_003 { function f() runs on GeneralComp { + var GeneralComp v_compRef := null; + connect(self:p, v_compRef:p); p.getcall(S:{}); - p.raise(S, 1); + p.raise(S, 1) to v_compRef; setverdict(pass); } - testcase TC_NegSem_220305_raise_operation_003() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220305_raise_operation_008() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; connect(self:p, v_ptc:p); v_ptc.start(f()); @@ -4907,392 +6533,469 @@ module NegSem_220305_raise_operation_003 { } control { - execute(TC_NegSem_220305_raise_operation_003(), 5.0); + execute(TC_NegSem_220305_raise_operation_008(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Type of the exception is ambiguous: `integer' is compatible with more than one exception types of signature `@NegSem_220305_raise_operation_003.S' +Dynamic test case error: The second argument of connect operation contains the null component reference. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_004 negative test +:h3. NegSem_220305_raise_operation_009 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - missing to clause in case of 1 to n connection > +<TC - raise operation on disconnected and unmapped ports > <COMPILE> <EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220305_raise_operation_004 NegSem_220305_raise_operation_004.ttcn > +<MODULE TTCN NegSem_220305_raise_operation_009 NegSem_220305_raise_operation_009.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, missing to clause in case of 1 to n connection + ** @purpose 1:22.3.5, raise operation on disconnected and unmapped ports ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// In case of one-to-one connections, the to clause may be omitted, because the receiving -// entity is uniquely identified by the system structure. +// Applying a raise operation to an unmapped or disconnected port shall cause a test case +// error. -module NegSem_220305_raise_operation_004 { +module NegSem_220305_raise_operation_009 { signature S() exception(integer); type port P procedure { inout S; } with {extension "internal"} - type component GeneralComp - { - port P p; - } - - function f(integer p_expected) runs on GeneralComp - { - p.call(S:{}) { - [] p.catch(S, p_expected) { setverdict(pass); } - [] p.catch { setverdict(fail); } - } + type component GeneralComp + { + port P p; } - testcase TC_NegSem_220305_raise_operation_004() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc1 := GeneralComp.create, v_ptc2 := GeneralComp.create; - connect(self:p, v_ptc1:p); - connect(self:p, v_ptc2:p); - v_ptc1.start(f(1)); - v_ptc2.start(f(1)); - p.getcall(S:{}); - p.getcall(S:{}); // call from both components expected - p.raise(S, 1); // missing to clause: error expected - all component.done; + function f() runs on GeneralComp + { + p.getcall(S:{}); + disconnect(self:p, mtc:p); + p.raise(S, 1); setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}, nowait); + // no processing of the exception to avoid possible errors in the catch operation + v_ptc.done; } control { - execute(TC_NegSem_220305_raise_operation_004(), 5.0); + execute(TC_NegSem_220305_raise_operation_009(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: Port p has more than one active connections. Message can be sent on it only with explicit addressing. +Dynamic test case error: Port p has neither connections nor mappings. Message cannot be sent on it. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_005 negative test +:h3. NegSem_220306_catch_operation_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - exception on a message port > +<TC - Verify that error occurs when any from catch is applied to single port > <COMPILE> -<MODULE TTCN NegSem_220305_raise_operation_005 NegSem_220305_raise_operation_005.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220306_catch_operation_001 NegSem_220306_catch_operation_001.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, exception on a message port + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to single port ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// An exception shall only be raised at a procedure-based port. An exception is a reaction -// to an accepted procedure call the result of which leads to an exceptional event. +// Restriction g +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220306_catch_operation_001 { -module NegSem_220305_raise_operation_005 { signature S() exception(integer); - type port PSig procedure { + type port P procedure { inout S; } with {extension "internal"} - - type port PMsg message { - inout integer; - } with {extension "internal"} type component GeneralComp { - port PSig p1; - port PMsg p2; + port P p; } function f() runs on GeneralComp { - p1.getcall(S:{}); - p2.raise(S, 1); - setverdict(pass); + p.getcall(S:{}); + p.raise(S, 10); } - testcase TC_NegSem_220305_raise_operation_005() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220306_catch_operation_001() runs on GeneralComp system GeneralComp { var GeneralComp v_ptc := GeneralComp.create; - connect(self:p1, v_ptc:p1); - connect(self:p2, v_ptc:p2); - v_ptc.start(f()); - p1.call(S:{}, nowait); - // no processing of the exception to avoid possible errors in the catch operation - v_ptc.done; - } + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] any from p.catch { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } control { - execute(TC_NegSem_220305_raise_operation_005(), 5.0); + execute(TC_NegSem_220306_catch_operation_001(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Procedure-based operation `raise' is not applicable to a message-based port of type `@NegSem_220305_raise_operation_005.PMsg' +error: Reference to a port array was expected instead of a port <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_006 negative test +:h3. NegSem_220306_catch_operation_002 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - exception procedure signature not in the port list > +<TC - Verify that error occurs when any from catch is applied to 1D array and index target is array > <COMPILE> -<MODULE TTCN NegSem_220305_raise_operation_006 NegSem_220305_raise_operation_006.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220306_catch_operation_002 NegSem_220306_catch_operation_002.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, exception procedure signature not in the port list + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to 1D array and index target is array ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// The type definition of the port shall include in its list of accepted procedure calls the -// name of the procedure to which the exception belongs. +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220306_catch_operation_002 { -module NegSem_220305_raise_operation_006 { - signature S1() exception(integer); - signature S2() exception(integer); + signature S() exception(integer); type port P procedure { - inout S1; + inout S; } with {extension "internal"} + const integer c_portCount := 4; type component GeneralComp { - port P p; + port P p[c_portCount]; } function f() runs on GeneralComp { - p.getcall(S1:{}); - p.raise(S2, 1); - setverdict(pass); + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 10) }; + } } - testcase TC_NegSem_220305_raise_operation_006() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create; - connect(self:p, v_ptc:p); - v_ptc.start(f()); - p.call(S1:{}, nowait); - // no processing of the exception to avoid possible errors in the catch operation - v_ptc.done; + testcase TC_NegSem_220306_catch_operation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + + var integer v_index[1]; + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index[0] == 1){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } } control { - execute(TC_NegSem_220305_raise_operation_006(), 5.0); + execute(TC_NegSem_220306_catch_operation_002(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Signature `@NegSem_220305_raise_operation_006.S2' is not present on the incoming list of port type `@NegSem_220305_raise_operation_006.P' +error: Indices of one-dimensional port arrays can only be redirected to an integer <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_007 negative test +:h3. NegSem_220306_catch_operation_003 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - value of incorrect type in the to clause of the raise operation > +<TC - Verify that error occurs when any from catch is applied to 1D array and index target has wrong type > <COMPILE> -<MODULE TTCN NegSem_220305_raise_operation_007 NegSem_220305_raise_operation_007.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220306_catch_operation_003 NegSem_220306_catch_operation_003.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, value of incorrect type in the to clause of the raise operation + ** @purpose 1:22.3.6, Verify that error occurs when any from catch is applied to 1D array and index target has wrong type ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// AddressRef shall be of type address, component or of the type provided in the address -// declaration of the port type of the port instance referenced in the raise operation. +// Restriction i +// If the index redirection is used for single-dimensional port arrays, the type +// of the integer variable shall allow storing the highest index of the respective array. +module NegSem_220306_catch_operation_003 { -module NegSem_220305_raise_operation_007 { signature S() exception(integer); type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 4; type component GeneralComp { - port P p; + port P p[c_portCount]; } - const charstring c_ptcName := "PTC"; - function f() runs on GeneralComp { - p.getcall(S:{}); - p.raise(S, 1) to c_ptcName; - setverdict(pass); + for(var integer i := 0; i < c_portCount; i := i + 1) { + p[i].getcall; + if (i mod 2 == 1) { p[i].raise(S, 10) }; + } } - testcase TC_NegSem_220305_raise_operation_007() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create(c_ptcName); - connect(self:p, v_ptc:p); - v_ptc.start(f()); - p.call(S:{}, nowait); - // no processing of the exception to avoid possible errors in the catch operation - v_ptc.done; - } + testcase TC_NegSem_220306_catch_operation_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var float v_index; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + connect(self:p[i], v_ptc:p[i]); + p[i].call(S:{}, nowait); + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1.0){ + setverdict(pass); + } else { + setverdict(fail, "Index or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } control { - execute(TC_NegSem_220305_raise_operation_007(), 5.0); + execute(TC_NegSem_220306_catch_operation_003(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: A component reference was expected as operand +error: Indices of port arrays can only be redirected to an integer, an integer array or a record of integers <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_008 negative test +:h3. NegSem_220306_catch_operation_004 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - null in the to clause of the raise operation > +<TC - Verify that any from catch index redirection for multi-D arrays requires arrays of correct size > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220305_raise_operation_008 NegSem_220305_raise_operation_008.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220306_catch_operation_004 NegSem_220306_catch_operation_004.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, null in the to clause of the raise operation + ** @purpose 1:22.3.6, Verify that any from catch index redirection for multi-D arrays requires arrays of correct size ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220306_catch_operation_004 { -module NegSem_220305_raise_operation_008 { signature S() exception(integer); type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 3; type component GeneralComp { - port P p; + port P p[c_portCount][c_portCount]; } function f() runs on GeneralComp { - var GeneralComp v_compRef := null; - connect(self:p, v_compRef:p); - p.getcall(S:{}); - p.raise(S, 1) to v_compRef; - setverdict(pass); + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:{}); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } + } + } } - testcase TC_NegSem_220305_raise_operation_008() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create; - connect(self:p, v_ptc:p); - v_ptc.start(f()); - p.call(S:{}, nowait); - // no processing of the exception to avoid possible errors in the catch operation - v_ptc.done; - } + + testcase TC_NegSem_220306_catch_operation_004() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index[1]; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.catch(S, integer:?) -> sender v_src @index value v_index { + if(v_index[0] == 1 and v_index[1] == 2){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } } control { - execute(TC_NegSem_220305_raise_operation_008(), 5.0); + execute(TC_NegSem_220306_catch_operation_004(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +error: Size of integer array is invalid: the port array has 2 dimensions, but the integer array has 1 element +<END_RESULT> +<RESULT COUNT 1> +error: Array index overflow: the index value must be at most `0' instead of `1' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220305_raise_operation_009 negative test +:h3. NegSem_220306_catch_operation_005 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - raise operation on disconnected and unmapped ports > +<TC - Verify that any from catch index redirection for multi-D arrays requires arrays > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220305_raise_operation_009 NegSem_220305_raise_operation_009.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220306_catch_operation_005 NegSem_220306_catch_operation_005.ttcn > +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.5, raise operation on disconnected and unmapped ports + ** @purpose 1:22.3.6, Verify that any from catch index redirection for multi-D arrays requires arrays ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// Applying a raise operation to an unmapped or disconnected port shall cause a test case -// error. +// Restriction j: +// If the index redirection is used for multi-dimensional component arrays, the size +// of the integer array or record of integer type shall exactly be the same as the dimension +// of the respective array, and its type shall allow storing the highest index (from all +// dimensions) of the array. +module NegSem_220306_catch_operation_005 { -module NegSem_220305_raise_operation_009 { - signature S() exception(integer); + signature S() exception(integer); type port P procedure { inout S; } with {extension "internal"} + const integer c_portCount := 3; type component GeneralComp { - port P p; + port P p[c_portCount][c_portCount]; } function f() runs on GeneralComp { - p.getcall(S:{}); - disconnect(self:p, mtc:p); - p.raise(S, 1); - setverdict(pass); + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + p[i][j].getcall(S:{}); + if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } + } + } } - testcase TC_NegSem_220305_raise_operation_009() runs on GeneralComp system GeneralComp { - var GeneralComp v_ptc := GeneralComp.create; - connect(self:p, v_ptc:p); - v_ptc.start(f()); - p.call(S:{}, nowait); - // no processing of the exception to avoid possible errors in the catch operation - v_ptc.done; - } + testcase TC_NegSem_220306_catch_operation_005() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create, v_src; + var integer v_index; + + for(var integer i := 0; i < c_portCount; i := i + 1) { + for(var integer j := 0; j < c_portCount; j := j + 1) { + connect(self:p[i][j], v_ptc:p[i][j]); + p[i][j].call(S:{}, nowait); + } + } + + v_ptc.start(f()); + v_ptc.done; + + alt + { + [] any from p.catch(S, integer:?) -> @index value v_index { + if(v_index == 1){ + setverdict(pass); + } else { + setverdict(fail, "Indices or parameter value incorrectly assigned"); + } + } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } control { - execute(TC_NegSem_220305_raise_operation_009(), 5.0); + execute(TC_NegSem_220306_catch_operation_005(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: Port p has neither connections nor mappings. Message cannot be sent on it. +error: Indices of multi-dimensional port arrays can only be redirected to an integer array or a record of integers <END_RESULT> <END_TC> @@ -5863,6 +7566,70 @@ error: The types in `from' clause and `sender' redirect are not the same: `@NegS <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSyn_220306_catch_operation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - Verify that error occurs when using index redirection in port.catch operation > + +<COMPILE> + +<MODULE TTCN NegSyn_220306_catch_operation_001 NegSyn_220306_catch_operation_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.6, Verify that error occurs when using index redirection in port.catch operation + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +// Restriction h +// The index redirection shall only be used when the operation is used on an any from +// port array construct. +module NegSyn_220306_catch_operation_001 { + signature S() exception(integer); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + function f() runs on GeneralComp + { + p.getcall(S:{}); + p.raise(S, 20); + } + + testcase TC_NegSyn_220306_catch_operation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + var integer v_index; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + alt + { + [] p.catch -> @index value v_index { setverdict(pass); } + [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } + } + } + + control { + execute(TC_NegSyn_220306_catch_operation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Index redirect cannot be used without the 'any from' clause +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h2. 2204_the_check_operation folder .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002_segfault.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002_segfault.ttcn deleted file mode 100644 index 591d16a6266a5ac5a18a6fda87b8bba623a70fde..0000000000000000000000000000000000000000 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002_segfault.ttcn +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2016 ETSI All Rights Reserved. - * - * Adrien Kirjak - * - ** @version 0.0.1 - ** @purpose 1:21.3.5, Verify that error occurs when any from alive is applied to 1D array and index target is array - ** @verdict pass reject - *****************************************************************/ -// The following requirements are tested: -// Restriction d -// If the index redirection is used for single-dimensional component arrays, the type -// of the integer variable shall allow storing the highest index of the respective array. -module NegSem_210305_alive_operation_002 { - - type component GeneralComp {} - - function f() runs on GeneralComp { - timer t := 100.0; - t.start; - t.timeout; - } - - testcase TC_NegSem_210305_alive_operation_002() runs on GeneralComp system GeneralComp { - var boolean v_isAlive; - const integer c_size := 4; - var GeneralComp v_ptc[c_size]; - var integer v_index[1]; - for (var integer i := 0; i < c_size; i := i + 1) { - v_ptc[i] := GeneralComp.create; // created components are inactive - if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices - else { v_ptc[i].start(f());} // activate v_ptc - } - - v_isAlive := any from v_ptc.alive -> @index v_index; - if(v_index[0] == 1){ - setverdict(pass); - } else { - setverdict(fail, "The any from alive operation didn't find alive components"); - } - } - - control { - execute(TC_NegSem_210305_alive_operation_002(), 5.0); - } -} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn index 21f0649845d2d80dbe0f07e204548bc2c66e4617..17a62b1f9fb6106c3950f530dfd011fc6a5299a3 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_017.ttcn @@ -28,7 +28,7 @@ module NegSem_220202_ReceiveOperation_017 { connect(self:p, self:p); p.send(10); - p.receive(integer:?) -> @index v_int; + p.receive(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn index 8e7616047fb8f27b0a4c5563bb7786e3be5cff29..2ee7f7aca602e0bd781b964419ce0446c4ace000 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_018.ttcn @@ -28,7 +28,7 @@ module NegSem_220202_ReceiveOperation_018 { connect(self:p, self:p); p.send(10); - any port.receive(integer:?) -> @index v_int; + any port.receive(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn index 396d669d2b08997c0e0307a911441bf3699d8af7..60c7078dd9c10ec28fd258c8b1e6dee161f24aed 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_019.ttcn @@ -25,9 +25,9 @@ module NegSem_220202_ReceiveOperation_019 { testcase TC_NegSem_220202_ReceiveOperation_019() runs on GeneralComp { var RestrInt v_int; - connect(self:p, self:p); + connect(self:p[5], self:p[5]); p[5].send(100); - any from p.receive(integer:?) -> @index v_int; + any from p.receive(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn index eb64cb9d22cfebaa226be089ed7bcd8fdafdba3a..e34628e3778476539ef1af2404f3e76fc6879278 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_020.ttcn @@ -25,8 +25,9 @@ module NegSem_220202_ReceiveOperation_020 { testcase TC_NegSem_220202_ReceiveOperation_020() runs on GeneralComp { var integer v_indices[2]; + connect(self:p[0][1][2],self:p[0][1][2]); p[0][1][2].send(100); - any from p.receive(integer:?) -> @index v_indices; + any from p.receive(integer:?) -> @index value v_indices; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn index 93fc94f82b5eb392d3bcd59aa98613f56c9219ab..94f224bcc264cd74ab1aede2aaed6c2c8b0e9a44 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/NegSem_220202_ReceiveOperation_021.ttcn @@ -27,8 +27,10 @@ module NegSem_220202_ReceiveOperation_021 { testcase TC_NegSem_220202_ReceiveOperation_021() runs on GeneralComp { var RestrInt v_indices[3]; + connect(self:p[3][1][2],self:p[3][1][2]); + p[3][1][2].send(100); - any from p.receive(integer:?) -> @index v_indices; + any from p.receive(integer:?) -> @index value v_indices; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn index 625a4bd7019f74e7673a8661209c040cdde867f8..6b24d6a7cd4387961c23c98ad1bc0ff6a4d55d1c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn @@ -38,7 +38,7 @@ module Sem_220202_ReceiveOperation_020 { p[2].send(10); alt { - [] any from p.receive(integer:?) -> @index v_index { + [] any from p.receive(integer:?) -> @index value v_index { if (v_index == 2) { setverdict(pass); } else { setverdict(fail); } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn index 936f41ea60a1097607f1a6bd4a1ace1c5cf8d511..2f4f870bbe617a5bf3e96b77f3695e8ba5604413 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn @@ -40,7 +40,7 @@ module Sem_220202_ReceiveOperation_021 { p[0][2].send(10); alt { - [] any from p.receive(integer:?) -> @index v_index { + [] any from p.receive(integer:?) -> @index value v_index { if (v_index == { 0, 2 }) { setverdict(pass); } else { setverdict(fail, "v_index: ", v_index); } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn index d467b7d14a595808b2e36ada7e40818aa6b7ee15..461dac31fd0ca617123b875a5913b50158e0b7eb 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_017.ttcn @@ -27,7 +27,7 @@ module NegSem_220203_TriggerOperation_017 { connect(self:p, self:p); p.send(10); - p.trigger(integer:?) -> @index v_int; + p.trigger(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn index 44184828d5c89b78e7d2b8d5a799e5ed167f4c9a..1ed4345516694d3e343913f289a52c84752b82de 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_018.ttcn @@ -27,7 +27,7 @@ module NegSem_220203_TriggerOperation_018 { connect(self:p, self:p); p.send(10); - any port.trigger(integer:?) -> @index v_int; + any port.trigger(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn index 2ff62647eee61273b4f730f33943510f762fe34d..cbbec72c9ec3d381590ff8778ed223f61aa607cb 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_019.ttcn @@ -27,7 +27,7 @@ module NegSem_220203_TriggerOperation_019 { connect(self:p[5], self:p[5]); p[5].send(100); - any from p.trigger(integer:?) -> @index v_int; + any from p.trigger(integer:?) -> @index value v_int; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn index 0ab66f6ae8cdb6885bc87e7ad9c9c56cfc938efb..4baa2b0296ea3064dfdb99510ef9bcccc187e8de 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_020.ttcn @@ -28,7 +28,7 @@ module NegSem_220203_TriggerOperation_020 { connect(self:p[0][1][2], self:p[0][1][2]); p[0][1][2].send(100); - any from p.trigger(integer:?) -> @index v_indices; + any from p.trigger(integer:?) -> @index value v_indices; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn index 9fa7ddc5f75aec04cc55aa21db78b21893e92bff..5a5bc91255ecb6644bb70ec95c1b600914f9f597 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_021.ttcn @@ -29,7 +29,7 @@ module NegSem_220203_TriggerOperation_021 { connect(self:p[3][1][2], self:p[3][1][2]); p[3][1][2].send(100); - any from p.trigger(integer:?) -> @index v_indices; + any from p.trigger(integer:?) -> @index value v_indices; setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn index a6e36a3170d9af974f701ada7b8ff31e2d741376..84adc2f885b44b563953231e55f2881e650d000e 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn @@ -41,7 +41,7 @@ module Sem_220203_TriggerOperation_020 { altP.send(1); alt { - [] any from p.trigger(integer:?) -> @index v_index { + [] any from p.trigger(integer:?) -> @index value v_index { if (v_index == 2) { setverdict(pass); } else { setverdict(fail); } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn index 3756cbb7ca0202e526363862ecb296c572711256..4f67431942643c1305c48aad7f261df6701a7797 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn @@ -43,7 +43,7 @@ module Sem_220203_TriggerOperation_021 { altP.send(1); alt { - [] any from p.trigger(integer:?) -> @index v_index { + [] any from p.trigger(integer:?) -> @index value v_index { if (v_index == { 0, 2 }) { setverdict(pass); } else { setverdict(fail, "v_index: ", v_index); } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_005.ttcn index eb57214263b5584a08d2aa42bab5b0b873759616..cf711b7b86a03b6969297674bcdecde0fb417ee0 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_005.ttcn @@ -30,7 +30,7 @@ module NegSem_220302_GetcallOperation_005 { var integer v_index[1]; alt { - [] any from p.getcall(S:?) -> @index v_index { + [] any from p.getcall(S:{}) -> @index value v_index { if(v_index[0] == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_006.ttcn index 2a2aefa6f1fc0283fdb8fdacc4731fb5dcc4006d..d9f93cee1236ad6db133b9d421d513d797d9c2f1 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_006.ttcn @@ -30,7 +30,7 @@ module NegSem_220302_GetcallOperation_006 { var float v_index; alt { - [] any from p.getcall(S:?) -> @index v_index { + [] any from p.getcall(S:{}) -> @index value v_index { if(v_index == 1.0){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_007.ttcn index 8d7685cd382200ff3dc3c0cdcf2eb09093326e2d..92f7c79f6e380b4e044e2bb3acd4072d66853e80 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_007.ttcn @@ -32,7 +32,7 @@ module NegSem_220302_GetcallOperation_007 { var GeneralComp v_src; alt { - [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> sender v_src @index v_index { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_008.ttcn index 52e77749995475ba2e9304ccc0893532d5641144..4ae07094de7400adeaadbfd365e671bdf62c06f3 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_008.ttcn @@ -32,7 +32,7 @@ module NegSem_220302_GetcallOperation_008 { var GeneralComp v_src; alt { - [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index v_index { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { if(v_index == 1 and v_parValue == v_index + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_001.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_001.ttcn index af56f242718ea0e38f6f96d481f50eaf8f780549..ba172ae229aa38f500d90850aed1016b96fb02bf 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_001.ttcn @@ -28,7 +28,7 @@ module NegSyn_220302_GetcallOperation_001 { var integer v_index; alt { - [] p.getcall -> @index v_index { setverdict(pass); } + [] p.getcall -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_002.ttcn index 8b1d7eeaab830732332b77fe3d4ff342eb39df49..0993014da86faa8c57c5c93495245c3864c9e26c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSyn_220302_GetcallOperation_002.ttcn @@ -29,7 +29,7 @@ module NegSyn_220302_GetcallOperation_002 { var integer v_index; alt { - [] any port.getcall -> @index v_index { setverdict(pass); } + [] any port.getcall -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from getcall operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn index 8045177b98f048a3462e08bff3f3e4a86c1a63ba..124343a9aca3d03d5823c6e2ea89f1206c29375e 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn @@ -30,7 +30,7 @@ module Sem_220302_GetcallOperation_008 { var integer v_index; alt { - [] any from p.getcall(S:{p_par := (1..10)}) -> @index v_index { + [] any from p.getcall(S:{p_par := (1..10)}) -> @index value v_index { setverdict(fail, "The any from getcall operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn index 5318cea609c6348b29b68701e32f608ccb01e0b9..2e6f10396eca9d13f8e2daf810fa08a5dddd716f 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn @@ -32,7 +32,7 @@ module Sem_220302_GetcallOperation_009 { alt { - [] any from p.getcall(S:{p_par := (1..10)}) -> sender v_src @index v_index { + [] any from p.getcall(S:{p_par := (1..10)}) -> sender v_src @index value v_index { setverdict(fail, "The any from getcall operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn index 744cb2b7543b64807324953a0afc995a32d77171..79859dc00201e13a971592aa5bf5be3b98027b8f 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn @@ -33,7 +33,7 @@ module Sem_220302_GetcallOperation_010 { alt { - [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) @index v_index { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) @index value v_index { if(v_index == 1 and v_parValue == v_index + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn index 7926362d814945e03cacaa6ddb8f843e9feba990..597db49d1508df275c61b3abe6e74968dfab6310 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn @@ -33,7 +33,7 @@ module Sem_220302_GetcallOperation_011 { var GeneralComp v_src; alt { - [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index v_index { + [] any from p.getcall(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn index 1dcc967adf4471ee9224a9bfc392e8d8a1f12d74..4d4ad2b41fa38bb417957335f84ee4fa6b5ef4e1 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn @@ -31,7 +31,7 @@ module Sem_220302_GetcallOperation_012 { var @lazy integer v_index; alt { - [] any from p.getcall -> @index v_index { + [] any from p.getcall -> @index value v_index { if(v_index == 1){ // no getcall call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn index 23494b2f01ac65179a9b89b0922799fd13616d0b..96e61e21f12c4843619638e53cdd59d0c7e8c5ce 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn @@ -32,7 +32,7 @@ module Sem_220302_GetcallOperation_013 { var @fuzzy integer v_index; alt { - [] any from p.getcall -> @index v_index { + [] any from p.getcall -> @index value v_index { if(v_index == 1){ // no getcall call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn index 24587f16a2ba98fe3c771238944b24cb453e109a..bce058a80b74df4ac7b0645ba054ca1d0ed79921 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn @@ -47,7 +47,7 @@ module NegSem_220304_getreply_operation_002 { alt { - [] any from p.getreply(S:?) -> @index v_index { + [] any from p.getreply(S:{}) -> @index value v_index { if(v_index[0] == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn index 222764770c8ba1c40938d0926f221fd44f790610..130794423c73e2e6693fc226ce1446cb5f03f06c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn @@ -47,7 +47,7 @@ module NegSem_220304_getreply_operation_003 { alt { - [] any from p.getreply(S:?) -> @index v_index { + [] any from p.getreply(S:{}) -> @index value v_index { if(v_index == 1.0){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn index 0731380ec0c3ed0369f22bc3b5690500a5e4a943..1a5ca773572720cf357bb78bb29e241cd5bc4099 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_004.ttcn @@ -31,7 +31,7 @@ module NegSem_220304_getreply_operation_004 { { for(var integer i := 0; i < c_portCount; i := i + 1) { for(var integer j := 0; j < c_portCount; j := j + 1) { - p[i][j].getcall(S:?); + p[i][j].getcall(S:{}); if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } } } @@ -54,7 +54,7 @@ module NegSem_220304_getreply_operation_004 { alt { - [] any from p.getreply(S:{}) -> sender v_src @index v_index { + [] any from p.getreply(S:{}) -> sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn index a077f6fcd788f155b0873b90e7ef0f3608c5df46..63dac7ac4103302f8a116ab287839247e3c91589 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_005.ttcn @@ -31,7 +31,7 @@ module NegSem_220304_getreply_operation_005 { { for(var integer i := 0; i < c_portCount; i := i + 1) { for(var integer j := 0; j < c_portCount; j := j + 1) { - p[i][j].getcall(S:?); + p[i][j].getcall(S:{}); if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].reply(S:{}); } } } @@ -53,7 +53,7 @@ module NegSem_220304_getreply_operation_005 { alt { - [] any from p.getreply(S:{}) -> @index v_index { + [] any from p.getreply(S:{}) -> @index value v_index { if(v_index == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn index 154f5db4d80219d5a490f57031bceffcc0bd9c77..6ee5b120d5a04e7312fcfa950eae075f90ad0e2e 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn @@ -25,7 +25,7 @@ module NegSyn_220304_getreply_operation_001 { function f() runs on GeneralComp { - p.getcall(S:?); + p.getcall(S:{}); p.reply(S:{}); } @@ -38,7 +38,7 @@ module NegSyn_220304_getreply_operation_001 { v_ptc.done; alt { - [] p.getreply -> @index v_index { setverdict(pass); } + [] p.getreply -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn index 4a7f1935f6f36c1f67815975961287b40260a823..da3f6023451abb5508fbe405fd932d3254900fe4 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn @@ -26,7 +26,7 @@ module NegSyn_220304_getreply_operation_002 { function f() runs on GeneralComp { - p.getcall(S:?); + p.getcall(S:{}); p.reply(S:{}); } @@ -39,7 +39,7 @@ module NegSyn_220304_getreply_operation_002 { v_ptc.done; alt { - [] any port.getreply -> @index v_index { setverdict(pass); } + [] any port.getreply -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from getreply operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn index 858c87144f6f5701c05111ff1c29e2128c18c8e8..5ac544122927a591d9c70ead8066a1c738c92d33 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn @@ -47,7 +47,7 @@ module Sem_220304_getreply_operation_003 { alt { - [] any from p.getreply(S:{p_par := (1..10)}) -> @index v_index { + [] any from p.getreply(S:{p_par := (1..10)}) -> @index value v_index { setverdict(fail, "The any from getreply operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn index 1246149c145330c342bef339355b907b92a9ec7c..50aef33f92da49617d78484f08371d6b88d372a5 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn @@ -47,7 +47,7 @@ module Sem_220304_getreply_operation_004 { alt { - [] any from p.getreply(S:{p_par := (1..10)}) -> @index v_index { + [] any from p.getreply(S:{p_par := (1..10)}) -> @index value v_index { setverdict(fail, "The any from getreply operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn index 5608712519cc3d78bf3ed32b0f379aea3b841e3f..c5551b5a74ffb2aea17d748a3284bbb98ad065d9 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn @@ -49,7 +49,7 @@ module Sem_220304_getreply_operation_005 { alt { - [] any from p.getreply(S:? value (0..c_portCount)) -> value v_res @index v_index { + [] any from p.getreply(S:{} value (0..c_portCount)) -> value v_res @index value v_index { if(v_index == 1 and v_res == v_index + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn index e645d776cd9487fcb4c4c4696c70bef273631f1e..a74f8a178734dd323641195f91f1175eac5da161 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn @@ -53,7 +53,7 @@ module Sem_220304_getreply_operation_006 { alt { - [] any from p.getreply(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index v_index { + [] any from p.getreply(S:{p_par := (0..c_portCount)}) -> param (v_parValue := p_par) sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2 and v_parValue == v_index[0] + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn index a06b5b9593a2a51d3eb0497ffd3e75278da1bddd..eff821c2201940e4c30d95e443bd36501c8a94aa 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn @@ -47,7 +47,7 @@ module Sem_220304_getreply_operation_007 { alt { - [] any from p.getreply(S:?) -> @index v_index { + [] any from p.getreply(S:{}) -> @index value v_index { if(v_index == 1){ // no getreply call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn index e87076f95bff486c12aaba837c3a293613888540..36c62a0266ee120014f76c3d97d1ca12b8940beb 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn @@ -47,7 +47,7 @@ module Sem_220304_getreply_operation_008 { alt { - [] any from p.getreply(S:?) -> @index v_index { + [] any from p.getreply(S:{}) -> @index value v_index { if(v_index == 1){ // no getreply call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn index 4e9cbd7fb8a9be927b920f6cd361ffc5ef59540f..449ffb4c07ad8395d09989c01fc7d28349543760 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_002.ttcn @@ -47,7 +47,7 @@ module NegSem_220306_catch_operation_002 { alt { - [] any from p.catch(S, integer:?) -> @index v_index { + [] any from p.catch(S, integer:?) -> @index value v_index { if(v_index[0] == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn index 6983eef44691a962610253248eacfeb2c6082f32..3a5704a19e3d82c632547e9078b374cf6a379891 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_003.ttcn @@ -47,7 +47,7 @@ module NegSem_220306_catch_operation_003 { alt { - [] any from p.catch(S, integer:?) -> @index v_index { + [] any from p.catch(S, integer:?) -> @index value v_index { if(v_index == 1.0){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn index c1c3fca5c64edc641768e1a6fb6c870bc6b74d4b..89c0477bc5d77669c10a7c06c9d7795cb93d823b 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_004.ttcn @@ -31,7 +31,7 @@ module NegSem_220306_catch_operation_004 { { for(var integer i := 0; i < c_portCount; i := i + 1) { for(var integer j := 0; j < c_portCount; j := j + 1) { - p[i][j].getcall(S:?); + p[i][j].getcall(S:{}); if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } } } @@ -54,7 +54,7 @@ module NegSem_220306_catch_operation_004 { alt { - [] any from p.catch(S, integer:?) -> sender v_src @index v_index { + [] any from p.catch(S, integer:?) -> sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn index 668e0e920e4ce2389281e729a136b1485886b914..b7b243daf5f359e991ffca89a1a5880c2a252f5d 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_005.ttcn @@ -31,7 +31,7 @@ module NegSem_220306_catch_operation_005 { { for(var integer i := 0; i < c_portCount; i := i + 1) { for(var integer j := 0; j < c_portCount; j := j + 1) { - p[i][j].getcall(S:?); + p[i][j].getcall(S:{}); if (i == 1 and j == 2 or i == 2 and j == 1) { p[i][j].raise(S, 10); } } } @@ -53,7 +53,7 @@ module NegSem_220306_catch_operation_005 { alt { - [] any from p.catch(S, integer:?) -> @index v_index { + [] any from p.catch(S, integer:?) -> @index value v_index { if(v_index == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn index d7abd2e76ce18ce5abd38831012ee418c5e7ffed..aeb6e0650883641273b3f929f56900af9974e86d 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn @@ -25,7 +25,7 @@ module NegSyn_220306_catch_operation_001 { function f() runs on GeneralComp { - p.getcall(S:?); + p.getcall(S:{}); p.raise(S, 20); } @@ -38,7 +38,7 @@ module NegSyn_220306_catch_operation_001 { v_ptc.done; alt { - [] p.catch -> @index v_index { setverdict(pass); } + [] p.catch -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn index 0cb9a549b9db6f2037863ccf16f41f4dc9c93574..0048925ec12549cc5a38360ee4b446c40990294a 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn @@ -26,7 +26,7 @@ module NegSyn_220306_catch_operation_002 { function f() runs on GeneralComp { - p.getcall(S:?); + p.getcall(S:{}); p.raise(S, 10); } @@ -39,7 +39,7 @@ module NegSyn_220306_catch_operation_002 { v_ptc.done; alt { - [] any port.catch -> @index v_index { setverdict(pass); } + [] any port.catch -> @index value v_index { setverdict(pass); } [else] { setverdict(fail, "The any from catch operation didn't match for some reason"); } } } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn index 64d8c5a23fc6274b6805dd8f0990d42541598879..36cdd130c4df18751cbe6bd244f98ad94979f82c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn @@ -47,7 +47,7 @@ module Sem_220306_catch_operation_003 { alt { - [] any from p.catch(S, integer:(1..10)) -> @index v_index { + [] any from p.catch(S, integer:(1..10)) -> @index value v_index { setverdict(fail, "The any from catch operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn index 99136127a5b858f5bdea2e6dded73f0f9e5aeb1c..d9c6d778300a7607881faeab32137cf7a415062b 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn @@ -47,7 +47,7 @@ module Sem_220306_catch_operation_004 { alt { - [] any from p.catch(S, integer:(1..10)) -> @index v_index { + [] any from p.catch(S, integer:(1..10)) -> @index value v_index { setverdict(fail, "The any from catch operation produced incorrect match"); } [else] { setverdict(pass); } diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn index 4f7dbbe8a9650a41679c08daaa819535ef2e3c1c..d991075f6ade199754fea66984c50ca02fd71414 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn @@ -49,7 +49,7 @@ module Sem_220306_catch_operation_005 { alt { - [] any from p.catch(S, integer:(0..c_portCount)) -> value v_res @index v_index { + [] any from p.catch(S, integer:(0..c_portCount)) -> value v_res @index value v_index { if(v_index == 1 and v_res == v_index + 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn index 9d75600b910b0d111660c9d0c0632df0d28dce08..3344b02e5ad44c9a1753b3896a07a8f897a456dd 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn @@ -52,7 +52,7 @@ module Sem_220306_catch_operation_006 { alt { - [] any from p.catch(S, integer:?) -> sender v_src @index v_index { + [] any from p.catch(S, integer:?) -> sender v_src @index value v_index { if(v_index[0] == 1 and v_index[1] == 2){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn index e2233ed96779a605d12838eb3408ebe59ee971c2..aa526815fd2c34d0ee4f4eda4e54149aede6a732 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn @@ -46,7 +46,7 @@ module Sem_220306_catch_operation_007 { alt { - [] any from p.catch(S, integer:?) -> @index v_index { + [] any from p.catch(S, integer:?) -> @index value v_index { if(v_index == 1){ // no catch call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn index 173a7bcaa218d3f17b4e52abb2290c9a41d32bff..8afc0c94475c25a4c9b84976eb26b5812d019f32 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn @@ -47,7 +47,7 @@ module Sem_220306_catch_operation_008 { alt { - [] any from p.catch(S, integer:?) -> @index v_index { + [] any from p.catch(S, integer:?) -> @index value v_index { if(v_index == 1){ // no catch call during evaluation, v_index remains equal to 1 setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn index 50ea6e792745f903a217fd1ba66ea4da3f11178b..271917ba673a0c376e63d3299aa661132522aa59 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn @@ -16,13 +16,13 @@ module Sem_2305_timer_running_005 { testcase TC_Sem_2305_timer_running_005() runs on TComp { var integer v_foundIndex[2]; - for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) { - for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) { + for (var integer i := 0; i < sizeof(t_TimerArray); i := i + 1) { + for (var integer j := 0; j < sizeof(t_TimerArray[i]); j := j + 1) { t_TimerArray[i][j].start; } } t_TimerArray[0][0].stop; - if (any from t_TimerArray.running -> @index v_foundIndex and v_foundIndex[0] == 0 and v_foundIndex[1] == 1) { + if (any from t_TimerArray.running -> @index value v_foundIndex and v_foundIndex[0] == 0 and v_foundIndex[1] == 1) { setverdict(pass); } else { setverdict(fail, "wrong number of timers running"); diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn index 7f51cde8d36941d7d9cf67afc3ecc73c5b70cfe9..800911ac1ad972b46da40e7749974cfabcec5e41 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn @@ -1,5 +1,8 @@ -/*************************************************** - ** @author STF 470, corrected by STF 487 +/****************************************************************************** + * Copyright (C) 2016 ETSI All Rights Reserved. + * + * Adrien Kirjak + * ** @version 0.0.1 ** @purpose 1:23.6, Ensure that timeout of a timer from a timer array works correctly ** @verdict pass accept, ttcn3verdict:pass @@ -12,15 +15,15 @@ module Sem_2306_timer_timeout_008 { testcase TC_Sem_2306_timer_timeout_008() runs on TComp{ var integer v_foundIndex[2]; - for (var integer i := 0; i < lengthof(t_TimerArray); i := i + 1) { - for (var integer j := 0; j < lengthof(t_TimerArray[i]); j := j + 1) { + for (var integer i := 0; i < sizeof(t_TimerArray); i := i + 1) { + for (var integer j := 0; j < sizeof(t_TimerArray[i]); j := j + 1) { t_TimerArray[i][j].start; } } t_TimerArray[0][0].stop; - any from t_TimerArray.timeout -> @index v_foundIndex; + any from t_TimerArray.timeout -> @index value v_foundIndex; if(v_foundIndex[0] == 0 and v_foundIndex[1] == 1){ setverdict(pass); } else { diff --git a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg index 943e3446ff276184aee3650e05bff8599057531f..7905c5f0b3e88cf07d9175c336e2460acd2c953c 100644 --- a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg +++ b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg @@ -992,6 +992,9 @@ Sem_220202_ReceiveOperation_013.control Sem_220202_ReceiveOperation_014.control Sem_220202_ReceiveOperation_015.control Sem_220202_ReceiveOperation_017.control +Sem_220202_ReceiveOperation_019.control +Sem_220202_ReceiveOperation_020.control +Sem_220202_ReceiveOperation_021.control Sem_220202_ReceiveOperation_022.control Sem_220203_TriggerOperation_001.control Sem_220203_TriggerOperation_002.control @@ -1006,6 +1009,9 @@ Sem_220203_TriggerOperation_013.control Sem_220203_TriggerOperation_014.control Sem_220203_TriggerOperation_015.control Sem_220203_TriggerOperation_017.control +Sem_220203_TriggerOperation_019.control +Sem_220203_TriggerOperation_020.control +Sem_220203_TriggerOperation_021.control Sem_220203_TriggerOperation_022.control Sem_220301_CallOperation_001.control Sem_220301_CallOperation_002.control @@ -1016,11 +1022,25 @@ Sem_220302_GetcallOperation_001.control Sem_220302_GetcallOperation_002.control Sem_220302_GetcallOperation_003.control Sem_220302_GetcallOperation_004.control +Sem_220302_GetcallOperation_006.control +Sem_220302_GetcallOperation_007.control +Sem_220302_GetcallOperation_008.control +Sem_220302_GetcallOperation_009.control +Sem_220302_GetcallOperation_010.control +Sem_220302_GetcallOperation_011.control +Sem_220302_GetcallOperation_012.control Sem_220302_GetcallOperation_014.control Sem_220302_GetcallOperation_015.control Sem_220302_GetcallOperation_016.control Sem_220302_GetcallOperation_017.control Sem_220302_GetcallOperation_018.control +Sem_220304_getreply_operation_001.control +Sem_220304_getreply_operation_002.control +Sem_220304_getreply_operation_003.control +Sem_220304_getreply_operation_004.control +Sem_220304_getreply_operation_005.control +Sem_220304_getreply_operation_006.control +Sem_220304_getreply_operation_007.control Sem_220304_getreply_operation_009.control Sem_220304_getreply_operation_010.control Sem_220304_getreply_operation_011.control @@ -1033,6 +1053,13 @@ Sem_220304_getreply_operation_018.control Sem_220304_getreply_operation_019.control Sem_220305_raise_operation_001.control Sem_220305_raise_operation_002.control +Sem_220306_catch_operation_001.control +Sem_220306_catch_operation_002.control +Sem_220306_catch_operation_003.control +Sem_220306_catch_operation_004.control +Sem_220306_catch_operation_005.control +Sem_220306_catch_operation_006.control +Sem_220306_catch_operation_007.control Sem_220306_catch_operation_009.control Sem_220306_catch_operation_010.control Sem_220306_catch_operation_011.control @@ -1130,6 +1157,7 @@ Sem_2305_timer_running_001.control Sem_2305_timer_running_002.control Sem_2305_timer_running_003.control Sem_2305_timer_running_004.control +Sem_2305_timer_running_005.control Sem_2306_timer_timeout_001.control Sem_2306_timer_timeout_002.control Sem_2306_timer_timeout_003.control @@ -1137,6 +1165,7 @@ Sem_2306_timer_timeout_004.control Sem_2306_timer_timeout_005.control Sem_2306_timer_timeout_006.control Sem_2306_timer_timeout_007.control +Sem_2306_timer_timeout_008.control Sem_2306_timer_timeout_009.control Sem_2401_GlobalVerdict_001.control Sem_2401_GlobalVerdict_004.control diff --git a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd index 61fe98febb7fb59f9f08a0df9688b42b9f8fc7e1..e0ef773828966c7e61c6cf0285d33eebe23c6608 100644 --- a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd +++ b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd @@ -2650,9 +2650,9 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_016.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_017.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_018.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_019.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_020.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_021.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_022.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_023.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_024.ttcn"/>--> @@ -2702,9 +2702,9 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_016.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_017.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_018.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_019.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_020.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_021.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_022.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_023.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_024.ttcn"/>--> @@ -2748,13 +2748,13 @@ <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_003.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_004.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_005.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_006.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_Getcall_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_Getcall_operation_007.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_006.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_007.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_008.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_009.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_010.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_011.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_012.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_013.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_014.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_014.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_015.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_015.ttcn"/> @@ -2789,13 +2789,13 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_020.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSyn_220304_getreply_operation_002.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_001.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_002.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_003.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_004.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_005.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_006.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_007.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_008.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_009.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_010.ttcn"/> @@ -2839,13 +2839,13 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSyn_220306_catch_operation_003.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn"/>--> -<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_001.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_002.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_003.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_004.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_005.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_006.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_007.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_008.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_009.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_010.ttcn"/> @@ -3022,7 +3022,7 @@ <FileResource projectRelativePath="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn" relativeURI="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_003.ttcn"/> <FileResource projectRelativePath="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn" relativeURI="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_004.ttcn"/> <FileResource projectRelativePath="23_timer_operations/2305_the_running_timer_operation/Syn_2305_timer_running_001.ttcn" relativeURI="23_timer_operations/2305_the_running_timer_operation/Syn_2305_timer_running_001.ttcn"/> -<!-- <FileResource projectRelativePath="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn" relativeURI="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn"/>--> + <FileResource projectRelativePath="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn" relativeURI="23_timer_operations/2305_the_running_timer_operation/Sem_2305_timer_running_005.ttcn"/> <!-- <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_001.ttcn"/>--> <!-- <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_002.ttcn"/>--> <!-- <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/NegSyn_2306_timer_timeout_003.ttcn"/>--> @@ -3037,7 +3037,7 @@ <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_005.ttcn"/> <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_006.ttcn"/> <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_007.ttcn"/> -<!-- <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn"/>--> + <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_008.ttcn"/> <FileResource projectRelativePath="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn" relativeURI="23_timer_operations/2306_the_timeout_operation/Sem_2306_timer_timeout_009.ttcn"/> <!-- <FileResource projectRelativePath="23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn" relativeURI="23_timer_operations/23_toplevel/NegSem_23_toplevel_001.ttcn"/>--> <!-- <FileResource projectRelativePath="23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn" relativeURI="23_timer_operations/23_toplevel/NegSem_23_toplevel_002.ttcn"/>--> diff --git a/usrguide/SoC_TITAN.docx b/usrguide/SoC_TITAN.docx index 9545701e6a7fe1cae04bc1aa51f80b740042adf5..4f0d69f8138ae76475c498cdebf390b8f9493f59 100644 Binary files a/usrguide/SoC_TITAN.docx and b/usrguide/SoC_TITAN.docx differ