diff --git a/conformance_test/core_language_tests/negative_tests/05_basic_language_elements.script b/conformance_test/core_language_tests/negative_tests/05_basic_language_elements.script index 1947562d19d3c244c065266ae8c5457bb327fe0c..c66fd0c054cd92c995c3b83b43ed3dfeadb83802 100644 --- a/conformance_test/core_language_tests/negative_tests/05_basic_language_elements.script +++ b/conformance_test/core_language_tests/negative_tests/05_basic_language_elements.script @@ -2861,898 +2861,3190 @@ error: at or before token `@fuzzy': syntax error, unexpected FuzzyKeyword <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_05040103_parameters_of_kind_timer_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040103_001 Verify that functions with timer parameters cannot be used in component.start operation > + +<COMPILE> + +<MODULE TTCN NegSem_05040103_parameters_of_kind_timer_001 05040103_parameters_of_kind_timer_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that functions with timer parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(inout timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_001() runs on C system C { + timer t_tmr := 0.1; + var C v_ptc := C.create; + t_tmr.start; + v_ptc.start(f_test(t_tmr)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Function `@NegSem_05040103_parameters_of_kind_timer_001.f_test' cannot be started on a parallel test component because it has timer parameter `p_tmr' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040103_parameters_of_kind_timer_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040103_003 Verify that test cases cannot have timer parameters > + +<COMPILE> + +<MODULE TTCN NegSem_05040103_parameters_of_kind_timer_003 05040103_parameters_of_kind_timer_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that test cases cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_003 { + + type component C { + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_003(timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + control { + timer t_tmr := 0.1; + t_tmr.start; + execute(TC_NegSem_05040103_parameters_of_kind_timer_003(t_tmr)); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `timer': syntax error, unexpected TimerKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040103_parameters_of_kind_timer_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040103_004 Verify that templates cannot have timer parameters > + +<COMPILE> + +<MODULE TTCN NegSem_05040103_parameters_of_kind_timer_004 05040103_parameters_of_kind_timer_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that templates cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_004 { + + type component C { + } + + template boolean m_msg (timer p_tmr) := p_tmr.running; + + testcase TC_NegSem_05040103_parameters_of_kind_timer_004() runs on C system C { + timer t_tmr := 0.1; + t_tmr.start; + log(m_msg(t_tmr)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_004()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `timer': syntax error, unexpected TimerKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_05040103_parameters_of_kind_timer_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040103_001 Verify that in timer parameters are not allowed > + +<COMPILE> + +<MODULE TTCN NegSyn_05040103_parameters_of_kind_timer_001 NegSyn_05040103_parameters_of_kind_timer_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that in timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(in timer p_tmr) { + p_tmr.timeout; + } + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_001() runs on C { + timer t_tmr := 1.0; + t_tmr.start; + f_test(t_tmr); + setverdict(pass); + } + + control { + execute(TC_NegSyn_05040103_parameters_of_kind_timer_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `timer': syntax error, unexpected TimerKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_05040103_parameters_of_kind_timer_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040103_002 Verify that out timer parameters are not allowed > + +<COMPILE> + +<MODULE TTCN NegSyn_05040103_parameters_of_kind_timer_002 NegSyn_05040103_parameters_of_kind_timer_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that out timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_002 { + + type component C { + + } + + function f_test(out timer p_tmr) { + + p_tmr.start(1.0); + + } + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ + + timer t_tmr; + + f_test(t_tmr); + + t_tmr.timeout; + setverdict(pass); + + } + + + control { + + execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); + + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `timer': syntax error, unexpected TimerKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040104_parameters_of_kind_port_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040104_001 Verify that functions with port parameters cannot be used in component.start operation > + +<COMPILE> + +<MODULE TTCN NegSem_05040104_parameters_of_kind_port_001 NegSem_05040104_parameters_of_kind_port_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that functions with port parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_001 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(P p_port) runs on C { + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_001() runs on C system C { + var C v_ptc := C.create; + connect(mtc:p,v_ptc:p); + v_ptc.start(f_test(p)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Function `@NegSem_05040104_parameters_of_kind_port_001.f_test' cannot be started on a parallel test component because it has port parameter `p_port' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040104_parameters_of_kind_port_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040104_003 Verify that in port parameters are not allowed > + +<COMPILE> + +<MODULE TTCN NegSem_05040104_parameters_of_kind_port_003 NegSem_05040104_parameters_of_kind_port_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that in port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_003 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(in P p_port) { + p_port.send(1); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_003() runs on C { + connect(self:p,self:p); + f_test(p); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_003()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Port type `@NegSem_05040104_parameters_of_kind_port_003.P' cannot be used as value parameter +<END_RESULT> +<RESULT COUNT 1> +error: Reference to a port or port parameter was expected instead of value parameter `p_port' +<END_RESULT> +<RESULT COUNT 1> +error: Reference to a value was expected instead of port `@NegSem_05040104_parameters_of_kind_port_003.C.p' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040104_parameters_of_kind_port_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040104_004 Verify that out port parameters are not allowed > + +<COMPILE> + +<MODULE TTCN NegSem_05040104_parameters_of_kind_port_004 NegSem_05040104_parameters_of_kind_port_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that out port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_004 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(out P p_port) { + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_004() runs on C { + connect(self:p,self:p); + f_test(p); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_004()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Port type `@NegSem_05040104_parameters_of_kind_port_004.P' cannot be used as `out' value parameter +<END_RESULT> +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of port `@NegSem_05040104_parameters_of_kind_port_004.C.p' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040104_parameters_of_kind_port_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040104_005 Verify that test cases cannot have port parameters > + +<COMPILE> + +<MODULE TTCN NegSem_05040104_parameters_of_kind_port_005 NegSem_05040104_parameters_of_kind_port_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that test cases cannot have port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_005 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + testcase TC_Test(P p_port) runs on C { // should cause a compilation error + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_005(P p_port) runs on C { + connect(self:p,self:p); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_005()); + } +} +<END_MODULE> + +<RESULT COUNT 2> +error: A testcase cannot have port parameter +<END_RESULT> +<RESULT COUNT 1> +error: Too few parameters: 1 was expected instead of 0 +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_05040104_parameters_of_kind_port_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 05040104_006 Verify that templates cannot contain port parameters > + +<COMPILE> + +<MODULE TTCN NegSem_05040104_parameters_of_kind_port_006 NegSem_05040104_parameters_of_kind_port_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that templates cannot contain port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_006 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + template boolean m_msg(P p_par) := p_par.checkstate("Started"); + + testcase TC_NegSem_05040104_parameters_of_kind_port_006() runs on C system C { + log(m_msg(p)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_006()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: A template cannot have port parameter +<END_RESULT> +<RESULT COUNT 1> +error: Operation `port.checkstate\(\)' is allowed only within statements +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_050402_actual_parameters_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_001 verify that template parameters cannot be used as in formal value parameters of functions > +<TC - 050402_001 verify that template parameters cannot be used as in formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_001 NegSem_050402_actual_parameters_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_001 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_001() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_001.m_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_002 verify that template variables cannot be used as in formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_002 NegSem_050402_actual_parameters_002.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_002 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_002() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_002()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template variable `vm_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_003 verify that template in parameters cannot be used as in formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_003 NegSem_050402_actual_parameters_003.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_003 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_003() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_003()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_004 verify that template out parameters cannot be used as in formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_004 NegSem_050402_actual_parameters_004.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_004 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_004() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_004()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `out' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_005 verify that template inout parameters cannot be used as in formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_005 NegSem_050402_actual_parameters_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_005 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_005() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_005()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `inout' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_006 verify that template parameters cannot be used as in formal value parameters of templates > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_006 NegSem_050402_actual_parameters_006.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_006 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + template integer m_test(in integer p_val) := 5 + p_val; + + testcase TC_NegSem_050402_actual_parameters_006() runs on GeneralComp { + if (match(6, m_test(m_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_050402_actual_parameters_006()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_006.m_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_007 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_007 verify that template variables cannot be used as in formal value parameters of templates > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_007 NegSem_050402_actual_parameters_007.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_007 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + testcase TC_NegSem_050402_actual_parameters_007() runs on GeneralComp { + var template integer vm_msg := 2; + if (match(7, m_test(vm_msg))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_050402_actual_parameters_007()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template variable `vm_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_008 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_008 verify that template in parameters cannot be used as in formal value parameters of templates > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_008 NegSem_050402_actual_parameters_008.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_008 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(in template integer p_val) { + if (match(8, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_008() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_008()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_009 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_009 verify that template out parameters cannot be used as in formal value parameters of templates > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_009 NegSem_050402_actual_parameters_009.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_009 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + if (match(9, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_009() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_009()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `out' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_010 verify that template out parameters cannot be used as in formal value parameters of templates > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_010 NegSem_050402_actual_parameters_010.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of templates + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_010 { + + type component GeneralComp { + } + + template integer m_test(in integer p_val) := 5 + p_val; + + function f_caller(inout template integer p_val) { + if (match(10, m_test(p_val))) { // tested parameter passing + setverdict(pass); + } else { + setverdict(fail); + } + } + + + testcase TC_NegSem_050402_actual_parameters_010() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_010()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `inout' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_011 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_011 verify that template parameters cannot be used as in formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_011 NegSem_050402_actual_parameters_011.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_011 { + + type component GeneralComp { + timer t := 0.0; + } + + template integer m_msg := 1; + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_011() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_011()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_011.m_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_012 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_012 verify that template variables cannot be used as in formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_012 NegSem_050402_actual_parameters_012.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_012 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_012() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_012()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template variable `vm_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_014 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_014 verify that template out parameters cannot be used as in formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_014 NegSem_050402_actual_parameters_014.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_014 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_014() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_014()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `out' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_015 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_015 verify that template inout parameters cannot be used as in formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_015 NegSem_050402_actual_parameters_015.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_015 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_015() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_015()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `inout' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_016 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_016 verify that template inout parameters cannot be used as in formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_016 NegSem_050402_actual_parameters_016.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_016 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + testcase TC_NegSem_050402_actual_parameters_016(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_016(m_msg)); // tested parameter passing + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_016.m_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_017 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_017 verify that template variables cannot be used as in formal value parameters of test cases > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_017 NegSem_050402_actual_parameters_017.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_017 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_017(in integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + var template integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_017(vm_msg)); // tested parameter passing + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template variable `vm_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_018 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_018 verify that template in parameters cannot be used as in formal value parameters of test cases > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_018 NegSem_050402_actual_parameters_018.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_018 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_018(in integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_018(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_019 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_019 verify that template out parameters cannot be used as in formal value parameters of test cases > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_019 NegSem_050402_actual_parameters_019.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_019 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_019(in integer p_val) runs on GeneralComp { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + execute(TC_NegSem_050402_actual_parameters_019(p_val)); // tested parameter passing + } + + control { + var template integer vm_val; + f_caller(vm_val); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `out' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_020 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_020 verify that template inout parameters cannot be used as in formal value parameters of test cases > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_020 NegSem_050402_actual_parameters_020.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed by value to in formal value parameters shall be +// variables, literal values, module parameters, constants, variables, value returning +// (external) functions, formal value parameters (of in, inout or out parameterization) +// of the current scope or expressions composed of the above. + +module NegSem_050402_actual_parameters_020 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_020(in integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + execute(TC_NegSem_050402_actual_parameters_020(p_val)); // tested parameter passing + } + + control { + var template integer vm_val := 5; + f_caller(vm_val); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `inout' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_021 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_021 verify that literals cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_021 NegSem_050402_actual_parameters_021.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_021 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_021() runs on GeneralComp { + f_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_021()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_022 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC -050402_022 verify that literals cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_022 NegSem_050402_actual_parameters_022.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_022 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(inout integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_022() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_022()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_023 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_023 verify that constants cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_023 NegSem_050402_actual_parameters_023.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_023 { + + type component GeneralComp { + } + + const integer c_val := 3; + + function f_test(inout integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_023() runs on GeneralComp { + f_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_023()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_024 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_024 verify that function calls cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_024 NegSem_050402_actual_parameters_024.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_024 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 5; + } + + function f_test(inout integer p_val) { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_024() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_024()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_025 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_025 verify that expressions cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_025 NegSem_050402_actual_parameters_025.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_025 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(inout integer p_val) { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_025() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_025()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_026 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_026 verify that template parameters cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_026 NegSem_050402_actual_parameters_026.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_026 { + + type component GeneralComp { + } + + template integer m_msg := 1; + + function f_test(inout integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_026() runs on GeneralComp { + f_test(m_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_026()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_027 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_027 verify that template variables cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_027 NegSem_050402_actual_parameters_027.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_027 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_027() runs on GeneralComp { + var template integer vm_msg := 2; + f_test(vm_msg); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_027()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_028 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_028 verify that template in parameters cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_028 NegSem_050402_actual_parameters_028.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_028 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_028() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_028()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_029 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_029 verify that template out parameters cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_029 NegSem_050402_actual_parameters_029.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_029 { + + type component GeneralComp { + } + + function f_test(inout integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(out template integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_029() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_029()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_030 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_030 verify that template inout parameters cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_030 NegSem_050402_actual_parameters_030.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_030 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 4) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_030() runs on GeneralComp { + var template integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_030()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a value was expected instead of `inout' template parameter `p_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_031 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_031 verify that template variable element reference cannot be used as inout formal value parameters of functions > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_031 NegSem_050402_actual_parameters_031.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_031 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_031() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_031()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_032 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_032 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_001 NegSem_050402_actual_parameters_001.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_032 NegSem_050402_actual_parameters_032.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of functions + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_001 { +module NegSem_050402_actual_parameters_032 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(inout integer p_val) { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } + } + + function f_caller(in template R p_param) { + f_test(p_param.field1); // tested parameter passing + } + + testcase TC_NegSem_050402_actual_parameters_032() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_032()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_033 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_033 verify that literals cannot be used as inout formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_033 NegSem_050402_actual_parameters_033.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_033 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_033() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_033()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_034 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_034 verify that module parameters cannot be used as inout formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_034 NegSem_050402_actual_parameters_034.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_034 { + + type component GeneralComp { + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_034() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_034()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_035 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_035 verify that constants cannot be used as inout formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_035 NegSem_050402_actual_parameters_035.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_035 { type component GeneralComp { + timer t := 0.0; + } + + const integer c_val := 3; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_035() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_035()); } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant `@NegSem_050402_actual_parameters_035.c_val' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_050402_actual_parameters_036 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 050402_036 verify that function calls cannot be used as inout formal value parameters of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_050402_actual_parameters_036 NegSem_050402_actual_parameters_036.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_036 { + + type component GeneralComp { + timer t := 0.0; + } - template integer m_msg := 1; + function f_ret() return integer { + return 5; + } - function f_test(in integer p_val) { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } + } } - testcase TC_NegSem_050402_actual_parameters_001() runs on GeneralComp { - f_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_036() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_001()); + execute(TC_NegSem_050402_actual_parameters_036()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_001.m_msg' +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function `@NegSem_050402_actual_parameters_036.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_002 negative test +:h3. NegSem_050402_actual_parameters_037 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_002 verify that template variables cannot be used as in formal value parameters of functions > +<TC - 050402_037 verify that expressions cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_002 NegSem_050402_actual_parameters_002.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_037 NegSem_050402_actual_parameters_037.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of functions + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_002 { +module NegSem_050402_actual_parameters_037 { type component GeneralComp { - } + timer t := 0.0; + } - function f_test(in integer p_val) { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } + function f_ret() return integer { + return 4; } - - testcase TC_NegSem_050402_actual_parameters_002() runs on GeneralComp { - var template integer vm_msg := 2; - f_test(vm_msg); // tested parameter passing + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_037() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_002()); + execute(TC_NegSem_050402_actual_parameters_037()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template variable `vm_msg' +error: Reference to a variable or value parameter was expected for an `inout' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_003 negative test +:h3. NegSem_050402_actual_parameters_038 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_003 verify that template in parameters cannot be used as in formal value parameters of functions > +<TC - 050402_038 verify that template parameters cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_003 NegSem_050402_actual_parameters_003.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_038 NegSem_050402_actual_parameters_038.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of functions + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_003 { +module NegSem_050402_actual_parameters_038 { type component GeneralComp { - } - - function f_test(in integer p_val) { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } - } + timer t := 0.0; + } - function f_caller(in template integer p_val) { - f_test(p_val); // tested parameter passing + template integer m_msg := 1; + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } } - - testcase TC_NegSem_050402_actual_parameters_003() runs on GeneralComp { - f_caller(3); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_038() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_003()); + execute(TC_NegSem_050402_actual_parameters_038()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template parameter `p_val' +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_004 negative test +:h3. NegSem_050402_actual_parameters_039 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_004 verify that template out parameters cannot be used as in formal value parameters of functions > +<TC - 050402_039 verify that template variables cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_004 NegSem_050402_actual_parameters_004.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_039 NegSem_050402_actual_parameters_039.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of functions + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_004 { +module NegSem_050402_actual_parameters_039 { type component GeneralComp { - } + timer t := 0.0; + } - function f_test(in integer p_val) { - if (p_val == 4) { setverdict(pass); } - else { setverdict(fail); } - } - - function f_caller(out template integer p_val) { - p_val := 4; // out parameter shall have a value before we can pass it to a function - f_test(p_val); // tested parameter passing + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } } - - testcase TC_NegSem_050402_actual_parameters_004() runs on GeneralComp { - var template integer v_val; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_039() runs on GeneralComp { + var template integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_004()); + execute(TC_NegSem_050402_actual_parameters_039()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `out' template parameter `p_val' +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_005 negative test +:h3. NegSem_050402_actual_parameters_040 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_005 verify that template inout parameters cannot be used as in formal value parameters of functions > +<TC - 050402_040 verify that template in parameters cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_005 NegSem_050402_actual_parameters_005.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_040 NegSem_050402_actual_parameters_040.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of functions + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types.. -module NegSem_050402_actual_parameters_005 { +module NegSem_050402_actual_parameters_040 { type component GeneralComp { + timer t := 0.0; } - function f_test(in integer p_val) { - if (p_val == 4) { setverdict(pass); } - else { setverdict(fail); } + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } } - function f_caller(inout template integer p_val) { - f_test(p_val); // tested parameter passing + function f_caller(in template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing } - testcase TC_NegSem_050402_actual_parameters_005() runs on GeneralComp { - var template integer v_val := 5; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_040() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_005()); + execute(TC_NegSem_050402_actual_parameters_040()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `inout' template parameter `p_val' +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_006 negative test +:h3. NegSem_050402_actual_parameters_041 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_006 verify that template parameters cannot be used as in formal value parameters of templates > +<TC - 050402_041 verify that template out parameters cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_006 NegSem_050402_actual_parameters_006.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_041 NegSem_050402_actual_parameters_041.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of templates + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_006 { +module NegSem_050402_actual_parameters_041 { type component GeneralComp { - } - - template integer m_msg := 1; + timer t := 0.0; + } - template integer m_test(in integer p_val) := 5 + p_val; - - testcase TC_NegSem_050402_actual_parameters_006() runs on GeneralComp { - if (match(6, m_test(m_msg))) { // tested parameter passing - setverdict(pass); - } else { - setverdict(fail); + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } } + } + + function f_caller(out template integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_041() runs on GeneralComp { + var template integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_006()); + execute(TC_NegSem_050402_actual_parameters_041()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_006.m_msg' +error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_007 negative test +:h3. NegSem_050402_actual_parameters_042 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_007 verify that template variables cannot be used as in formal value parameters of templates > +<TC - 050402_042 verify that template inout parameters cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_007 NegSem_050402_actual_parameters_007.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_042 NegSem_050402_actual_parameters_042.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of templates + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of altsteps ** @verdict pass reject - ***************************************************/ - -// The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. + ***************************************************/ -module NegSem_050402_actual_parameters_007 { +// The following requirement is tested: +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. + +module NegSem_050402_actual_parameters_042 { type component GeneralComp { - } + timer t := 0.0; + } - template integer m_test(in integer p_val) := 5 + p_val; - - testcase TC_NegSem_050402_actual_parameters_007() runs on GeneralComp { - var template integer vm_msg := 2; - if (match(7, m_test(vm_msg))) { // tested parameter passing - setverdict(pass); - } else { - setverdict(fail); + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } } + } + + function f_caller(inout template integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + } + + + testcase TC_NegSem_050402_actual_parameters_042() runs on GeneralComp { + var template integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_007()); + execute(TC_NegSem_050402_actual_parameters_042()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template variable `vm_msg' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `inout' template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_008 negative test +:h3. NegSem_050402_actual_parameters_043 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_008 verify that template in parameters cannot be used as in formal value parameters of templates > +<TC - 050402_043 verify that template variable element reference cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_008 NegSem_050402_actual_parameters_008.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_043 NegSem_050402_actual_parameters_043.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of templates + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_008 { +module NegSem_050402_actual_parameters_043 { type component GeneralComp { + timer t := 0.0; } - template integer m_test(in integer p_val) := 5 + p_val; - - function f_caller(in template integer p_val) { - if (match(8, m_test(p_val))) { // tested parameter passing - setverdict(pass); - } else { - setverdict(fail); + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } } } - - testcase TC_NegSem_050402_actual_parameters_008() runs on GeneralComp { - f_caller(3); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_043() runs on GeneralComp { + var template R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_008()); + execute(TC_NegSem_050402_actual_parameters_043()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_009 negative test +:h3. NegSem_050402_actual_parameters_044 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_009 verify that template out parameters cannot be used as in formal value parameters of templates > +<TC - 050402_044 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_009 NegSem_050402_actual_parameters_009.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_044 NegSem_050402_actual_parameters_044.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of templates + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_009 { +module NegSem_050402_actual_parameters_044 { type component GeneralComp { + timer t := 0.0; } - template integer m_test(in integer p_val) := 5 + p_val; - - function f_caller(out template integer p_val) { - p_val := 4; // out parameter shall have a value before we can pass it to a function - if (match(9, m_test(p_val))) { // tested parameter passing - setverdict(pass); - } else { - setverdict(fail); + type record R { + integer field1 + } + + altstep a_test(inout integer p_val) runs on GeneralComp { + []t.timeout { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } } } - - testcase TC_NegSem_050402_actual_parameters_009() runs on GeneralComp { - var template integer v_val; - f_caller(v_val); // this parameter passing is not a subject of the test + function f_caller(in template R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + } + + testcase TC_NegSem_050402_actual_parameters_044() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); } control { - execute(TC_NegSem_050402_actual_parameters_009()); + execute(TC_NegSem_050402_actual_parameters_044()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `out' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_010 negative test +:h3. NegSem_050402_actual_parameters_045 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_010 verify that template out parameters cannot be used as in formal value parameters of templates > +<TC - 050402_045 verify that literals cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_010 NegSem_050402_actual_parameters_010.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_045 NegSem_050402_actual_parameters_045.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of templates + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_010 { +module NegSem_050402_actual_parameters_045 { type component GeneralComp { - } - - template integer m_test(in integer p_val) := 5 + p_val; - - function f_caller(inout template integer p_val) { - if (match(10, m_test(p_val))) { // tested parameter passing - setverdict(pass); - } else { - setverdict(fail); - } - } + } - - testcase TC_NegSem_050402_actual_parameters_010() runs on GeneralComp { - var template integer v_val := 5; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_045(inout integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_010()); + execute(TC_NegSem_050402_actual_parameters_045(1)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `inout' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_011 negative test +:h3. NegSem_050402_actual_parameters_046 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_011 verify that template parameters cannot be used as in formal value parameters of altsteps > +<TC - 050402_046 verify that module parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_011 NegSem_050402_actual_parameters_011.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_046 NegSem_050402_actual_parameters_046.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_011 { +module NegSem_050402_actual_parameters_046 { type component GeneralComp { - timer t := 0.0; } - template integer m_msg := 1; - - altstep a_test(integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } - } + modulepar integer PX_VAL := 2; - testcase TC_NegSem_050402_actual_parameters_011() runs on GeneralComp { - t.start; - a_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_046(inout integer p_val) runs on GeneralComp { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_011()); + execute(TC_NegSem_050402_actual_parameters_046(PX_VAL)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_011.m_msg' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_012 negative test +:h3. NegSem_050402_actual_parameters_047 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_012 verify that template variables cannot be used as in formal value parameters of altsteps > +<TC - 050402_047 verify that constants cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_012 NegSem_050402_actual_parameters_012.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_047 NegSem_050402_actual_parameters_047.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_012 { +module NegSem_050402_actual_parameters_047 { type component GeneralComp { - timer t := 0.0; - } - - altstep a_test(integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } - } - } + } - testcase TC_NegSem_050402_actual_parameters_012() runs on GeneralComp { - var template integer vm_msg := 2; - t.start; - a_test(vm_msg); // tested parameter passing + const integer c_val := 3; + + testcase TC_NegSem_050402_actual_parameters_047(inout integer p_val) runs on GeneralComp { + if (p_val == 3) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_012()); + execute(TC_NegSem_050402_actual_parameters_047(c_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template variable `vm_msg' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_014 negative test +:h3. NegSem_050402_actual_parameters_048 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_014 verify that template out parameters cannot be used as in formal value parameters of altsteps > +<TC - 050402_048 verify that function calls cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_014 NegSem_050402_actual_parameters_014.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_048 NegSem_050402_actual_parameters_048.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_014 { +module NegSem_050402_actual_parameters_048 { type component GeneralComp { - timer t := 0.0; } - altstep a_test(integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 4) { setverdict(pass); } - else { setverdict(fail); } - } - } - - function f_caller(out template integer p_val) runs on GeneralComp { - p_val := 4; // out parameter shall have a value before we can pass it to a function - a_test(p_val); // tested parameter passing + function f_ret() return integer { + return 5; } - - testcase TC_NegSem_050402_actual_parameters_014() runs on GeneralComp { - var template integer v_val; - t.start; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_048(inout integer p_val) runs on GeneralComp { + if (p_val == 5) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_014()); + execute(TC_NegSem_050402_actual_parameters_048(f_ret())); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `out' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function `@NegSem_050402_actual_parameters_048.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_015 negative test +:h3. NegSem_050402_actual_parameters_049 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_015 verify that template inout parameters cannot be used as in formal value parameters of altsteps > +<TC - 050402_049 verify that expressions cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_015 NegSem_050402_actual_parameters_015.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_049 NegSem_050402_actual_parameters_049.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_015 { +module NegSem_050402_actual_parameters_049 { type component GeneralComp { - timer t := 0.0; } - altstep a_test(integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 5) { setverdict(pass); } - else { setverdict(fail); } - } - } - - function f_caller(inout template integer p_val) runs on GeneralComp { - a_test(p_val); // tested parameter passing + function f_ret() return integer { + return 4; } - - testcase TC_NegSem_050402_actual_parameters_015() runs on GeneralComp { - var template integer v_val := 5; - t.start; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_049(inout integer p_val) runs on GeneralComp { + if (p_val == 9) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_015()); + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_049(10 + f_ret() - v_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `inout' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_016 negative test +:h3. NegSem_050402_actual_parameters_050 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_016 verify that template inout parameters cannot be used as in formal value parameters of altsteps > +<TC - 050402_050 verify that template parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_016 NegSem_050402_actual_parameters_016.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_050 NegSem_050402_actual_parameters_050.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as in formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_016 { +module NegSem_050402_actual_parameters_050 { type component GeneralComp { } template integer m_msg := 1; - testcase TC_NegSem_050402_actual_parameters_016(in integer p_val) runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_050(inout integer p_val) runs on GeneralComp { if (p_val == 1) { setverdict(pass); } else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_016(m_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_050(m_msg)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template `@NegSem_050402_actual_parameters_016.m_msg' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template `@NegSem_050402_actual_parameters_050.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_017 negative test +:h3. NegSem_050402_actual_parameters_051 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_017 verify that template variables cannot be used as in formal value parameters of test cases > +<TC - 050402_051 verify that template variables cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_017 NegSem_050402_actual_parameters_017.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_051 NegSem_050402_actual_parameters_051.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as in formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. - -module NegSem_050402_actual_parameters_017 { +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. +module NegSem_050402_actual_parameters_051 { type component GeneralComp { } - testcase TC_NegSem_050402_actual_parameters_017(in integer p_val) runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_051(inout integer p_val) runs on GeneralComp { if (p_val == 2) { setverdict(pass); } else { setverdict(fail); } } control { var template integer vm_msg := 2; - execute(TC_NegSem_050402_actual_parameters_017(vm_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_051(vm_msg)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template variable `vm_msg' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_018 negative test +:h3. NegSem_050402_actual_parameters_052 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_018 verify that template in parameters cannot be used as in formal value parameters of test cases > +<TC - 050402_052 verify that template in parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_018 NegSem_050402_actual_parameters_018.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_052 NegSem_050402_actual_parameters_052.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as in formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_018 { +module NegSem_050402_actual_parameters_052 { type component GeneralComp { } - testcase TC_NegSem_050402_actual_parameters_018(in integer p_val) runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_052(inout integer p_val) runs on GeneralComp { if (p_val == 3) { setverdict(pass); } else { setverdict(fail); } } function f_caller(in template integer p_val) { - execute(TC_NegSem_050402_actual_parameters_018(p_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_052(p_val)); // tested parameter passing } control { @@ -3762,47 +6054,46 @@ module NegSem_050402_actual_parameters_018 { <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_019 negative test +:h3. NegSem_050402_actual_parameters_053 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_019 verify that template out parameters cannot be used as in formal value parameters of test cases > +<TC - 050402_053 verify that template in parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_019 NegSem_050402_actual_parameters_019.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_053 NegSem_050402_actual_parameters_053.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as in formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_019 { +module NegSem_050402_actual_parameters_053 { type component GeneralComp { } - testcase TC_NegSem_050402_actual_parameters_019(in integer p_val) runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_053(inout integer p_val) runs on GeneralComp { if (p_val == 4) { setverdict(pass); } else { setverdict(fail); } } function f_caller(out template integer p_val) { p_val := 4; // out parameter shall have a value before we can pass it to a function - execute(TC_NegSem_050402_actual_parameters_019(p_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_053(p_val)); // tested parameter passing } control { @@ -3813,46 +6104,45 @@ module NegSem_050402_actual_parameters_019 { <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `out' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_020 negative test +:h3. NegSem_050402_actual_parameters_054 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_020 verify that template inout parameters cannot be used as in formal value parameters of test cases > +<TC - 050402_054 verify that template inout parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_020 NegSem_050402_actual_parameters_020.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_054 NegSem_050402_actual_parameters_054.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as in formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed by value to in formal value parameters shall be -// variables, literal values, module parameters, constants, variables, value returning -// (external) functions, formal value parameters (of in, inout or out parameterization) -// of the current scope or expressions composed of the above. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_020 { +module NegSem_050402_actual_parameters_054 { type component GeneralComp { } - testcase TC_NegSem_050402_actual_parameters_020(in integer p_val) runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_054(inout integer p_val) runs on GeneralComp { if (p_val == 5) { setverdict(pass); } else { setverdict(fail); } } function f_caller(inout template integer p_val) { - execute(TC_NegSem_050402_actual_parameters_020(p_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_054(p_val)); // tested parameter passing } control { @@ -3863,25 +6153,25 @@ module NegSem_050402_actual_parameters_020 { <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `inout' template parameter `p_val' + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `inout' template parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_021 negative test +:h3. NegSem_050402_actual_parameters_055 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_021 verify that literals cannot be used as inout formal value parameters of functions > +<TC - 050402_055 verify that template variable element reference cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_021 NegSem_050402_actual_parameters_021.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_055 NegSem_050402_actual_parameters_055.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ @@ -3890,46 +6180,47 @@ error: Reference to a value was expected instead of `inout' template parameter ` // or formal value parameters (of in, inout or out parameterization) or references to // elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_021 { +module NegSem_050402_actual_parameters_055 { type component GeneralComp { - } - - function f_test(inout integer p_val) { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } + } + + type record R { + integer field1 } - testcase TC_NegSem_050402_actual_parameters_021() runs on GeneralComp { - f_test(1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_055(inout integer p_val) runs on GeneralComp { + if (p_val == 10) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_021()); + var template R v_val := { field1 := 10 }; + execute(TC_NegSem_050402_actual_parameters_055(v_val.field1)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_022 negative test +:h3. NegSem_050402_actual_parameters_056 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC -050402_022 verify that literals cannot be used as inout formal value parameters of functions > +<TC - 050402_056 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_022 NegSem_050402_actual_parameters_022.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_056 NegSem_050402_actual_parameters_056.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of test cases ** @verdict pass reject ***************************************************/ @@ -3938,4951 +6229,4981 @@ error: Reference to a variable or value parameter was expected for an `inout' va // or formal value parameters (of in, inout or out parameterization) or references to // elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_022 { +module NegSem_050402_actual_parameters_056 { type component GeneralComp { - } - - modulepar integer PX_VAL := 2; - - function f_test(inout integer p_val) { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } } + + type record R { + integer field1 + } - testcase TC_NegSem_050402_actual_parameters_022() runs on GeneralComp { - f_test(PX_VAL); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_056(inout integer p_val) runs on GeneralComp { + if (p_val == 11) { setverdict(pass); } + else { setverdict(fail); } } + + function f_caller(in template R p_param) { + execute(TC_NegSem_050402_actual_parameters_056(p_param.field1)); // tested parameter passing + } control { - execute(TC_NegSem_050402_actual_parameters_022()); + f_caller({field1 := 11 }); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter + error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_023 negative test +:h3. NegSem_050402_actual_parameters_057 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_023 verify that constants cannot be used as inout formal value parameters of functions > +<TC - 050402_057 verify that literals cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_023 NegSem_050402_actual_parameters_023.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_057 NegSem_050402_actual_parameters_057.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_023 { +module NegSem_050402_actual_parameters_057 { type component GeneralComp { } - const integer c_val := 3; - - function f_test(inout integer p_val) { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); } - testcase TC_NegSem_050402_actual_parameters_023() runs on GeneralComp { - f_test(c_val); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_057() runs on GeneralComp { + f_test(1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_023()); + execute(TC_NegSem_050402_actual_parameters_057()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_024 negative test +:h3. NegSem_050402_actual_parameters_058 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_024 verify that function calls cannot be used as inout formal value parameters of functions > +<TC - 050402_058 verify that module parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_024 NegSem_050402_actual_parameters_024.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_058 NegSem_050402_actual_parameters_058.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_024 { +module NegSem_050402_actual_parameters_058 { type component GeneralComp { - } - - function f_ret() return integer { - return 5; - } + } + + modulepar integer PX_VAL := 2; - function f_test(inout integer p_val) { - if (p_val == 5) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); } - testcase TC_NegSem_050402_actual_parameters_024() runs on GeneralComp { - f_test(f_ret()); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_058() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_024()); + execute(TC_NegSem_050402_actual_parameters_058()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_025 negative test +:h3. NegSem_050402_actual_parameters_059 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_025 verify that expressions cannot be used as inout formal value parameters of functions > +<TC - 050402_059 verify that constants cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_025 NegSem_050402_actual_parameters_025.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_059 NegSem_050402_actual_parameters_059.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_025 { +module NegSem_050402_actual_parameters_059 { type component GeneralComp { - } - - function f_ret() return integer { - return 4; - } + } + + const integer c_val := 3; - function f_test(inout integer p_val) { - if (p_val == 9) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); } - - testcase TC_NegSem_050402_actual_parameters_025() runs on GeneralComp { - var integer v_val := 5; - f_test(10 + f_ret() - v_val); // tested parameter passing + + testcase TC_NegSem_050402_actual_parameters_059() runs on GeneralComp { + f_test(c_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_025()); + execute(TC_NegSem_050402_actual_parameters_059()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_026 negative test +:h3. NegSem_050402_actual_parameters_060 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_026 verify that template parameters cannot be used as inout formal value parameters of functions > +<TC - 050402_060 verify that function calls cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_026 NegSem_050402_actual_parameters_026.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_060 NegSem_050402_actual_parameters_060.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_026 { +module NegSem_050402_actual_parameters_060 { type component GeneralComp { - } + } - template integer m_msg := 1; + function f_ret() return integer { + return 5; + } - function f_test(inout integer p_val) { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); } - testcase TC_NegSem_050402_actual_parameters_026() runs on GeneralComp { - f_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_060() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_026()); + execute(TC_NegSem_050402_actual_parameters_060()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_027 negative test +:h3. NegSem_050402_actual_parameters_061 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_027 verify that template variables cannot be used as inout formal value parameters of functions > +<TC - 050402_061 verify that expressions cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_027 NegSem_050402_actual_parameters_027.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_061 NegSem_050402_actual_parameters_061.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_027 { +module NegSem_050402_actual_parameters_061 { type component GeneralComp { - } + } - function f_test(inout integer p_val) { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } + function f_ret() return integer { + return 4; } - - testcase TC_NegSem_050402_actual_parameters_027() runs on GeneralComp { - var template integer vm_msg := 2; - f_test(vm_msg); // tested parameter passing + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); + } + + testcase TC_NegSem_050402_actual_parameters_061() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_027()); + execute(TC_NegSem_050402_actual_parameters_061()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_028 negative test +:h3. NegSem_050402_actual_parameters_062 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_028 verify that template in parameters cannot be used as inout formal value parameters of functions > +<TC - 050402_062 verify that template parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_028 NegSem_050402_actual_parameters_028.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_062 NegSem_050402_actual_parameters_062.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_028 { +module NegSem_050402_actual_parameters_062 { type component GeneralComp { - } + } - function f_test(inout integer p_val) { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } - } - - function f_caller(in template integer p_val) { - f_test(p_val); // tested parameter passing + template integer m_msg := 1; + + function f_test(out template integer p_val) { + p_val := ?; + setverdict(pass); } - - testcase TC_NegSem_050402_actual_parameters_028() runs on GeneralComp { - f_caller(3); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_062() runs on GeneralComp { + f_test(m_msg); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_028()); + execute(TC_NegSem_050402_actual_parameters_062()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `@NegSem_050402_actual_parameters_062.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_029 negative test +:h3. NegSem_050402_actual_parameters_063 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_029 verify that template out parameters cannot be used as inout formal value parameters of functions > +<TC - 050402_063 verify that literals cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_029 NegSem_050402_actual_parameters_029.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_063 NegSem_050402_actual_parameters_063.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_029 { +module NegSem_050402_actual_parameters_063 { type component GeneralComp { - } - - function f_test(inout integer p_val) { - if (p_val == 4) { setverdict(pass); } - else { setverdict(fail); } - } + timer t := 0.0; + } - function f_caller(out template integer p_val) { - p_val := 4; // out parameter shall have a value before we can pass it to a function - f_test(p_val); // tested parameter passing + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } } - - testcase TC_NegSem_050402_actual_parameters_029() runs on GeneralComp { - var template integer v_val; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_063() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_029()); + execute(TC_NegSem_050402_actual_parameters_063()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_030 negative test +:h3. NegSem_050402_actual_parameters_064 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_030 verify that template inout parameters cannot be used as inout formal value parameters of functions > +<TC - 050402_064 verify that module parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_030 NegSem_050402_actual_parameters_030.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_064 NegSem_050402_actual_parameters_064.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_030 { +module NegSem_050402_actual_parameters_064 { type component GeneralComp { - } - - function f_test(in integer p_val) { - if (p_val == 4) { setverdict(pass); } - else { setverdict(fail); } - } + timer t := 0.0; + } - function f_caller(inout template integer p_val) { - f_test(p_val); // tested parameter passing + modulepar integer PX_VAL := 2; + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } } - - testcase TC_NegSem_050402_actual_parameters_030() runs on GeneralComp { - var template integer v_val := 5; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_064() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_030()); + execute(TC_NegSem_050402_actual_parameters_064()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a value was expected instead of `inout' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_031 negative test +:h3. NegSem_050402_actual_parameters_065 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_031 verify that template variable element reference cannot be used as inout formal value parameters of functions > +<TC - 050402_065 verify that constants cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_031 NegSem_050402_actual_parameters_031.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_065 NegSem_050402_actual_parameters_065.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_031 { +module NegSem_050402_actual_parameters_065 { type component GeneralComp { - } - - type record R { - integer field1 - } + timer t := 0.0; + } + + const integer c_val := 3; - function f_test(inout integer p_val) { - if (p_val == 10) { setverdict(pass); } - else { setverdict(fail); } + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } } - testcase TC_NegSem_050402_actual_parameters_031() runs on GeneralComp { - var template R v_val := { field1 := 10 }; - f_test(v_val.field1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_065() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_031()); + execute(TC_NegSem_050402_actual_parameters_065()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_032 negative test +:h3. NegSem_050402_actual_parameters_066 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_032 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of functions > +<TC - 050402_066 verify that function calls cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_032 NegSem_050402_actual_parameters_032.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_066 NegSem_050402_actual_parameters_066.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_032 { +module NegSem_050402_actual_parameters_066 { type component GeneralComp { + timer t := 0.0; } - type record R { - integer field1 - } - - function f_test(inout integer p_val) { - if (p_val == 11) { setverdict(pass); } - else { setverdict(fail); } + function f_ret() return integer { + return 5; } - function f_caller(in template R p_param) { - f_test(p_param.field1); // tested parameter passing + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := ?; + setverdict(pass); + } } - testcase TC_NegSem_050402_actual_parameters_032() runs on GeneralComp { - f_caller({field1 := 11 }); + testcase TC_NegSem_050402_actual_parameters_066() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_032()); + execute(TC_NegSem_050402_actual_parameters_066()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_033 negative test +:h3. NegSem_050402_actual_parameters_067 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_033 verify that literals cannot be used as inout formal value parameters of altsteps > +<TC - 050402_067 verify that expressions cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_033 NegSem_050402_actual_parameters_033.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_067 NegSem_050402_actual_parameters_067.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_033 { +module NegSem_050402_actual_parameters_067 { type component GeneralComp { timer t := 0.0; - } - - altstep a_test(inout integer p_val) runs on GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } + p_val := ?; + setverdict(pass); } } - - testcase TC_NegSem_050402_actual_parameters_033() runs on GeneralComp { + + testcase TC_NegSem_050402_actual_parameters_067() runs on GeneralComp { + var integer v_val := 5; t.start; - a_test(1); // tested parameter passing + a_test(10 + f_ret() - v_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_033()); + execute(TC_NegSem_050402_actual_parameters_067()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_034 negative test +:h3. NegSem_050402_actual_parameters_068 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_034 verify that module parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_068 verify that template parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_034 NegSem_050402_actual_parameters_034.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_068 NegSem_050402_actual_parameters_068.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_034 { +module NegSem_050402_actual_parameters_068 { type component GeneralComp { timer t := 0.0; } - modulepar integer PX_VAL := 2; + template integer m_msg := 1; - altstep a_test(inout integer p_val) runs on GeneralComp { + altstep a_test(out template integer p_val) runs on GeneralComp { []t.timeout { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } + p_val := ?; + setverdict(pass); } } - testcase TC_NegSem_050402_actual_parameters_034() runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_068() runs on GeneralComp { t.start; - a_test(PX_VAL); // tested parameter passing + a_test(m_msg); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_034()); + execute(TC_NegSem_050402_actual_parameters_068()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_035 negative test +:h3. NegSem_050402_actual_parameters_069 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_035 verify that constants cannot be used as inout formal value parameters of altsteps > +<TC - 050402_069 verify that literals cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_035 NegSem_050402_actual_parameters_035.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_069 NegSem_050402_actual_parameters_069.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_035 { +module NegSem_050402_actual_parameters_069 { type component GeneralComp { - timer t := 0.0; } - const integer c_val := 3; - - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } - } - } - - testcase TC_NegSem_050402_actual_parameters_035() runs on GeneralComp { - t.start; - a_test(c_val); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_069(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_035()); + execute(TC_NegSem_050402_actual_parameters_069(1)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant `@NegSem_050402_actual_parameters_035.c_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_036 negative test +:h3. NegSem_050402_actual_parameters_070 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_036 verify that function calls cannot be used as inout formal value parameters of altsteps > +<TC - 050402_070 verify that module parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_036 NegSem_050402_actual_parameters_036.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_070 NegSem_050402_actual_parameters_070.ttcn > /*************************************************** - ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of altsteps - ** @verdict pass reject - ***************************************************/ - -// The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. - -module NegSem_050402_actual_parameters_036 { - - type component GeneralComp { - timer t := 0.0; - } - - function f_ret() return integer { - return 5; - } - - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 5) { setverdict(pass); } - else { setverdict(fail); } - } - } + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ - testcase TC_NegSem_050402_actual_parameters_036() runs on GeneralComp { - t.start; - a_test(f_ret()); // tested parameter passing +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_070 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + testcase TC_NegSem_050402_actual_parameters_070(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_036()); + execute(TC_NegSem_050402_actual_parameters_070(PX_VAL)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function `@NegSem_050402_actual_parameters_036.f_ret' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter `@NegSem_050402_actual_parameters_070.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_037 negative test +:h3. NegSem_050402_actual_parameters_071 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_037 verify that expressions cannot be used as inout formal value parameters of altsteps > +<TC - 050402_071 verify that constants cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_037 NegSem_050402_actual_parameters_037.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_071 NegSem_050402_actual_parameters_071.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_037 { +module NegSem_050402_actual_parameters_071 { type component GeneralComp { - timer t := 0.0; - } - - function f_ret() return integer { - return 4; - } - - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 9) { setverdict(pass); } - else { setverdict(fail); } - } - } - - testcase TC_NegSem_050402_actual_parameters_037() runs on GeneralComp { - var integer v_val := 5; - t.start; - a_test(10 + f_ret() - v_val); // tested parameter passing + } + + const integer c_val := 3; + + testcase TC_NegSem_050402_actual_parameters_071(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_037()); + execute(TC_NegSem_050402_actual_parameters_071(c_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_038 negative test +:h3. NegSem_050402_actual_parameters_072 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_038 verify that template parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_072 verify that function calls cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_038 NegSem_050402_actual_parameters_038.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_072 NegSem_050402_actual_parameters_072.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_038 { +module NegSem_050402_actual_parameters_072 { type component GeneralComp { - timer t := 0.0; - } - - template integer m_msg := 1; + } - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } + function f_ret() return integer { + return 5; } - testcase TC_NegSem_050402_actual_parameters_038() runs on GeneralComp { - t.start; - a_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_072(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_038()); + execute(TC_NegSem_050402_actual_parameters_072(f_ret())); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function `@NegSem_050402_actual_parameters_072.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_039 negative test +:h3. NegSem_050402_actual_parameters_073 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_039 verify that template variables cannot be used as inout formal value parameters of altsteps > +<TC - 050402_073 verify that expressions cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_039 NegSem_050402_actual_parameters_039.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_073 NegSem_050402_actual_parameters_073.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_039 { +module NegSem_050402_actual_parameters_073 { type component GeneralComp { - timer t := 0.0; - } + } - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } + function f_ret() return integer { + return 4; } - - testcase TC_NegSem_050402_actual_parameters_039() runs on GeneralComp { - var template integer vm_msg := 2; - t.start; - a_test(vm_msg); // tested parameter passing + + testcase TC_NegSem_050402_actual_parameters_073(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_039()); + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_073(10 + f_ret() - v_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' + error: Reference to a template variable or template parameter was expected for an `out' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_040 negative test +:h3. NegSem_050402_actual_parameters_074 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_040 verify that template in parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_074 verify that template parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_040 NegSem_050402_actual_parameters_040.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_074 NegSem_050402_actual_parameters_074.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types.. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_040 { +module NegSem_050402_actual_parameters_074 { type component GeneralComp { - timer t := 0.0; - } + } - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } - } - - function f_caller(in template integer p_val) runs on GeneralComp { - a_test(p_val); // tested parameter passing - } + template integer m_msg := 1; - - testcase TC_NegSem_050402_actual_parameters_040() runs on GeneralComp { - t.start; - f_caller(3); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_074(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_040()); + execute(TC_NegSem_050402_actual_parameters_074(m_msg)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `@NegSem_050402_actual_parameters_074.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_041 negative test +:h3. NegSem_050402_actual_parameters_075 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_041 verify that template out parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_075 verify that literals cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_041 NegSem_050402_actual_parameters_041.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_075 NegSem_050402_actual_parameters_075.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_041 { +module NegSem_050402_actual_parameters_075 { type component GeneralComp { - timer t := 0.0; - } - - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } - } + } - function f_caller(out template integer p_val) runs on GeneralComp { - p_val := 4; // out parameter shall have a value before we can pass it to a function - a_test(p_val); // tested parameter passing + function f_test(inout template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } } - - testcase TC_NegSem_050402_actual_parameters_041() runs on GeneralComp { - var template integer v_val; - t.start; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_075() runs on GeneralComp { + f_test(1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_041()); + execute(TC_NegSem_050402_actual_parameters_075()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_042 negative test +:h3. NegSem_050402_actual_parameters_076 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_042 verify that template inout parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_076 verify that module parameters cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_042 NegSem_050402_actual_parameters_042.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_076 NegSem_050402_actual_parameters_076.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_042 { +module NegSem_050402_actual_parameters_076 { type component GeneralComp { - timer t := 0.0; - } - - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } - } - } + } - function f_caller(inout template integer p_val) runs on GeneralComp { - a_test(p_val); // tested parameter passing + modulepar integer PX_VAL := 2; + + function f_test(inout template integer p_val) { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } } - - testcase TC_NegSem_050402_actual_parameters_042() runs on GeneralComp { - var template integer v_val := 5; - t.start; - f_caller(v_val); // this parameter passing is not a subject of the test + testcase TC_NegSem_050402_actual_parameters_076() runs on GeneralComp { + f_test(PX_VAL); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_042()); + execute(TC_NegSem_050402_actual_parameters_076()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `inout' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_076.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_043 negative test +:h3. NegSem_050402_actual_parameters_077 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_043 verify that template variable element reference cannot be used as inout formal value parameters of altsteps > +<TC - 050402_077 verify that constants cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_043 NegSem_050402_actual_parameters_043.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_077 NegSem_050402_actual_parameters_077.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_043 { +module NegSem_050402_actual_parameters_077 { type component GeneralComp { - timer t := 0.0; - } - - type record R { - integer field1 - } + } + + const integer c_val := 3; - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 10) { setverdict(pass); } - else { setverdict(fail); } - } + function f_test(inout template integer p_val) { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_043() runs on GeneralComp { - var template R v_val := { field1 := 10 }; - t.start; - a_test(v_val.field1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_077() runs on GeneralComp { + f_test(c_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_043()); + execute(TC_NegSem_050402_actual_parameters_077()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_077.c_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_044 negative test +:h3. NegSem_050402_actual_parameters_078 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_044 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of altsteps > +<TC - 050402_078 verify that constants cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_044 NegSem_050402_actual_parameters_044.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_078 NegSem_050402_actual_parameters_078.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of altsteps + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_044 { +module NegSem_050402_actual_parameters_078 { type component GeneralComp { - timer t := 0.0; - } - - type record R { - integer field1 } - altstep a_test(inout integer p_val) runs on GeneralComp { - []t.timeout { - if (p_val == 11) { setverdict(pass); } - else { setverdict(fail); } - } + function f_ret() return integer { + return 5; } - function f_caller(in template R p_param) runs on GeneralComp { - a_test(p_param.field1); // tested parameter passing + function f_test(inout template integer p_val) { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_044() runs on GeneralComp { - t.start; - f_caller({field1 := 11 }); + testcase TC_NegSem_050402_actual_parameters_078() runs on GeneralComp { + f_test(f_ret()); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_044()); + execute(TC_NegSem_050402_actual_parameters_078()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_078.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_045 negative test +:h3. NegSem_050402_actual_parameters_079 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_045 verify that literals cannot be used as inout formal value parameters of test cases > +<TC - 050402_079 verify that expressions cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_045 NegSem_050402_actual_parameters_045.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_079 NegSem_050402_actual_parameters_079.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_045 { +module NegSem_050402_actual_parameters_079 { type component GeneralComp { - } - - testcase TC_NegSem_050402_actual_parameters_045(inout integer p_val) runs on GeneralComp { - if (p_val == 1) { setverdict(pass); } + } + + function f_ret() return integer { + return 4; + } + + function f_test(inout template integer p_val) { + if (match(9, p_val)) { setverdict(pass); } else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_079() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_045(1)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_079()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_046 negative test +:h3. NegSem_050402_actual_parameters_080 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_046 verify that module parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_080 verify that template parameters cannot be used as inout formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_046 NegSem_050402_actual_parameters_046.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_080 NegSem_050402_actual_parameters_080.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_046 { +module NegSem_050402_actual_parameters_080 { type component GeneralComp { - } - - modulepar integer PX_VAL := 2; - - testcase TC_NegSem_050402_actual_parameters_046(inout integer p_val) runs on GeneralComp { - if (p_val == 2) { setverdict(pass); } + } + + template integer m_msg := 1; + + function f_test(inout template integer p_val) { + if (match(1, p_val)) { setverdict(pass); } else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_080() runs on GeneralComp { + f_test(m_msg); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_046(PX_VAL)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_080()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of module parameter + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_080.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_047 negative test +:h3. NegSem_050402_actual_parameters_081 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_047 verify that constants cannot be used as inout formal value parameters of test cases > +<TC - 050402_081 verify that literals cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_047 NegSem_050402_actual_parameters_047.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_081 NegSem_050402_actual_parameters_081.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. - -module NegSem_050402_actual_parameters_047 { +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. +module NegSem_050402_actual_parameters_081 { type component GeneralComp { + timer t := 0.0; } - const integer c_val := 3; + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } - testcase TC_NegSem_050402_actual_parameters_047(inout integer p_val) runs on GeneralComp { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_081() runs on GeneralComp { + t.start; + a_test(1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_047(c_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_081()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of constant + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_048 negative test +:h3. NegSem_050402_actual_parameters_082 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_048 verify that function calls cannot be used as inout formal value parameters of test cases > +<TC - 050402_082 verify that module parameters cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_048 NegSem_050402_actual_parameters_048.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_082 NegSem_050402_actual_parameters_082.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. - -module NegSem_050402_actual_parameters_048 { +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. +module NegSem_050402_actual_parameters_082 { type component GeneralComp { - } + timer t := 0.0; + } + + modulepar integer PX_VAL := 2; - function f_ret() return integer { - return 5; + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(2, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } } - testcase TC_NegSem_050402_actual_parameters_048(inout integer p_val) runs on GeneralComp { - if (p_val == 5) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_082() runs on GeneralComp { + t.start; + a_test(PX_VAL); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_048(f_ret())); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_082()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of function `@NegSem_050402_actual_parameters_048.f_ret' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_082.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_049 negative test +:h3. NegSem_050402_actual_parameters_083 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_049 verify that expressions cannot be used as inout formal value parameters of test cases > +<TC - 050402_083 verify that module parameters cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_049 NegSem_050402_actual_parameters_049.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_083 NegSem_050402_actual_parameters_083.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_049 { +module NegSem_050402_actual_parameters_083 { type component GeneralComp { - } + timer t := 0.0; + } + + const integer c_val := 3; - function f_ret() return integer { - return 4; + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(3, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } } - - testcase TC_NegSem_050402_actual_parameters_049(inout integer p_val) runs on GeneralComp { - if (p_val == 9) { setverdict(pass); } - else { setverdict(fail); } + + testcase TC_NegSem_050402_actual_parameters_083() runs on GeneralComp { + t.start; + a_test(c_val); // tested parameter passing } control { - var integer v_val := 5; - execute(TC_NegSem_050402_actual_parameters_049(10 + f_ret() - v_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_083()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_083.c_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_050 negative test +:h3. NegSem_050402_actual_parameters_084 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_050 verify that template parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_084 verify that function calls cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_050 NegSem_050402_actual_parameters_050.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_084 NegSem_050402_actual_parameters_084.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_050 { +module NegSem_050402_actual_parameters_084 { type component GeneralComp { - } + timer t := 0.0; + } - template integer m_msg := 1; + function f_ret() return integer { + return 5; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } - testcase TC_NegSem_050402_actual_parameters_050(inout integer p_val) runs on GeneralComp { - if (p_val == 1) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_084() runs on GeneralComp { + t.start; + a_test(f_ret()); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_050(m_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_084()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template `@NegSem_050402_actual_parameters_050.m_msg' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_084.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_051 negative test +:h3. NegSem_050402_actual_parameters_085 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_051 verify that template variables cannot be used as inout formal value parameters of test cases > +<TC - 050402_085 verify that expressions cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_051 NegSem_050402_actual_parameters_051.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_085 NegSem_050402_actual_parameters_085.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variables cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. -module NegSem_050402_actual_parameters_051 { +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. + +module NegSem_050402_actual_parameters_085 { type component GeneralComp { - } + timer t := 0.0; + } - testcase TC_NegSem_050402_actual_parameters_051(inout integer p_val) runs on GeneralComp { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } + function f_ret() return integer { + return 4; + } + + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_085() runs on GeneralComp { + var integer v_val := 5; + t.start; + a_test(10 + f_ret() - v_val); // tested parameter passing } control { - var template integer vm_msg := 2; - execute(TC_NegSem_050402_actual_parameters_051(vm_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_085()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `vm_msg' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_052 negative test +:h3. NegSem_050402_actual_parameters_086 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_052 verify that template in parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_086 verify that template parameters cannot be used as inout formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_052 NegSem_050402_actual_parameters_052.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_086 NegSem_050402_actual_parameters_086.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template in parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value parameters, formal template parameters or references +// to elements of variables, template variables, formal value parameters or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_052 { +module NegSem_050402_actual_parameters_086 { type component GeneralComp { - } - - testcase TC_NegSem_050402_actual_parameters_052(inout integer p_val) runs on GeneralComp { - if (p_val == 3) { setverdict(pass); } - else { setverdict(fail); } - } + timer t := 0.0; + } + + template integer m_msg := 1; - function f_caller(in template integer p_val) { - execute(TC_NegSem_050402_actual_parameters_052(p_val)); // tested parameter passing + altstep a_test(inout template integer p_val) runs on GeneralComp { + []t.timeout { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } } + testcase TC_NegSem_050402_actual_parameters_086() runs on GeneralComp { + t.start; + a_test(m_msg); // tested parameter passing + } + control { - f_caller(3); // this parameter passing is not a subject of the test + execute(TC_NegSem_050402_actual_parameters_086()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_086.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_053 negative test +:h3. NegSem_050402_actual_parameters_087 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_053 verify that template in parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_087 verify that literals cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_053 NegSem_050402_actual_parameters_053.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_087 NegSem_050402_actual_parameters_087.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template out parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_053 { +module NegSem_050402_actual_parameters_087 { type component GeneralComp { - } - - testcase TC_NegSem_050402_actual_parameters_053(inout integer p_val) runs on GeneralComp { - if (p_val == 4) { setverdict(pass); } + } + + testcase TC_NegSem_050402_actual_parameters_087(inout template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } else { setverdict(fail); } } - - function f_caller(out template integer p_val) { - p_val := 4; // out parameter shall have a value before we can pass it to a function - execute(TC_NegSem_050402_actual_parameters_053(p_val)); // tested parameter passing - } control { - var template integer vm_val; - f_caller(vm_val); + execute(TC_NegSem_050402_actual_parameters_087(1)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `out' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_054 negative test +:h3. NegSem_050402_actual_parameters_088 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_054 verify that template inout parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_088 verify that module parameters cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_054 NegSem_050402_actual_parameters_054.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_088 NegSem_050402_actual_parameters_088.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template inout parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_054 { +module NegSem_050402_actual_parameters_088 { type component GeneralComp { - } - - testcase TC_NegSem_050402_actual_parameters_054(inout integer p_val) runs on GeneralComp { - if (p_val == 5) { setverdict(pass); } + } + + modulepar integer PX_VAL := 2; + + testcase TC_NegSem_050402_actual_parameters_088(inout template integer p_val) runs on GeneralComp { + if (match(2, p_val)) { setverdict(pass); } else { setverdict(fail); } } - function f_caller(inout template integer p_val) { - execute(TC_NegSem_050402_actual_parameters_054(p_val)); // tested parameter passing - } - control { - var template integer vm_val := 5; - f_caller(vm_val); + execute(TC_NegSem_050402_actual_parameters_088(PX_VAL)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of `inout' template parameter `p_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_088.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_055 negative test +:h3. NegSem_050402_actual_parameters_089 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_055 verify that template variable element reference cannot be used as inout formal value parameters of test cases > +<TC - 050402_089 verify that constants cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_055 NegSem_050402_actual_parameters_055.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_089 NegSem_050402_actual_parameters_089.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template variable element reference cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_055 { +module NegSem_050402_actual_parameters_089 { + + type component GeneralComp { + } - type component GeneralComp { - } - - type record R { - integer field1 - } + const integer c_val := 3; - testcase TC_NegSem_050402_actual_parameters_055(inout integer p_val) runs on GeneralComp { - if (p_val == 10) { setverdict(pass); } + testcase TC_NegSem_050402_actual_parameters_089(inout template integer p_val) runs on GeneralComp { + if (match(3, p_val)) { setverdict(pass); } else { setverdict(fail); } } control { - var template R v_val := { field1 := 10 }; - execute(TC_NegSem_050402_actual_parameters_055(v_val.field1)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_089(c_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template variable `v_val' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_089.c_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_056 negative test +:h3. NegSem_050402_actual_parameters_090 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_056 verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of test cases > +<TC - 050402_090 verify that function calls cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_056 NegSem_050402_actual_parameters_056.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_090 NegSem_050402_actual_parameters_090.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as inout formal value parameters of test cases + ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_056 { +module NegSem_050402_actual_parameters_090 { type component GeneralComp { } - type record R { - integer field1 - } + function f_ret() return integer { + return 5; + } - testcase TC_NegSem_050402_actual_parameters_056(inout integer p_val) runs on GeneralComp { - if (p_val == 11) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_090(inout template integer p_val) runs on GeneralComp { + if (match(5, p_val)) { setverdict(pass); } + else { setverdict(fail); } } - - function f_caller(in template R p_param) { - execute(TC_NegSem_050402_actual_parameters_056(p_param.field1)); // tested parameter passing - } control { - f_caller({field1 := 11 }); + execute(TC_NegSem_050402_actual_parameters_090(f_ret())); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a variable or value parameter was expected for an `inout' value parameter instead of template parameter `p_param' + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_090.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_057 negative test +:h3. NegSem_050402_actual_parameters_091 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_057 verify that literals cannot be used as out formal template parameters of functions > +<TC - 050402_091 verify that expressions cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_057 NegSem_050402_actual_parameters_057.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_091 NegSem_050402_actual_parameters_091.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_057 { +module NegSem_050402_actual_parameters_091 { type component GeneralComp { - } - - function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); } - - testcase TC_NegSem_050402_actual_parameters_057() runs on GeneralComp { - f_test(1); // tested parameter passing + + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_091(inout template integer p_val) runs on GeneralComp { + if (match(9, p_val)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_057()); + var integer v_val := 5; + execute(TC_NegSem_050402_actual_parameters_091(10 + f_ret() - v_val)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter + error: Reference to a template variable or template parameter was expected for an `inout' template parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_058 negative test +:h3. NegSem_050402_actual_parameters_092 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_058 verify that module parameters cannot be used as out formal template parameters of functions > +<TC - 050402_092 verify that template parameters cannot be used as inout formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_058 NegSem_050402_actual_parameters_058.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_092 NegSem_050402_actual_parameters_092.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to inout formal template parameters shall be variables, +// template variables, formal value or template parameters (of in, inout or out +// parameterization) of the current scope or references to elements of (template) variables +// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_058 { +module NegSem_050402_actual_parameters_092 { type component GeneralComp { - } - - modulepar integer PX_VAL := 2; + } - function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); - } + template integer m_msg := 1; - testcase TC_NegSem_050402_actual_parameters_058() runs on GeneralComp { - f_test(PX_VAL); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_092(inout template integer p_val) runs on GeneralComp { + if (match(1, p_val)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_058()); + execute(TC_NegSem_050402_actual_parameters_092(m_msg)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter + error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_092.m_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_059 negative test +:h3. NegSem_050402_actual_parameters_093 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_059 verify that constants cannot be used as out formal template parameters of functions > +<TC - 050402_093 verify that referencing errors are detected in actual parameters passed to in formal value parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_059 NegSem_050402_actual_parameters_059.ttcn > +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_050402_actual_parameters_093 NegSem_050402_actual_parameters_093.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal value parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. -module NegSem_050402_actual_parameters_059 { +module NegSem_050402_actual_parameters_093 { type component GeneralComp { - } - - const integer c_val := 3; + } - function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional } - testcase TC_NegSem_050402_actual_parameters_059() runs on GeneralComp { - f_test(c_val); // tested parameter passing + function f_test(in integer p_val) { + if (p_val == 2) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_093() runs on GeneralComp { + var R v_rec := { + field1 := 1, + field2 := omit + } + f_test(v_rec.field2.subfield1); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_059()); + execute(TC_NegSem_050402_actual_parameters_093()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant +Dynamic test case error: Using the value of an optional field containing omit <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_060 negative test +:h3. NegSem_050402_actual_parameters_094 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_060 verify that function calls cannot be used as out formal template parameters of functions > +<TC - 050402_094 verify that referencing errors are detected in actual parameters passed to in formal template parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_060 NegSem_050402_actual_parameters_060.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_094 NegSem_050402_actual_parameters_094.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal template parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When actual parameters that are passed to in formal value or template parameters +// contain a value or template reference, rules for using references on the right hand +// side of assignments apply. -module NegSem_050402_actual_parameters_060 { +module NegSem_050402_actual_parameters_094 { type component GeneralComp { - } + } - function f_ret() return integer { - return 5; + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional } - function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); + template R mw_rec := { + field1 := 1, + field2 := * } - testcase TC_NegSem_050402_actual_parameters_060() runs on GeneralComp { - f_test(f_ret()); // tested parameter passing + function f_test(in template integer p_val) { + if (match(255, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_094() runs on GeneralComp { + f_test(mw_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) } control { - execute(TC_NegSem_050402_actual_parameters_060()); + execute(TC_NegSem_050402_actual_parameters_094()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function +error: Reference to field `subfield1' of any or omit `@NegSem_050402_actual_parameters_094.mw_rec.field2' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_061 negative test +:h3. NegSem_050402_actual_parameters_095 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_061 verify that expressions cannot be used as out formal template parameters of functions > +<TC - 050402_095 verify that referencing errors are detected in actual parameters passed to in formal template parameters > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_050402_actual_parameters_061 NegSem_050402_actual_parameters_061.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_095 NegSem_050402_actual_parameters_095.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to out formal template parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. -module NegSem_050402_actual_parameters_061 { +module NegSem_050402_actual_parameters_095 { type component GeneralComp { - } + } - function f_ret() return integer { - return 4; + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional } - + function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); + p_val := 10; } - - testcase TC_NegSem_050402_actual_parameters_061() runs on GeneralComp { - var integer v_val := 5; - f_test(10 + f_ret() - v_val); // tested parameter passing + + testcase TC_NegSem_050402_actual_parameters_095() runs on GeneralComp { + var template R v_rec := { + field1 := 1, + field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) + }; + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } + } control { - execute(TC_NegSem_050402_actual_parameters_061()); + execute(TC_NegSem_050402_actual_parameters_095()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter +Dynamic test case error: Matching with an uninitialized/unsupported integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_062 negative test +:h3. NegSem_050402_actual_parameters_096 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_062 verify that template parameters cannot be used as out formal template parameters of functions > +<TC - 050402_096 verify that referencing rules are correctly applied to actual parameters of inout formal template parameters > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_050402_actual_parameters_062 NegSem_050402_actual_parameters_062.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_096 NegSem_050402_actual_parameters_096.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of functions + ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of inout formal template parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When actual parameters that are passed to inout and out formal value or template +// parameters contain a value or template reference, rules for using references on +// the left hand side of assignments apply. -module NegSem_050402_actual_parameters_062 { +module NegSem_050402_actual_parameters_096 { type component GeneralComp { } - template integer m_msg := 1; - - function f_test(out template integer p_val) { - p_val := ?; - setverdict(pass); + type record R { + integer field1, + record { + integer subfield1, + integer subfield2 + } field2 optional } - testcase TC_NegSem_050402_actual_parameters_062() runs on GeneralComp { - f_test(m_msg); // tested parameter passing + function f_test(inout template integer p_val) { + p_val := 10; + } + + testcase TC_NegSem_050402_actual_parameters_096() runs on GeneralComp { + var template R v_rec := { + field1 := 1, + field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) + }; + // expected error since v_rec.field2.subfield1 not defined since v_rec.field2 is not *, ? or omit (see expansion rules) + f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + log(v_rec); + if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_062()); + execute(TC_NegSem_050402_actual_parameters_096()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `@NegSem_050402_actual_parameters_062.m_msg' +Dynamic test case error: Matching with an uninitialized/unsupported integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_063 negative test +:h3. NegSem_050402_actual_parameters_097 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_063 verify that literals cannot be used as out formal template parameters of altsteps > +<TC - 050402_097 verify that string item references cannot be used as inout formal value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_063 NegSem_050402_actual_parameters_063.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_097 NegSem_050402_actual_parameters_097.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that string item references cannot be used as inout formal value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to inout formal value parameters shall be variables +// or formal value parameters (of in, inout or out parameterization) or references to +// elements of variables or formal value parameters of structured types. +// (see also the NOTE from 5.4.2) -module NegSem_050402_actual_parameters_063 { +module NegSem_050402_actual_parameters_097 { type component GeneralComp { - timer t := 0.0; } - - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + + function f_test(inout charstring p_val) { + if (p_val == "t") { setverdict(pass); } + else { setverdict(fail); } + p_val := "r"; } - testcase TC_NegSem_050402_actual_parameters_063() runs on GeneralComp { - t.start; - a_test(1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_097() runs on GeneralComp { + var charstring v_val := "test"; + f_test(v_val[0]); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_063()); + execute(TC_NegSem_050402_actual_parameters_097()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter +error: Reference to a string element of type `charstring' cannot be used in this context <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_064 negative test +:h3. NegSem_050402_actual_parameters_098 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_064 verify that module parameters cannot be used as out formal template parameters of altsteps > +<TC - 050402_098 verify that ordinary values cannot be passed to timer parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_064 NegSem_050402_actual_parameters_064.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_098 NegSem_050402_actual_parameters_098.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that ordinary values cannot be passed to timer parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to formal timer parameters shall be component +// timers, local timers or formal timer parameters of the current scope. -module NegSem_050402_actual_parameters_064 { +module NegSem_050402_actual_parameters_098 { type component GeneralComp { - timer t := 0.0; - } - - modulepar integer PX_VAL := 2; + } - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + function f_test(timer t_par) { + t_par.start; + if (t_par.running) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_064() runs on GeneralComp { - t.start; - a_test(PX_VAL); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_098() runs on GeneralComp { + f_test(5.0); // tested parameter passing: it should not be possible to pass a float value to a timer parameter } control { - execute(TC_NegSem_050402_actual_parameters_064()); + execute(TC_NegSem_050402_actual_parameters_098()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter +error: Reference to a timer or timer parameter was expected for a timer parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_065 negative test +:h3. NegSem_050402_actual_parameters_099 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_065 verify that constants cannot be used as out formal template parameters of altsteps > +<TC - 050402_099 verify that values cannot be passed to port parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_065 NegSem_050402_actual_parameters_065.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_099 NegSem_050402_actual_parameters_099.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that values cannot be passed to port parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to formal port parameters shall be component +// ports or formal port parameters of the current scope. -module NegSem_050402_actual_parameters_065 { +module NegSem_050402_actual_parameters_099 { + type port IntPort message { + inout integer; + } + type component GeneralComp { - timer t := 0.0; - } - - const integer c_val := 3; + port IntPort p; + } - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + function f_test(IntPort p_port) { + p_port.stop; } - testcase TC_NegSem_050402_actual_parameters_065() runs on GeneralComp { - t.start; - a_test(c_val); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_099() runs on GeneralComp { + var integer v_val := 5; + f_test(v_val); // tested parameter passing + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_065()); + execute(TC_NegSem_050402_actual_parameters_099()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant +error: Reference to a port or port parameter was expected for a port parameter instead of variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_066 negative test +:h3. NegSem_050402_actual_parameters_100 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_066 verify that function calls cannot be used as out formal template parameters of altsteps > +<TC - 050402_100 verify that list notation containing actual parameters in wrong order is not accepted > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_066 NegSem_050402_actual_parameters_066.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_100 NegSem_050402_actual_parameters_100.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that list notation containing actual parameters in wrong order is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When using list notation, the order of elements in the actual parameter list shall +// be the same as their order in the corresponding formal parameter list. -module NegSem_050402_actual_parameters_066 { +module NegSem_050402_actual_parameters_100 { type component GeneralComp { - timer t := 0.0; - } - - function f_ret() return integer { - return 5; - } - - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + } + + function f_test (integer p_val1, charstring p_val2) { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_066() runs on GeneralComp { - t.start; - a_test(f_ret()); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_100() runs on GeneralComp { + f_test("test", 1); } control { - execute(TC_NegSem_050402_actual_parameters_066()); + execute(TC_NegSem_050402_actual_parameters_100()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function +error: integer value was expected +<END_RESULT> +<RESULT COUNT 1> +error: character string value was expected <END_RESULT> - <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_067 negative test +:h3. NegSem_050402_actual_parameters_101 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_067 verify that expressions cannot be used as out formal template parameters of altsteps > +<TC - 050402_101 verify that list notation containing less actual parameters than required is not accepted > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_067 NegSem_050402_actual_parameters_067.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_101 NegSem_050402_actual_parameters_101.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of altsteps - ** @verdict pass reject - ***************************************************/ - -// The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. - -module NegSem_050402_actual_parameters_067 { - - type component GeneralComp { - timer t := 0.0; - } - - function f_ret() return integer { - return 4; - } - - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + ** @purpose 1:5.4.2, verify that list notation containing less actual parameters than required is not accepted + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For each formal parameter without a default there shall be an actual parameter. + +module NegSem_050402_actual_parameters_101 { + + type component GeneralComp { + } + + function f_test (integer p_val1, charstring p_val2) { + if (p_val1 == 1) { setverdict(pass); } + else { setverdict(fail); } } - - testcase TC_NegSem_050402_actual_parameters_067() runs on GeneralComp { - var integer v_val := 5; - t.start; - a_test(10 + f_ret() - v_val); // tested parameter passing + + testcase TC_NegSem_050402_actual_parameters_101() runs on GeneralComp { + f_test(1); } control { - execute(TC_NegSem_050402_actual_parameters_067()); + execute(TC_NegSem_050402_actual_parameters_101()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter +error: Too few parameters: 2 was expected instead of 1 <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_068 negative test +:h3. NegSem_050402_actual_parameters_102 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_068 verify that template parameters cannot be used as out formal template parameters of altsteps > +<TC - 050402_102 verify that parameter without default value cannot be skipped > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_068 NegSem_050402_actual_parameters_068.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_102 NegSem_050402_actual_parameters_102.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that parameter without default value cannot be skipped ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// For each formal parameter without a default there shall be an actual parameter. -module NegSem_050402_actual_parameters_068 { +module NegSem_050402_actual_parameters_102 { type component GeneralComp { - timer t := 0.0; - } + } - template integer m_msg := 1; - - altstep a_test(out template integer p_val) runs on GeneralComp { - []t.timeout { - p_val := ?; - setverdict(pass); - } + function f_test (integer p_val1, charstring p_val2) { + if (p_val1 == 1) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_068() runs on GeneralComp { - t.start; - a_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_102() runs on GeneralComp { + f_test(1, -); } control { - execute(TC_NegSem_050402_actual_parameters_068()); + execute(TC_NegSem_050402_actual_parameters_102()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template +error: Not used symbol \(`-'\) cannot be used for parameter that does not have default value <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_069 negative test +:h3. NegSem_050402_actual_parameters_103 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_069 verify that literals cannot be used as out formal template parameters of test cases > +<TC - 050402_103 verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_069 NegSem_050402_actual_parameters_069.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_103 NegSem_050402_actual_parameters_103.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Either list notation or assignment notation shall be used in a single parameter +// list. They shall not be mixed. -module NegSem_050402_actual_parameters_069 { +module NegSem_050402_actual_parameters_103 { type component GeneralComp { - } + } - testcase TC_NegSem_050402_actual_parameters_069(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + function f_test (integer p_val1, charstring p_val2) { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_103() runs on GeneralComp { + f_test(p_val1 := 1, "test"); } control { - execute(TC_NegSem_050402_actual_parameters_069(1)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_103()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter +error: at or before token `"': syntax error, unexpected Cstring <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_070 negative test +:h3. NegSem_050402_actual_parameters_104 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_070 verify that module parameters cannot be used as out formal template parameters of test cases > +<TC - 050402_104 verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_070 NegSem_050402_actual_parameters_070.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_104 NegSem_050402_actual_parameters_104.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Either list notation or assignment notation shall be used in a single parameter +// list. They shall not be mixed. -module NegSem_050402_actual_parameters_070 { +module NegSem_050402_actual_parameters_104 { type component GeneralComp { - } + } - modulepar integer PX_VAL := 2; + function f_test (integer p_val1, charstring p_val2 := "test") { + if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + else { setverdict(fail); } + } - testcase TC_NegSem_050402_actual_parameters_070(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + testcase TC_NegSem_050402_actual_parameters_104() runs on GeneralComp { + f_test(p_val1 := 1, -); } control { - execute(TC_NegSem_050402_actual_parameters_070(PX_VAL)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_104()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of module parameter `@NegSem_050402_actual_parameters_070.PX_VAL' +error: at or before token `-': syntax error, unexpected '-' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_071 negative test +:h3. NegSem_050402_actual_parameters_105 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_071 verify that constants cannot be used as out formal template parameters of test cases > +<TC - 050402_105 verify that parameters cannot be assigned more than once in assignment notation > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_071 NegSem_050402_actual_parameters_071.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_105 NegSem_050402_actual_parameters_105.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that parameters cannot be assigned more than once in assignment notation ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// When using assignment notation, each formal parameter shall be assigned an actual +// parameter at most once. -module NegSem_050402_actual_parameters_071 { +module NegSem_050402_actual_parameters_105 { type component GeneralComp { - } + } - const integer c_val := 3; + function f_test (integer p_val1, charstring p_val2) { + if (match(p_val1 == 1 and p_val2 == "test") { setverdict(pass); } + else { setverdict(fail); } + } - testcase TC_NegSem_050402_actual_parameters_071(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + testcase TC_NegSem_050402_actual_parameters_105() runs on GeneralComp { + f_test(p_val1 := 1, p_val2 := "test", p_val1 := 1); } control { - execute(TC_NegSem_050402_actual_parameters_071(c_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_105()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of constant +error: at or before token `\)': syntax error, unexpected '\)' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_072 negative test +:h3. NegSem_050402_actual_parameters_106 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_072 verify that function calls cannot be used as out formal template parameters of test cases > +<TC - 050402_106 verify that assignment notation that doesn't contain all parameters is not accepted > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_072 NegSem_050402_actual_parameters_072.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_106 NegSem_050402_actual_parameters_106.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that assignment notation that doesn't contain all parameters is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// For each formal parameter without default value, there shall be an actual parameter. -module NegSem_050402_actual_parameters_072 { +module NegSem_050402_actual_parameters_106 { type component GeneralComp { - } - - function f_ret() return integer { - return 5; + } + + function f_test (integer p_val1, charstring p_val2, integer p_val3) { + if (match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_072(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + testcase TC_NegSem_050402_actual_parameters_106() runs on GeneralComp { + f_test(p_val2 := "test", p_val3 := 3); } control { - execute(TC_NegSem_050402_actual_parameters_072(f_ret())); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_106()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of function `@NegSem_050402_actual_parameters_072.f_ret' +error: Parameter not specified <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_073 negative test +:h3. NegSem_050402_actual_parameters_107 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_073 verify that expressions cannot be used as out formal template parameters of test cases > +<TC - 050402_107 verify that incompatible values cannot be passed to in formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_073 NegSem_050402_actual_parameters_073.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_107 NegSem_050402_actual_parameters_107.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to in formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. -module NegSem_050402_actual_parameters_073 { +module NegSem_050402_actual_parameters_107 { type component GeneralComp { - } + } - function f_ret() return integer { - return 4; + type record R1 { + integer field1, + integer field2 } - testcase TC_NegSem_050402_actual_parameters_073(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + type record R2 { + integer elem1, + integer elem2 optional + } + + function f_test (R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_107() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); } control { - var integer v_val := 5; - execute(TC_NegSem_050402_actual_parameters_073(10 + f_ret() - v_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_107()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter +error: Type mismatch: `@NegSem_050402_actual_parameters_107.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_107.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_074 negative test +:h3. NegSem_050402_actual_parameters_108 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_074 verify that template parameters cannot be used as out formal template parameters of test cases > +<TC - 050402_108 verify that incompatible values cannot be passed from out formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_074 NegSem_050402_actual_parameters_074.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_108 NegSem_050402_actual_parameters_108.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of test cases + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed from out formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// The type of each actual parameter shall be compatible with the type of each +// corresponding formal parameter. -module NegSem_050402_actual_parameters_074 { +module NegSem_050402_actual_parameters_108 { type component GeneralComp { } - template integer m_msg := 1; + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 + } - testcase TC_NegSem_050402_actual_parameters_074(out template integer p_val) runs on GeneralComp { - p_val := ?; - setverdict(pass); + function f_test (out R1 p_val) { + p_val.field1 := 1; + p_val.field2 := 2; + } + + testcase TC_NegSem_050402_actual_parameters_108() runs on GeneralComp { + var R2 v_rec; + f_test(v_rec); + if (v_rec == { elem1 := 1, elem2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_074(m_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_108()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of template `@NegSem_050402_actual_parameters_074.m_msg' +error: Type mismatch: `@NegSem_050402_actual_parameters_108.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_108.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_075 negative test +:h3. NegSem_050402_actual_parameters_109 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_075 verify that literals cannot be used as inout formal template parameters of functions > +<TC - 050402_109 verify that incompatible values cannot be passed to inout formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_075 NegSem_050402_actual_parameters_075.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_109 NegSem_050402_actual_parameters_109.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to inout formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Strong typing is required for parameters passed by reference. -module NegSem_050402_actual_parameters_075 { +module NegSem_050402_actual_parameters_109 { type component GeneralComp { - } + } + + type record R1 { + integer field1, + integer field2 optional + } + + type record R2 { + integer elem1, + integer elem2 + } - function f_test(inout template integer p_val) { - if (match(1, p_val)) { setverdict(pass); } + function f_test (inout R1 p_val) { + if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_075() runs on GeneralComp { - f_test(1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_109() runs on GeneralComp { + var R2 v_rec := { 1, 2 }; + f_test(v_rec); } control { - execute(TC_NegSem_050402_actual_parameters_075()); + execute(TC_NegSem_050402_actual_parameters_109()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: Type mismatch: `@NegSem_050402_actual_parameters_109.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_109.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_076 negative test +:h3. NegSem_050402_actual_parameters_111 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_076 verify that module parameters cannot be used as inout formal template parameters of functions > +<TC - 050402_111 verify that incompatible templates cannot be passed to template parameters with omit restriction > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_076 NegSem_050402_actual_parameters_076.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_111 NegSem_050402_actual_parameters_111.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that incompatible templates cannot be passed to template parameters with omit restriction ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. -module NegSem_050402_actual_parameters_076 { +module NegSem_050402_actual_parameters_111 { type component GeneralComp { - } + } - modulepar integer PX_VAL := 2; - - function f_test(inout template integer p_val) { - if (match(2, p_val)) { setverdict(pass); } + function f_test (omit integer p_val) { + if (match(1, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_076() runs on GeneralComp { - f_test(PX_VAL); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_111() runs on GeneralComp { + f_test((0..10)); } control { - execute(TC_NegSem_050402_actual_parameters_076()); + execute(TC_NegSem_050402_actual_parameters_111()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_076.PX_VAL' +error: Restriction on template formal parameter does not allow usage of value range match <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_077 negative test +:h3. NegSem_050402_actual_parameters_112 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_077 verify that constants cannot be used as inout formal template parameters of functions > +<TC - 050402_112 verify that compatible templates can be passed to template parameters with value restriction > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_077 NegSem_050402_actual_parameters_077.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_112 NegSem_050402_actual_parameters_112.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with value restriction ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. -module NegSem_050402_actual_parameters_077 { +module NegSem_050402_actual_parameters_112 { type component GeneralComp { - } + } - const integer c_val := 3; - - function f_test(inout template integer p_val) { - if (match(3, p_val)) { setverdict(pass); } + function f_test (template(value) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_077() runs on GeneralComp { - f_test(c_val); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_112() runs on GeneralComp { + f_test((1, 2, 3)); } control { - execute(TC_NegSem_050402_actual_parameters_077()); + execute(TC_NegSem_050402_actual_parameters_112()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_077.c_val' +error: Restriction on template formal parameter does not allow usage of value list match <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_078 negative test +:h3. NegSem_050402_actual_parameters_113 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_078 verify that constants cannot be used as inout formal template parameters of functions > +<TC - 050402_113 verify that compatible templates can be passed to template parameters with present restriction > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_078 NegSem_050402_actual_parameters_078.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_113 NegSem_050402_actual_parameters_113.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with present restriction ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters passed to restricted formal template parameters shall obey +// the restrictions given in clause 15.8. -module NegSem_050402_actual_parameters_078 { +module NegSem_050402_actual_parameters_113 { type component GeneralComp { - } - - function f_ret() return integer { - return 5; - } - - function f_test(inout template integer p_val) { - if (match(5, p_val)) { setverdict(pass); } + } + + function f_test (template(present) integer p_val) { + if (match(1, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_078() runs on GeneralComp { - f_test(f_ret()); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_113() runs on GeneralComp { + f_test(*); } control { - execute(TC_NegSem_050402_actual_parameters_078()); + execute(TC_NegSem_050402_actual_parameters_113()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_078.f_ret' +error: Restriction on template formal parameter does not allow usage of any or omit <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_079 negative test +:h3. NegSem_050402_actual_parameters_114 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_079 verify that expressions cannot be used as inout formal template parameters of functions > +<TC - 050402_114 verify that compatible templates can be passed to template parameters with present restriction > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_079 NegSem_050402_actual_parameters_079.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_114 NegSem_050402_actual_parameters_114.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that parametrized entities used as actual parameter cannot be passed without parameter list ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// All parameterized entities specified as an actual parameter shall have their +// own parameters resolved in the top-level actual parameter list. -module NegSem_050402_actual_parameters_079 { +module NegSem_050402_actual_parameters_114 { type component GeneralComp { - } + } - function f_ret() return integer { - return 4; + type record R { + integer field1, + integer field2 optional } - - function f_test(inout template integer p_val) { - if (match(9, p_val)) { setverdict(pass); } + + template R mw_rec(template integer p_field2) := { + field1 := 1, + field2 := p_field2 + } + + function f_test (template R p_match) { + if (match({1, omit}, p_match)) { setverdict(pass); } else { setverdict(fail); } } - - testcase TC_NegSem_050402_actual_parameters_079() runs on GeneralComp { - var integer v_val := 5; - f_test(10 + f_ret() - v_val); // tested parameter passing + + testcase TC_NegSem_050402_actual_parameters_114() runs on GeneralComp { + f_test(mw_rec); } control { - execute(TC_NegSem_050402_actual_parameters_079()); + execute(TC_NegSem_050402_actual_parameters_114()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: Reference to parameterized definition `mw_rec' without actual parameter list <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_080 negative test +:h3. NegSem_050402_actual_parameters_115 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_080 verify that template parameters cannot be used as inout formal template parameters of functions > +<TC - 050402_115 verify that error is generated when no actual parameter list is used for functions with no parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_080 NegSem_050402_actual_parameters_080.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_115 NegSem_050402_actual_parameters_115.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of functions + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for functions with no parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. -module NegSem_050402_actual_parameters_080 { +module NegSem_050402_actual_parameters_115 { type component GeneralComp { } - - template integer m_msg := 1; - - function f_test(inout template integer p_val) { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } + + function f_test () return integer { + setverdict(pass); + return 1; } - testcase TC_NegSem_050402_actual_parameters_080() runs on GeneralComp { - f_test(m_msg); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_115() runs on GeneralComp { + log(f_test); } control { - execute(TC_NegSem_050402_actual_parameters_080()); + execute(TC_NegSem_050402_actual_parameters_115()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_080.m_msg' +error: Reference to parameterized definition `f_test' without actual parameter list <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_081 negative test +:h3. NegSem_050402_actual_parameters_116 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_081 verify that literals cannot be used as inout formal template parameters of altsteps > +<TC - 050402_116 verify that error is generated when no actual parameter list is used for test cases with no parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_081 NegSem_050402_actual_parameters_081.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_116 NegSem_050402_actual_parameters_116.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for test cases with no parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_081 { +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_116 { type component GeneralComp { - timer t := 0.0; - } - - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } - } + } - testcase TC_NegSem_050402_actual_parameters_081() runs on GeneralComp { - t.start; - a_test(1); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_116() runs on GeneralComp { + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_081()); + execute(TC_NegSem_050402_actual_parameters_116); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: at or before token `\)': syntax error, unexpected '\)', expecting '\(' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_082 negative test +:h3. NegSem_050402_actual_parameters_117 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_082 verify that module parameters cannot be used as inout formal template parameters of altsteps > +<TC - 050402_117 verify that error is generated when no actual parameter list is used for altsteps with no parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_082 NegSem_050402_actual_parameters_082.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_117 NegSem_050402_actual_parameters_117.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for altsteps with no parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. -module NegSem_050402_actual_parameters_082 { +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. + +module NegSem_050402_actual_parameters_117 { type component GeneralComp { - timer t := 0.0; - } + } - modulepar integer PX_VAL := 2; - - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(2, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } + altstep a_test () { + [] any timer.timeout { setverdict(pass); } } - testcase TC_NegSem_050402_actual_parameters_082() runs on GeneralComp { - t.start; - a_test(PX_VAL); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_117() runs on GeneralComp { + timer t_instant := 0.0; + t_instant.start; + alt { + [] a_test { + setverdict(pass); + } + } } control { - execute(TC_NegSem_050402_actual_parameters_082()); + execute(TC_NegSem_050402_actual_parameters_117()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_082.PX_VAL' +error: at or before token `\{': syntax error, unexpected '\{' +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_083 negative test +:h3. NegSem_050402_actual_parameters_118 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_083 verify that module parameters cannot be used as inout formal template parameters of altsteps > +<TC - 050402_118 verify that error is generated when empty actual parameter list is used for templates with no parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_083 NegSem_050402_actual_parameters_083.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_118 NegSem_050402_actual_parameters_118.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that error is generated when empty actual parameter list is used for templates with no parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// If the formal parameter list of TTCN-3 objects function, testcase, signature, +// altstep or external function is empty, then the empty parentheses shall be +// included both in the declaration and in the invocation of that object. In all +// other cases the empty parentheses shall be omitted. -module NegSem_050402_actual_parameters_083 { +module NegSem_050402_actual_parameters_118 { type component GeneralComp { - timer t := 0.0; - } + } - const integer c_val := 3; - - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(3, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } - } + template integer mw_allInt := ?; - testcase TC_NegSem_050402_actual_parameters_083() runs on GeneralComp { - t.start; - a_test(c_val); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_118() runs on GeneralComp { + if (match(1, mw_allInt())) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_083()); + execute(TC_NegSem_050402_actual_parameters_118()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_083.c_val' +error: The referenced template `@NegSem_050402_actual_parameters_118.mw_allInt' cannot have actual parameters <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_084 negative test +:h3. NegSem_050402_actual_parameters_146 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_084 verify that function calls cannot be used as inout formal template parameters of altsteps > +<TC - 050402_146 verify that literal cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_084 NegSem_050402_actual_parameters_084.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_146 NegSem_050402_actual_parameters_146.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_084 { +module NegSem_050402_actual_parameters_146 { type component GeneralComp { - timer t := 0.0; } - - function f_ret() return integer { - return 5; + + function f_test(out integer p_val) { + p_val := 9 } - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(5, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } - } - - testcase TC_NegSem_050402_actual_parameters_084() runs on GeneralComp { - t.start; - a_test(f_ret()); // tested parameter passing + testcase TC_NegSem_050402_actual_parameters_146() runs on GeneralComp { + f_test(1); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_084()); + execute(TC_NegSem_050402_actual_parameters_146()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_084.f_ret' +error: Reference to a variable or value parameter was expected for an `out' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_085 negative test +:h3. NegSem_050402_actual_parameters_147 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_085 verify that expressions cannot be used as inout formal template parameters of altsteps > +<TC - 050402_147 verify that expression cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_085 NegSem_050402_actual_parameters_085.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_147 NegSem_050402_actual_parameters_147.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_085 { +module NegSem_050402_actual_parameters_147 { type component GeneralComp { - timer t := 0.0; } - + function f_ret() return integer { return 4; } - - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(9, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } + + function f_test(out integer p_val) { + p_val := 9 } - testcase TC_NegSem_050402_actual_parameters_085() runs on GeneralComp { + testcase TC_NegSem_050402_actual_parameters_147() runs on GeneralComp { var integer v_val := 5; - t.start; - a_test(10 + f_ret() - v_val); // tested parameter passing + f_test(10 + f_ret() - v_val); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_085()); + execute(TC_NegSem_050402_actual_parameters_147()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: Reference to a variable or value parameter was expected for an `out' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_086 negative test +:h3. NegSem_050402_actual_parameters_148 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_086 verify that template parameters cannot be used as inout formal template parameters of altsteps > +<TC - 050402_148 verify that function calls cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_086 NegSem_050402_actual_parameters_086.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_148 NegSem_050402_actual_parameters_148.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of altsteps + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template -// parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_086 { +module NegSem_050402_actual_parameters_148 { type component GeneralComp { - timer t := 0.0; - } - - template integer m_msg := 1; - - altstep a_test(inout template integer p_val) runs on GeneralComp { - []t.timeout { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } + } + + function f_ret() return integer { + return 4; } - testcase TC_NegSem_050402_actual_parameters_086() runs on GeneralComp { - t.start; - a_test(m_msg); // tested parameter passing + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_148() runs on GeneralComp { + f_test(f_ret()); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_086()); + execute(TC_NegSem_050402_actual_parameters_148()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_086.m_msg' +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of function `@NegSem_050402_actual_parameters_148.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_087 negative test +:h3. NegSem_050402_actual_parameters_149 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_087 verify that literals cannot be used as inout formal template parameters of test cases > +<TC - 050402_149 verify that module parameters cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_087 NegSem_050402_actual_parameters_087.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_149 NegSem_050402_actual_parameters_149.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that literals cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_087 { +module NegSem_050402_actual_parameters_149 { type component GeneralComp { - } + } + + modulepar integer PX_VAL := 2; - testcase TC_NegSem_050402_actual_parameters_087(inout template integer p_val) runs on GeneralComp { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_149() runs on GeneralComp { + f_test(PX_VAL); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_087(1)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_149()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of module parameter `@NegSem_050402_actual_parameters_149.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_088 negative test +:h3. NegSem_050402_actual_parameters_150 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_088 verify that module parameters cannot be used as inout formal template parameters of test cases > +<TC - 050402_150 verify that templates cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_088 NegSem_050402_actual_parameters_088.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_150 NegSem_050402_actual_parameters_150.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that module parameters cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_088 { +module NegSem_050402_actual_parameters_150 { type component GeneralComp { - } - - modulepar integer PX_VAL := 2; + } + + template integer mw_msg := ?; - testcase TC_NegSem_050402_actual_parameters_088(inout template integer p_val) runs on GeneralComp { - if (match(2, p_val)) { setverdict(pass); } - else { setverdict(fail); } + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_150() runs on GeneralComp { + f_test(mw_msg); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_088(PX_VAL)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_150()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of module parameter `@NegSem_050402_actual_parameters_088.PX_VAL' + error: Reference to a variable or value parameter was expected for an `out' value parameter instead of template `@NegSem_050402_actual_parameters_150.mw_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_089 negative test +:h3. NegSem_050402_actual_parameters_151 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_089 verify that constants cannot be used as inout formal template parameters of test cases > +<TC - 050402_151 verify that constants cannot be used as actual out value parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_089 NegSem_050402_actual_parameters_089.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_151 NegSem_050402_actual_parameters_151.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that constants cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_089 { +module NegSem_050402_actual_parameters_151 { type component GeneralComp { - } - - const integer c_val := 3; - - testcase TC_NegSem_050402_actual_parameters_089(inout template integer p_val) runs on GeneralComp { - if (match(3, p_val)) { setverdict(pass); } - else { setverdict(fail); } + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_151() runs on GeneralComp { + const integer c_val := 3; + f_test(c_val); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_089(c_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_151()); } } <END_MODULE> + <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of constant `@NegSem_050402_actual_parameters_089.c_val' + error: Reference to a variable or value parameter was expected for an `out' value parameter instead of constant `c_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_090 negative test +:h3. NegSem_050402_actual_parameters_152 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_090 verify that function calls cannot be used as inout formal template parameters of test cases > +<TC - 050402_152 verify that literal cannot be used as actual out value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_090 NegSem_050402_actual_parameters_090.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_152 NegSem_050402_actual_parameters_152.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that function calls cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_090 { +module NegSem_050402_actual_parameters_152 { type component GeneralComp { } - - function f_ret() return integer { - return 5; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } } - - testcase TC_NegSem_050402_actual_parameters_090(inout template integer p_val) runs on GeneralComp { - if (match(5, p_val)) { setverdict(pass); } - else { setverdict(fail); } + + testcase TC_NegSem_050402_actual_parameters_152() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_090(f_ret())); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_152()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of function `@NegSem_050402_actual_parameters_090.f_ret' +error: Reference to a variable or value parameter was expected for an `out' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_091 negative test +:h3. NegSem_050402_actual_parameters_153 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_091 verify that expressions cannot be used as inout formal template parameters of test cases > +<TC - 050402_153 verify that expression cannot be used as actual out value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_091 NegSem_050402_actual_parameters_091.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_153 NegSem_050402_actual_parameters_153.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that expressions cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_091 { +module NegSem_050402_actual_parameters_153 { type component GeneralComp { } - - function f_ret() return integer { - return 4; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_test(out integer p_val) { + p_val := 9 } - testcase TC_NegSem_050402_actual_parameters_091(inout template integer p_val) runs on GeneralComp { - if (match(9, p_val)) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_153() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(10 + f_ret() - v_val); + setverdict(pass); } control { - var integer v_val := 5; - execute(TC_NegSem_050402_actual_parameters_091(10 + f_ret() - v_val)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_153()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter +error: Reference to a variable or value parameter was expected for an `out' value parameter <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_092 negative test +:h3. NegSem_050402_actual_parameters_154 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_092 verify that template parameters cannot be used as inout formal template parameters of test cases > +<TC - 050402_154 verify that function calls cannot be used as actual out value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_092 NegSem_050402_actual_parameters_092.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_154 NegSem_050402_actual_parameters_154.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that template parameters cannot be used as inout formal template parameters of test cases + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal template parameters shall be variables, -// template variables, formal value or template parameters (of in, inout or out -// parameterization) of the current scope or references to elements of (template) variables -// or formal (template) parameters of structured types. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_092 { +module NegSem_050402_actual_parameters_154 { type component GeneralComp { - } - - template integer m_msg := 1; + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } - testcase TC_NegSem_050402_actual_parameters_092(inout template integer p_val) runs on GeneralComp { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_154() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(f_ret()); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_092(m_msg)); // tested parameter passing + execute(TC_NegSem_050402_actual_parameters_154()); } } <END_MODULE> <RESULT COUNT 1> - error: Reference to a template variable or template parameter was expected for an `inout' template parameter instead of template `@NegSem_050402_actual_parameters_092.m_msg' +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of function `@NegSem_050402_actual_parameters_154.f_ret' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_093 negative test +:h3. NegSem_050402_actual_parameters_155 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_093 verify that referencing errors are detected in actual parameters passed to in formal value parameters > +<TC - 050402_155 verify that module parameters cannot be used as actual out value parameters of altsteps > <COMPILE> -<EXECUTE_PARALLEL> - -<MODULE TTCN NegSem_050402_actual_parameters_093 NegSem_050402_actual_parameters_093.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_155 NegSem_050402_actual_parameters_155.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal value parameters + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When actual parameters that are passed to in formal value or template parameters -// contain a value or template reference, rules for using references on the right hand -// side of assignments apply. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_093 { +module NegSem_050402_actual_parameters_155 { type component GeneralComp { - } - - type record R { - integer field1, - record { - integer subfield1, - integer subfield2 - } field2 optional - } - - function f_test(in integer p_val) { - if (p_val == 2) { setverdict(pass); } - else { setverdict(fail); } } + + modulepar integer PX_VAL := 2; - testcase TC_NegSem_050402_actual_parameters_093() runs on GeneralComp { - var R v_rec := { - field1 := 1, - field2 := omit + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 } - f_test(v_rec.field2.subfield1); // tested parameter passing + } + + testcase TC_NegSem_050402_actual_parameters_155() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(PX_VAL); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_093()); + execute(TC_NegSem_050402_actual_parameters_155()); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: Using the value of an optional field containing omit +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of module parameter `@NegSem_050402_actual_parameters_155.PX_VAL' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_094 negative test +:h3. NegSem_050402_actual_parameters_156 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_094 verify that referencing errors are detected in actual parameters passed to in formal template parameters > +<TC - 050402_156 verify that templates cannot be used as actual out value parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_094 NegSem_050402_actual_parameters_094.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_156 NegSem_050402_actual_parameters_156.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to in formal template parameters + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When actual parameters that are passed to in formal value or template parameters -// contain a value or template reference, rules for using references on the right hand -// side of assignments apply. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_094 { +module NegSem_050402_actual_parameters_156 { type component GeneralComp { - } - - type record R { - integer field1, - record { - integer subfield1, - integer subfield2 - } field2 optional - } - - template R mw_rec := { - field1 := 1, - field2 := * } + + template integer mw_msg := ?; - function f_test(in template integer p_val) { - if (match(255, p_val)) { setverdict(pass); } - else { setverdict(fail); } + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } } - - testcase TC_NegSem_050402_actual_parameters_094() runs on GeneralComp { - f_test(mw_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) + + testcase TC_NegSem_050402_actual_parameters_156() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(mw_msg); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_094()); + execute(TC_NegSem_050402_actual_parameters_156()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to field `subfield1' of any or omit `@NegSem_050402_actual_parameters_094.mw_rec.field2' +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of template `@NegSem_050402_actual_parameters_156.mw_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_095 negative test +:h3. NegSem_050402_actual_parameters_157 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_095 verify that referencing errors are detected in actual parameters passed to in formal template parameters > +<TC - 050402_157 verify that templates cannot be used as actual out value parameters of altsteps > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_050402_actual_parameters_095 NegSem_050402_actual_parameters_095.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_157 NegSem_050402_actual_parameters_157.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that referencing errors are detected in actual parameters passed to out formal template parameters + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When actual parameters that are passed to inout and out formal value or template -// parameters contain a value or template reference, rules for using references on -// the left hand side of assignments apply. +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. -module NegSem_050402_actual_parameters_095 { +module NegSem_050402_actual_parameters_157 { type component GeneralComp { - } - - type record R { - integer field1, - record { - integer subfield1, - integer subfield2 - } field2 optional } - function f_test(out template integer p_val) { - p_val := 10; + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } } - - testcase TC_NegSem_050402_actual_parameters_095() runs on GeneralComp { - var template R v_rec := { - field1 := 1, - field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) - }; - f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) - if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } - else { setverdict(fail); } - + + testcase TC_NegSem_050402_actual_parameters_157() runs on GeneralComp { + const integer c_val := 3; + timer t_tmr := 0.1; + t_tmr.start; + a_test(c_val); + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_095()); + execute(TC_NegSem_050402_actual_parameters_157()); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: Matching with an uninitialized/unsupported integer template. +error: Reference to a variable or value parameter was expected for an `out' value parameter instead of constant `c_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_096 negative test +:h3. NegSem_050402_actual_parameters_158 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_096 verify that referencing rules are correctly applied to actual parameters of inout formal template parameters > +<TC - 050402_158 verify that function cannot have more actual than formal parameters > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_050402_actual_parameters_096 NegSem_050402_actual_parameters_096.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_158 NegSem_050402_actual_parameters_158.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that referencing rules are correctly applied to actual parameters of inout formal template parameters + ** @purpose 1:5.4.2, verify that function cannot have more actual than formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When actual parameters that are passed to inout and out formal value or template -// parameters contain a value or template reference, rules for using references on -// the left hand side of assignments apply. +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. -module NegSem_050402_actual_parameters_096 { +module NegSem_050402_actual_parameters_158 { type component GeneralComp { - } - - type record R { - integer field1, - record { - integer subfield1, - integer subfield2 - } field2 optional - } + } - function f_test(inout template integer p_val) { - p_val := 10; + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_096() runs on GeneralComp { - var template R v_rec := { - field1 := 1, - field2 := ({ subfield1 := 0, subfield2 := 1}, { subfield1 := 2, subfield2 := 3 }) - }; - // expected error since v_rec.field2.subfield1 not defined since v_rec.field2 is not *, ? or omit (see expansion rules) - f_test(v_rec.field2.subfield1); // tested parameter passing (using referencing rules specified at 15.6.2) - log(v_rec); - if (valueof(v_rec.field2.subfield1) == 10 and match(0, v_rec.field2.subfield2)) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_158() runs on GeneralComp { + f_test(1, 2); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_096()); + execute(TC_NegSem_050402_actual_parameters_158()); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: Matching with an uninitialized/unsupported integer template. +error: Too many parameters: 1 was expected instead of 2 <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_097 negative test +:h3. NegSem_050402_actual_parameters_159 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_097 verify that string item references cannot be used as inout formal value parameters of functions > +<TC - 050402_159 verify that templates cannot have more actual than formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_097 NegSem_050402_actual_parameters_097.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_159 NegSem_050402_actual_parameters_159.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that string item references cannot be used as inout formal value parameters of functions + ** @purpose 1:5.4.2, verify that templates cannot have more actual than formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to inout formal value parameters shall be variables -// or formal value parameters (of in, inout or out parameterization) or references to -// elements of variables or formal value parameters of structured types. -// (see also the NOTE from 5.4.2) +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. -module NegSem_050402_actual_parameters_097 { +module NegSem_050402_actual_parameters_159 { type component GeneralComp { } - - function f_test(inout charstring p_val) { - if (p_val == "t") { setverdict(pass); } - else { setverdict(fail); } - p_val := "r"; - } - testcase TC_NegSem_050402_actual_parameters_097() runs on GeneralComp { - var charstring v_val := "test"; - f_test(v_val[0]); // tested parameter passing + template integer mw_range (integer p_par) := (0..p_par); + + testcase TC_NegSem_050402_actual_parameters_159() runs on GeneralComp { + log(mw_range(1, 2)); // tested parameter passing + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_097()); + execute(TC_NegSem_050402_actual_parameters_159()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a string element of type `charstring' cannot be used in this context +error: Too many parameters: 1 was expected instead of 2 <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_098 negative test +:h3. NegSem_050402_actual_parameters_160 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_098 verify that ordinary values cannot be passed to timer parameters > +<TC - 050402_160 verify that altstep cannot have more actual than formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_098 NegSem_050402_actual_parameters_098.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_160 NegSem_050402_actual_parameters_160.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that ordinary values cannot be passed to timer parameters + ** @purpose 1:5.4.2, verify that altstep cannot have more actual than formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to formal timer parameters shall be component -// timers, local timers or formal timer parameters of the current scope. +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. -module NegSem_050402_actual_parameters_098 { +module NegSem_050402_actual_parameters_160 { type component GeneralComp { - } - - function f_test(timer t_par) { - t_par.start; - if (t_par.running) { setverdict(pass); } - else { setverdict(fail); } + } + + altstep a_test(in integer p_val) { + [] any timer.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } } - testcase TC_NegSem_050402_actual_parameters_098() runs on GeneralComp { - f_test(5.0); // tested parameter passing: it should not be possible to pass a float value to a timer parameter + testcase TC_NegSem_050402_actual_parameters_160() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1, 2); // tested parameter passing } control { - execute(TC_NegSem_050402_actual_parameters_098()); + execute(TC_NegSem_050402_actual_parameters_160()); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a timer or timer parameter was expected for a timer parameter +error: Too many parameters: 1 was expected instead of 2 <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_099 negative test +:h3. NegSem_050402_actual_parameters_161 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_099 verify that values cannot be passed to port parameters > +<TC - 050402_161 verify that testcase cannot have more actual than formal parameters > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_099 NegSem_050402_actual_parameters_099.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_161 NegSem_050402_actual_parameters_161.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that values cannot be passed to port parameters + ** @purpose 1:5.4.2, verify that testcase cannot have more actual than formal parameters ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to formal port parameters shall be component -// ports or formal port parameters of the current scope. +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. -module NegSem_050402_actual_parameters_099 { +module NegSem_050402_actual_parameters_161 { - type port IntPort message { - inout integer; - } - type component GeneralComp { - port IntPort p; } - - function f_test(IntPort p_port) { - p_port.stop; - } - testcase TC_NegSem_050402_actual_parameters_099() runs on GeneralComp { - var integer v_val := 5; - f_test(v_val); // tested parameter passing - setverdict(pass); + testcase TC_NegSem_050402_actual_parameters_161(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_099()); + execute(TC_NegSem_050402_actual_parameters_161(1, 2)); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to a port or port parameter was expected for a port parameter instead of variable `v_val' +error: Too many parameters: 1 was expected instead of 2 <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_100 negative test +:h3. NegSem_050402_actual_parameters_165 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_100 verify that list notation containing actual parameters in wrong order is not accepted > +<TC - 050402_165 verify that value variables cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_100 NegSem_050402_actual_parameters_100.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_165 NegSem_050402_actual_parameters_165.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that list notation containing actual parameters in wrong order is not accepted + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When using list notation, the order of elements in the actual parameter list shall -// be the same as their order in the corresponding formal parameter list. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_100 { +module NegSem_050402_actual_parameters_165 { type component GeneralComp { } - - function f_test (integer p_val1, charstring p_val2) { - if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } - else { setverdict(fail); } + + function f_test(out template integer p_val) { + p_val := 2; } - testcase TC_NegSem_050402_actual_parameters_100() runs on GeneralComp { - f_test("test", 1); + testcase TC_NegSem_050402_actual_parameters_165() runs on GeneralComp { + var integer vm_msg; + f_test(vm_msg); // tested parameter passing + if (match(2, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_100()); + execute(TC_NegSem_050402_actual_parameters_165()); } } <END_MODULE> <RESULT COUNT 1> -error: integer value was expected -<END_RESULT> -<RESULT COUNT 1> -error: character string value was expected +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `vm_msg' <END_RESULT> + <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_101 negative test +:h3. NegSem_050402_actual_parameters_166 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_101 verify that list notation containing less actual parameters than required is not accepted > +<TC - 050402_166 verify that value in parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_101 NegSem_050402_actual_parameters_101.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_166 NegSem_050402_actual_parameters_166.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that list notation containing less actual parameters than required is not accepted + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// For each formal parameter without a default there shall be an actual parameter. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_101 { +module NegSem_050402_actual_parameters_166 { type component GeneralComp { - } + } + + function f_test(out template integer p_val) { + p_val := 0; + } - function f_test (integer p_val1, charstring p_val2) { - if (p_val1 == 1) { setverdict(pass); } + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_101() runs on GeneralComp { - f_test(1); + + testcase TC_NegSem_050402_actual_parameters_166() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_101()); + execute(TC_NegSem_050402_actual_parameters_166()); } } <END_MODULE> <RESULT COUNT 1> -error: Too few parameters: 2 was expected instead of 1 +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_102 negative test +:h3. NegSem_050402_actual_parameters_167 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_102 verify that parameter without default value cannot be skipped > +<TC - 050402_167 verify that value in parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_102 NegSem_050402_actual_parameters_102.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_167 NegSem_050402_actual_parameters_167.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that parameter without default value cannot be skipped + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// For each formal parameter without a default there shall be an actual parameter. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_102 { +module NegSem_050402_actual_parameters_167 { type component GeneralComp { - } + } + + function f_test(out template integer p_val) { + p_val := 0; + } - function f_test (integer p_val1, charstring p_val2) { - if (p_val1 == 1) { setverdict(pass); } + function f_caller(out integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_102() runs on GeneralComp { - f_test(1, -); + + testcase TC_NegSem_050402_actual_parameters_167() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_102()); + execute(TC_NegSem_050402_actual_parameters_167()); } } <END_MODULE> <RESULT COUNT 1> -error: Not used symbol \(`-'\) cannot be used for parameter that does not have default value +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `out' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_103 negative test +:h3. NegSem_050402_actual_parameters_168 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_103 verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) > +<TC - 050402_168 verify that value inout parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_103 NegSem_050402_actual_parameters_103.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_168 NegSem_050402_actual_parameters_168.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Either list notation or assignment notation shall be used in a single parameter -// list. They shall not be mixed. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_103 { +module NegSem_050402_actual_parameters_168 { type component GeneralComp { - } + } + + function f_test(out template integer p_val) { + p_val := 0; + } - function f_test (integer p_val1, charstring p_val2) { - if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_103() runs on GeneralComp { - f_test(p_val1 := 1, "test"); + + testcase TC_NegSem_050402_actual_parameters_168() runs on GeneralComp { + var integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_103()); + execute(TC_NegSem_050402_actual_parameters_168()); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `"': syntax error, unexpected Cstring +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `inout' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_104 negative test +:h3. NegSem_050402_actual_parameters_169 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_104 verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) > +<TC - 050402_169 verify that value variable element reference cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_104 NegSem_050402_actual_parameters_104.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_169 NegSem_050402_actual_parameters_169.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Either list notation or assignment notation shall be used in a single parameter -// list. They shall not be mixed. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_104 { +module NegSem_050402_actual_parameters_169 { type component GeneralComp { - } - - function f_test (integer p_val1, charstring p_val2 := "test") { - if ( match(p_val1, 1) and match(p_val2, "test")) { setverdict(pass); } - else { setverdict(fail); } + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; } - testcase TC_NegSem_050402_actual_parameters_104() runs on GeneralComp { - f_test(p_val1 := 1, -); + testcase TC_NegSem_050402_actual_parameters_169() runs on GeneralComp { + var R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + if (match( { field1 := 0 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_104()); + execute(TC_NegSem_050402_actual_parameters_169()); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `-': syntax error, unexpected '-' +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_105 negative test +:h3. NegSem_050402_actual_parameters_170 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_105 verify that parameters cannot be assigned more than once in assignment notation > +<TC - 050402_170 verify that reference to elements of formal value parameters cannot be used as out formal template parameters of functions > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_105 NegSem_050402_actual_parameters_105.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_170 NegSem_050402_actual_parameters_170.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that parameters cannot be assigned more than once in assignment notation + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// When using assignment notation, each formal parameter shall be assigned an actual -// parameter at most once. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_105 { +module NegSem_050402_actual_parameters_170 { type component GeneralComp { - } - - function f_test (integer p_val1, charstring p_val2) { - if (match(p_val1 == 1 and p_val2 == "test") { setverdict(pass); } + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + function f_caller(in R p_param) { + f_test(p_param.field1); // tested parameter passing + if (match( { field1 := 0 }, p_param)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_105() runs on GeneralComp { - f_test(p_val1 := 1, p_val2 := "test", p_val1 := 1); + testcase TC_NegSem_050402_actual_parameters_170() runs on GeneralComp { + f_caller({field1 := 11 }); } control { - execute(TC_NegSem_050402_actual_parameters_105()); + execute(TC_NegSem_050402_actual_parameters_170()); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `\)': syntax error, unexpected '\)' +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_param' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_106 negative test +:h3. NegSem_050402_actual_parameters_171 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_106 verify that assignment notation that doesn't contain all parameters is not accepted > +<TC - 050402_171 verify that value variables cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_106 NegSem_050402_actual_parameters_106.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_171 NegSem_050402_actual_parameters_171.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that assignment notation that doesn't contain all parameters is not accepted + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// For each formal parameter without default value, there shall be an actual parameter. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_106 { +module NegSem_050402_actual_parameters_171 { type component GeneralComp { + timer t := 0.0; } - - function f_test (integer p_val1, charstring p_val2, integer p_val3) { - if (match(p_val1, 1) and match(p_val2, "test") and match(p_val3, 3)) { setverdict(pass); } - else { setverdict(fail); } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } } - testcase TC_NegSem_050402_actual_parameters_106() runs on GeneralComp { - f_test(p_val2 := "test", p_val3 := 3); + testcase TC_NegSem_050402_actual_parameters_171() runs on GeneralComp { + var integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + if (match(0, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_106()); + execute(TC_NegSem_050402_actual_parameters_171()); } } <END_MODULE> <RESULT COUNT 1> -error: Parameter not specified +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `vm_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_107 negative test +:h3. NegSem_050402_actual_parameters_172 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_107 verify that incompatible values cannot be passed to in formal parameters > +<TC - 050402_172 verify that value in parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_107 NegSem_050402_actual_parameters_107.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_172 NegSem_050402_actual_parameters_172.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to in formal parameters + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// The type of each actual parameter shall be compatible with the type of each -// corresponding formal parameter. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_107 { +module NegSem_050402_actual_parameters_172 { type component GeneralComp { - } - - type record R1 { - integer field1, - integer field2 + timer t := 0.0; } - type record R2 { - integer elem1, - integer elem2 optional + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } } - function f_test (R1 p_val) { - if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + function f_caller(in integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_107() runs on GeneralComp { - var R2 v_rec := { 1, 2 }; - f_test(v_rec); + + testcase TC_NegSem_050402_actual_parameters_172() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_107()); + execute(TC_NegSem_050402_actual_parameters_172()); } } <END_MODULE> <RESULT COUNT 1> -error: Type mismatch: `@NegSem_050402_actual_parameters_107.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_107.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_108 negative test +:h3. NegSem_050402_actual_parameters_173 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_108 verify that incompatible values cannot be passed from out formal parameters > +<TC - 050402_173 verify that value out parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_108 NegSem_050402_actual_parameters_108.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_173 NegSem_050402_actual_parameters_173.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that incompatible values cannot be passed from out formal parameters + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// The type of each actual parameter shall be compatible with the type of each -// corresponding formal parameter. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_108 { +module NegSem_050402_actual_parameters_173 { type component GeneralComp { - } - - type record R1 { - integer field1, - integer field2 optional + timer t := 0.0; } - type record R2 { - integer elem1, - integer elem2 + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } } - function f_test (out R1 p_val) { - p_val.field1 := 1; - p_val.field2 := 2; + function f_caller(out integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + if (match(0 , p_val)) { setverdict(pass); } + else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_108() runs on GeneralComp { - var R2 v_rec; - f_test(v_rec); - if (v_rec == { elem1 := 1, elem2 := 2 }) { setverdict(pass); } - else { setverdict(fail); } + + testcase TC_NegSem_050402_actual_parameters_173() runs on GeneralComp { + var integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_108()); + execute(TC_NegSem_050402_actual_parameters_173()); } } <END_MODULE> <RESULT COUNT 1> -error: Type mismatch: `@NegSem_050402_actual_parameters_108.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_108.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `out' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_109 negative test +:h3. NegSem_050402_actual_parameters_174 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_109 verify that incompatible values cannot be passed to inout formal parameters > +<TC - 050402_174 verify that value inout parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_109 NegSem_050402_actual_parameters_109.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_174 NegSem_050402_actual_parameters_174.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that incompatible values cannot be passed to inout formal parameters + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Strong typing is required for parameters passed by reference. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_109 { +module NegSem_050402_actual_parameters_174 { type component GeneralComp { - } - - type record R1 { - integer field1, - integer field2 optional + timer t := 0.0; } - type record R2 { - integer elem1, - integer elem2 + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } } - function f_test (inout R1 p_val) { - if (p_val == { field1 := 1, field2 := 2 }) { setverdict(pass); } + function f_caller(inout integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_109() runs on GeneralComp { - var R2 v_rec := { 1, 2 }; - f_test(v_rec); + + testcase TC_NegSem_050402_actual_parameters_174() runs on GeneralComp { + var integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test } control { - execute(TC_NegSem_050402_actual_parameters_109()); + execute(TC_NegSem_050402_actual_parameters_174()); } } <END_MODULE> <RESULT COUNT 1> -error: Type mismatch: `@NegSem_050402_actual_parameters_109.R1.field2' of type `integer' and `@NegSem_050402_actual_parameters_109.R2.elem2' of type `integer' are not compatible: The optionality of fields in record/SEQUENCE types must be the same +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `inout' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_111 negative test +:h3. NegSem_050402_actual_parameters_175 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_111 verify that incompatible templates cannot be passed to template parameters with omit restriction > +<TC - 050402_175 verify that value variable element reference cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_111 NegSem_050402_actual_parameters_111.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_175 NegSem_050402_actual_parameters_175.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that incompatible templates cannot be passed to template parameters with omit restriction + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters passed to restricted formal template parameters shall obey -// the restrictions given in clause 15.8. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_111 { +module NegSem_050402_actual_parameters_175 { type component GeneralComp { - } - - function f_test (omit integer p_val) { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } } - testcase TC_NegSem_050402_actual_parameters_111() runs on GeneralComp { - f_test((0..10)); + testcase TC_NegSem_050402_actual_parameters_175() runs on GeneralComp { + var R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + if (match({ field1 := 5 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } } control { - execute(TC_NegSem_050402_actual_parameters_111()); + execute(TC_NegSem_050402_actual_parameters_175()); } } <END_MODULE> <RESULT COUNT 1> -error: Restriction on template formal parameter does not allow usage of value range match +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_112 negative test +:h3. NegSem_050402_actual_parameters_176 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_112 verify that compatible templates can be passed to template parameters with value restriction > +<TC - 050402_176 verify that reference to elements of formal value parameters cannot be used as out formal template parameters of altsteps > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_112 NegSem_050402_actual_parameters_112.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_176 NegSem_050402_actual_parameters_176.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with value restriction + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters passed to restricted formal template parameters shall obey -// the restrictions given in clause 15.8. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_112 { +module NegSem_050402_actual_parameters_176 { type component GeneralComp { - } - - function f_test (template(value) integer p_val) { - if (match(1, p_val)) { setverdict(pass); } + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + function f_caller(in R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + if (match({ field1 := 5 }, p_param)) { setverdict(pass); } else { setverdict(fail); } } - testcase TC_NegSem_050402_actual_parameters_112() runs on GeneralComp { - f_test((1, 2, 3)); + testcase TC_NegSem_050402_actual_parameters_176() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); } control { - execute(TC_NegSem_050402_actual_parameters_112()); + execute(TC_NegSem_050402_actual_parameters_176()); } } <END_MODULE> <RESULT COUNT 1> -error: Restriction on template formal parameter does not allow usage of value list match +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_param' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_113 negative test +:h3. NegSem_050402_actual_parameters_177 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_113 verify that compatible templates can be passed to template parameters with present restriction > +<TC - 050402_177 verify that value variables cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_113 NegSem_050402_actual_parameters_113.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_177 NegSem_050402_actual_parameters_177.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that compatible templates can be passed to template parameters with present restriction + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters passed to restricted formal template parameters shall obey -// the restrictions given in clause 15.8. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_113 { +module NegSem_050402_actual_parameters_177 { type component GeneralComp { } - - function f_test (template(present) integer p_val) { - if (match(1, p_val)) { setverdict(pass); } - else { setverdict(fail); } - } - - testcase TC_NegSem_050402_actual_parameters_113() runs on GeneralComp { - f_test(*); + + testcase TC_NegSem_050402_actual_parameters_177(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_113()); + var integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_177(vm_msg)); // tested parameter passing } } <END_MODULE> <RESULT COUNT 1> -error: Restriction on template formal parameter does not allow usage of any or omit +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `vm_msg' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_114 negative test +:h3. NegSem_050402_actual_parameters_178 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_114 verify that compatible templates can be passed to template parameters with present restriction > +<TC - 050402_178 verify that value in parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_114 NegSem_050402_actual_parameters_114.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_178 NegSem_050402_actual_parameters_178.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that parametrized entities used as actual parameter cannot be passed without parameter list + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// All parameterized entities specified as an actual parameter shall have their -// own parameters resolved in the top-level actual parameter list. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_114 { +module NegSem_050402_actual_parameters_178 { type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_178(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } - type record R { - integer field1, - integer field2 optional - } - - template R mw_rec(template integer p_field2) := { - field1 := 1, - field2 := p_field2 + function f_caller(in integer p_val) { + execute(TC_NegSem_050402_actual_parameters_178(p_val)); // tested parameter passing } - function f_test (template R p_match) { - if (match({1, omit}, p_match)) { setverdict(pass); } - else { setverdict(fail); } - } - - testcase TC_NegSem_050402_actual_parameters_114() runs on GeneralComp { - f_test(mw_rec); - } - control { - execute(TC_NegSem_050402_actual_parameters_114()); + f_caller(3); // this parameter passing is not a subject of the test } } <END_MODULE> <RESULT COUNT 1> -error: Reference to parameterized definition `mw_rec' without actual parameter list +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_115 negative test +:h3. NegSem_050402_actual_parameters_179 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_115 verify that error is generated when no actual parameter list is used for functions with no parameters > +<TC - 050402_179 verify that value out parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_115 NegSem_050402_actual_parameters_115.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_179 NegSem_050402_actual_parameters_179.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for functions with no parameters + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// If the formal parameter list of TTCN-3 objects function, testcase, signature, -// altstep or external function is empty, then the empty parentheses shall be -// included both in the declaration and in the invocation of that object. In all -// other cases the empty parentheses shall be omitted. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_115 { +module NegSem_050402_actual_parameters_179 { type component GeneralComp { - } - - function f_test () return integer { - setverdict(pass); - return 1; } - - testcase TC_NegSem_050402_actual_parameters_115() runs on GeneralComp { - log(f_test); + + testcase TC_NegSem_050402_actual_parameters_179(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } + + function f_caller(out integer p_val) { + execute(TC_NegSem_050402_actual_parameters_179(p_val)); // tested parameter passing + } control { - execute(TC_NegSem_050402_actual_parameters_115()); + var integer vm_val; + f_caller(vm_val); } } <END_MODULE> <RESULT COUNT 1> -error: Reference to parameterized definition `f_test' without actual parameter list +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `out' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_116 negative test +:h3. NegSem_050402_actual_parameters_180 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_116 verify that error is generated when no actual parameter list is used for test cases with no parameters > +<TC - 050402_180 verify that value inout parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_116 NegSem_050402_actual_parameters_116.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_180 NegSem_050402_actual_parameters_180.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for test cases with no parameters + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// If the formal parameter list of TTCN-3 objects function, testcase, signature, -// altstep or external function is empty, then the empty parentheses shall be -// included both in the declaration and in the invocation of that object. In all -// other cases the empty parentheses shall be omitted. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_116 { +module NegSem_050402_actual_parameters_180 { type component GeneralComp { - } - - testcase TC_NegSem_050402_actual_parameters_116() runs on GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_180(out template integer p_val) runs on GeneralComp { + p_val := ?; setverdict(pass); } + function f_caller(inout integer p_val) { + execute(TC_NegSem_050402_actual_parameters_180(p_val)); // tested parameter passing + } + control { - execute(TC_NegSem_050402_actual_parameters_116); + var integer vm_val := 5; + f_caller(vm_val); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `\)': syntax error, unexpected '\)', expecting '\(' +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of `inout' value parameter `p_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_117 negative test +:h3. NegSem_050402_actual_parameters_181 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_117 verify that error is generated when no actual parameter list is used for altsteps with no parameters > +<TC - 050402_181 verify that variable element reference cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_117 NegSem_050402_actual_parameters_117.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_181 NegSem_050402_actual_parameters_181.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that error is generated when no actual parameter list is used for altsteps with no parameters + ** @purpose 1:5.4.2, verify that variable element reference cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// If the formal parameter list of TTCN-3 objects function, testcase, signature, -// altstep or external function is empty, then the empty parentheses shall be -// included both in the declaration and in the invocation of that object. In all -// other cases the empty parentheses shall be omitted. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_117 { +module NegSem_050402_actual_parameters_181 { type component GeneralComp { - } - - altstep a_test () { - [] any timer.timeout { setverdict(pass); } + } + + type record R { + integer field1 } - testcase TC_NegSem_050402_actual_parameters_117() runs on GeneralComp { - timer t_instant := 0.0; - t_instant.start; - alt { - [] a_test { - setverdict(pass); - } - } + testcase TC_NegSem_050402_actual_parameters_181(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } control { - execute(TC_NegSem_050402_actual_parameters_117()); + var R v_val := { field1 := 10 }; + execute(TC_NegSem_050402_actual_parameters_181(v_val.field1)); // tested parameter passing } } <END_MODULE> - -<RESULT COUNT 1> -error: at or before token `\{': syntax error, unexpected '\{' -<END_RESULT> <RESULT COUNT 1> -error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of variable `v_val' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_050402_actual_parameters_118 negative test +:h3. NegSem_050402_actual_parameters_182 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 050402_118 verify that error is generated when empty actual parameter list is used for templates with no parameters > +<TC - 050402_182 verify that reference to elements of formal value parameters cannot be used as out formal template parameters of test cases > <COMPILE> -<MODULE TTCN NegSem_050402_actual_parameters_118 NegSem_050402_actual_parameters_118.ttcn > +<MODULE TTCN NegSem_050402_actual_parameters_182 NegSem_050402_actual_parameters_182.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:5.4.2, verify that error is generated when empty actual parameter list is used for templates with no parameters + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// If the formal parameter list of TTCN-3 objects function, testcase, signature, -// altstep or external function is empty, then the empty parentheses shall be -// included both in the declaration and in the invocation of that object. In all -// other cases the empty parentheses shall be omitted. +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. -module NegSem_050402_actual_parameters_118 { +module NegSem_050402_actual_parameters_182 { type component GeneralComp { - } - - template integer mw_allInt := ?; + } + + type record R { + integer field1 + } - testcase TC_NegSem_050402_actual_parameters_118() runs on GeneralComp { - if (match(1, mw_allInt())) { setverdict(pass); } - else { setverdict(fail); } + testcase TC_NegSem_050402_actual_parameters_182(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); } + + function f_caller(in R p_param) { + execute(TC_NegSem_050402_actual_parameters_182(p_param.field1)); // tested parameter passing + } control { - execute(TC_NegSem_050402_actual_parameters_118()); + var R mw_t := { field1 := 1 }; + f_caller(mw_t); } } <END_MODULE> - <RESULT COUNT 1> -error: The referenced template `@NegSem_050402_actual_parameters_118.mw_allInt' cannot have actual parameters +error: Reference to a template variable or template parameter was expected for an `out' template parameter instead of value parameter `p_param' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/negative_tests/06_types_and_values.script b/conformance_test/core_language_tests/negative_tests/06_types_and_values.script index c6e38350caf0bc7c8f6d5208b91f815b49ca1516..91cddd8d31f4ad4f0e878238068c2d224a0ec1af 100644 --- a/conformance_test/core_language_tests/negative_tests/06_types_and_values.script +++ b/conformance_test/core_language_tests/negative_tests/06_types_and_values.script @@ -491,6 +491,309 @@ error: Invalid character `H' \(0x48\) in binary string <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_001 Accessing not individual elements of a bitstring > + +<COMPILE> + +<MODULE TTCN NegSem_06010101_AccessStringElements_001 NegSem_06010101_AccessStringElements_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of a bitstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * Only single elements of the string may be accessed. + * Trying to assign strings with length 0 or more than 1 + * to a string element using the array-like syntax shall + * cause an error. +*/ + +module NegSem_06010101_AccessStringElements_001 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { + var bitstring v_b := '100010'B; + v_b[1] := '11'B; //error: only individual elements can be accessed + if (v_b == '100001'B){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_001()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The length of the string to be assigned to a string element of type `bitstring' should be 1 instead of 2 +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_002 Access bitstring element out of range > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_06010101_AccessStringElements_002 NegSem_06010101_AccessStringElements_002.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_002 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_002() runs on GeneralComp { + var bitstring v_b := '100010'B; + v_b[7] := '0'B; //error: index outside of range + if (v_b == '100001'B){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_002()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Index overflow when accessing a bitstring element: The index is 7, but the string has only 6 bits. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_003 Accessing not individual elements of a hexstring > + +<COMPILE> + +<MODULE TTCN NegSem_06010101_AccessStringElements_003 NegSem_06010101_AccessStringElements_003.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of a hexstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_003 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_003() runs on GeneralComp { + var hexstring v_h := '100010'H; + v_h[1] := '01'H; //error: only individual elements can be accessed + if (v_h == '100001'H){ + setverdict(pass); + } + else { + setverdict(fail, "v_h:",v_h); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_003()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The length of the string to be assigned to a string element of type `hexstring' should be 1 instead of 2 +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_004 Access hexstring element out of range > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_06010101_AccessStringElements_004 NegSem_06010101_AccessStringElements_004.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_004 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_004() runs on GeneralComp { + var hexstring v_h := '100010'H; + v_h[7] := '0'H; //error: index outside of range + if (v_h == '100001'H){ + setverdict(pass); + } + else { + setverdict(fail, "v_h:",v_h); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_004()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Index overflow when accessing a hexstring element: The index is 7, but the string has only 6 hexadecimal digits. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_005 Accessing not individual elements of an octetstring > + +<COMPILE> + +<MODULE TTCN NegSem_06010101_AccessStringElements_005 NegSem_06010101_AccessStringElements_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of an octetstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_005 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_005() runs on GeneralComp { + var octetstring v_o := '100010'O; + v_o[1] := '0120'O; //error: only individual elements can be accessed + if (v_o == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_o:",v_o); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_005()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The length of the string to be assigned to a string element of type `octetstring' should be 1 instead of 2 +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06010101_AccessStringElements_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06010101_006 Accessing not individual elements of an octetstring > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_06010101_AccessStringElements_006 NegSem_06010101_AccessStringElements_006.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_006 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_006() runs on GeneralComp { + var octetstring v_o := '100010'O; + v_o[4] := '01'O; //error: only individual elements can be accessed + if (v_o == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_o:",v_o); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_006()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Index overflow when accessing a octetstring element: The index is 4, but the string has only 3 octets. +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_06010201_ListOfValues_001 negative test .*---------------------------------------------------------------------* @@ -2835,6 +3138,216 @@ error: at or before token `"': syntax error, unexpected Cstring <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSyn_0602_TopLevel_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 0602_004 Combined value list and assignment notation not allowed in the same (immediate) context. > + +<COMPILE> + +<MODULE TTCN NegSyn_0602_TopLevel_004 NegSyn_0602_TopLevel_004.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + *The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_004 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + field1 := 6, // error: already appeared field + field3 := 3.14 + }; +} +<END_MODULE> + +<RESULT COUNT 1> +error: Duplicate record field `field1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_0602_TopLevel_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 0602_005 Combined value list and assignment notation not allowed in the same (immediate) context. > + +<COMPILE> + +<MODULE TTCN NegSyn_0602_TopLevel_005 NegSyn_0602_TopLevel_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index notation can be used for record of and setof value notations and for arrays. + * In this notation each index shall not appear more than once and shall conform to the range of indices allowed by the type definition. +*/ + +module NegSyn_0602_TopLevel_005 { + + type set of integer MySetOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_005() runs on GeneralComp { + + var MySetOfType v_set := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_set, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_005()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Duplicate index value `1' for components `3' and `2' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_0602_TopLevel_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 0602_006 Combined value list and assignment notation not allowed in the same (immediate) context. > + +<COMPILE> + +<MODULE TTCN NegSyn_0602_TopLevel_006 NegSyn_0602_TopLevel_006.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_006 { + + type set MySetType{ + integer field1, + charstring field2 + } + + type component GeneralComp { + } + + testcase TC_NegSyn_0602_TopLevel_006() runs on GeneralComp { + + var MySetType v_set := { + field1 := 5, + field1 := 6, // error: already appeared field + field2 := "abc" + }; + + if ( match(v_set, {5,"abc"})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_006()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Duplicate set field `field1' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_0602_TopLevel_007 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 0602_007 Combined value list and assignment notation not allowed in the same (immediate) context. > + +<COMPILE> + +<MODULE TTCN NegSyn_0602_TopLevel_007 NegSyn_0602_TopLevel_007.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_007 { + + type record of integer MyRecordOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_007() runs on GeneralComp { + + var MyRecordOfType v_RoI := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_RoI, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_007()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Duplicate index value `1' for components `3' and `2' +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSyn_060201_RecordTypeValues_001 negative test .*---------------------------------------------------------------------* @@ -4585,6 +5098,91 @@ error: Cannot determine the type of the operands in operation `!=' <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_060204_enumerated_type_and_values_012 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060204_012 using enumerated value number integer conversion > + +<COMPILE> + +<MODULE TTCN NegSem_060204_enumerated_type_and_values_012 NegSem_060204_enumerated_type_and_values_012.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value number integer conversion + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// enumerated values with a specific integer value assigned shall not use the associated integer + +module NegSem_060204_enumerated_type_and_values_012 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(1), Wednesday(2), Thursday(3), Friday(5) + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_012() runs on GeneralComp { + var EDays v_enum := Friday(5); // error: shall not use the associated integer + + if (match(enum2int(v_enum),5)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_012()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: There is no local or imported definition with name `Friday' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_060204_enumerated_type_and_values_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060204_001 expression as user-assigned enumerated value > + +<COMPILE> + +<MODULE TTCN NegSyn_060204_enumerated_type_and_values_001 NegSyn_060204_enumerated_type_and_values_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2.4, expression as user-assigned enumerated value + ** @verdict pass reject, noexecutino + ***************************************************/ + +// The following requirement is tested: +// ach enumerated value may optionally have a user-assigned integer value or non-empty list of integer literal values or ranges of integer literal values + +module NegSyn_060204_enumerated_type_and_values_001 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(), Thursday, Friday + }; // error: non-empty integer literal required +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `\)': syntax error, unexpected '\)' +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_060205_top_level_001 negative test .*---------------------------------------------------------------------* @@ -6927,6 +7525,39 @@ error: A value or expression of type integer was expected <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSyn_060207_arrays_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060207_005 Ensure that arrays upper value shall not be lesser than the corresponding lower value > + +<COMPILE> + +<MODULE TTCN NegSyn_060207_arrays_005 NegSyn_060207_arrays_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2.7, Ensure that arrays upper value shall not be lesser than the corresponding lower value + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * The upper value shall not be lesser than the corresponding lower value. + */ +module NegSyn_060207_arrays_005 { + + control { + var integer v_arr[5..1]; // error: . The upper value shall not be lesser than the corresponding lower value + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: The lower bound of array index \(5\) is greater than the upper bound \(1\) +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_060209_CommunicationPortTypes_004 negative test .*---------------------------------------------------------------------* @@ -7335,6 +7966,76 @@ error: at or before token `!': syntax error, unexpected '!' <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_06021301_LengthSubtyping_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06021301_005 The length subtyping check for 'record of' or 'set of' types > + +<COMPILE> + +<MODULE TTCN NegSem_06021301_LengthSubtyping_005 NegSem_06021301_LengthSubtyping_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. + */ +module NegSem_06021301_LengthSubtyping_005 { + type set length(0..10) of integer SetOfLengthLessThan10; + + type SetOfLengthLessThan10 SetOfLength5 length(5..2); + //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} +<END_MODULE> + +<RESULT COUNT 1> +error: The upper boundary of the length restriction \(2\) cannot be smaller than the lower boundary \(5\) +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_06021301_LengthSubtyping_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 06021301_006 The length subtyping check for 'record of' or 'set of' types > + +<COMPILE> + +<MODULE TTCN NegSem_06021301_LengthSubtyping_006 NegSem_06021301_LengthSubtyping_006.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ + +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. +*/ + +module NegSem_06021301_LengthSubtyping_006 { + type record length(0..10) of integer RecordOfLengthLessThan10; + + type RecordOfLengthLessThan10 RecordOfLengthLessThan5 length(5..2); + //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} +<END_MODULE> + +<RESULT COUNT 1> +error: The upper boundary of the length restriction \(2\) cannot be smaller than the lower boundary \(5\) +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_06021302_ListSubtyping_001 negative test .*---------------------------------------------------------------------* @@ -7688,7 +8389,7 @@ error: Type mismatch: `@NegSem_060302_structured_types_004.SetType.b' of type `i ** @verdict pass reject ***************************************************/ -module NegSem_060302_structured_types_009 { +module NegSem_060302_structured_types_009 language "TTCN-3:2016"{ type enumerated EnumeratedType {e_black, e_white}; type enumerated EnumeratedRedefinition {e_black, e_white}; diff --git a/conformance_test/core_language_tests/negative_tests/07-14_folder.script b/conformance_test/core_language_tests/negative_tests/07-14_folder.script index 4d5b5499dedda5f99274da3082384357457b9a15..111fcba6104e3e3402716508528120bebe001023 100644 --- a/conformance_test/core_language_tests/negative_tests/07-14_folder.script +++ b/conformance_test/core_language_tests/negative_tests/07-14_folder.script @@ -746,6 +746,287 @@ error: Right operand of operation `&' should be a string, `record of' or `set of :h2. 08_modules folder .*---------------------------------------------------------------------* +*---------------------------------------------------------------------* +:h3. NegSem_080201_ModuleParameters_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_001 Ensure that a port, default or component types cannot be module parameters. > + +<COMPILE> + +<MODULE TTCN NegSem_080201_ModuleParameters_001 NegSem_080201_ModuleParameters_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_001 { + + type port MyMessagePortType message { + inout integer + } with {extension "internal"} + + modulepar MyMessagePortType MY_PORT; // not allowed + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_001() runs on GeneralComp { + if (MY_PORT.checkstate("Started")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type of module parameter cannot be or embed port type `@NegSem_080201_ModuleParameters_001.MyMessagePortType' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_080201_ModuleParameters_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_004 Ensure that module parameters remain constant. > + +<COMPILE> + +<MODULE TTCN NegSem_080201_ModuleParameters_004 NegSem_080201_ModuleParameters_004.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameters remain constant. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_004 { + + modulepar integer MY_INT := 2; + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_004() runs on GeneralComp { + MY_INT := 3; // not allowed to change module parameter + if (MY_INT == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_004()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to a variable or template variable was expected instead of module parameter `@NegSem_080201_ModuleParameters_004.MY_INT' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_080201_ModuleParameters_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_005 Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. > + +<COMPILE> + +<MODULE TTCN NegSem_080201_ModuleParameters_005 NegSem_080201_ModuleParameters_005.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass reject + *****************************************************************/ +// A module parameter shall only be of type address if the address type is explicitly defined within the associated module + +module NegSem_080201_ModuleParameters_005 { + + modulepar address MY_ADDRESS_MODULE_PARAMETER := 2; // error: address type not defined + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_005() runs on GeneralComp { + if (MY_ADDRESS_MODULE_PARAMETER == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_005()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type `address' is not defined in this module +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_080201_ModuleParameters_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_006 Ensure that a module parameter is not allowed to be used in arrays > + +<COMPILE> + +<MODULE TTCN NegSem_080201_ModuleParameters_006 NegSem_080201_ModuleParameters_006.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a module parameter is not allowed to be used in arrays + ** @verdict pass reject + *****************************************************************/ +//Module parameters shall not be used in type or array definitions. + +module NegSem_080201_ModuleParameters_006 { + + modulepar integer MY_INT_MODULE_PARAMETER := 2; + + type component GeneralComp { + } + + type integer MyArrayType[MY_INT_MODULE_PARAMETER]; + // error: Module parameters shall not be used in type or array definitions. + + testcase TC_NegSem_080201_ModuleParameters_006() runs on GeneralComp { + + var MyArrayType v_arr := {2,3}; + + if (v_arr[0] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_006()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Reference to an \(evaluable\) constant value was expected instead of module parameter `@NegSem_080201_ModuleParameters_006.MY_INT_MODULE_PARAMETER' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_080201_ModuleParameters_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_001 Ensure that module parameter can be declared within the module definition part only. > + +<COMPILE> + +<MODULE TTCN NegSyn_080201_ModuleParameters_001 NegSyn_080201_ModuleParameters_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_001 { + + type component GeneralComp { + } + + testcase TC_NegSyn_080201_ModuleParameters_001() runs on GeneralComp { + modulepar integer MY_MODULE_PAR := 1; // not allowed to declared here + setverdict(fail); + } + + control { + execute(TC_NegSyn_080201_ModuleParameters_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `modulepar': syntax error, unexpected ModuleParKeyword +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_080201_ModuleParameters_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 080201_002 Ensure that module parameter can be declared within the module definition part only. > + +<COMPILE> + +<MODULE TTCN NegSyn_080201_ModuleParameters_002 NegSyn_080201_ModuleParameters_002.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_002 { + modulepar integer MY_MODULE_PAR := 1; + modulepar integer MY_MODULE_PAR := 2; //error: not allowed to redeclare + + type component GeneralComp { + } + + testcase TC_NegSyn_080201_ModuleParameters_002() runs on GeneralComp { + setverdict(fail); + } + + control { + execute(TC_NegSyn_080201_ModuleParameters_002()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Duplicate definition with name `MY_MODULE_PAR' +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_08020301_GeneralFormatOfImport_002 negative test .*---------------------------------------------------------------------* @@ -2274,6 +2555,49 @@ error: any value is not allowed in this context <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_1101_ValueVars_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 1101_005 Variables should be assigned only by initialized variables > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_1101_ValueVars_005 NegSem_1101_ValueVars_005.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by initialized variables + ** @verdict pass reject + ***************************************************/ + +// The expression shall evaluate to a value, which is at least partially initialized. + +module NegSem_1101_ValueVars_005 { + type component GeneralComp {} + + testcase TC_NegSem_1101_ValueVars_005() runs on GeneralComp { + var integer v_i; + var integer v_j := v_i + 2; // error: v_i is uninitialized + + setverdict(pass); + } + + control { + execute(TC_NegSem_1101_ValueVars_005()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Unbound left operand of integer addition. +<END_RESULT> + +<END_TC> +:exmp + + *---------------------------------------------------------------------* :h3. NegSyn_1101_ValueVars_001 negative test .*---------------------------------------------------------------------* @@ -2367,6 +2691,49 @@ error: at or before token `var': syntax error, unexpected VarKeyword <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSyn_1102_TemplateVars_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 1102_002 Template variables should be assigned with unitialized variables > + +<COMPILE> + +<MODULE TTCN NegSyn_1102_TemplateVars_002 NegSyn_1102_TemplateVars_002.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:11.2, Template variables should be assigned with unitialized variables + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: +Restriction l) The template body at the right-hand side of the assignment symbol shall evaluate to a value or template, which is type compatible with the variable being declared. +*/ + +module NegSyn_1102_TemplateVars_002 { + type component GeneralComp {} + + testcase TC_NegSyn_1102_TemplateVars_002() runs on GeneralComp { + var integer v_i1 := 1; + var template float v_i2 := v_i1; // error: v_i1 is integer, meanwhile template type is float + + setverdict(pass); + } + + control { + execute(TC_NegSyn_1102_TemplateVars_002()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: a value or template of type `float' was expected instead of `integer' +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h2. 12_timers folder .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/negative_tests/08_empty_modules.script b/conformance_test/core_language_tests/negative_tests/08_empty_modules.script index 7dfc200d726fb9247e6d824179a75641036f958e..f04578711848d0e811d1d232e2ad3ae0db169959 100644 --- a/conformance_test/core_language_tests/negative_tests/08_empty_modules.script +++ b/conformance_test/core_language_tests/negative_tests/08_empty_modules.script @@ -282,6 +282,34 @@ error <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. Syn_0801_DefinitionOfAModule_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 0801_010 Ensure that a module definition with ed4.8.1 language and package is accepted. > + +<COMPILE> + +<MODULE TTCN Syn_0801_DefinitionOfAModule_010 Syn_0801_DefinitionOfAModule_010.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.8.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_010 language "TTCN-3:2016" { + +} +<END_MODULE> + +<RESULT IF_PASS NEGATIVE> +error +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. Syn_0803_ModuleControlPart_003 negative test .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/negative_tests/15_templates.script b/conformance_test/core_language_tests/negative_tests/15_templates.script index a6c85ceabcf1f0cad6436b5b4484c575fd8c795c..7c874d025287fc8a8d59764eebb4daecb0357eb9 100644 --- a/conformance_test/core_language_tests/negative_tests/15_templates.script +++ b/conformance_test/core_language_tests/negative_tests/15_templates.script @@ -56,6 +56,47 @@ This TD contains negative tests from ETSI TTCN3 Conformance Test's 15_templates :h1.REQUIREMENT-BASED TESTS .*---------------------------------------------------------------------* .*---------------------------------------------------------------------* +:h2. 15_top_level folder +.*---------------------------------------------------------------------* +*---------------------------------------------------------------------* +:h3. NegSyn_15_TopLevel_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 15_001 Ensure that the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. > + +<COMPILE> + +<MODULE TTCN NegSyn_15_TopLevel_001 NegSyn_15_TopLevel_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:15, Ensure that the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + ** @verdict pass reject, noexecution + *****************************************************************/ + +// The following requirement is tested: +//Restriction C: the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + +module NegSyn_15_TopLevel_001 { + + type record MyRecord { + integer myInt + } + + template MyRecord mw_myRecord := { + myInt := 2.1 // error: incompatible type (int req., float is given) + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: integer value was expected +<END_RESULT> + +<END_TC> +:exmp +.*---------------------------------------------------------------------* :h2. 1503_global_and_local_templates folder .*---------------------------------------------------------------------* *---------------------------------------------------------------------* @@ -3589,7 +3630,7 @@ error: Formal parameter with template restriction `present' not allowed here <MODULE TTCN NegSem_1508_TemplateRestrictions_043 NegSem_1508_TemplateRestrictions_043.ttcn > /****************************************************************************** ** @version 0.0.1 - ** @purpose 1:15.8, Ensure that template(present) can be parameter to template(omit) + ** @purpose 1:15.8, Ensure that template cannot be parameter to template(omit) ** @verdict pass reject *****************************************************************/ @@ -4202,6 +4243,55 @@ error: Reference to a value was expected instead of template `@NegSem_1509_Match <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_1509_MatchOperation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 1509_003 Ensure that the match operation works correctly with enums. > + +<COMPILE> + +<MODULE TTCN NegSem_1509_MatchOperation_003 NegSem_1509_MatchOperation_003.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1509_MatchOperation_003 { + + type component GeneralComp { } + + type enumerated A_enum { A, B, C, D, E }; + type enumerated B_enum { A, F, G }; + + testcase TC_NegSem_1509_MatchOperation_003() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(v_value, B_enum:G)) { // error: different enum type + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1509_MatchOperation_003()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Type mismatch: a value of type `@NegSem_1509_MatchOperation_003.B_enum' was expected instead of `@NegSem_1509_MatchOperation_003.A_enum' +<END_RESULT> + +<END_TC> +:exmp + .*---------------------------------------------------------------------* :h2. 1510_valueof_operation folder .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/negative_tests/16-20_folders.script b/conformance_test/core_language_tests/negative_tests/16-20_folders.script index 9a8c63fcf5834a2fd660a50fc7f792d0e8641a8f..c66c3ba686938fd6112a953ca12623890568e836 100644 --- a/conformance_test/core_language_tests/negative_tests/16-20_folders.script +++ b/conformance_test/core_language_tests/negative_tests/16-20_folders.script @@ -2802,6 +2802,68 @@ error: The 'intOption' is already present in the 1. branch of select union <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_190302_select_union_statement_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 190302_006 verify that it is possible to use a select union statement with several branches > + +<COMPILE> + +<MODULE TTCN NegSem_190302_select_union_statement_006 NegSem_190302_select_union_statement_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use a select union statement with several branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// c) No two cases in a select union statement shall have the same caseIdentifier or TypeIdentifier. +module NegSem_190302_select_union_statement_006 { + + type component GeneralComp { + } + + testcase TC_NegSem_190302_select_union_statement_006() runs on GeneralComp { + var anytype v_any; + v_any.integer := 2; + v_any.charstring := "abc"; + v_any.float := 1.2; + + select union (v_any) { + case (charstring) { + if(match(v_any.charstring,"abc")) + {setverdict(pass, v_any.charstring);} + } case (integer) { + if(match(v_any.integer,2)) + {setverdict(pass, v_any.integer);} + } case (charstring) { // error + if(match(v_any.charstring,"abc")) + {setverdict(fail, v_any.charstring);} + } + case else { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_006()); + } +} +with { + extension "anytype integer, charstring, float" +} +<END_MODULE> + +<RESULT COUNT 1> +error: The 'charstring' is already present in the 1. branch of select union +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_1904_for_statement_001 negative test .*---------------------------------------------------------------------* 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 0e56412adefe0ac493c4c25f22d2b2989557fd61..5bc2895a9fe66063ad2e1b6c881025bc5fa2d0e6 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 @@ -2481,6 +2481,67 @@ error: The operand of operation `alive': Type mismatch: component array referenc <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_210305_alive_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 210305_002 Verify that error occurs when any from alive is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_210305_alive_operation_002 NegSem_210305_alive_operation_002.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 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 value 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); + } +} +<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_210305_alive_operation_003 negative test .*---------------------------------------------------------------------* @@ -2510,8 +2571,6 @@ module NegSem_210305_alive_operation_003 { 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; @@ -2519,7 +2578,7 @@ module NegSem_210305_alive_operation_003 { 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 + 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 value v_index; @@ -2574,8 +2633,6 @@ module NegSem_210305_alive_operation_004 { 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; @@ -2584,7 +2641,7 @@ module NegSem_210305_alive_operation_004 { 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 + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i].kill; } //kill components on even i or odd j else { v_ptc[i][j].start(f());} // activate v_ptc } } @@ -2643,8 +2700,6 @@ module NegSem_210305_alive_operation_005 { 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; @@ -2653,7 +2708,7 @@ module NegSem_210305_alive_operation_005 { 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 + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i].kill; } //kill components on even i or odd j else { v_ptc[i][j].start(f());} // activate v_ptc } } 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 ba6303a54727c985cc3ddaa5671677ea4f314c21..5c13200642b5a48a7e6be9d05c11322c928f3cf6 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 @@ -661,7 +661,8 @@ error: Cannot determine the type of the outgoing message *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220201_SendOperation_010 { @@ -3262,7 +3263,8 @@ error: Catching of `timeout' exception is not allowed because the previous `call *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220301_CallOperation_003 { @@ -3298,501 +3300,434 @@ Dynamic test case error: The second argument of connect operation contains the n :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_001 negative test +:h3. NegSem_220301_CallOperation_005 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_001 Ensure that getcall operations are only used on procedure based ports > +<TC - 220301_005 incompatible template in the to clause of the call operation > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_001 NegSem_220302_GetcallOperation_001.ttcn > -/*************************************************** +<MODULE TTCN NegSem_220301_CallOperation_005 NegSem_220301_CallOperation_005.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Ensure that getcall operations are only used on procedure based ports + ** @purpose 1:22.3.1, incompatible template in the to clause of the call operation ** @verdict pass reject - ***************************************************/ + *****************************************************************/ -module NegSem_220302_GetcallOperation_001 { +// The following requirements are tested: +// f) All AddressRef items in the to clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the call operation. - type port loopbackPort message { - inout integer - } with {extension "internal"} +module NegSem_220301_CallOperation_005 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} type component GeneralComp { - port loopbackPort messagePort + port P p; + } + + testcase TC_NegSem_220301_CallOperation_005() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait) to v_addr; + setverdict(pass); } - testcase TC_NegSem_220302_GetcallOperation_001() runs on GeneralComp { + control { + execute(TC_NegSem_220301_CallOperation_005(), 5.0); + } +} +<END_MODULE> - connect(self:messagePort, self:messagePort); +<RESULT COUNT 1> +error: Type mismatch: The type of the operand should be a component type instead of `charstring' +<END_RESULT> - messagePort.send(2); +<END_TC> +:exmp - alt { - [] messagePort.getcall { //cannot use getcall on a message based port - setverdict(pass); - } - [] messagePort.receive { - setverdict(fail); - } - } +*---------------------------------------------------------------------* +:h3. NegSem_220301_CallOperation_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220301_006 verify that non-blocking calls cannot have a response and exception handling part > + +<COMPILE> + +<MODULE TTCN NegSem_220301_CallOperation_006 NegSem_220301_CallOperation_006.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking calls cannot have a response and exception handling part + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case of non-blocking procedure-based communication the handling of exceptions +// to call operations is done by using catch (see clause 22.3.6) operations as +// alternatives in alt statements. +// A non-blocking procedure has no out and inout parameters, no return value and the +// non-blocking property is indicated in the corresponding signature definition by means +// of a noblock keyword. Possible exceptions raised by non-blocking procedures have to be +// removed from the port queue by using catch operations in subsequent alt or interleave +// statements. + +module NegSem_220301_CallOperation_006 { + + signature S() noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_called); + p.call(S:{}) { + [] p.getreply(S:{}) {} + } + setverdict(pass); } control{ - execute(TC_NegSem_220302_GetcallOperation_001()); + execute(TC_NegSem_220301_CallOperation_006(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Procedure-based operation `getcall' is not applicable to a message-based port of type `@NegSem_220302_GetcallOperation_001.loopbackPort' +error: A call of non-blocking signature `@NegSem_220301_CallOperation_006.S' cannot have response and exception handling part +<END_RESULT> +<RESULT COUNT 1> +error: Operation `getreply' is not applicable to non-blocking signature `@NegSem_220301_CallOperation_006.S' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_002 negative test +:h3. NegSem_220301_CallOperation_007 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_002 Ensure that getcall operation does not allow value assignment > +<TC - 220301_007 verify that signature that are not listed in the port inout and out list cannot be used in call operations > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_002 NegSem_220302_GetcallOperation_002.ttcn > +<MODULE TTCN NegSem_220301_CallOperation_007 NegSem_220301_CallOperation_007.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Ensure that getcall operation does not allow value assignment + ** @purpose 1:22.3.1, verify that signature that are not listed in the port inout and out list cannot be used in call operations ** @verdict pass reject *****************************************************************/ -module NegSem_220302_GetcallOperation_002 { +// The following requirements are tested: +// a) The call operation shall only be used on procedure-based ports. The type definition +// of the port at which the call operation takes place shall include the procedure name +// in its out or inout list i.e. it shall be allowed to call this procedure at this port. - /** - * @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_220302_GetcallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; +module NegSem_220301_CallOperation_007 { - template p_NegSem_220302_GetcallOperation_002 s_returnTemplate := { - p_par1 := 0, // p_par1 := -, core dump - p_par2 := 4, - p_par3 := 5 - } + signature S1() noblock; + signature S2() noblock; - template p_NegSem_220302_GetcallOperation_002 s_wrongTemplate := { - p_par1 := 0, // p_par1 := -, core dump - p_par2 := 2, - p_par3 := 3 + type port P procedure { + inout S1; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(S2:{}); // error expected + setverdict(pass); } - template p_NegSem_220302_GetcallOperation_002 s_callTemplate := { - p_par1 := 1, - p_par2 := 0, // p_par2 := -, core dump - p_par3 := 3 + control{ + execute(TC_NegSem_220301_CallOperation_007(), 5.0); } - type port remotePort procedure { - inout p_NegSem_220302_GetcallOperation_002; - } with {extension "internal"} +} +<END_MODULE> - type component GeneralComp { - port remotePort PCO; - } +<RESULT COUNT 1> +error: Incompatible explicit type specification: `@NegSem_220301_CallOperation_007.S1' was expected instead of `@NegSem_220301_CallOperation_007.S2' +<END_RESULT> - function f_ClientQuery() runs on GeneralComp { - var integer v_zero:=0; - var integer v_one:=1; - - PCO.call(p_NegSem_220302_GetcallOperation_002:s_callTemplate, 5.0) { - - [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_wrongTemplate value 1) { - setverdict(fail); - } - [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 2) { - setverdict(fail); - } - [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated - setverdict(pass); - } - [] PCO.catch (timeout) { - setverdict(fail); - } - } - } +<END_TC> +:exmp - function f_ServerResponses() runs on GeneralComp { - - var integer v_par1; - var integer v_par3; - var integer v_return; - timer t_timeout:=30.0; +*---------------------------------------------------------------------* +:h3. NegSem_220301_CallOperation_008 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. - template p_NegSem_220302_GetcallOperation_002 s_acceptTemplate := { - p_par1 := ?, - p_par2 := ?, - p_par3 := ? - }; +<TC - 220301_008 verify that in parameters of a signature used in a call operation cannot contain matching symbols > - - t_timeout.start; - - alt { - [] PCO.getcall(p_NegSem_220302_GetcallOperation_001:s_acceptTemplate) -> value v_return { - //not allowed assignment - } - [] t_timeout.timeout { - } - } - - } +<COMPILE> +<EXECUTE_PARALLEL> - - testcase TC_NegSem_220302_GetcallOperation_002() runs on GeneralComp system GeneralComp { - var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); - var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); - timer t_wait:=1.0; - - connect(server:PCO, client:PCO); +<MODULE TTCN NegSem_220301_CallOperation_008 NegSem_220301_CallOperation_008.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot contain matching symbols + ** @verdict pass reject + *****************************************************************/ - server.start(f_ServerResponses()); - client.start(f_ClientQuery()); +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. - alt { - [] client.done { - t_wait.start; - while(t_wait.running) { - //this gives a chance for server to still test for second getcall match - } - server.stop; - } - } +module NegSem_220301_CallOperation_008 { - alt { - [] all component.done {} - } + signature S(in integer p_par) noblock; - disconnect(server:PCO, client:PCO); - } + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_NegSem_220301_CallOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); + } control{ - execute(TC_NegSem_220302_GetcallOperation_002()); + execute(TC_NegSem_220301_CallOperation_008(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: at or before token `value': syntax error, unexpected ValueKeyword, expecting ParamKeyword or SenderKeyword -<END_RESULT> -<RESULT COUNT 1> -error: at or before token `testcase': syntax error, unexpected TestcaseKeyword, expecting \$end +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_003 negative test +:h3. NegSem_220301_CallOperation_009 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_003 Ensure that getcall for any call does not allow param assignment > +<TC - 220301_009 verify that in parameters of a signature used in a call operation cannot be omitted > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_003 NegSem_220302_GetcallOperation_003.ttcn > + +<MODULE TTCN NegSem_220301_CallOperation_009 NegSem_220301_CallOperation_009.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Ensure that getcall for any call does not allow param assignment + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot be omitted ** @verdict pass reject *****************************************************************/ -module NegSem_220302_GetcallOperation_003 { - - /** - * @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_220302_GetcallOperation_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. - template p_NegSem_220302_GetcallOperation_003 s_returnTemplate := { - p_par1 := 0, // p_par1 := -, core dump - p_par2 := 4, - p_par3 := 5 - } +module NegSem_220301_CallOperation_009 { - template p_NegSem_220302_GetcallOperation_003 s_wrongTemplate := { - p_par1 := 0, // p_par1 := -, core dump - p_par2 := 2, - p_par3 := 3 - } + signature S(in integer p_par) noblock; - template p_NegSem_220302_GetcallOperation_003 s_callTemplate := { - p_par1 := 1, - p_par2 := 0, // p_par2 := -, core dump - p_par3 := 3 - } - - type port remotePort procedure { - inout p_NegSem_220302_GetcallOperation_003; + type port P procedure { + inout S; } with {extension "internal"} type component GeneralComp { - port remotePort PCO; - } - - function f_ClientQuery() runs on GeneralComp { - var integer v_zero:=0; - var integer v_one:=1; - - PCO.call(p_NegSem_220302_GetcallOperation_003:s_callTemplate, 5.0) { - - [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_wrongTemplate value 1) { - setverdict(fail); - } - [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 2) { - setverdict(fail); - } - [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated - setverdict(pass); - } - [] PCO.catch (timeout) { - setverdict(fail); - } - } + port P p; } - - function f_ServerResponses() runs on GeneralComp { - var integer v_par1; - var integer v_par3; - timer t_timeout:=30.0; - - template p_NegSem_220302_GetcallOperation_003 s_acceptTemplate := { - p_par1 := ?, - p_par2 := ?, - p_par3 := ? - }; - - - t_timeout.start; + template S s_signature1 := { p_par := - }; - alt { - [] PCO.getcall -> param(v_par1, v_par3) { //not allowed param assignment for any call - } - [] t_timeout.timeout { - } - } - + testcase TC_NegSem_220301_CallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); } - - testcase TC_NegSem_220302_GetcallOperation_003() runs on GeneralComp system GeneralComp { - var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); - var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); - timer t_wait:=1.0; - - // map the PTCs to the system port - connect(server:PCO, client:PCO); - - server.start(f_ServerResponses()); - client.start(f_ClientQuery()); - - alt { - [] client.done { - t_wait.start; - while(t_wait.running) { - //this gives a chance for server to still test for second getcall match - } - server.stop; - } - } - - alt { - [] all component.done {} - } - - disconnect(server:PCO, client:PCO); - } - control{ - execute(TC_NegSem_220302_GetcallOperation_003()); + execute(TC_NegSem_220301_CallOperation_009(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -error: Parameter redirect cannot be used without signature template +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_004 negative test +:h3. NegSem_220301_CallOperation_010 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_004 Verify that error occurs when any from getcall is applied to single port > +<TC - 220301_010 verify that inout parameters of a signature used in a call operation cannot contain matching symbols > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_004 NegSem_220302_GetcallOperation_004.ttcn > -/****************************************************************************** + +<MODULE TTCN NegSem_220301_CallOperation_010 NegSem_220301_CallOperation_010.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to single port + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot contain matching symbols ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// Restriction g -// The PortArrayRef shall be a reference to a port array variable identifier. -module NegSem_220302_GetcallOperation_004 { +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_010 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} - signature S(); - - type port P procedure { - inout S; - } with {extension "internal"} - type component GeneralComp { - port P p; - } + port P p; + } - function f() runs on GeneralComp - { - 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"); } - } - } + template S s_signature1 := { p_par := ? }; - 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; + testcase TC_NegSem_220301_CallOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_004(), 5.0); + control{ + execute(TC_NegSem_220301_CallOperation_010(), 5.0); } + } <END_MODULE> <RESULT COUNT 1> -error: Reference to a port array was expected instead of a port +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_005 negative test +:h3. NegSem_220301_CallOperation_011 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_005 Verify that error occurs when any from getcall is applied to 1D array and index target is array > +<TC - 220301_011 verify that inout parameters of a signature used in a call operation cannot be omitted > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_005 NegSem_220302_GetcallOperation_005.ttcn > -/****************************************************************************** + +<MODULE TTCN NegSem_220301_CallOperation_011 NegSem_220301_CallOperation_011.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target is array + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot be omitted ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// 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 { +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. - signature S(); - - type port P procedure { - inout S; - } - - const integer c_portCount := 4; +module NegSem_220301_CallOperation_011 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} type component GeneralComp { - port P p[c_portCount]; - } + port P p; + } - 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"); } - } - } + template S s_signature1 := { p_par := - }; - 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; + testcase TC_NegSem_220301_CallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_005(), 5.0); + control{ + execute(TC_NegSem_220301_CallOperation_011(), 5.0); } + } <END_MODULE> <RESULT COUNT 1> -error: Indices of one-dimensional port arrays can only be redirected to an integer +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_006 negative test +:h3. NegSem_220301_CallOperation_012 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_006 Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type > +<TC - 220301_012 missing to clause in case of one-to-many connections > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_006 NegSem_220302_GetcallOperation_006.ttcn > -/****************************************************************************** + +<MODULE TTCN NegSem_220301_CallOperation_012 NegSem_220301_CallOperation_012.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type + ** @purpose 1:22.3.1, missing to clause in case of one-to-many connections ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// 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 { +// e) A to clause shall be present in case of one-to-many connections. + +module NegSem_220301_CallOperation_012 { signature S(); @@ -3800,367 +3735,324 @@ module NegSem_220302_GetcallOperation_006 { inout S; } with {extension "internal"} - const integer c_portCount := 4; - type component GeneralComp { - port P p[c_portCount]; + port P p; } - 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"); } - } + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); } - 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); } + testcase TC_NegSem_220301_CallOperation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + + p.call(S:{}) { // error expected as the to clause is missing + [] p.getreply(S:{}) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); } + } } - v_ptc.start(f()); - v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_006(), 5.0); + execute(TC_NegSem_220301_CallOperation_012(), 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 +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_220302_GetcallOperation_007 negative test +:h3. NegSem_220301_CallOperation_013 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_007 Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size > +<TC - 220301_013 verify that type mismatch error is issued for incorrect call timer values > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_007 NegSem_220302_GetcallOperation_007.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220301_CallOperation_013 NegSem_220301_CallOperation_013.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size + ** @purpose 1:22.3.1, verify that type mismatch error is issued for incorrect call timer values ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// 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 { +// g) CallTimerValue shall be of type float. - signature S(integer p_par); +module NegSem_220301_CallOperation_013 { + + 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]; + port P p; } - 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"); } - } + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); } - - 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); } - } + testcase TC_NegSem_220301_CallOperation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 2) { // error expected as 2 is an integer literal + [] p.getreply(S:{}) {} + [] p.catch(timeout) {} } - v_ptc.start(f()); - v_ptc.done; + setverdict(pass); } control { - execute(TC_NegSem_220302_GetcallOperation_007(), 5.0); + execute(TC_NegSem_220301_CallOperation_013(), 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' +error: A value or expression of type float was expected <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_008 negative test +:h3. NegSem_220301_CallOperation_014 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_008 Verify that any from getcall index redirection for multi-D arrays requires arrays > +<TC - 220301_014 verify that getreply signature mismatch in the response and exception handling causes an error > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_008 NegSem_220302_GetcallOperation_008.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220301_CallOperation_014 NegSem_220301_CallOperation_014.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that any from getcall index redirection for multi-D arrays requires arrays + ** @purpose 1:22.3.1, verify that getreply signature mismatch in the response and exception handling causes an error ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// 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 { +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. - signature S(integer p_par); +module NegSem_220301_CallOperation_014 { + + signature S1(); + signature S2(); type port P procedure { - inout S; + inout S1, S2; } with {extension "internal"} - const integer c_portCount := 3; type component GeneralComp { - port P p[c_portCount][c_portCount]; + port P p; } - 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"); } - } + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.reply(S1:{}); } - 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); } - } + testcase TC_NegSem_220301_CallOperation_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.getreply(S1:{}) { setverdict(pass, "Reply accepted"); } + [] p.getreply(S2:{}) {} // error expected } - v_ptc.start(f()); - v_ptc.done; } control { - execute(TC_NegSem_220302_GetcallOperation_008(), 5.0); + execute(TC_NegSem_220301_CallOperation_014(), 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 +error: The `getreply' operation refers to a different signature than the previous `call' statement: `@NegSem_220301_CallOperation_014.S1' was expected instead of `@NegSem_220301_CallOperation_014.S2' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_009 negative test +:h3. NegSem_220301_CallOperation_015 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_009 null component in the from clause of the getcall operation > +<TC - 220301_015 verify that exception signature mismatch in the response and exception handling causes an error > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_009 NegSem_220302_GetcallOperation_009.ttcn > +<MODULE TTCN NegSem_220301_CallOperation_015 NegSem_220301_CallOperation_015.ttcn > /***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, null component in the from clause of the getcall operation + ** @purpose 1:22.3.1, verify that exception signature mismatch in the response and exception handling causes an error ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. -module NegSem_220302_GetcallOperation_009 { +module NegSem_220301_CallOperation_015 { - signature S(); + signature S1() exception(integer); + signature S2() exception(charstring); type port P procedure { - inout S; + inout S1, S2; } with {extension "internal"} type component GeneralComp { port P p; } - 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"); } - } + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.raise(S1, 1); } - testcase TC_NegSem_220302_GetcallOperation_009() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220301_CallOperation_015() 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); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.catch(S1, integer:?) { setverdict(pass, "Exception caught!"); } + [] p.catch(S2, charstring:?) {} // expected error + } } control { - execute(TC_NegSem_220302_GetcallOperation_009(), 5.0); + execute(TC_NegSem_220301_CallOperation_015(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +error: The `catch' operation refers to a different signature than the previous `call' statement: `@NegSem_220301_CallOperation_015.S1' was expected instead of `@NegSem_220301_CallOperation_015.S2' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_011 negative test +:h3. NegSem_220301_CallOperation_018 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_011 applying @decoded to a forbidden field > +<TC - 220301_018 verify that exception signature mismatch in the response and exception handling causes an error > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_011 NegSem_220302_GetcallOperation_011.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220301_CallOperation_018 NegSem_220301_CallOperation_018.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, applying @decoded to a forbidden field + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain timeout values ** @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. +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. -module NegSem_220302_GetcallOperation_011 { - type record of integer RoI (0..255); - - signature S(RoI p_par); - +module NegSem_220301_CallOperation_018 { + + signature S() noblock; + type port P procedure { inout S; - } with {extension "internal"} + } type component GeneralComp { port P p; } - - 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_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 1.0); + alt { + [] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + } } control { - execute(TC_NegSem_220302_GetcallOperation_011(), 5.0); + execute(TC_NegSem_220301_CallOperation_018(), 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: Operation `reply' is not applicable to non-blocking signature `@NegSem_220301_CallOperation_018.S' +<END_RESULT> +<RESULT COUNT 1> +error: A call of non-blocking signature `@NegSem_220301_CallOperation_018.S' cannot have call timer +<END_RESULT> +<RESULT COUNT 1> +error: Operation `getreply' is not applicable to non-blocking signature `@NegSem_220301_CallOperation_018.S' <END_RESULT> <END_TC> :exmp - *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_012 negative test +:h3. NegSem_220301_CallOperation_019 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_012 decoding error in @decoded redirect assignment > +<TC - 220301_019 verify that non-blocking procedure calls cannot contain nowait parameter > <COMPILE> -<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_012 NegSem_220302_GetcallOperation_012.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220301_CallOperation_019 NegSem_220301_CallOperation_019.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, decoding error in @decoded redirect assignment + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain nowait parameter ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// Failure of this decoding shall cause a test case error. +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. -module NegSem_220302_GetcallOperation_012 { - signature S(charstring p_par); +module NegSem_220301_CallOperation_019 { - type integer I with { variant "32 bit"}; - + signature S() noblock; + type port P procedure { inout S; } with {extension "internal"} @@ -4168,68 +4060,61 @@ module NegSem_220302_GetcallOperation_012 { 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"; - - 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_called() runs on GeneralComp { + //p.getcall(S:{}); + //p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, nowait); + /*alt { + [] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + }*/ } control { - execute(TC_NegSem_220302_GetcallOperation_012(), 5.0); + execute(TC_NegSem_220301_CallOperation_019(), 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: A call of non-blocking signature `@NegSem_220301_CallOperation_019.S' cannot use the `nowait' keyword <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_013 negative test +:h3. NegSem_220301_CallOperation_020 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_013 invalid format value in @decoded redirect assignment > +<TC - 220301_020 verify that calls cannot be used on disconnected ports > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_013 NegSem_220302_GetcallOperation_013.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220301_CallOperation_020 NegSem_220301_CallOperation_020.ttcn > +/***************************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, invalid format value in @decoded redirect assignment + ** @purpose 1:22.3.1, verify that calls cannot be used on disconnected ports ** @verdict pass reject *****************************************************************/ // The following requirements are tested: -// Any other value shall cause an error. +// m) Applying a call operation to an unmapped or disconnected port shall cause a test +// case error. -module NegSem_220302_GetcallOperation_013 { - signature S(universal charstring p_par); +module NegSem_220301_CallOperation_020 { - type integer I with { variant "32 bit"}; - + signature S() noblock; + type port P procedure { inout S; } with {extension "internal"} @@ -4237,398 +4122,1967 @@ module NegSem_220302_GetcallOperation_013 { 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("proprietary") p_par) { - setverdict(pass); - } - [] p.getcall { setverdict(pass); } - } + + testcase TC_NegSem_220301_CallOperation_020() runs on GeneralComp system GeneralComp { + p.call(S:{}); } - - 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"); + control { + execute(TC_NegSem_220301_CallOperation_020(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Port p has neither connections nor mappings. Message cannot be sent on it. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_220301_CallOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220301_001 verify that the response and exception handling part cannot contain an else clause > + +<COMPILE> + +<MODULE TTCN NegSyn_220301_CallOperation_001 NegSyn_220301_CallOperation_001.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an else clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_001 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSyn_220301_CallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:{}) { setverdict(pass); } + [else] {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_001(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `else': syntax error, unexpected ElseKeyword +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_220301_CallOperation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220301_002 verify that the response and exception handling part cannot contain an altstep > + +<COMPILE> + +<MODULE TTCN NegSyn_220301_CallOperation_002 NegSyn_220301_CallOperation_002.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an altstep + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_002 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + altstep a_handleReply() runs on GeneralComp { + [] p.getreply {} + } + + testcase TC_NegSyn_220301_CallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:{}) { setverdict(pass); } + [] a_handleReply() {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_002(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `\(': syntax error, unexpected '\(', expecting DotCatchOpKeyword or DotGetReplyOpKeyword +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `control': syntax error, unexpected ControlKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_001 Ensure that getcall operations are only used on procedure based ports > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_001 NegSem_220302_GetcallOperation_001.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operations are only used on procedure based ports + ** @verdict pass reject + ***************************************************/ + +module NegSem_220302_GetcallOperation_001 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_220302_GetcallOperation_001() runs on GeneralComp { + + connect(self:messagePort, self:messagePort); + + messagePort.send(2); + + alt { + [] messagePort.getcall { //cannot use getcall on a message based port + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Procedure-based operation `getcall' is not applicable to a message-based port of type `@NegSem_220302_GetcallOperation_001.loopbackPort' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_002 Ensure that getcall operation does not allow value assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_002 NegSem_220302_GetcallOperation_002.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall operation does not allow value assignment + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220302_GetcallOperation_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_220302_GetcallOperation_002(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220302_GetcallOperation_002 s_returnTemplate := { + p_par1 := 0, // p_par1 := -, core dump + p_par2 := 4, + p_par3 := 5 + } + + template p_NegSem_220302_GetcallOperation_002 s_wrongTemplate := { + p_par1 := 0, // p_par1 := -, core dump + p_par2 := 2, + p_par3 := 3 + } + + template p_NegSem_220302_GetcallOperation_002 s_callTemplate := { + p_par1 := 1, + p_par2 := 0, // p_par2 := -, core dump + p_par3 := 3 + } + + type port remotePort procedure { + inout p_NegSem_220302_GetcallOperation_002; + } with {extension "internal"} + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_NegSem_220302_GetcallOperation_002:s_callTemplate, 5.0) { + + [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_002:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + var integer v_return; + timer t_timeout:=30.0; + + template p_NegSem_220302_GetcallOperation_002 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall(p_NegSem_220302_GetcallOperation_001:s_acceptTemplate) -> value v_return { + //not allowed assignment + } + [] t_timeout.timeout { + } + } + + } + + + testcase TC_NegSem_220302_GetcallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_wait:=1.0; + + + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + t_wait.start; + while(t_wait.running) { + //this gives a chance for server to still test for second getcall match + } + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO, client:PCO); + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_002()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: at or before token `value': syntax error, unexpected ValueKeyword, expecting ParamKeyword or SenderKeyword +<END_RESULT> +<RESULT COUNT 1> +error: at or before token `testcase': syntax error, unexpected TestcaseKeyword, expecting \$end +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_003 Ensure that getcall for any call does not allow param assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_003 NegSem_220302_GetcallOperation_003.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, Ensure that getcall for any call does not allow param assignment + ** @verdict pass reject + *****************************************************************/ + +module NegSem_220302_GetcallOperation_003 { + + /** + * @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_220302_GetcallOperation_003(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + + template p_NegSem_220302_GetcallOperation_003 s_returnTemplate := { + p_par1 := 0, // p_par1 := -, core dump + p_par2 := 4, + p_par3 := 5 + } + + template p_NegSem_220302_GetcallOperation_003 s_wrongTemplate := { + p_par1 := 0, // p_par1 := -, core dump + p_par2 := 2, + p_par3 := 3 + } + + template p_NegSem_220302_GetcallOperation_003 s_callTemplate := { + p_par1 := 1, + p_par2 := 0, // p_par2 := -, core dump + p_par3 := 3 + } + + type port remotePort procedure { + inout p_NegSem_220302_GetcallOperation_003; + } with {extension "internal"} + + type component GeneralComp { + port remotePort PCO; + } + + function f_ClientQuery() runs on GeneralComp { + var integer v_zero:=0; + var integer v_one:=1; + + PCO.call(p_NegSem_220302_GetcallOperation_003:s_callTemplate, 5.0) { + + [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 2) { + setverdict(fail); + } + [v_one>v_zero] PCO.getreply(p_NegSem_220302_GetcallOperation_003:s_returnTemplate value 1) { //check that boolean guard is correctly evaluated + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } + } + + function f_ServerResponses() runs on GeneralComp { + + var integer v_par1; + var integer v_par3; + timer t_timeout:=30.0; + + template p_NegSem_220302_GetcallOperation_003 s_acceptTemplate := { + p_par1 := ?, + p_par2 := ?, + p_par3 := ? + }; + + + t_timeout.start; + + alt { + [] PCO.getcall -> param(v_par1, v_par3) { //not allowed param assignment for any call + } + [] t_timeout.timeout { + } + } + + } + + + testcase TC_NegSem_220302_GetcallOperation_003() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + timer t_wait:=1.0; + + // map the PTCs to the system port + connect(server:PCO, client:PCO); + + server.start(f_ServerResponses()); + client.start(f_ClientQuery()); + + alt { + [] client.done { + t_wait.start; + while(t_wait.running) { + //this gives a chance for server to still test for second getcall match + } + server.stop; + } + } + + alt { + [] all component.done {} + } + + disconnect(server:PCO, client:PCO); + } + + control{ + execute(TC_NegSem_220302_GetcallOperation_003()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: Parameter redirect cannot be used without signature template +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_004 Verify that error occurs when any from getcall is applied to single port > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_004 NegSem_220302_GetcallOperation_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @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: +// Restriction g +// The PortArrayRef shall be a reference to a port array variable identifier. +module NegSem_220302_GetcallOperation_004 { + + 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 + { + [] 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_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; + } + + control { + execute(TC_NegSem_220302_GetcallOperation_004(), 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_220302_GetcallOperation_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_005 Verify that error occurs when any from getcall is applied to 1D array and index target is array > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_005 NegSem_220302_GetcallOperation_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @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: +// 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 { + + signature S(); + + type port P procedure { + inout S; + } + + const integer c_portCount := 4; + + type component GeneralComp { + port P p[c_portCount]; + } + + 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_005(), 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_220302_GetcallOperation_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_006 Verify that error occurs when any from getcall is applied to 1D array and index target has wrong type > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_006 NegSem_220302_GetcallOperation_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @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: +// 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 { + + 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 + { + 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_006(), 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_220302_GetcallOperation_007 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_007 Verify that any from getcall index redirection for multi-D arrays requires arrays of correct size > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_007 NegSem_220302_GetcallOperation_007.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @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: +// 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 { + + 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[c_portCount][c_portCount]; + } + + 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_007(), 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_220302_GetcallOperation_008 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_008 Verify that any from getcall index redirection for multi-D arrays requires arrays > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_008 NegSem_220302_GetcallOperation_008.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @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: +// 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 { + + 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[c_portCount][c_portCount]; + } + + 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_008(), 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_220302_GetcallOperation_009 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_009 null component in the from clause of the getcall operation > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220302_GetcallOperation_009 NegSem_220302_GetcallOperation_009.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, null component in the from clause of the getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. + +module NegSem_220302_GetcallOperation_009 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + 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_009(), 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_220302_GetcallOperation_011 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_011 applying @decoded to a forbidden field > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_011 NegSem_220302_GetcallOperation_011.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, applying @decoded to a forbidden field + ** @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. + +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 { + port P p; + } + + 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); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_011(), 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_220302_GetcallOperation_012 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_012 decoding error in @decoded redirect assignment > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_220302_GetcallOperation_012 NegSem_220302_GetcallOperation_012.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, decoding error in @decoded redirect assignment + ** @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); + + 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"; + + 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_012(), 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_220302_GetcallOperation_013 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_013 invalid format value in @decoded redirect assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_013 NegSem_220302_GetcallOperation_013.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, invalid format value in @decoded redirect assignment + ** @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); + + 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("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); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_013(), 5.0); + } +} with { encode "RAW"} +<END_MODULE> + +<RESULT COUNT > +error: 'proprietary' is not a valid encoding format +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_220302_GetcallOperation_014 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_014 value of wrong type in @decoded redirect assignment > + +<COMPILE> + +<MODULE TTCN NegSem_220302_GetcallOperation_014 NegSem_220302_GetcallOperation_014.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.2, value of wrong type in @decoded redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Any other value shall cause an error. + +module NegSem_220302_GetcallOperation_014 { + 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; + } + + 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); + } + + 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 - 220302_015 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"} + + 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 formal 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 - 220302_016 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); + p.call(S:{}, nowait); + v_ptc.start(f()); + v_ptc.done; + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_016(), 5.0); + } +} +<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' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSyn_220302_GetcallOperation_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220302_001 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 - 220303_001 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 - 220303_002 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 in the to clause 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_220303_ReplyOperation_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220303_004 null component in the to clause of the reply operation > - p.call(S:{ p_par := v_str }, nowait); - v_ptc.done; +<COMPILE> + +<MODULE TTCN NegSem_220303_ReplyOperation_004 NegSem_220303_ReplyOperation_004.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that reply operation cannot be used on a message port + ** @verdict pass reject + ***************************************************/ +// The following requirements are tested: +// a) A reply operation shall only be used at a procedure-based port. + +module NegSem_220303_ReplyOperation_004 { + + signature S() return integer; + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220303_ReplyOperation_004() runs on GeneralComp { + p.reply(S:{} value 1); setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_013(), 5.0); + control{ + execute(TC_NegSem_220303_ReplyOperation_004(), 5.0); } -} with { encode "RAW"} + +} <END_MODULE> -<RESULT COUNT > -error: 'proprietary' is not a valid encoding format +<RESULT COUNT 1> +error: Procedure-based operation `reply' is not applicable to a message-based port of type `@NegSem_220303_ReplyOperation_004.P' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_014 negative test +:h3. NegSem_220303_ReplyOperation_005 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_014 value of wrong type in @decoded redirect assignment > +<TC - 220303_005 verify that signature not listed in the port definition cannot be used in the reply operation > <COMPILE> -<MODULE TTCN NegSem_220302_GetcallOperation_014 NegSem_220302_GetcallOperation_014.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220303_ReplyOperation_005 NegSem_220303_ReplyOperation_005.ttcn > +/*************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, value of wrong type in @decoded redirect assignment + ** @purpose 1:22.3.3, verify that signature not listed in the port definition cannot be used in the reply operation ** @verdict pass reject - *****************************************************************/ + ***************************************************/ // The following requirements are tested: -// Any other value shall cause an error. +// The type definition of the port shall include the name of the procedure +// to which the reply operation belongs. -module NegSem_220302_GetcallOperation_014 { - signature S(universal charstring p_par); +module NegSem_220303_ReplyOperation_005 { + + signature S(); + signature SNotListed(); + + type port P procedure { + inout S; + } with {extension "internal"} - 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, v_enc := 32; - alt { - [] p.getcall(S:{ p_par := ?}) -> param (v_res := @decoded(v_enc) p_par) { - setverdict (pass); - } - [] p.getcall { setverdict(pass); } - } + port P p; } - - 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"); + function f_server() runs on GeneralComp { + p.getcall; + p.reply(SNotListed:{}); + } + + testcase TC_NegSem_220303_ReplyOperation_005() 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 := v_str }, nowait); - v_ptc.done; - + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_014(), 5.0); + control{ + execute(TC_NegSem_220303_ReplyOperation_005(), 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: Incompatible explicit type specification: `@NegSem_220303_ReplyOperation_005.S' was expected instead of `@NegSem_220303_ReplyOperation_005.SNotListed' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_015 negative test +:h3. NegSem_220303_ReplyOperation_006 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_015 encoding parameter of @decoded redirect assignment applied to incorrect type > +<TC - 220303_006 verify that matching symbols cannot be used in out signature parameters in reply operations > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_015 NegSem_220302_GetcallOperation_015.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220303_ReplyOperation_006 NegSem_220303_ReplyOperation_006.ttcn > +/*************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, encoding parameter of @decoded redirect assignment applied to incorrect type + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in out signature parameters in reply operations ** @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. +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. -module NegSem_220302_GetcallOperation_015 { - signature S(octetstring p_par); +module NegSem_220303_ReplyOperation_006 { - type charstring CS with { variant ""}; - - type port P procedure { - inout S; - } with {extension "internal"} + type record R { + integer field1, + integer field2 + } + signature S(out R par1); + + 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); } - } + port P p; } - - testcase TC_NegSem_220302_GetcallOperation_015() runs on GeneralComp system GeneralComp { - var CS v_src := "abc"; - var octetstring v_os := bit2oct(encvalue(v_src)); + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? }; + p.getcall(S:{-}); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_NegSem_220303_ReplyOperation_006() 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 := v_os }, nowait); - v_ptc.done; - + p.call(S:{-}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_015(), 5.0); + control{ + execute(TC_NegSem_220303_ReplyOperation_006(), 5.0); } -} with { encode "RAW"} + +} <END_MODULE> -<RESULT COUNT > -error: The encoding formal parameter for the '@decoded' modifier is only available to parameter redirects of universal charstrings +<RESULT COUNT 1> +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220302_GetcallOperation_016 negative test +:h3. NegSem_220303_ReplyOperation_007 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_016 incompatible from and sender clause in getcall operation > +<TC - 220303_007 verify that matching symbols cannot be used in inout signature parameters in reply operations > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220302_GetcallOperation_016 NegSem_220302_GetcallOperation_016.ttcn > -/***************************************************************** +<MODULE TTCN NegSem_220303_ReplyOperation_007 NegSem_220303_ReplyOperation_007.ttcn > +/*************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, incompatible from and sender clause in getcall operation + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in inout signature parameters in reply operations ** @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. +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. -module NegSem_220302_GetcallOperation_016 { +module NegSem_220303_ReplyOperation_007 { - signature S(); - - type port P procedure { - inout S; - } with {extension "internal"} + type record R { + integer field1, + integer field2 + } + signature S(inout R par1); + + type port P procedure { + inout S; + } with {extension "internal"} + type component GeneralComp { - var integer vc_int; - port P p; - } + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:{par1 := {field1 := 0, field2 := 5}}); + p.reply(S:{par1 := v_rec}); + } - type component AltComp { - var charstring vc_str; - port P px; - } - - function f() runs on GeneralComp { - var GeneralComp v_compRef := null; + testcase TC_NegSem_220303_ReplyOperation_007() 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:{par1 := {field1 := 0, field2 := 5} }, nowait); 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.getreply {} + [] v_ptc.done {} + } setverdict(pass); } - control { - execute(TC_NegSem_220302_GetcallOperation_016(), 5.0); + control{ + execute(TC_NegSem_220303_ReplyOperation_007(), 5.0); } + } <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' +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template. <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSyn_220302_GetcallOperation_001 negative test +:h3. NegSem_220303_ReplyOperation_008 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220302_001 Verify that error occurs when using index redirection in port.getcall operation > +<TC - 220303_008 verify that error is issued for a missing to clause in a reply operation in case of one-to-many connections > <COMPILE> +<EXECUTE_PARALLEL> -<MODULE TTCN NegSyn_220302_GetcallOperation_001 NegSyn_220302_GetcallOperation_001.ttcn > -/****************************************************************************** +<MODULE TTCN NegSem_220303_ReplyOperation_008 NegSem_220303_ReplyOperation_008.ttcn > +/*************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.2, Verify that error occurs when using index redirection in port.getcall operation + ** @purpose 1:22.3.3, verify that error is issued for a missing to clause in a reply operation in case of one-to-many connections ** @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"} +// c) A to clause shall be present in case of one-to-many connections. + +module NegSem_220303_ReplyOperation_008 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ClientQuery() runs on GeneralComp { - type component GeneralComp - { - port P p; - } + p.call(S:{}, 1.0) { - 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"); } - } - } + [] p.getreply(S:{}) { + } + [] p.catch (timeout) { + } + } + setverdict(pass); + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_client1 := null, v_client2 := null; - 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; + alt { + [v_client1 == null] p.getcall(S:{}) -> sender v_client1 { + if (v_client2 == null) { repeat; } + } + [v_client2 == null] p.getcall(S:{}) -> sender v_client2 { + if (v_client1 == null) { repeat; } + } + } + p.reply(S:{}); // to clause missing, but there are 2 clients! + setverdict(pass); } + + testcase TC_NegSem_220303_ReplyOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:p, client:p); + connect(server:p, client2:p); + + server.start(f_ServerResponses()); + + client2.start(f_ClientQuery()); + client.start(f_ClientQuery()); - control { - execute(TC_NegSyn_220302_GetcallOperation_001(), 5.0); + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_008()); } + } <END_MODULE> <RESULT COUNT 1> -error: Index redirect cannot be used without the 'any from' clause +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_220303_ReplyOperation_001 negative test +:h3. NegSem_220303_ReplyOperation_009 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220303_001 Ensure that reply operations are only used on procedure based ports > +<TC - 220303_009 verify that error is issued for a missing to clause in a reply operation in case of one-to-many connections > <COMPILE> -<MODULE TTCN NegSem_220303_ReplyOperation_001 NegSem_220303_ReplyOperation_001.ttcn > +<MODULE TTCN NegSem_220303_ReplyOperation_009 NegSem_220303_ReplyOperation_009.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.3, verify that values that are not addresses or components cannot be used in the to clause of the reply operation ** @verdict pass reject ***************************************************/ -module NegSem_220303_ReplyOperation_001 { - - type port loopbackPort message { - inout integer - } with {extension "internal"} - +// The following requirements are tested: +// d) All AddressRef items in the to clause shall be of type address, component or of the address +// type bound to the port type (see clause 6.2.9) of the port instance referenced in the reply +// operation. - type component GeneralComp { - port loopbackPort messagePort - } +module NegSem_220303_ReplyOperation_009 { - testcase TC_NegSem_220303_ReplyOperation_001() runs on GeneralComp { + signature S(); - connect(self:messagePort, self:messagePort); + type port P procedure { + inout S; + } with {extension "internal"} - messagePort.send(2); + type component GeneralComp { + port P p; + } - alt { - [] messagePort.receive(2) { - messagePort.reply(3); //cannot use reply on a message based port - setverdict(pass); - } - [] messagePort.receive { - setverdict(fail); - } - } - } + function f_server() runs on GeneralComp { + var integer v_addr := 10; + p.getcall(S:{}); + p.reply(S:{}) to v_addr; + } + + testcase TC_NegSem_220303_ReplyOperation_009() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } - control{ - execute(TC_NegSem_220303_ReplyOperation_001()); - } + control{ + execute(TC_NegSem_220303_ReplyOperation_009(), 5.0); + } } <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 +error: Type mismatch: The type of the operand should be a component type instead of `integer' <END_RESULT> <END_TC> :exmp *---------------------------------------------------------------------* -:h3. NegSem_220303_ReplyOperation_002 negative test +:h3. NegSem_220303_ReplyOperation_010 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 220303_002 null component in the to clause of the reply operation > +<TC - 220303_010 verify that reply operation on a disconnected port causes an error > <COMPILE> <EXECUTE_PARALLEL> -<MODULE TTCN NegSem_220303_ReplyOperation_002 NegSem_220303_ReplyOperation_002.ttcn > +<MODULE TTCN NegSem_220303_ReplyOperation_010 NegSem_220303_ReplyOperation_010.ttcn > /*************************************************** ** @version 0.0.1 - ** @purpose 1:22.3.3, null component in the to clause of the reply operation + ** @purpose 1:22.3.3, verify that reply operation on a disconnected port causes an error ** @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 { +// f) Applying a reply operation to an unmapped or disconnected port shall cause a test +// case error. +module NegSem_220303_ReplyOperation_010 { signature S(); @@ -4641,32 +6095,32 @@ module NegSem_220303_ReplyOperation_002 { } 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; + disconnect(self:p, mtc:p); + p.reply(S:{}); } - testcase TC_NegSem_220303_ReplyOperation_002() runs on GeneralComp system GeneralComp { + testcase TC_NegSem_220303_ReplyOperation_010() 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) { } - } + p.call(S:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } setverdict(pass); } control{ - execute(TC_NegSem_220303_ReplyOperation_002(), 5.0); + execute(TC_NegSem_220303_ReplyOperation_010(), 5.0); } } <END_MODULE> <RESULT COUNT 1> -Dynamic test case error: The second argument of connect operation contains the null component reference. +Dynamic test case error: Port p has neither connections nor mappings. Message cannot be sent on it. <END_RESULT> <END_TC> @@ -5085,7 +6539,8 @@ error: Indices of multi-dimensional port arrays can only be redirected to an int *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220304_getreply_operation_006 { @@ -5151,7 +6606,8 @@ Dynamic test case error: The second argument of connect operation contains the n *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220304_getreply_operation_007 { @@ -5979,6 +7435,70 @@ error: The encoding format parameter for the '@decoded' modifier is only availab <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_220304_getreply_operation_021 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220304_021 incompatible template in the from clause of the getreply operation > + +<COMPILE> + +<MODULE TTCN NegSem_220304_getreply_operation_021 NegSem_220304_getreply_operation_021.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.4, incompatible template in the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the getcall operation. + +module NegSem_220304_getreply_operation_021 { + + signature S() return 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.reply(S:{} value 1); + } + + testcase TC_NegSem_220304_getreply_operation_021() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from v_addr {} // error expected + [] p.getreply {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_021(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT > +error: The type of the template should be a component type instead of `charstring' +<END_RESULT> + +<END_TC> +:exmp + + *---------------------------------------------------------------------* :h3. NegSyn_220304_getreply_operation_001 negative test .*---------------------------------------------------------------------* @@ -6061,10 +7581,10 @@ error: Index redirect cannot be used without the 'any from' clause // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_001 { signature S() exception(charstring, octetstring); @@ -6125,10 +7645,10 @@ error: Type `integer' is not present on the exception list of signature `@NegSem // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_002 { signature S(); @@ -6189,10 +7709,10 @@ error: Signature `@NegSem_220305_raise_operation_002.S' does not have exceptions // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_003 { type integer MyInt1 (1..10); @@ -6446,9 +7966,11 @@ error: Signature `@NegSem_220305_raise_operation_006.S2' is not present on the i ** @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: -// 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. +// All AddressRef items in the to clause shall be of type address, component or of the +// address type bound to the port type (see clause 6.2.9) of the port instance referenced +// in the raise operation. module NegSem_220305_raise_operation_007 { signature S() exception(integer); @@ -6509,8 +8031,10 @@ error: A component reference was expected as operand ** @purpose 1:22.3.5, null in the to clause of the raise operation ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220305_raise_operation_008 { signature S() exception(integer); @@ -6617,6 +8141,63 @@ Dynamic test case error: Port p has neither connections nor mappings. Message ca <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_220305_raise_operation_010 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220305_010 raise operation on disconnected and unmapped ports > + +<COMPILE> + +<MODULE TTCN NegSem_220305_raise_operation_010 NegSem_220305_raise_operation_010.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.5, exception template not conforming to template(value) restriction + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) The TemplateInstance shall conform to the template(value) restriction (see clause 15.8). + +module NegSem_220305_raise_operation_010 { + signature S() exception(charstring, octetstring); + + 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, charstring:?); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_010() 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_010(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: A specific value was expected instead of any value +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_220306_catch_operation_001 negative test .*---------------------------------------------------------------------* @@ -7029,7 +8610,8 @@ error: Indices of multi-dimensional port arrays can only be redirected to an int *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220306_catch_operation_006 { @@ -7094,7 +8676,8 @@ Dynamic test case error: The second argument of connect operation contains the n *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220306_catch_operation_007 { @@ -7576,6 +9159,71 @@ error: The types in `from' clause and `sender' redirect are not the same: `@NegS <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_220306_catch_operation_015 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 220306_015 incompatible template in the from clause of the catch operation > + +<COMPILE> + +<MODULE TTCN NegSem_220306_catch_operation_015 NegSem_220306_catch_operation_015.ttcn > +/***************************************************************** + ** @version 0.0.1 + ** @purpose 1:22.3.6, incompatible template in the from clause of the catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// clause 6.2.9) of the port instance referenced in the catch operation. + +module NegSem_220306_catch_operation_015 { + + signature S() exception (charstring); + + 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, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from v_addr {} // error expected + [] p.catch {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_015(), 5.0); + } +} +<END_MODULE> + +<RESULT COUNT 1> + error: The type of the template should be a component type instead of `charstring' +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSyn_220306_catch_operation_001 negative test .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script b/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script index 078ec0ac19caf5ea9e650f198a10086e968c2f8c..9d255b4d3d6d11db896134e030c3e91a776a1cd8 100644 --- a/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script +++ b/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script @@ -4281,6 +4281,280 @@ error: `omit' value is not allowed in this context <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_B010201_value_list_001 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - B010201_001 Ensure that the IUT correctly handles template matching with all from clause > + +<COMPILE> + +<MODULE TTCN NegSem_B010201_value_list_001 NegSem_B010201_value_list_001.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//The type of the template list and the member type of the template in the all from clause shall be compatible. +// Restriction B + +module NegSem_B010201_value_list_001 { + + type set of integer SoI; + + template SoI m_SoI := {1,2,3,4}; + template float mw_SoI := (all from m_SoI); //error: m_SoI is integer, mw_SoI is float + + type port loopbackPort message { + inout float + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_001() runs on GeneralComp { + + var float v_testMessage := 2.0; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_001()); + } + +} +<END_MODULE> + +<RESULT COUNT 4> +error: float value was expected +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_B010201_value_list_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - B010201_002 Ensure that the IUT correctly handles template matching with all from clause > + +<COMPILE> + +<MODULE TTCN NegSem_B010201_value_list_002 NegSem_B010201_value_list_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_002 { + + type set of integer SoI; + + template SoI m_SoI := {1,*,4}; + template integer mw_SoI := (all from m_SoI); //error: m_SoI contains AnyElementsOrNone + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_002() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_002()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: 'all from' can not refer to permutation or AnyElementsOrNone +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_B010201_value_list_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - B010201_003 Ensure that the IUT correctly handles template matching with all from clause > + +<COMPILE> + +<MODULE TTCN NegSem_B010201_value_list_003 NegSem_B010201_value_list_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_003 { + + type record of integer RoI; + + template RoI m_RoI := {permutation(0,1,3,*),2}; + template integer mw_RoI := (all from m_RoI); //error: m_RoI contains permutation + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_003() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_RoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_003()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: 'all from' can not refer to permutation or AnyElementsOrNone +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_B010201_value_list_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - B010201_004 Ensure that the IUT correctly handles template matching with all from clause > + +<COMPILE> + +<MODULE TTCN NegSem_B010201_value_list_004 NegSem_B010201_value_list_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template list corretly + ** @verdict pass accept reject + ***************************************************/ + +// The following requirements are tested: +// e) Templates in the template list shall obey the template (present) restriction + +module NegSem_B010201_value_list_004 { + + type record MessageType { + integer field1, + charstring field2 + } + + template integer t_omit := omit; + + template MessageType t_mes := { + field1 := (1, 2, t_omit), // present restriction does not allow omit + field2 := ("abc", "bc") + } + + type port loopbackPort message { + inout MessageType + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage := { + field1:= 1, + field2:= "abc" + } + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(t_mes) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_004()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +error: `omit' value is not allowed in this context +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_B010204_any_value_or_none_001 negative test .*---------------------------------------------------------------------* @@ -6228,22 +6502,22 @@ error: permutation match cannot be used for type `integer' :exmp *---------------------------------------------------------------------* -:h3. NegSem_B010401_length_restrictions_002 negative test +:h3. NegSem_B010401_length_restrictions_001 negative test .*---------------------------------------------------------------------* :xmp tab=0. -<TC - B010401_002 Ensure that the IUT correctly handles template matching of value length definitions > +<TC - B010401_001 Ensure that the IUT correctly handles template matching of value length definitions > <COMPILE> -<MODULE TTCN NegSem_B010401_length_restrictions_002 NegSem_B010401_length_restrictions_002.ttcn > +<MODULE TTCN NegSem_B010401_length_restrictions_001 NegSem_B010401_length_restrictions_001.ttcn > /*************************************************** ** @version 0.0.1 ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions ** @verdict pass reject ***************************************************/ -module NegSem_B010401_length_restrictions_002 { +module NegSem_B010401_length_restrictions_001 { type record MessageType { @@ -6264,7 +6538,7 @@ module NegSem_B010401_length_restrictions_002 { port loopbackPort messagePort } - testcase TC_NegSem_B010401_length_restrictions_002() runs on GeneralComp { + testcase TC_NegSem_B010401_length_restrictions_001() runs on GeneralComp { var MessageType v_testMessage; @@ -6300,7 +6574,7 @@ module NegSem_B010401_length_restrictions_002 { } control{ - execute(TC_NegSem_B010401_length_restrictions_002()); + execute(TC_NegSem_B010401_length_restrictions_001()); } } @@ -6315,7 +6589,7 @@ error: There are fewer \(5\) elements in the string than it is allowed by the le :exmp *---------------------------------------------------------------------* -:h3. NegSem_B010401_length_restrictions_004 negative test +:h3. NegSem_B010401_length_restrictions_002 negative test .*---------------------------------------------------------------------* :xmp tab=0. @@ -6323,14 +6597,14 @@ error: There are fewer \(5\) elements in the string than it is allowed by the le <COMPILE> -<MODULE TTCN NegSem_B010401_length_restrictions_004 NegSem_B010401_length_restrictions_004.ttcn > +<MODULE TTCN NegSem_B010401_length_restrictions_002 NegSem_B010401_length_restrictions_002.ttcn > /*************************************************** ** @version 0.0.1 ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions ** @verdict pass reject ***************************************************/ -module NegSem_B010401_length_restrictions_004 { +module NegSem_B010401_length_restrictions_002 { type record MessageType { @@ -6350,7 +6624,7 @@ module NegSem_B010401_length_restrictions_004 { port loopbackPort messagePort } - testcase TC_NegSem_B010401_length_restrictions_004() runs on GeneralComp { + testcase TC_NegSem_B010401_length_restrictions_002() runs on GeneralComp { var MessageType v_testMessage; @@ -6382,7 +6656,7 @@ module NegSem_B010401_length_restrictions_004 { } control{ - execute(TC_NegSem_B010401_length_restrictions_004()); + execute(TC_NegSem_B010401_length_restrictions_002()); } } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..43d05b6bf8efdc923f197c7faedc6f1cf7c97ead --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that identifiers for fields of structured types, enumerated values and groups do not have to be globally unique. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/* The following requirements are tested: + * Within the same module,they shall only be reused for enumerated values within other enumerated types or as identifiers for fields of structured types. In addition, enumeration values shall not be used as names of value or + * template definitions of imported enumeration types, defining the given enumeration value + */ + +module Sem_050202_Uniqueness_004 { + type component GeneralComp { + } + + type enumerated MyFirstEnumType {MyFirstEnumValue, MySecondEnumValue} + type enumerated MySecondEnumType {MyFirstEnumValue, MySecondEnumValue} + //enumerated values within other enumerated types or as identifiers for fields of structured types + + testcase TC_Sem_050202_Uniqueness_004() runs on GeneralComp { + + var MyFirstEnumType v_enum := MySecondEnumValue; + var MySecondEnumType v_enum_2 := MySecondEnumValue; + + if (match(v_enum, MyFirstEnumType:MySecondEnumValue) and match(v_enum_2, MySecondEnumType:MySecondEnumValue)) { // local value + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050202_Uniqueness_004()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9c0777ba5bae17a45437c09c05a0fab0d61b4303 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.2.2, Ensure that identifiers for fields of structured types, enumerated values and groups do not have to be globally unique. + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the same module,they shall only be reused for enumerated values within other enumerated types or as identifiers for fields of structured types. In addition, enumeration values shall not be used as names of value or + * template definitions of imported enumeration types, defining the given enumeration value + */ + +module Sem_050202_Uniqueness_005 { + type component GeneralComp { + } + + type enumerated MyFirstEnumType {MyInt,MySecondEnumValue}; + + type record MyRec { + integer Myint + } + + testcase TC_Sem_050202_Uniqueness_005() runs on GeneralComp { + + var MyFirstEnumType v_enum := MySecondEnumValue; + var MyRec v_rec; + + v_rec.Myint := 1; + + if (match(v_enum, MyFirstEnumType:MySecondEnumValue) and match(v_rec.Myint,1)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_050202_Uniqueness_005()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_008.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_008.ttcn index ec9fc9f6ba011eeaa0454ad913fd7e6db8c754e8..8b230142598781e7d0428a5e83a64ce242f9e1c1 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_008.ttcn @@ -23,7 +23,7 @@ // Restriction e) // The template instance shall not refer to elements of the component type in a runs on clause. -module NegSem_05040102_parameters_of_kind_template_008 { +module NegSem_05040102_parameters_of_kind_template_008 language "TTCN-3:2016" { type component GeneralComp { var template integer vc_int := ?; } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cdd0bbdd1d0b4eca5d9b9360be1874d6cb273b3a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn @@ -0,0 +1,43 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an out parameter + ** @verdict pass reject + *****************************************************************/ + +module NegSem_05040102_parameters_of_kind_template_018 { + + type component C { + var template integer v_int := ?; + } + + altstep a_test(out template integer p_par) runs on C { + [] any timer.timeout { + p_par := ?; + } + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_018() runs on C { + //var integer v_int := ?; //original line + activate(a_test(v_int)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040102_parameters_of_kind_template_018()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28bb48b3bc4f7b28a5b9cce4afda6a953b79249f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn @@ -0,0 +1,43 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.2, Verify that template parameter of an activated altstep cannot be an inout parameter + ** @verdict pass reject + *****************************************************************/ + +module NegSem_05040102_parameters_of_kind_template_019 { + + type component C { + var template integer v_int := ?; + } + + altstep a_test(inout template integer p_par) runs on C { + [] any timer.timeout { + p_par := ?; + } + } + + testcase TC_NegSem_05040102_parameters_of_kind_template_019() runs on C { + //var integer v_int := ?; //original line + activate(a_test(v_int)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040102_parameters_of_kind_template_019()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..de9d79e63189b508bcb60c9ab764a2fce39073fe --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that functions with timer parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(inout timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_001() runs on C system C { + timer t_tmr := 0.1; + var C v_ptc := C.create; + t_tmr.start; + v_ptc.start(f_test(t_tmr)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_001()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a4bf1cbad0b567b1310131b134c1c43ea93472bc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that altsteps with timer parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_002 { + + type component C { + } + + altstep f_test(inout timer p_tmr) runs on C { + [] p_tmr.timeout { + setverdict(pass); + } + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_002() runs on C system C { + timer t_tmr := 0.1; + var C v_ptc := C.create; + t_tmr.start; + v_ptc.start(f_test(t_tmr)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dd10f2e136823c5c4b5f575b082bf4dc761a9d21 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn @@ -0,0 +1,41 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that test cases cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_003 { + + type component C { + } + + testcase TC_NegSem_05040103_parameters_of_kind_timer_003(timer p_tmr) runs on C { + p_tmr.timeout; + setverdict(pass); + } + + control { + timer t_tmr := 0.1; + t_tmr.start; + execute(TC_NegSem_05040103_parameters_of_kind_timer_003(t_tmr)); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..30f8fee7a15579668bae3a2d561d75de38ce3401 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn @@ -0,0 +1,43 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that templates cannot have timer parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040103_parameters_of_kind_timer_004 { + + type component C { + } + + template boolean m_msg (timer p_tmr) := p_tmr.running; + + testcase TC_NegSem_05040103_parameters_of_kind_timer_004() runs on C system C { + timer t_tmr := 0.1; + t_tmr.start; + log(m_msg(t_tmr)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040103_parameters_of_kind_timer_004()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dded5798b3299b9bfcf7288f21619ee645dd6574 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that in timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_001 { + + type component C { + } + + function f_test(in timer p_tmr) { + p_tmr.timeout; + } + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_001() runs on C { + timer t_tmr := 1.0; + t_tmr.start; + f_test(t_tmr); + setverdict(pass); + } + + control { + execute(TC_NegSyn_05040103_parameters_of_kind_timer_001()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..09d71fb07a4a6041c586c69fdd1c345e49313101 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that out timer parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSyn_05040103_parameters_of_kind_timer_002 { + + type component C { + + } + + function f_test(out timer p_tmr) { + + p_tmr.start(1.0); + + } + + + testcase TC_NegSyn_05040103_parameters_of_kind_timer_002() runs on C{ + + timer t_tmr; + + f_test(t_tmr); + + t_tmr.timeout; + setverdict(pass); + + } + + + control { + + execute(TC_NegSyn_05040103_parameters_of_kind_timer_002()); + + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..188a9f3d1307682ce31e1d5246b09b1e8b852775 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that inout prefix can be used for timer parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Formal timer parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module Sem_05040103_parameters_of_kind_timer_002 { + + type component C { + } + + function f_test(inout timer p_tmr) { + p_tmr.timeout; + setverdict(pass); + } + + testcase TC_Sem_05040103_parameters_of_kind_timer_002() runs on C { + timer t_tmr := 0.1; + t_tmr.start; + f_test(t_tmr); + } + + control { + execute(TC_Sem_05040103_parameters_of_kind_timer_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b5b26d1d484cbae3600a46c1da1a082e8790eec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.3, Verify that altstep can have timer parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal timer parameters, with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module Sem_05040103_parameters_of_kind_timer_003 { + + type component C { + } + + altstep a_test(timer p_tmr) { + [] p_tmr.timeout { + setverdict(pass); + } + } + + testcase TC_Sem_05040103_parameters_of_kind_timer_003() runs on C { + timer t_tmr := 0.1; + t_tmr.start; + a_test(t_tmr); + } + + control { + execute(TC_Sem_05040103_parameters_of_kind_timer_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4b276f8420490d7b4fe6b3db9db26ba0a9c2ba14 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that functions with port parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_001 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(P p_port) runs on C { + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_001() runs on C system C { + var C v_ptc := C.create; + connect(mtc:p,v_ptc:p); + v_ptc.start(f_test(p)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_001()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..795f50c8d35b4c00c0e3938f6f95dcd62f51b8d7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that altsteps with port parameters cannot be used in component.start operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_002 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + altstep a_test(P p_port) runs on C { + [] p_port.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_002() runs on C system C { + var C v_ptc := C.create; + connect(mtc:p, mtc:p); + p.send(1); + v_ptc.start(a_test(p)); + v_ptc.done; + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..add40fb90812cd8c6686fdea1ea44ecd5bddb249 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that in port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_003 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(in P p_port) { + p_port.send(1); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_003() runs on C { + connect(self:p,self:p); + f_test(p); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7f8ba72399798d060f5f7591acb3c61b2edd2951 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that out port parameters are not allowed + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module NegSem_05040104_parameters_of_kind_port_004 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(out P p_port) { + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_004() runs on C { + connect(self:p,self:p); + f_test(p); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_004()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..674f1848cbb9f69ddd03cc93a4aeba1755bc1b42 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that test cases cannot have port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_005 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + testcase TC_Test(P p_port) runs on C { // should cause a compilation error + p_port.send(1); + setverdict(pass); + } + + testcase TC_NegSem_05040104_parameters_of_kind_port_005(P p_port) runs on C { + connect(self:p,self:p); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ee2430171ab85703c57040eacff5c94020d0110e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that templates cannot contain port parameters + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// Only function and altstep definitions may have formal port parameters, - with the exception of functions or +// altsteps started as test component behaviour (see clause 21.3.2). + +module NegSem_05040104_parameters_of_kind_port_006 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + template boolean m_msg(P p_par) := p_par.checkstate("Started"); + + testcase TC_NegSem_05040104_parameters_of_kind_port_006() runs on C system C { + log(m_msg(p)); + setverdict(pass); + } + + control { + execute(TC_NegSem_05040104_parameters_of_kind_port_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..370c366853bcb796150798ef2372fc47661f86c8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.1.4, Verify that inout prefix can be used for port parameters + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Formal port parameters shall be inout parameters, which can optionally be indicated by the keyword inout. + +module Sem_05040104_parameters_of_kind_port_002 { + + type port P message { + inout integer + } with {extension "internal"} + + type component C { + port P p; + } + + function f_test(inout P p_port) { + p_port.send(1); + setverdict(pass); + } + + testcase TC_Sem_05040104_parameters_of_kind_port_002() runs on C { + connect(self:p,self:p); + f_test(p); + } + + control { + execute(TC_Sem_05040104_parameters_of_kind_port_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn index f04af6eb2d8d48b2f778c4ec52181d4dbf1520a6..0beabdc3f7dba0e61df2e26ca971667368e5a75f 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_057.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_057 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn index 31ae0c129106cff8d1b3fbd8fc8db9600a09669a..bf680ef4adcf0e0bc50b371067a0ef98ba7fca4e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_058.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_058 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn index aa7a70991750d50ba294555d90c888e159fb8166..f8f34b71d4a82552de60bf42985d9e260b42b718 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_059.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_059 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn index 72939bcafdf7385fae1811d584bc008f4774ef66..842924ef1a6d54679210865873ef5ace1819185e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_060.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_060 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn index 5b603fb38dd45d289faa2871b36d68b7607d1d7a..704f023ae5a936eff226e1af019aa27196ee83bc 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_061.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_061 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn index 85019a369b25488df270d48c8606605dbbc0511d..0ab6053c0cd4d9aeea5210cbedf36ed18db9f8e2 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_062.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of functions ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_062 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn index 492bdcb26500ab3713a44adbfb87aae29f75abf6..35857e90bcfd1d1f49d65dc45a49bb93653e355f 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_063.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_063 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn index 4080aa0e503c81533df8ac6fc4588215c23a36ad..e6201a83b1950271294dbb7ed0798232e0dbd94e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_064.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_064 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn index 9ed5cbfd8425f4a6549f10d0d4e38bee18a59b61..5cc442e2ac501d8053872a0721cd6de05c539f45 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_065.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that constants cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_065 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn index 34af805b4556884254b744181982ce5698bb49a5..165e30067ec7ff34b56ba16eaa3969c52356177c 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_066.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_066 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn index e9182dc35cc5863d7304decaa7ef6ebd1ccb4d44..4faa5362cd0aca3a95583ff9c54d4cf2a656607c 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_067.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_067 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn index 31e8cd72691e47ad4732152f58b079365fd92481..2ed19272d981bb68b9d9d30fae7775af1069a8ba 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_068.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template parameters cannot be used as out formal template parameters of altsteps ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_068 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn index 264c8ca5fcb555a7449265a2a99e296a31b631c1..6497535867bf0b2cefa96918d2a5d2e2611b83c4 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_069.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that literals cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_069 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn index 2561ab5943fc558c410f5eb8c7db094ee5faae61..bec99bbf2a6b31903e0f8cedc675401afbeac41e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_070.ttcn @@ -14,17 +14,15 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that module parameters cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. - module NegSem_050402_actual_parameters_070 { type component GeneralComp { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn index da0bdd62ecec57ed0a8d7e81cf93311558c999d2..b974e36ad90e52557c345da10d93cfb0ca7f687d 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_071.ttcn @@ -20,9 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_071 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn index 620eeeffd74a8f47abbeb41b67f500f25ca14749..aaccf24d57b9ca93468218a15082a14dc1c88ed6 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_072.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that function calls cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_072 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn index 40590148609040b9c5858fe7a3c6b290b331303c..cc19d27a9c23efa49e8648ae57f934ab740740b8 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_073.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that expressions cannot be used as out formal template parameters of test cases ** @verdict pass reject ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_073 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn index 184027d3c863d2704d251ceae253d7ef1a3eafe7..e3c43356eed89b0038655896364b6f3747c043d5 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_074.ttcn @@ -20,9 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module NegSem_050402_actual_parameters_074 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f1e754625e1545be07dded43df81194db9ac39c5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_146 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_146() runs on GeneralComp { + f_test(1); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_146()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..13f437e975eda0e2fa495dd0862a7206fc0c4c5a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_147 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_147() runs on GeneralComp { + var integer v_val := 5; + f_test(10 + f_ret() - v_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_147()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25602c511709ce990ab43a019be04a655a2119cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @author STF 521 + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_148 { + + type component GeneralComp { + } + + function f_ret() return integer { + return 4; + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_148() runs on GeneralComp { + f_test(f_ret()); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_148()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..67fde68f9d4f2e77d922ea1b07ef780a56cfc627 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_149 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_149() runs on GeneralComp { + f_test(PX_VAL); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_149()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2926e1751dc1a4386620de55a29e3d0519bf66da --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_150 { + + type component GeneralComp { + } + + template integer mw_msg := ?; + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_150() runs on GeneralComp { + f_test(mw_msg); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_150()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7db808996630e1b64a4904bb55373a3f142f7a29 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_151 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_151() runs on GeneralComp { + const integer c_val := 3; + f_test(c_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_151()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3e39de03b329392658773fb019f6ffbe09b61cda --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that literal cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_152 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_152() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_152()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1498d119a4ce559e4a6d8458cddfe6efa35deb93 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that expression cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_153 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_NegSem_050402_actual_parameters_153() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(10 + f_ret() - v_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_153()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ffaa6efcf67e1faa7fb50181196f044b50a50b91 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function calls cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_154 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_ret() return integer { + return 4; + } + + testcase TC_NegSem_050402_actual_parameters_154() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(f_ret()); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_154()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5b09ce575367f1fd77d4377e868c5844269c1baa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that module parameters cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_155 { + + type component GeneralComp { + } + + modulepar integer PX_VAL := 2; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_155() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(PX_VAL); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_155()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dcf2f6ae89c9a625f48a5fa763a60919f8f8cba9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_156 { + + type component GeneralComp { + } + + template integer mw_msg := ?; + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_156() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(mw_msg); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_156()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f12cc6ae080a14459822f1fe36ca829c3552cc60 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that constants cannot be used as actual out value parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module NegSem_050402_actual_parameters_157 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_NegSem_050402_actual_parameters_157() runs on GeneralComp { + const integer c_val := 3; + timer t_tmr := 0.1; + t_tmr.start; + a_test(c_val); + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_157()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3da92c731ee93d96376811febb3b40b6ded5734e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn @@ -0,0 +1,43 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that function cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_158 { + + type component GeneralComp { + } + + function f_test(in integer p_val) { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_158() runs on GeneralComp { + f_test(1, 2); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_158()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fe877f1af5e2d9141fa6759ed2048afc3300a237 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn @@ -0,0 +1,41 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that templates cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_159 { + + type component GeneralComp { + } + + template integer mw_range (integer p_par) := (0..p_par); + + testcase TC_NegSem_050402_actual_parameters_159() runs on GeneralComp { + log(mw_range(1, 2)); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_NegSem_050402_actual_parameters_159()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5e66c90eb5e35c3a97e815a0d6e68c16bfd15e8c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that altstep cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_160 { + + type component GeneralComp { + } + + altstep a_test(in integer p_val) { + [] any timer.timeout { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + } + + testcase TC_NegSem_050402_actual_parameters_160() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(1, 2); // tested parameter passing + } + + control { + execute(TC_NegSem_050402_actual_parameters_160()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ce90c416ee6e9b5acf8d973c6ab5aa5f155957d4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn @@ -0,0 +1,39 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that testcase cannot have more actual than formal parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The number of actual parameters in the list notation shall not exceed the number of parameters +// in the formal parameter list. + +module NegSem_050402_actual_parameters_161 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_161(in integer p_val) runs on GeneralComp { + if (p_val == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_161(1, 2)); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b59c1043ca62aa3ab0702ee3fc2de4589f94e107 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that restricted template variables cannot be passed to unrestricted inout template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_162 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_162() runs on GeneralComp { + var template(value) R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_162()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f3ec20574822012e670cebee9479471cf4186ae0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that unrestricted template variables cannot be passed to restricted inout template parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_163 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template(value) R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_163() runs on GeneralComp { + var template R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_163()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bde825bea546831ff10f3ee9816ad818309050bd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that restricted template variables cannot be passed to inout template parameters with a different restriction + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// For inout formal template parameters, the template restriction of the actual and the formal parameter must be the same. + +module NegSem_050402_actual_parameters_164 { + + type component GeneralComp { + } + + type record R1 { + integer field1, + integer field2 optional + } + + function f_test (inout template(omit) R1 p_val) { + if (valueof(p_val) == { field1 := 1, field2 := 2 }) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_164() runs on GeneralComp { + var template(value) R1 v_rec := { 1, 2 }; + f_test(v_rec); + } + + control { + execute(TC_NegSem_050402_actual_parameters_164()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ab3e0c7ec7c976aaaa27188cf72db46176885838 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_165 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 2; + } + + testcase TC_NegSem_050402_actual_parameters_165() runs on GeneralComp { + var integer vm_msg; + f_test(vm_msg); // tested parameter passing + if (match(2, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_165()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e3943a1f378c4671fd493e1d5c27feea7738e374 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_166 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(in integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_166() runs on GeneralComp { + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_166()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f7018af610b8110e61afb0299569a31a5e5aaa20 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_167 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(out integer p_val) { + p_val := 4; // out parameter shall have a value before we can pass it to a function + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_167() runs on GeneralComp { + var integer v_val; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_167()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..530acc2b5b8586b51c63e89e9fe32009447b0a97 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_168 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := 0; + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_168() runs on GeneralComp { + var integer v_val := 5; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_168()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ed93e26ca0ae455e20d4e820ccf0875926743fdb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_169 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + testcase TC_NegSem_050402_actual_parameters_169() runs on GeneralComp { + var R v_val := { field1 := 10 }; + f_test(v_val.field1); // tested parameter passing + if (match( { field1 := 0 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_169()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e3a88438a8b9ee2b8c9c9ba713fb30256e905834 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of functions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_170 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + function f_test(out template integer p_val) { + p_val := ?; + } + + function f_caller(in R p_param) { + f_test(p_param.field1); // tested parameter passing + if (match( { field1 := 0 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_170() runs on GeneralComp { + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_170()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6de22fcf3a0e92943a07ce2112994c48e3cfe4f2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_171 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + testcase TC_NegSem_050402_actual_parameters_171() runs on GeneralComp { + var integer vm_msg := 2; + t.start; + a_test(vm_msg); // tested parameter passing + if (match(0, vm_msg)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_171()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2499d0d57e17ad9b39f5d6ae237020615560cd29 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_172 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(in integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_172() runs on GeneralComp { + t.start; + f_caller(3); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_172()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..777d4bf40e269a58508086958217e31e61c41554 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_173 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(out integer p_val) runs on GeneralComp { + p_val := 4; // out parameter shall have a value before we can pass it to a function + a_test(p_val); // tested parameter passing + if (match(0 , p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_173() runs on GeneralComp { + var integer v_val; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_173()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..86ff11a724b695fc5aa77806e0e371ac00d128cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_174 { + + type component GeneralComp { + timer t := 0.0; + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 0; + } + } + + function f_caller(inout integer p_val) runs on GeneralComp { + a_test(p_val); // tested parameter passing + if (match(0, p_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + + testcase TC_NegSem_050402_actual_parameters_174() runs on GeneralComp { + var integer v_val := 5; + t.start; + f_caller(v_val); // this parameter passing is not a subject of the test + } + + control { + execute(TC_NegSem_050402_actual_parameters_174()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..16b0736d3fddc5e14901fdd2f5b6b39022fcbc78 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variable element reference cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_175 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + testcase TC_NegSem_050402_actual_parameters_175() runs on GeneralComp { + var R v_val := { field1 := 10 }; + t.start; + a_test(v_val.field1); // tested parameter passing + if (match({ field1 := 5 }, v_val)) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_NegSem_050402_actual_parameters_175()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9581de2dac020b012d968c29f481a1cd33a224c0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_176 { + + type component GeneralComp { + timer t := 0.0; + } + + type record R { + integer field1 + } + + altstep a_test(out template integer p_val) runs on GeneralComp { + []t.timeout { + p_val := 5; + } + } + + function f_caller(in R p_param) runs on GeneralComp { + a_test(p_param.field1); // tested parameter passing + if (match({ field1 := 5 }, p_param)) { setverdict(pass); } + else { setverdict(fail); } + } + + testcase TC_NegSem_050402_actual_parameters_176() runs on GeneralComp { + t.start; + f_caller({field1 := 11 }); + } + + control { + execute(TC_NegSem_050402_actual_parameters_176()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..af98d547cdd23277e9e6df7f316ca2353957a80f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn @@ -0,0 +1,41 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value variables cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_177 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_177(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var integer vm_msg := 2; + execute(TC_NegSem_050402_actual_parameters_177(vm_msg)); // tested parameter passing + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d3f1da4f92639bd3365b415ba2e14d8cdcb48ffa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value in parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_178 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_178(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in integer p_val) { + execute(TC_NegSem_050402_actual_parameters_178(p_val)); // tested parameter passing + } + + control { + f_caller(3); // this parameter passing is not a subject of the test + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0d6ad402a3f8f56d5e4ce4fbf193b555f1ddc68b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value out parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_179 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_179(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(out integer p_val) { + execute(TC_NegSem_050402_actual_parameters_179(p_val)); // tested parameter passing + } + + control { + var integer vm_val; + f_caller(vm_val); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ee00adf1abadb28c5c8873f83f4cbcc7d30af5b1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that value inout parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_180 { + + type component GeneralComp { + } + + testcase TC_NegSem_050402_actual_parameters_180(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(inout integer p_val) { + execute(TC_NegSem_050402_actual_parameters_180(p_val)); // tested parameter passing + } + + control { + var integer vm_val := 5; + f_caller(vm_val); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d6b2fa44dc6c37862deb0cdb8ad1de82e98f83e8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variable element reference cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_181 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_181(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + control { + var R v_val := { field1 := 10 }; + execute(TC_NegSem_050402_actual_parameters_181(v_val.field1)); // tested parameter passing + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3cdbc6060e955171e29da524fd553e0e85ca91de --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters cannot be used as out formal template parameters of test cases + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template +// parameters of structured types. + +module NegSem_050402_actual_parameters_182 { + + type component GeneralComp { + } + + type record R { + integer field1 + } + + testcase TC_NegSem_050402_actual_parameters_182(out template integer p_val) runs on GeneralComp { + p_val := ?; + setverdict(pass); + } + + function f_caller(in R p_param) { + execute(TC_NegSem_050402_actual_parameters_182(p_param.field1)); // tested parameter passing + } + + control { + var R mw_t := { field1 := 1 }; + f_caller(mw_t); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn index ccd1488d15d008f140f0d78c55e61cb0552fe4d8..dbfdc1852480a5ce34ebb4eeee4e969d0ebf9f4a 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_113.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_113 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn index 340869f1e36b91c0472f2df49a21da09a1e03427..d8ad23c27b848ce4114aa140296b4fb99043acaf 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_114.ttcn @@ -14,16 +14,16 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. + module Sem_050402_actual_parameters_114 { type component GeneralComp { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn index 81f8ce0e6a635e2787652926ae38318618740dcb..0d361c3e692d1b5932a830aabd408478f4dde84a 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_115.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_115 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn index 87e23cd3546448bacd3122f7ad0d1ebb328a2452..fab6b2c2aaaf54803da44dfcd29450ca8f492c34 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_116.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_116 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn index 15e187e8213c18fde82668a1aaef6ae0d28a3558..a7a90cb36cedea67a16154a4dc06c6c7feef9d1e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_117 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn index ada5ed3d43114cc1003e2d235873fe09ec0d030e..17bf797ab5a88bbb16f96de4f1a0e7550019c024 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn @@ -14,16 +14,16 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as out formal template parameters of functions ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. + module Sem_050402_actual_parameters_118 { type component GeneralComp { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn index 9f76fa5603dc1e831f5e6d45fc4e5f3eaf4a51be..ca6d558b7c027bb06a4777d77882f85af6d9df33 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_119.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_119 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn index 02c98651be9e702a0da855faf64dc7c1066f7f90..13c4ae9a7b21b485e6b4c5c5617d26c36681a34f 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_120.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_120 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn index 71742b00149b9e3045884ed07f8611e8e7c95ef8..db88a1a6b689c03b3e53051969fe33edfe7a98df 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_121.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_121 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn index 01cda85a6b970164c99723fb60210dae54d8ce08..64adf8bba3ae8bde2b64f3cdcc2ea5afada99f9e 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_122.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_122 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn index 512e47cc5bb0b7b3d45a04d2b7196159afc4c4c9..39774b3242930ee2de5c11143d15160596686001 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_123 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn index 2751df37f7d7d72e83780a165d5037a357227e62..7eb5d33093f7701acc3851aee9e93788c2c08a2a 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as out formal template parameters of altsteps ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_124 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn index ac0ff8dc601b6388245063fccfeda908e81de939..48d4fd3b276522b0e060099bbeeaa0fa63d5f671 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_125.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variables can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_125 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn index f7d4779320678a8ebd26a36fa01f53b5a575cdba..4a1f3fee2395df3565ca25f25fdc76388b157a28 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_126.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template in parameters can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_126 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn index 5b1c76b4667d64f23af99ad6d205eff345161afd..acdbd99e515f806ef4fdee7e51e9b6c1702ca207 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_127.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template out parameters can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_127 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn index a631b244d69da4198c263bfbb51af79b5ada418e..bfe0f97b8fd1069fcbae3ee51b716308f6aacd6b 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_128.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template inout parameters can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_128 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn index 0d27a6faa5b810dbc0836370ff22d821e741e096..9776acc4cdf44803946e99a8f2aa966c56f34d4a 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that template variable element reference can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_129 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn index f3b453f7b25d18e8b2c922175a39249e49bdc7e5..a7e96fa7890dbb5839de2904e5a267533da7ad02 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn @@ -14,15 +14,14 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.4.2, verify that reference to elements of formal value parameters can be used as out formal template parameters of test cases ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: -// Actual parameters that are passed to out formal template parameters shall be variables, -// template variables, formal value parameters, formal template parameters or references -// to elements of variables, template variables, formal value parameters or formal template +// Actual parameters that are passed to out formal template parameters shall be template variables, +// formal template parameters or references to elements of template variables or formal template // parameters of structured types. module Sem_050402_actual_parameters_130 { diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn index 0692bb488b2a45889f6c55a6ebeb8956b011ad9f..db17a7ea7bee4616a8fbf36c97c92e4ec9832577 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_135.ttcn @@ -34,14 +34,13 @@ module Sem_050402_actual_parameters_135 { integer field1 } - //function f_test(inout template(present) integer p_val) <-- something not working with present - function f_test(inout template integer p_val) { + function f_test(inout template(present) integer p_val) { if (match(10, p_val)) { setverdict(pass); } else { setverdict(fail); } } testcase TC_Sem_050402_actual_parameters_135() runs on GeneralComp { - var template R v_val := { field1 := 10 }; + var template(present) R v_val := { field1 := 10 }; f_test(v_val.field1); // tested parameter passing } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn index 786dae8f1ce377addd51d0bc939e437bd11b53f9..6c4b59149d00388d7949323e1477f16643b48e06 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_136.ttcn @@ -34,13 +34,12 @@ module Sem_050402_actual_parameters_136 { integer field1 } - //function f_test(inout template(present) integer p_val) <-- something not working with present - function f_test(inout template integer p_val) { + function f_test(inout template(present) integer p_val) { if (match(11, p_val)) { setverdict(pass); } else { setverdict(fail); } } - function f_caller(in template R p_param) { + function f_caller(in template(present) R p_param) { f_test(p_param.field1); // tested parameter passing } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn index 311db40f2618c7971e8fda01c905179dd350b874..3f5ea686b7bc31a1cc6a653eec41b96d7180ecf8 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_141.ttcn @@ -35,8 +35,7 @@ module Sem_050402_actual_parameters_141 { integer field1 } - //altstep a_test(inout template(present) integer p_val) runs on GeneralComp <-- something not working with present - altstep a_test(inout template integer p_val) runs on GeneralComp { + altstep a_test(inout template(present) integer p_val) runs on GeneralComp { []t.timeout { if (match(10, p_val)) { setverdict(pass); } else { setverdict(fail); } @@ -44,7 +43,7 @@ module Sem_050402_actual_parameters_141 { } testcase TC_Sem_050402_actual_parameters_141() runs on GeneralComp { - var template R v_val := { field1 := 10 }; + var template(present) R v_val := { field1 := 10 }; t.start; a_test(v_val.field1); // tested parameter passing } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn index af80da4976ca223a1b35fb67b177564f721eed4a..1ace4cca6a1beb42a11b015dcbd636d4e9f21535 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_142.ttcn @@ -36,14 +36,14 @@ module Sem_050402_actual_parameters_142 { } //altstep a_test(inout template(present) integer p_val) runs on GeneralComp <-- something not working with present - altstep a_test(inout template integer p_val) runs on GeneralComp { + altstep a_test(inout template(present) integer p_val) runs on GeneralComp { []t.timeout { if (match(11, p_val)) { setverdict(pass); } else { setverdict(fail); } } } - function f_caller(in template R p_param) runs on GeneralComp { + function f_caller(in template(present) R p_param) runs on GeneralComp { a_test(p_param.field1); // tested parameter passing } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn index d8c2452f92efa87c8e455be173260aead7ad0f93..0dfae25247e3c5b715b61b867f9d5821efaedb7c 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_147.ttcn @@ -34,15 +34,13 @@ module Sem_050402_actual_parameters_147 { integer field1 } - //testcase TC_Sem_050402_actual_parameters_147(inout template(present) integer p_val) runs on GeneralComp - // something not working with present --^ - testcase TC_Sem_050402_actual_parameters_147(inout template integer p_val) runs on GeneralComp { + testcase TC_Sem_050402_actual_parameters_147(inout template(present) integer p_val) runs on GeneralComp { if (match(10, p_val)) { setverdict(pass); } else { setverdict(fail); } } control { - var template R v_val := { field1 := 10 }; + var template(present) R v_val := { field1 := 10 }; execute(TC_Sem_050402_actual_parameters_147(v_val.field1)); // tested parameter passing } } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn index 7bb9c5b8f953f227d5f684be5d1acc2ba7bd70e5..fcf108784f98f85a0acd2b89b8a11d65e6c0da10 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_148.ttcn @@ -34,14 +34,12 @@ module Sem_050402_actual_parameters_148 { integer field1 } - //testcase TC_Sem_050402_actual_parameters_148(inout template(present) integer p_val) runs on GeneralComp - // something not working with present --^ - testcase TC_Sem_050402_actual_parameters_148(inout template integer p_val) runs on GeneralComp { + testcase TC_Sem_050402_actual_parameters_148(inout template(present) integer p_val) runs on GeneralComp { if (match(11, p_val)) { setverdict(pass); } else { setverdict(fail); } } - function f_caller(in template R p_param) { + function f_caller(in template(present) R p_param) { execute(TC_Sem_050402_actual_parameters_148(p_param.field1)); // tested parameter passing } diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn index fdfda8e73adf669f80c71dce10be85eb8f7f7a09..7770c514aafcaae742c03dc32e112e8c5ab434e6 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_154.ttcn @@ -38,14 +38,14 @@ module Sem_050402_actual_parameters_154 { } //function f_test(inout template(present) integer p_val) <-- ref bug everywhere - function f_test(inout template integer p_val) { + function f_test(inout template(present) integer p_val) { if (match(25, p_val)) { setverdict(pass); } else { setverdict(fail); } p_val := 10; } testcase TC_Sem_050402_actual_parameters_154() runs on GeneralComp { - var template R v_rec := { + var template(present) R v_rec := { field1 := 1, field2 := ? }; diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7a85b7325abc46d397ac40694f44df16f3bcb3a2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_203 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_203() runs on GeneralComp { + var integer v_val := 5; + f_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_203()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..efe0e7190e7e6bbaf6fcea0f80e3a7cbf8a73931 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_204 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_204() runs on GeneralComp { + var template integer v_val := 5; + f_test(v_val); // tested parameter passing + if (valueof(v_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_204()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3b81901e51275b1076e49b77be3725a421b65786 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_205 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_205() runs on GeneralComp { + f_caller(0); + } + + control { + execute(TC_Sem_050402_actual_parameters_205()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0f142069d8011020fcbcf2e18e072dbefb6606a3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_206 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(out integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_206() runs on GeneralComp { + var integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_206()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..595cc04e03aee826f4bbe4b4063fee6d1e1ae1cc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_207 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(inout integer p_val) { + f_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_207() runs on GeneralComp { + var integer v_val := 1; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_207()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3e0e9da47539303b347ab97fa79dab388928e64a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_208 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_208() runs on GeneralComp { + f_caller(?); + } + + control { + execute(TC_Sem_050402_actual_parameters_208()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6f93c54c04565031164140b6a7ae8d4f1ddee4f7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_209 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(out template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_209() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_209()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c27015d0ea8928b3f8ccd02f82c985307b5ce3c1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout template parameters can be used as actual out value parameters of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_210 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + function f_caller(inout template integer p_val) { + f_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_210() runs on GeneralComp { + var template integer v_val := ?; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_210()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f40763406a53ad2e78c7c8ff7ecaab545faa077d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out value parameter of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_211 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_211() runs on GeneralComp { + f_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_211()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e4eb9ce41a892d5345672765d9bdc345e9152e31 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_212 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_212() runs on GeneralComp { + var integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(v_val); // tested parameter passing + if (v_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_212()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6e04d356f7b641c02ee79626b92ac5732787fd0b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that variables can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_213 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_213() runs on GeneralComp { + var template integer v_val := 5; + timer t_tmr := 0.1; + t_tmr.start; + a_test(v_val); // tested parameter passing + if (valueof(v_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_050402_actual_parameters_213()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..47ba949000c54683f48cfeb16610d12d2ed49211 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_214 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_214() runs on GeneralComp { + f_caller(0); + } + + control { + execute(TC_Sem_050402_actual_parameters_214()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..63a52d2cf7c11a22639118416bbb2e0f6bd03879 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_215 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(out integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_215() runs on GeneralComp { + var integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_215()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ef551e60c16e7a0e9690b8cf1b1dc41c8ad02f25 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout value parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_216 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(inout integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (p_val == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_216() runs on GeneralComp { + var integer v_val := 1; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_216()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7c047bd085f0358ab545acf919e6435fdd2bb3d2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that in template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_217 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_217() runs on GeneralComp { + f_caller(?); + } + + control { + execute(TC_Sem_050402_actual_parameters_217()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b3180c01b5743f817a70a58176fb14a016494012 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that out template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_218 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(out template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_218() runs on GeneralComp { + var template integer v_val; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_218()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3e191bcfb30e81d96a697e0f378ae382f3ba5c4c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that inout template parameters can be used as actual out value parameters of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_219 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + function f_caller(inout template integer p_val) { + timer t_tmr := 0.1; + t_tmr.start; + a_test(p_val); // tested parameter passing + if (valueof(p_val) == 9) { + setverdict(pass); + }else { + setverdict(fail); + } + } + + testcase TC_Sem_050402_actual_parameters_219() runs on GeneralComp { + var template integer v_val := ?; + f_caller(v_val); + } + + control { + execute(TC_Sem_050402_actual_parameters_219()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4bf57fa627d3e2ee5fd1dd432c794221236ea69c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out value parameter of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal value parameters shall be (template) variables, +// formal (template) parameters (of in, inout or out parameterization) or references to elements +// of (template) variables or formal (template) parameters of structured types. Furthermore it is +// allowed to use the dash symbol "-" as an actual out parameter, signifying that a possible result +// for that parameter will not be passed back. + +module Sem_050402_actual_parameters_220 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_220() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_220()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ca57f096dde95c05f218ca156a27c78953847a3f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out template parameter of functions + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, formal +// template parameters or references to elements of template variables or formal template parameters of +// structured types. Furthermore it is allowed to use the dash symbol "-" as an actual out parameter, +// signifying that a possible result for that parameter will not be passed back. + +module Sem_050402_actual_parameters_221 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := ? + } + + testcase TC_Sem_050402_actual_parameters_221() runs on GeneralComp { + f_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_221()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..deb2081947043766cf79d8afb1d4441eefff0b5e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that dash can be used as an actual out template parameter of altsteps + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Actual parameters that are passed to out formal template parameters shall be template variables, formal +// template parameters or references to elements of template variables or formal template parameters of +// structured types. Furthermore it is allowed to use the dash symbol "-" as an actual out parameter, +// signifying that a possible result for that parameter will not be passed back. + +module Sem_050402_actual_parameters_222 { + + type component GeneralComp { + } + + altstep a_test(out template integer p_val) { + [] any timer.timeout { + p_val := ? + } + } + + testcase TC_Sem_050402_actual_parameters_222() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_222()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f5b348a49338d471978d751f74e09d8cd0e9b968 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out value parameters of functions can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_223 { + + type component GeneralComp { + } + + function f_test(out integer p_val) { + p_val := 9 + } + + testcase TC_Sem_050402_actual_parameters_223() runs on GeneralComp { + f_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_223()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a7219afe6bc89fe6f0589d51ea6b8837b0979609 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out value parameters of altsteps can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_224 { + + type component GeneralComp { + } + + altstep a_test(out integer p_val) { + [] any timer.timeout { + p_val := 9 + } + } + + testcase TC_Sem_050402_actual_parameters_224() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(-); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_224()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f42eff2537d68b977944a9302e24fbbd02b7e396 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out template parameters of functions can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_225 { + + type component GeneralComp { + } + + function f_test(out template integer p_val) { + p_val := ? + } + + testcase TC_Sem_050402_actual_parameters_225() runs on GeneralComp { + f_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_225()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..74b6725aa8306bc838e5edd79034bce781379666 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.4.2, verify that actual out template parameters of altsteps can be skipped if they are the last ones + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// An actual parameter can also be skipped by just leaving it out if no other actual parameter follows in the actual parameter +// list - either because the parameter is last or because all following formal parameters are out parameters or have default +// values and are left out. + +module Sem_050402_actual_parameters_226 { + + type component GeneralComp { + } + + altstep a_test(out template integer p_val) { + [] any timer.timeout { + p_val := ? + } + } + + testcase TC_Sem_050402_actual_parameters_226() runs on GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + a_test(); // tested parameter passing + setverdict(pass); + } + + control { + execute(TC_Sem_050402_actual_parameters_226()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn index 66382e812f44373876603b41ed3c9e2839fdbb2d..a025a61dcc261bbb782adb42d91c11bf07ddddc5 100644 --- a/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/05_basic_language_elements/0505_cyclic_definitions/Sem_0505_cyclic_definitions_004.ttcn @@ -14,7 +14,7 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:5.5, Verify that cyclic altsteps are allowed ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ @@ -31,6 +31,7 @@ module Sem_0505_cyclic_definitions_004 { type component GeneralComp { var integer vc_receiveCounter := 0; + timer t_tmr := 1.0; port P p1; } @@ -56,6 +57,7 @@ module Sem_0505_cyclic_definitions_004 { for (var integer i := 0; i < 5; i := i + 1) { p1.send(i); } + t_tmr.start; a_test(); } diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ea04aaa0b88cb95940bc2eb94ab7748f42e206d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of a bitstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * Only single elements of the string may be accessed. + * Trying to assign strings with length 0 or more than 1 + * to a string element using the array-like syntax shall + * cause an error. +*/ + +module NegSem_06010101_AccessStringElements_001 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { + var bitstring v_b := '100010'B; + v_b[1] := '11'B; //error: only individual elements can be accessed + if (v_b == '100001'B){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_001()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d3950eb3bfae521d4abd81ceac7bc569cc36ea82 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access bitstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_002 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_002() runs on GeneralComp { + var bitstring v_b := '100010'B; + v_b[7] := '0'B; //error: index outside of range + if (v_b == '100001'B){ + setverdict(pass); + } + else { + setverdict(fail, "v_b:",v_b); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_003.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53f28faea8ab089774fca5ef30fb4bf5c4b68b64 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_003.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Created by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of a hexstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_003 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_003() runs on GeneralComp { + var hexstring v_h := '100010'H; + v_h[1] := '01'H; //error: only individual elements can be accessed + if (v_h == '100001'H){ + setverdict(pass); + } + else { + setverdict(fail, "v_h:",v_h); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d8582a12a35d9ce7524cdbe84eab36744289669c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_004.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Created by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_004 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_004() runs on GeneralComp { + var hexstring v_h := '100010'H; + v_h[7] := '0'H; //error: index outside of range + if (v_h == '100001'H){ + setverdict(pass); + } + else { + setverdict(fail, "v_h:",v_h); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_004()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e9fc191ea57f347f245ffbf6465b2b0cbffb206 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_005.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Created by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Accessing not individual elements of an octetstring + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_005 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_005() runs on GeneralComp { + var octetstring v_o := '100010'O; + v_o[1] := '0120'O; //error: only individual elements can be accessed + if (v_o == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_o:",v_o); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..568a7eef30771cb8482c17506e5f4cc11bb08b93 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_006.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Created by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1.1, Access hexstring element out of range + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index shall be between zero and the + * length of the string minus one for retrieving + * an element from a string. Trying to retrieve outside + * this range shall cause an error. +*/ + +module NegSem_06010101_AccessStringElements_006 { + + type component GeneralComp {} + + testcase TC_NegSem_06010101_AccessStringElements_006() runs on GeneralComp { + var octetstring v_o := '100010'O; + v_o[4] := '01'O; //error: only individual elements can be accessed + if (v_o == '100001'O){ + setverdict(pass); + } + else { + setverdict(fail, "v_o:",v_o); + } + } + + control{ + execute(TC_NegSem_06010101_AccessStringElements_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..9e5a72d368869178051d60c48a87a14de7824169 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read bitstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_008 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_008() runs on GeneralComp { + var bitstring v_a := '0101\ + 1010'B; + + if (match(v_a,'01011010'B)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_008()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..cba917bbcfcc9f34bcc50a68e641d3b09240def6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the bitstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_009 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_009() runs on GeneralComp { + var bitstring v_a := '0101\ + 1010'B; + + if (match(lengthof(v_a), 8)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_009()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..6ff6d0b79cc9dbf7f6a818052e22a52af55bf3d9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read hexstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_010 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_010() runs on GeneralComp { + var hexstring v_a := 'Ab\ + cD'H; + + if (match(v_a,'AbcD'H)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_010()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..dabee8c1ae9361898645d25818a7439d6191351e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the hexstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_011 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_011() runs on GeneralComp { + var hexstring v_a := '12\ + 34\ + Ab\ + Cd'H; + + if (match(lengthof(v_a), 8)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_011()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..54ff0e83bd2f79f46ec7c0edd68407102b493668 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Assign and read octetstring with newline character + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_012 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_012() runs on GeneralComp { + var octetstring v_a := '1234\ + 56'O; + + if (match(v_a,'123456'O)) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_012()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..2d37da8a36803792bcf6d1863c0efde03c7e2d36 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be ignored for the octetstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * Within the quotes any number of whitespaces or any sequence of the following C0 control characters: + * LF(10), VT(11), FF(12), CR(13) which constitutes a newline may be included. The newline shall be preceded by a backslash ("\"). + * Such whitespaces, control characters and backslash will be ignored for the value and length calculation. +*/ + +module Sem_060101_TopLevel_013 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_013() runs on GeneralComp { + var octetstring v_a := '12\ + 34\ + 56'O; // 3 octets + + if (match(lengthof(v_a), 3)) + { + setverdict(pass,"Size of v_a is: ",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is: ",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_013()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..18cf5af1768ad42916fbbc2d51977af0b13a2127 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn @@ -0,0 +1,40 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces and backslash character is allowed in a universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060101_TopLevel_014 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_014() runs on GeneralComp { + var universal charstring v_a := "ABC\ DEF"; + if (match(v_a,universal charstring:"ABC\ DEF")) + { + setverdict(pass,"v_a:",v_a); + } + else { + setverdict(fail,"v_a:",v_a); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_014()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..9d27bff823ffbd469d30880fcb10392ac23832b4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn @@ -0,0 +1,41 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.1.1, Ensure that whitespaces, control characters and backslash will be included for the universal charstring length calculation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_060101_TopLevel_015 { + + type component GeneralComp {} + + testcase TC_Sem_060101_TopLevel_015() runs on GeneralComp { + var universal charstring v_a := "ABC\ DEF"; //lengthof(v_a) is 11 + + if (match(lengthof(v_a), 11)) + { + setverdict(pass,"Size of v_a is:",lengthof(v_a)); + } + else { + setverdict(fail,"Size of v_a is:",lengthof(v_a)); + } + } + + control{ + execute(TC_Sem_060101_TopLevel_015()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_012.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e9df01bbb93bc104c1ed8f489bd2af10aefaa26a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_012.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.4, using enumerated value number integer conversion + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// enumerated values with a specific integer value assigned shall not use the associated integer + +module NegSem_060204_enumerated_type_and_values_012 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(1), Wednesday(2), Thursday(3), Friday(5) + }; + + testcase TC_NegSem_060204_enumerated_type_and_values_012() runs on GeneralComp { + var EDays v_enum := Friday(5); // error: shall not use the associated integer + + if (match(enum2int(v_enum),5)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_060204_enumerated_type_and_values_012()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2945a1912448d358e0c4289b83e8d4fe5ffb8289 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn @@ -0,0 +1,30 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.4, expression as user-assigned enumerated value + ** @verdict pass reject, noexecutino + ***************************************************/ + +// The following requirement is tested: +// ach enumerated value may optionally have a user-assigned integer value or non-empty list of integer literal values or ranges of integer literal values + +module NegSyn_060204_enumerated_type_and_values_001 { + + type enumerated MyFirstEnumType { + Monday, Tuesday(), Thursday, Friday + }; // error: non-empty integer literal required +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2af1fdbc4d55226b6d9cdee2473de9912838429f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.4, mixed automatic and explicit numbering of enumerated items + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +/* For each enumerated value without an assigned integer value, + the system successively associates an integer number in the textual + order of the enumerated values, starting at the left-hand side, + beginning with zero, by step 1 and skipping any number occupied by any + of the enumerated values with a manually assigned value or value list. +*/ +module Sem_060204_enumerated_type_and_values_007 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(1), Tuesday, Wednesday, Thursday(10), Friday(11..30) + }; + + testcase TC_Sem_060204_enumerated_type_and_values_007() runs on GeneralComp { + var EDays v_day0 := Monday, v_day2 := Wednesday, v_day4 := Friday(15); + + if (enum2int(v_day0) == 1 and enum2int(v_day2) == 2 and enum2int(v_day4) == 15) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_060204_enumerated_type_and_values_007()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a4a49b10e1fbc00990bd0b6bf45c0f80ef08edb7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.5.2, Ensure that union is initialized by anytype dot notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/*The following requirement is tested: + * AlternativeId shall resolve to the name of an alternative in the union type or + * in case of an anytype value or template AlternativeId shall resolve to a known type name + * or a known type name qualified with a module name. + */ + +module Sem_06020501_referencing_fields_of_union_type_007 { + type union MyUnionType + { + integer number, + anytype string + }; + + type component GeneralComp { + }; + + + testcase TC_Sem_06020501_referencing_fields_of_union_type_007 () runs on GeneralComp { + var MyUnionType v_mut ; + v_mut.string.integer := 3; // AlternativeID shall resolve type e.g. integer + + if (v_mut.string.integer == 3) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020501_referencing_fields_of_union_type_007()); + } +} +with { + extension "anytype integer" +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..18558454e142aec0592874aae8bdf3a783bc9384 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.5.2, Ensure that union is initialized by anytype dot notation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/*The following requirement is tested: + * AlternativeId shall resolve to the name of an alternative in the union type or + * in case of an anytype value or template AlternativeId shall resolve to a known type name + * or a known type name qualified with a module name. + */ + +module Sem_06020501_referencing_fields_of_union_type_008 { + type union MyUnionType + { + integer number, + anytype string + }; + type integer My_Int; + + type component GeneralComp { + }; + + + testcase TC_Sem_06020501_referencing_fields_of_union_type_008 () runs on GeneralComp { + var MyUnionType v_mut ; + v_mut.string.My_Int := 3; // AlternativeID shall resolve type e.g. My_Int + + if (v_mut.string.My_Int == 3) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06020501_referencing_fields_of_union_type_008()); + } +} +with { + extension "anytype My_Int" +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cf9b3d5a11b8da5665f99ff1f6497702068c0fbd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn @@ -0,0 +1,29 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.7, Ensure that arrays upper value shall not be lesser than the corresponding lower value + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * The upper value shall not be lesser than the corresponding lower value. + */ +module NegSyn_060207_arrays_005 { + + control { + var integer v_arr[5..1]; // error: . The upper value shall not be lesser than the corresponding lower value + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f9eeac7bb10321a26fd5ec06cda4ae48300dec08 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn @@ -0,0 +1,30 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. + */ +module NegSem_06021301_LengthSubtyping_005 { + type set length(0..10) of integer SetOfLengthLessThan10; + + type SetOfLengthLessThan10 SetOfLength5 length(5..2); + //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7e1e7f4d61ae4b46d0a273f2b6f3dd8309b57d67 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn @@ -0,0 +1,32 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2.13.1, The length subtyping check for 'record of' or 'set of' types + ** @verdict pass reject + ***************************************************/ + +/*The following requirement is tested: + * In case of the range syntax the upper bound shall not be lesser than the lower bound value. +*/ + +module NegSem_06021301_LengthSubtyping_006 { + type record length(0..10) of integer RecordOfLengthLessThan10; + + type RecordOfLengthLessThan10 RecordOfLengthLessThan5 length(5..2); + //Error: In case of the range syntax the upper bound shall not be lesser than the lower bound value. + +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..abda24318598dccdf086c3b9839de1caa467e040 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn @@ -0,0 +1,37 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + *The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_004 { + type record MyRecord { + integer field1, + charstring field2 optional, + float field3 + } + const MyRecord c_rec := { + field1 := 5, + field1 := 6, // error: already appeared field + field3 := 3.14 + }; +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..027a250f379fd8a70374f4fc1e9d3c4ade0f367c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The index notation can be used for record of and setof value notations and for arrays. + * In this notation each index shall not appear more than once and shall conform to the range of indices allowed by the type definition. +*/ + +module NegSyn_0602_TopLevel_005 { + + type set of integer MySetOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_005() runs on GeneralComp { + + var MySetOfType v_set := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_set, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d8047e14db3eb56bb471d7f79673ec36ee90901c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_006 { + + type set MySetType{ + integer field1, + charstring field2 + } + + type component GeneralComp { + } + + testcase TC_NegSyn_0602_TopLevel_006() runs on GeneralComp { + + var MySetType v_set := { + field1 := 5, + field1 := 6, // error: already appeared field + field2 := "abc" + }; + + if ( match(v_set, {5,"abc"})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..26fc4822f35f7e2b8ddb30cb44056361ee511bd5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.2, Combined value list and assignment notation not allowed in the same (immediate) context. + ** @verdict pass reject + ***************************************************/ +/* The following requirements are tested: + * The assignment notation can be used for record, record of, set, setof and union value + * notations and for arrays. In this notation each field shall not appear more than once. +*/ + +module NegSyn_0602_TopLevel_007 { + + type record of integer MyRecordOfType; + type component GeneralComp { + } + +testcase TC_NegSyn_0602_TopLevel_007() runs on GeneralComp { + + var MyRecordOfType v_RoI := { + [0] := 1, + [1] := 2, + [1] := 3 // error already indexed + }; + + if ( match(v_RoI, {1,3})) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + control { + execute(TC_NegSyn_0602_TopLevel_007()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn index c376d1a2602efde797e9fe6155d6216ae66235af..032a2d10b8af483c5e693964ac0e23d893ee2282 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_009.ttcn @@ -19,7 +19,7 @@ ** @verdict pass reject ***************************************************/ -module NegSem_060302_structured_types_009 { +module NegSem_060302_structured_types_009 language "TTCN-3:2016"{ type enumerated EnumeratedType {e_black, e_white}; type enumerated EnumeratedRedefinition {e_black, e_white}; diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn index a24e41526fdab9412da95545b57c0d0f04490a84..9bcdf2492805160a5b779be47e3630a66fc5faec 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_002.ttcn @@ -14,12 +14,12 @@ * * Modified by: Adrien Kirjak * - ** @version 0.0.1 + ** @version 0.0.2 ** @purpose 1:6.3.2, Ensure that the IUT correctly handles assignments from structures having compatible types and lengths ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ -module Sem_060302_structured_types_002 language "TTCN-3:2010" { +module Sem_060302_structured_types_002 { type record RecordType { integer a, diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn index dfa1cd833d1fbed9007854ff06ac8c1a743c538a..e9ce8ea8f8b5dfc12b5dbd8249601061633afde6 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different runs on clauses diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn index 48939709d3f22b3f126dfde0986e9c593fbd2e41..d0bb5a70efaf424b87ef0cd1a8e2a9dc7cd1265b 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn index 3951edfde3e0f7c5e02e2ec7b5e1389f3c9f339a..7d8f3ec81e98946d7f20104d2b8a1730db39bcd2 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn index 9f83857ce0f6c86363ff19a5976ac93df77cd3f5..66cc1123ab509f5feb07530ec80486477ec0db1f 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different system clauses diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn index 806aeb432f04274774713e1b851b321869be1bfb..6ff4bec2a01cddc96af91e3e2ecbc52077947465 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different runs on clauses diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn index b50cdf0271038e8d927ffb766a990c986f22ca8f..c421a7669ccfb7d64199f422e1502cb368f2bd64 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn index 78a87b75694dd760cb2392e16fbc8104f02484f5..69dc1f8c79716b258178885dc4ba2dc2e73dc248 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn index 3478bb1398e04e6991f57cae5eefba46b5b8e209..ffd9a5d27477fa6e9913f697494667b00fcdd138 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn @@ -12,7 +12,7 @@ * copyright notice shall be included in all copies of whole or part of this * file and shall not imply any sub-license right. * - * Modified by: Adrien Kirjak + * Created by: Adrien Kirjak * ** @version 0.0.1 ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different system clauses diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..68aa3da047feb3d5e05d51c87c6f041e731a495b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass reject + ***************************************************/ + +/*The following requirement is tested: + * Only anytype types that are constrained to a fixed set of types via list subtyping + * can be a potential cause for anytype incompatibility, i.e. if the set of types contained + * in type "B" does not contain the type selected in "a". +*/ + +module NegSem_060305_compatibility_of_anytype_types_001 { + + //import from NegSem_060305_compatibility_of_anytype_types_001_importB all; + //import from NegSem_060305_compatibility_of_anytype_types_001_importC all; + + type integer I (0..9); + type charstring C; + type anytype Btype; + //type anytype Btype ({float:=?},{integer:=?}); + + type component GeneralComp { + } + + + testcase TC_NegSem_060305_compatibility_of_anytype_types_001() runs on GeneralComp { + + //var NegSem_060305_compatibility_of_anytype_types_001_importB.Atype v_aa; + //var Atype v_baI ; +//:= { NegSem_060305_compatibility_of_anytype_types_001_importC.I := 1 }; + + //v_aa := v_baI; // incorrect + setverdict(pass); + } + + control { + execute(TC_NegSem_060305_compatibility_of_anytype_types_001()); + } + +} +with { + extension "anytype integer" +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importB.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importB.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a83ddefd42f78190eb1cf8bd58609308f9613c8a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importB.ttcn @@ -0,0 +1,28 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass reject + ***************************************************/ + +module NegSem_060305_compatibility_of_anytype_types_001_importB { + type integer I (0..2); + type anytype Atype ({I:=?},{integer:=?},{float:=?}); +} +with { + extension "anytype integer, float, I" +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importC.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importC.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6c808fc6d8c7acc04cd858ce077008934e39079a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060305_compatibility_of_anytype_types/NegSem_060305_compatibility_of_anytype_types_001_importC.ttcn @@ -0,0 +1,29 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:5.3.0.6, ensure that anytype types are only compatible with other anytype types. + ** @verdict pass reject + ***************************************************/ + +module NegSem_060305_compatibility_of_anytype_types_001_importC { + type integer I (0..2); + type float F; + type anytype Atype ({I:=?},{F:=?},{integer:=?}); +} +with { + extension "anytype I, F, integer" +} diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn index 507dfe96de4d622fed5b0f0ab9bfcfd2251a3e5d..3147472e21bdc09e40e73d98ebe9c2331489da89 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_051.ttcn @@ -28,7 +28,12 @@ testcase TC_Sem_070101_ArithmeticOperators_051() runs on GeneralComp { var float v_i := -infinity; var float v_k :=2.0E0; - var float v_result := v_i * v_k; // arithmetic operator with -infinity is not allowed + var float v_result := v_i * v_k; // arithmetic operator with -infinity is allowed by IEEE 754 + + if (v_result == -infinity) + { setverdict(pass); } + else + { setverdict(fail); } setverdict(pass); diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn index cfa051bc60d11f84d3ab019dc98513f2f9300f7a..28c89df357a2b8d3734b7bd2defe4037af71fdd3 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_052.ttcn @@ -19,14 +19,14 @@ ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ -module Sem_070101_ArithmeticOperators_051 { +module Sem_070101_ArithmeticOperators_052 { type component GeneralComp { } type integer address; -testcase TC_Sem_070101_ArithmeticOperators_051() runs on GeneralComp { +testcase TC_Sem_070101_ArithmeticOperators_052() runs on GeneralComp { var address My_address := null; diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn index 9a0f957020970705cde63298e7d69f1806b6e530..9a921ba994d38e8a47bae325ac914abf6028be9e 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_053.ttcn @@ -22,14 +22,14 @@ /* Restriction c) With the exception of the equality and non-equality operators, the special value null shall not be used as an operand of expressions (see clause 7.1.3).*/ -module Sem_070101_ArithmeticOperators_052 { +module Sem_070101_ArithmeticOperators_053 { type component GeneralComp { } type integer address; -testcase TC_Sem_070101_ArithmeticOperators_052() runs on GeneralComp { +testcase TC_Sem_070101_ArithmeticOperators_053() runs on GeneralComp { var address My_address := 1; diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a921c849e4c91c73d634d99453e1b225451d7b4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that anytypes can be compared + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Values of the same or any two anytype types can be compared. +// For anytype values the same rule apply as to union values, with the addition that names of user-defined types defined with the same name in different modules do not denote the same type name of the selected alternatives. + +module Sem_070103_RelationalOperators_048 { + +type component GeneralComp { +} + +type anytype Atype_1; + +type anytype Atype_2; + +testcase TC_Sem_070103_RelationalOperators_048() runs on GeneralComp { + + var Atype_1 v_any1; + var Atype_2 v_any2; + + v_any1.integer := 2; + v_any2.integer := 4; + + if (v_any1.integer < v_any2.integer) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_048()); +} + +} +with { + extension "anytype integer" +} diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ee570b155f20122661424c7fd06e4bb191bf5cf9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that anytypes can be compared + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirement is tested: +// Values of the same or any two anytype types can be compared. +// For anytype values the same rule apply as to union values, with the addition that names of user-defined types defined with the same name in different modules do not denote the same type name of the selected alternatives. + + +module Sem_070103_RelationalOperators_049 { + +type component GeneralComp { +} + +type anytype Atype; + +testcase TC_Sem_070103_RelationalOperators_049() runs on GeneralComp { + + var Atype v_any1; + var Atype v_any2; + + v_any1.float := 2.4; + v_any2.float := 4.2; + + if (v_any1.float < v_any2.float) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_049()); +} + +} +with { + extension "anytype float" +} diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..60a570716cbe0fdf26c50ce83a0ffcff208abca1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7.1.3, Ensure that the less than or equal to operator on enumerations is evaluated correctly with differing values. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirements are tested: +/* Two enumerated values are equal if and only if they are associated + * with the same integer value. Otherwise, they are ordered using the + * mathematical order on the associated integer values.*/ + + +module Sem_070103_RelationalOperators_050 { + +type component GeneralComp { +} + +type enumerated MyEnumType1 { + e_monday(2), e_tuesday, e_wednesday, e_thursday, e_friday +}; + +type enumerated MyEnumType2 { + e_monday(1..8), e_tuesday, e_wednesday, e_thursday, e_friday +}; + +testcase TC_Sem_070103_RelationalOperators_050() runs on GeneralComp { + var MyEnumType1 v_first := e_monday; + var MyEnumType2 v_second := e_monday(2); + + if (match(enum2int(v_first),enum2int(v_second))) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_070103_RelationalOperators_050()); +} + +} diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn index 77e0f4ffcb0e705a94e29e1c522015b12432ae88..14ca927b3d75dc8982ae2c0144a5f12b49c42962 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_002.ttcn @@ -20,8 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Compound expressions are used for expressions of array, record, record of and -// set of types. +// Assignment or list notations are used for expressions of record, set, record of, set of, +// array, union and anytype types. module Sem_07_toplevel_002 { diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn index 517d89ce29498b3cf0684f7c77d8adb8685f1b44..fe6aece782400d9672b154d92c7830f838840c6a 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_003.ttcn @@ -20,8 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Compound expressions are used for expressions of array, record, record of and -// set of types. +// Assignment or list notations are used for expressions of record, set, record of, set of, +// array, union and anytype types. module Sem_07_toplevel_003 { diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn index 643b844c460ad7a2725ef7f5342d4a3f368476eb..abfb7a09c6c812d966a78441548d6567aaaa9178 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn @@ -20,8 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Compound expressions are used for expressions of array, record, record of and -// set of types. +// Assignment or list notations are used for expressions of record, set, record of, set of, +// array, union and anytype types. module Sem_07_toplevel_004 { diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn index b9ceecee6c1911bef9afdd8245b0e8b79d856d40..ea462c44b750f3e9c00db1c91484587d941ca216 100644 --- a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn @@ -20,8 +20,8 @@ ***************************************************/ // The following requirement is tested: -// Compound expressions are used for expressions of array, record, record of and -// set of types. +// Assignment or list notations are used for expressions of record, set, record of, set of, +// array, union and anytype types. module Sem_07_toplevel_005 { diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7f08c820b73a7c9a8d95f5597f3426170e924deb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of anytype type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assignment or list notations are used for expressions of record, set, record of, set of, array, union and anytype types. + +module Sem_07_toplevel_007 +{ + type component GeneralComp { + } + + type anytype Atype; + + type record R { + integer field1, + charstring field2 optional + } + + testcase TC_Sem_07_toplevel_007() runs on GeneralComp { + var Atype v_any; + v_any.R.field1 := 1; + v_any.R.field2 := omit; + + if (v_any.R == { field1 := 1, field2 := omit }) + { setverdict(pass); } + else + { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_007()); + } +} +with { + extension "anytype R" +} + diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..245b3b8e23300d25a97c74a03a91bc05e761bdc4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of union type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assignment or list notations are used for expressions of record, set, record of, set of, array, union and anytype types. + +module Sem_07_toplevel_008 +{ + type component GeneralComp { + } + + type union U { + integer field1, + charstring field2 + } + + testcase TC_Sem_07_toplevel_008() runs on GeneralComp { + var U v_union := { field2 := "abc" }; + + if (v_union == {field2 := "abc" }) { setverdict(pass); } + else { setverdict(fail,v_union); } + } + + control { + execute(TC_Sem_07_toplevel_008()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6a620bf186b6a58d7a73b96bb12358afdad4720a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:7, compound expression as an operand of set type + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Assignment or list notations are used for expressions of record, set, record of, set of, +// array, union and anytype types. + +module Sem_07_toplevel_009 +{ + type component GeneralComp { + } + + type set SI + { + integer field1, + integer field2 + }; + + testcase TC_Sem_07_toplevel_009() runs on GeneralComp { + var SI v_set; + v_set.field1 := 1; + v_set.field2 := 2; + if (match(v_set,{ field1 := 1, field2 := 2 })) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_07_toplevel_009()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..060b8ecff6d7f564fb94be309de7105908ff5c42 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn @@ -0,0 +1,24 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.1, Ensure that a module definition with ed4.8.1 language and package is accepted. + ** @verdict pass accept, noexecution + *****************************************************************/ + +module Syn_0801_DefinitionOfAModule_010 language "TTCN-3:2016" { + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9fd8753bb0f287b0ed6413bbc78a4328a2315f5f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_001 { + + type port MyMessagePortType message { + inout integer + } with {extension "internal"} + + modulepar MyMessagePortType MY_PORT; // not allowed + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_001() runs on GeneralComp { + if (MY_PORT.checkstate("Started")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_001()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c53228b74dbe04a9120725da55a1a753a40b6cf8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_002 { + + type port MyMessagePortType message{ + inout integer + } with {extension "internal"} + + type component MyComponentType { + port MyMessagePortType pCO1; + } + + modulepar MyComponentType MY_COMP; // not allowed + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_002() runs on GeneralComp { + + if (MY_COMP.running) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_002()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4d8798313e416d5c9d0bc3d45354788889f31fe5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a port, default or component types cannot be module parameters. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_003 { + + modulepar default MY_DEF := null; // not allowed + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_003() runs on GeneralComp { + + if (MY_DEF == null) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_003()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..139fd8e864bb79dddae704e719f6b561d0448fec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameters remain constant. + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +/* Restriction B: Module parameters shall not be of port type, + * default type or component type and shall not be of a structured type that contains a sub-element of + * port type at any level of nesting.*/ + +module NegSem_080201_ModuleParameters_004 { + + modulepar integer MY_INT := 2; + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_004() runs on GeneralComp { + MY_INT := 3; // not allowed to change module parameter + if (MY_INT == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_004()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..71e38763f1496c6206fd48c7e29f023dab1a57d4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn @@ -0,0 +1,42 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a reference to plain module parameter with a default value delivers the default value unless it is overwritten. + ** @verdict pass reject + *****************************************************************/ +// A module parameter shall only be of type address if the address type is explicitly defined within the associated module + +module NegSem_080201_ModuleParameters_005 { + + modulepar address MY_ADDRESS_MODULE_PARAMETER := 2; // error: address type not defined + + type component GeneralComp { + } + + testcase TC_NegSem_080201_ModuleParameters_005() runs on GeneralComp { + if (MY_ADDRESS_MODULE_PARAMETER == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_005()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..14f57b4a4f1c6ac1d92027442d30104df3fb33e7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that a module parameter is not allowed to be used in arrays + ** @verdict pass reject + *****************************************************************/ +//Module parameters shall not be used in type or array definitions. + +module NegSem_080201_ModuleParameters_006 { + + modulepar integer MY_INT_MODULE_PARAMETER := 2; + + type component GeneralComp { + } + + type integer MyArrayType[MY_INT_MODULE_PARAMETER]; + // error: Module parameters shall not be used in type or array definitions. + + testcase TC_NegSem_080201_ModuleParameters_006() runs on GeneralComp { + + var MyArrayType v_arr := {2,3}; + + if (v_arr[0] == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_080201_ModuleParameters_006()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2ef5c8b982c33ed2f6c4665db68f240b3d3b1530 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn @@ -0,0 +1,35 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_001 { + + type component GeneralComp { + } + + testcase TC_NegSyn_080201_ModuleParameters_001() runs on GeneralComp { + modulepar integer MY_MODULE_PAR := 1; // not allowed to declared here + setverdict(fail); + } + + control { + execute(TC_NegSyn_080201_ModuleParameters_001()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8928e77fcdf089769005627b280ddaa792d906b7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn @@ -0,0 +1,36 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:8.2.1, Ensure that module parameter can be declared within the module definition part only. + ** @verdict pass reject, noexecution + *****************************************************************/ +module NegSyn_080201_ModuleParameters_002 { + modulepar integer MY_MODULE_PAR := 1; + modulepar integer MY_MODULE_PAR := 2; //error: not allowed to redeclare + + type component GeneralComp { + } + + testcase TC_NegSyn_080201_ModuleParameters_002() runs on GeneralComp { + setverdict(fail); + } + + control { + execute(TC_NegSyn_080201_ModuleParameters_002()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn b/conformance_test/core_language_tests/positive_tests/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn index 9773bb05dec93a1f2b228cf8ed897d3835d06cea..22d9ff5e4f8d3523fa326ce33ffc3e346bb55d86 100644 --- a/conformance_test/core_language_tests/positive_tests/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/09_test_configurations/0901_communication_ports/NegSem_0901_Communication_ports_002.ttcn @@ -19,7 +19,7 @@ ** @verdict pass reject ***************************************************/ -/*NOTE: see Figure 7(f): connection of two TSI ports is not allowed +/*NOTE: see Figure 7(g): connection of an already mapped port is not allowed * */ module NegSem_0901_Communication_ports_002{ diff --git a/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn b/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..c525681cab40607fefce89af36bc88635bda87b8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn @@ -0,0 +1,37 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by initialized variables + ** @verdict pass reject + ***************************************************/ + +// The expression shall evaluate to a value, which is at least partially initialized. + +module NegSem_1101_ValueVars_005 { + type component GeneralComp {} + + testcase TC_NegSem_1101_ValueVars_005() runs on GeneralComp { + var integer v_i; + var integer v_j := v_i + 2; // error: v_i is uninitialized + + setverdict(pass); + } + + control { + execute(TC_NegSem_1101_ValueVars_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn b/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..853dc95e273d047cdda8e45b071fedcb456a5cf9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:11.1, Variables should be assigned only by values + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +//formerly: NegSem_1101_ValueVars_006 + +module Sem_1101_ValueVars_006 { + type component GeneralComp {} + + testcase TC_Sem_1101_ValueVars_006() runs on GeneralComp { + var integer v_i := 1; + var @lazy integer v_j := v_i + 2; + + v_i := v_j; + + if(v_i == 3){ + setverdict(pass); + } + else{ + setverdict(fail); + } + + + } + + control { + execute(TC_Sem_1101_ValueVars_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn b/conformance_test/core_language_tests/positive_tests/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a2ce6c390c7eb35ebe1437eacfbe660a2eb268f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn @@ -0,0 +1,39 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:11.2, Template variables should be assigned with unitialized variables + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: +Restriction l) The template body at the right-hand side of the assignment symbol shall evaluate to a value or template, which is type compatible with the variable being declared. +*/ + +module NegSyn_1102_TemplateVars_002 { + type component GeneralComp {} + + testcase TC_NegSyn_1102_TemplateVars_002() runs on GeneralComp { + var integer v_i1 := 1; + var template float v_i2 := v_i1; // error: v_i1 is integer, meanwhile template type is float + + setverdict(pass); + } + + control { + execute(TC_NegSyn_1102_TemplateVars_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001_new.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001_new.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..35d84361ef92fda2e1cf712bb0bbfd5c619ea275 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1506_referencing_elements_of_templates_or_template_fields/150604_referencing_signature_parameters/Sem_150604_ReferencingSignatureParameters_001_new.ttcn @@ -0,0 +1,92 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.6.4, Test modification of signature parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_150604_ReferencingSignatureParameters_001_new { + +/** + * @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_Sem_150604_ReferencingSignatureParameters_001(in integer p_par1, out integer p_par2, inout integer p_par3) return integer; + +template p_Sem_150604_ReferencingSignatureParameters_001 s_baseTemplate := { + p_par1 := -, + p_par2 := 4, + p_par3 := ? +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_returnTemplate modifies s_baseTemplate := { + p_par3 := 5 +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_wrongTemplate modifies s_baseTemplate := { + p_par3 := 3 +} + +template p_Sem_150604_ReferencingSignatureParameters_001 s_callTemplate := { + p_par1 := 1, + p_par2 := -, + p_par3 := 3 +} + + type port remotePort procedure { + inout p_Sem_150604_ReferencingSignatureParameters_001; + } + +type component GeneralComp { + port remotePort PCO; +} + +function f_ptcBehaviour() runs on GeneralComp { + PCO.getcall(p_Sem_150604_ReferencingSignatureParameters_001:?); + PCO.reply(p_Sem_150604_ReferencingSignatureParameters_001:{-, 4, 5} value 1); +} + +testcase TC_Sem_150604_ReferencingSignatureParameters_001_new() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect (self:PCO, v_ptc:PCO); + v_ptc.start(f_ptcBehaviour()); + PCO.call(p_Sem_150604_ReferencingSignatureParameters_001:s_callTemplate, 5.0) { + + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_wrongTemplate value 1) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_returnTemplate value 2) { + setverdict(fail); + } + [] PCO.getreply(p_Sem_150604_ReferencingSignatureParameters_001:s_returnTemplate value 1) { //check that procedure is returning correct values + setverdict(pass); + } + [] PCO.catch (timeout) { + setverdict(fail); + } + } +} + +control{ + execute(TC_Sem_150604_ReferencingSignatureParameters_001_new()); +} + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn index 7c12ea250debf11a63b35f0d3e325a3a56ef9fef..3e1f35651d7c55cb9e5edc13b2d6f70085a71784 100644 --- a/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_036.ttcn @@ -39,7 +39,7 @@ module NegSem_1508_TemplateRestrictions_036 { if (valueof(m_baseTemplate.b) == true) { setverdict(pass); } else { - setverdict(fail); + setverdict(fail, valueof(m_baseTemplate.b)); } } diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_043.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_043.ttcn index fef12208291070e6bc7d29fc8076a71e30f4a253..728845683a1b8b53f199c5329ede3602e4201705 100644 --- a/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_043.ttcn +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1508_template_restrictions/NegSem_1508_TemplateRestrictions_043.ttcn @@ -15,7 +15,7 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:15.8, Ensure that template(present) can be parameter to template(omit) + ** @purpose 1:15.8, Ensure that template cannot be parameter to template(omit) ** @verdict pass reject *****************************************************************/ diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0ec422f11f09f320c8b6428124edb652358f88a0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation refuses not initialized operands. + ** @verdict pass reject + *****************************************************************/ + +// Restriction b) The operands of the match operation shall be completely initialized. + +module NegSem_1509_MatchOperation_002 { + + type component GeneralComp { } + + template integer m_lessThan10 := (-infinity..9); + + testcase TC_NegSem_1509_MatchOperation_002() runs on GeneralComp { + + var integer v_value; + + if (match(v_value, m_lessThan10)) { // error: The operands of the match operation shall be completely initialized. + setverdict(pass); + } else { + setverdict(fail,"Reason: ", v_value); + } + } + + control{ + execute(TC_NegSem_1509_MatchOperation_002()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a016f81e9b8661b365538e624523f9fc04b4bfce --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_1509_MatchOperation_003 { + + type component GeneralComp { } + + type enumerated A_enum { A, B, C, D, E }; + type enumerated B_enum { A, F, G }; + + testcase TC_NegSem_1509_MatchOperation_003() runs on GeneralComp { + + var A_enum v_value := A; + + + if (match(v_value, B_enum:G)) { // error: different enum type + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1509_MatchOperation_003()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9b99cbcc178a783d0ffe845c7c5bc6efd61c5a32 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that matching a value expression against a template instance which evaluates to the omit matching mechanism shall return false. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_011 { + + type component GeneralComp { } + + type set MySet { + charstring field1, + boolean field2 optional + } + + template MySet mw_receiveTemplate := { + field1 := pattern "ab*de", + field2 := omit + } + + testcase TC_Sem_1509_MatchOperation_011() runs on GeneralComp { + var MySet v_value := { + field1 := "abcde", + field2 := true + } + + if (match(v_value, mw_receiveTemplate)) { + setverdict(fail); + } else { + setverdict(pass); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_011()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c0d233a3b396ded73ae30f7adba50a19c674dcda --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that if the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Restriction C: If the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + + +module Sem_1509_MatchOperation_012 { + + type component GeneralComp { } + + template integer m_lessThan10 := (-infinity..9); + + testcase TC_Sem_1509_MatchOperation_012() runs on GeneralComp { + + if (match(-20, m_lessThan10)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_012()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6f7a29fe1abb6b567445e361feb23374709e6e5d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that if the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// Restriction C: If the expression-parameter evaluates to a literal value without explicit or implicit identification of its type, the type of the template instance-parameter shall be used as the type governor for the expression-parameter. + + +module Sem_1509_MatchOperation_013 { + + type component GeneralComp { } + + const integer c_value := 1; + + testcase TC_Sem_1509_MatchOperation_013() runs on GeneralComp { + + if (match(c_value,*)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_013()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3bc97683932a8cbb7c620ddf816e1944b1646fe4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_014 { + + type component GeneralComp { } + + type enumerated A_enum { A, B, C, D, E }; + type enumerated B_enum { A, F, G }; + + testcase TC_Sem_1509_MatchOperation_014() runs on GeneralComp { + + var A_enum v_value := A; + + if (match(v_value, B_enum:G)) { + setverdict(fail); + } else { + setverdict(pass); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_014()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e0dedd7f69a9b315b7845929924a779bc04728a3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_015 { + +type component GeneralComp { } + + type enumerated A_enum { A, B, C, D, E }; + type enumerated B_enum { A, F, G }; + + testcase TC_Sem_1509_MatchOperation_015() runs on GeneralComp { + + var A_enum v_value := A; + + if (match(A,v_value)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_015()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..440f10e988f52b2964a42950248535ae55674837 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.9, Ensure that the match operation works correctly with enums. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1509_MatchOperation_016 { + + type component GeneralComp { } + + type enumerated A_enum { A, B, C, D, E }; + type enumerated B_enum { A, F, G }; + + testcase TC_Sem_1509_MatchOperation_016() runs on GeneralComp { + + var A_enum v_value := A; + + if (match(B,v_value)) { + setverdict(fail); + } else { + setverdict(pass); + } + } + + control{ + execute(TC_Sem_1509_MatchOperation_016()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b226378e4e177da96807f5a2df9ba745fedcd679 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015.ttcn @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15.11, Ensure that concatenations of record of charstrings work when parameterized. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +module Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015 { + + type component GeneralComp { } + + type record of charstring RecOfChar; + + template RecOfChar m_myRec_par(integer p_num) := {"ABC"} & ? & * length(p_num) & {"EF"}; + + testcase TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015() runs on GeneralComp { + var integer v_int := 3; + var template RecOfChar v_recofChar; + v_recofChar :={ "ABC" } & { "Z" } & { "Z" } & { "Z" } & { "EF" }; + + if (match(valueof(v_recofChar), m_myRec_par(2))) { + setverdict(pass); + } else { + setverdict(fail); + } + + } + + control{ + execute(TC_Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_015()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn b/conformance_test/core_language_tests/positive_tests/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c207f42cd6de3fb0cc5d4370e7b56125eaa508f8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/15_templates/15_toplevel/NegSyn_15_TopLevel_001.ttcn @@ -0,0 +1,35 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:15, Ensure that the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + ** @verdict pass reject, noexecution + *****************************************************************/ + +// The following requirement is tested: +//Restriction C: the expression or template body initializing a template shall evaluate to a value or template, which is type compatible with the template being declared. + +module NegSyn_15_TopLevel_001 { + + type record MyRecord { + integer myInt + } + + template MyRecord mw_myRecord := { + myInt := 2.1 // error: incompatible type (int req., float is given) + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..c0a0833f757c45665fff301d91800a81931b4eb0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module NegSem_160102_predefined_functions_039 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_NegSem_160102_predefined_functions_039() runs on GeneralComp { + var EDays v_enum := Friday(3); + int2enum(6,v_enum); // error: not allowed value + + if (match(enum2int(v_enum),6)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_160102_predefined_functions_039()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..4fea1d573affaf312b58a868995ac74758fca8a1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module NegSem_160102_predefined_functions_040 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday(-1), Tuesday(1), Wednesday(2), Thursday(3), Friday(3..5) // error + }; + + testcase TC_NegSem_160102_predefined_functions_040() runs on GeneralComp { + var EDays v_enum := Wednesday; + int2enum(3,v_enum); // value already occupied + + if (match(enum2int(v_enum),2)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_160102_predefined_functions_040()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..c17fbd8846aeae3da1d468d1b31469dca719cadc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C.3.5) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +module Sem_160102_predefined_functions_062 { + + type component GeneralComp { + } + + type record of integer MyRecofInt; + + testcase TC_Sem_160102_predefined_functions_062() runs on GeneralComp { + var template MyRecofInt v_1 := {1,2,3,4,5}; // specific value of integer type + var template bitstring enc := decmatch v_1; //encoded template + + if (match(istemplatekind(enc, "decmatch"), true)) { + setverdict(pass, "decmatch: ", istemplatekind(enc, "decmatch")); + } else { + setverdict(fail, "decmatch: ", istemplatekind(enc, "decmatch"), "; expected result: true"); + } + + } + + control { + execute(TC_Sem_160102_predefined_functions_062()); + } +} with { encode "RAW"} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..0d5f7eb85b08e9089862789207bc496d54b72b72 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module Sem_160102_predefined_functions_093 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_Sem_160102_predefined_functions_093() runs on GeneralComp { + var EDays v_enum := Thursday; + + int2enum(4,v_enum); // new value for v_enum is Friday(4) + + if (match(enum2int(v_enum),4) and match(v_enum,Friday(4))) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_093()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..27608326c72add4925a92ca3072683d944465448 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Ensure that integer value of an enum handled correctly + +module Sem_160102_predefined_functions_094 { + + type component GeneralComp { + } + + type enumerated EDays { + Monday, Tuesday, Wednesday, Thursday, Friday(3..5) + }; + + testcase TC_Sem_160102_predefined_functions_094 () runs on GeneralComp { + var EDays v_enum := Friday(3); + var integer v_day := enum2int(v_enum); + + if (match(v_day,3)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_160102_predefined_functions_094 ()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..d24f2eaf05be65d0e0a92d57ccdcab4d4098dc92 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: Using ischosen for anytype + +module Sem_160102_predefined_functions_095 { + type union U { integer f1, octetstring f2 } + + type component GeneralComp { + } + + + testcase TC_Sem_160102_predefined_functions_095 () runs on GeneralComp { + template U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); + template anytype mw_anytype := { U := m_u4 } + var boolean v_i; + + v_i := ischosen(mw_anytype.U); //function returns true value + if(match(v_i,true)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected decoding result"); + } + } + + control{ + + execute(TC_Sem_160102_predefined_functions_095()); + + } + +} +with { + extension "anytype U" +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..5de17113d10e91819ec5f8b00278637b68498f5e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: Using ischosen for anytype + +module Sem_160102_predefined_functions_096 { + + type component GeneralComp { + } + + type union U { integer f1, charstring f2 }; + + testcase TC_Sem_160102_predefined_functions_096 () runs on GeneralComp { + + var U chosen := { f1 := 1 }; + template anytype mw_anytype := { U := chosen }; + var boolean v_i, v_j; + + v_i := ischosen(mw_anytype.integer); //function returns false + + if(match(v_i,false)) { + setverdict(pass); + } else { + setverdict(fail, "Unexpected result for ischosen()"); + } + } + + control{ + + execute(TC_Sem_160102_predefined_functions_096()); + + } + +} +with { + extension "anytype U, integer" +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..93341968b354f9c514a4172b5b92b40d9b4a79cb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +// The following requirements are tested: +// The optional decoding_info parameter is used for passing additional encoding information to the codec and, if it is omitted, no additional information is sent to the codec. + +module Sem_160102_predefined_functions_097 { + + type component GeneralComp { + } + + type integer I with { variant "32 bit"}; + + testcase TC_Sem_160102_predefined_functions_097() runs on GeneralComp { + var I v_test := 23424; + var bitstring v_enc := encvalue(v_test, "encoding_info_text"); + + if (match(decvalue(v_enc,v_test,"decoding_info_text"), 0)){ + setverdict(pass,v_test); + } else { + setverdict(fail, "Invalid encoding length"); + } + } + + control{ + execute(TC_Sem_160102_predefined_functions_097()); + } + +} with { encode "RAW" } diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..d35248fe6c3a68894c1334ebec67b5144195f1ba --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn @@ -0,0 +1,49 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * The optional encoding_info parameter is used for passing additional encoding information to the codec and, + * if it is omitted, no additional information is sent to the codec.*/ + + +module Sem_160102_predefined_functions_098 { + + type component GeneralComp { + } + + type charstring CH with { variant ""}; + + testcase TC_Sem_160102_predefined_functions_098 () runs on GeneralComp { + + var CH v_test := "abc"; + + //Encoding: + var universal charstring v_test_enc_8 := encvalue_unichar(v_test,"UTF-8", "encoding_info_text"); + //encode to universal charstring UTF-8 + + setverdict(pass,"Encoded value: ", v_test_enc_8); + } + + control{ + execute(TC_Sem_160102_predefined_functions_098()); + } + +} with { encode "RAW" } diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..bd8aa3744870a20bcc6a1fc7b39e763100de5715 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.2, Ensure that predefined encvalue_unichar function works properly in case of encoding universal charstring + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +/* The following requirements are tested: + * The optional decoding_info parameter is used for passing additional encoding information to the codec and, + * if it is omitted, no additional information is sent to the codec.*/ + +module Sem_160102_predefined_functions_099 { + + type component GeneralComp { + + } + + type charstring CH with { variant ""}; + + testcase TC_Sem_160102_predefined_functions_099 () runs on GeneralComp { + + var CH v_test := "abc"; + + //Encoding: + var universal charstring v_test_enc_8 := encvalue_unichar(v_test,"UTF-8", "encoding_info_text"); + //encode to universal charstring UTF-8 + + //Decoding: + var CH v_test_dec; + var integer v_res:= decvalue_unichar(v_test_enc_8,v_test_dec,"UTF-8", "encoding_info_text"); //decode (UTF-8) + + if (v_res == 0) { + setverdict(pass, "Decoded ", v_test_enc_8 , " with result ", v_res); + } else { + setverdict(fail, "Unexpected decoding result: Decoded ", v_test_enc_8 , " with result ", v_res); + } + + } + + control{ + execute(TC_Sem_160102_predefined_functions_099()); + } + +} with { encode "RAW" } diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c799353cac8a7d8636e91feb951fddeab9464ea --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_005 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_005() runs on GeneralComp system GeneralComp + { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..94a769f62b75b957642a6ecf8ad467811e45ea7f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_006 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_006() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..07c00f46125cc16b225916c9b1fc684e3eb45d9c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_007 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_007() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create alive; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_007()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..280211be5b794957aad5fc59a41f0591d6cd1ff9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_008 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + template @fuzzy integer mw_test := f_test(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_008()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec0537a71445be31af3d61a60f71dc859758bac5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_009 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_009()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b53b836bffb8415bb89e88d8222a269b1aa5715a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_010 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_010()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..740816ab6d7caf5fa196e942b207558895b33180 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_011 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy integer mw_test := f_test(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_011()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5b73e7693e56afb68581ef1ac2a7e892cf4d048f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_012 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + template @fuzzy integer mw_test := f_test(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_012()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..76b5efd66c1b961ce83c854a9bd996447e917a6a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_013 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_013() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_013()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..675f43a24132a86e9234b39a36e1ae47d07b0943 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_014 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_014() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.start; //stop + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_014()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4a18da84c48458f7538da645d54581441ada6e22 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_015 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_015() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.start; //halt + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_015()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fe64be424a8ac9ed503bb4e74e60dd3c679814fc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_016 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_016() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_016()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..578b88f74d09c45e89d04bbcc19c4c31119378cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_017 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_017() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_017()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bbb4c5addb0a0c80e9ebc4200290bdddcddbd0b0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_018 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(2); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_018() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + template @fuzzy integer mw_test := f_test(); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_018()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..481ec71b4822915df57ffbd061dfdc29f25a24ed --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_019 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(integer:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_019() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + template @fuzzy integer mw_test := f_test(); + p.send(1); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_019()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9cc6a4bac88bd7c32b125357ee842ee4805e3b67 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_020 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(integer:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_020() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + template @fuzzy integer mw_test := f_test(); + p.send(1); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_020()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ae77e86a945f659ed5ab8b2c715b634ebcf49c2f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_021 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_021()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d02cf97b9701262610b4b0598bd71339b8b2be4d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn @@ -0,0 +1,71 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_022 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_022()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ad06736ded9f5ae03ddf07512f004b08359dd935 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_023 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_023() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_023()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ddf1ffecd42fb9893a6c9ae8266c76f768ff3bdf --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_024 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_024() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_024()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c1250b89c7805b6cb7e83d801d972339c43f40c1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_025 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_025() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_025()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..359caa13a53f26b79d8a89556d7f8c2bea37df8b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_026 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_026() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy integer mw_test := f_test(); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_026()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e4d967743b0f8c1b6ecd9fdecf8481edb84c39d0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_027 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_027() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_027()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..776eed0f0d83eac8c58f1868d73b60467f97d24c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_028 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_028() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_028()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eb110c38cd3218630bccc4baafbd6af7263432a6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_029 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_029() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_029()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eec1ce5957dd59c541a370ddbe5777d49b4b13e9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_030 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_030() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + unmap(mtc:p, system:p); //connect >< map + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_030()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..40e3134ae03ce15c12c685375f86754f0fdadf4f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_031 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_031() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_031()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..87d7431fa7baaa36e43964b19c4447211e62f7ab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_032 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_032() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_032()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..44beb31640a6402775742cd1bbd44adce2a67c99 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_033 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_033() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_033()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8222511d9704ce029f3c5009a7d760e86b815e9c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_034 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_034() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_034()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7094fb5979ccdbbaafa49a138391ca4ae4b9b36 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_035 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_035() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_035()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e9d16c98c1e00d5d184808aa0da208f2915be45c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_036 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_036() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_036()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d567ee63724733e201917634fd2d8b724ff9e1ea --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_037 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_037() runs on GeneralComp system GeneralComp { + tc_tmr.start; + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_037()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d2629f684d54a47671f729d1532890abf182ac75 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_038 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_038() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_038()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_038() runs on GeneralComp system GeneralComp + { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_038()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e63a6bcd13e09cd0b7c1211a4a446883c9dd56d7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_039 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_039() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_039()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..031cdc5a93dbc396b8f591c968369c5e12407243 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_040 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_040() runs on GeneralComp system GeneralComp + { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_040()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5ee088958e6a1cde33b13fc74f4973f4d6805afa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_041 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_041() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_041()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..433ac8b3bda50f334ef2c7c24efb559012adc0b1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_042 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_042() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_042()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2b02df2e406ff2d8d775bc7f914dc2fccb7ee32e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_043 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_043() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_043()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cc6e09b5a4319bddbb8ae0844a90e7a872e1394a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_044 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_044() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_044()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d341492c821f562bc47006c1a7d91d375fcdf641 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_045 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_045() runs on GeneralComp system GeneralComp { + template @fuzzy integer mw_test := f_test(); + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_045()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2282fc6eac05c45a444b74548def66127d7f4def --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_046 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_046() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_046()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e2188a5815fb6a58ac89e104e63e16a5e9ca2191 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_047 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_047() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_047()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a6cd11c3b8279991e9687cc22582d6844d9efca7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_048 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_048() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_048()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..322254d67065bac7ff2f5d66a1826fa36fc19c7f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_049 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_049() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_049()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9e3ef6ad05f36a97ed2b00c813c240b77336441b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_050 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_050() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_050()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..39a31f7c9abfe577fc879e810bffba8924d854a2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_051 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_051() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_051()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d676c7fe6f0577544ac873b5ec4a18f561276cbc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_052 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_052() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_052()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5a706108909c8160b0c1957f8dbd85bb99316483 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_053 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_053() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + template @fuzzy R mw_test := { field1 := f_test(v_ptc) }; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_053()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f6d918fe81e7200a8bc83fd635783581b7899d9d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_054 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_054() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_054()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..64d33b3c0e971d654e72be827388eeaa0d24701e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_055 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_055() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + p.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_055()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e1667b88ce2debc40e74a57892907c582b11e3db --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_056 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_056() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + p.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_056()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fd40a732ec58e7c4c813054c9b5761ae1173274a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_057 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_057() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(mw_test) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_057()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7257d4217ac64fae6199bfc6f27fc0d942fa37b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_058 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_058() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_058()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..97a5a945ddbc9232951c41d8401bad1c12618e6b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_059 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_059() runs on GeneralComp system GeneralComp + { + connect(mtc:p, mtc:p); + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_059()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b381822f3aa59f2284d37de1c9521f50091940d3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_060 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_060() runs on GeneralComp system GeneralComp + { + connect(mtc:p, mtc:p); + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_060()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2170e0606b64bf308a94ea8701028f8abb55733a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_061 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_061() runs on GeneralComp system GeneralComp + { + connect(mtc:p, mtc:p); + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_061()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ebde725776bc65718aa3cec97f010e980097dddc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn @@ -0,0 +1,71 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_062 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_062() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_062()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1422ac374e5488bc11d7b1da6c12a596f118f1a6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_063 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_063() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_063()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4c02b930601e567916cf1a7a12b03142fc4a3c06 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn @@ -0,0 +1,77 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_064 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_064() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_064()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24e8827809b642f0b8703bab660f3dd928088d07 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn @@ -0,0 +1,78 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_065 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_065() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_065()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8bfb4e54293aeb247092d0bdc5033c43c5f354c7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn @@ -0,0 +1,77 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_066 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_066() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_066()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..37692f7685d68062c104b020208176e29242058d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn @@ -0,0 +1,78 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_067 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_067() runs on GeneralComp system GeneralComp + { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + template @fuzzy R mw_test := { field1 := f_test() }; + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_067()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b02b7d6ceff561cebe90a474afd19b48bd25559 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_068 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_068() runs on GeneralComp system GeneralComp + { + connect(mtc:p, mtc:p); + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_068()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..77b74c3935356b85ab09e938c987b0acc6b22a1e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_069 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_069() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_069()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec5e56b6a9f2cdd356eb957cce417da43085cc33 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_070 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_070() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_070()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec6c104d9c6baedd88b74f2c092fb93835b26b8c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_071 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_071() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + unmap(mtc:p, system:p); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_071()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8376c57bb6811cdaa9c67bfec89dea9bf6cd5a1d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_072 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_072() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_072()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a36115bd0886ed9575c615d1a82696f9f157c9d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_073 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_073() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_073()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..04a73f9aacd01ac4ca28b1ef44f84eb0cc359951 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_074 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_074() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_074()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f2e69099812d3fd4ed39a0bbf461b8a39376f195 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_075 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_075() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_075()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8c4d19fb510d79fb7e60cafb82dea0098267ddf8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_076 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_076() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_076()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..037e90ae55c2cad7f5218cae5fc5f66090e7bb78 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_077 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_077() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_077()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5fde0e66bc1857023771cc565c84a33f79bd78e3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_078 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_078() runs on GeneralComp system GeneralComp + { + tc_tmr.start; + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_078()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4f453861663879fd13b0edbe72079d8fb3ed5c1e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_079 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_079() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_079()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_079() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_079()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..328eb18ef9c718664688d26aa3da70ae49cdbf43 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_080 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_080() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_080()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..689f138ad16f05b155dba4e8c47924914bdf22ec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_081 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_081() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_081()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..02f950ad6546d191b5cea65225f4fa74e8018b4a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_082 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_082() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_082()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..172c2431da836be57b16e7d90b30a82e4bf31a56 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_083 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_083() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_083()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..64cec6a94e006e6127132523013cd603a26b159d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_084 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_084() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_084()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3a471d492a4ec7967b651db7a9957a23f299a9d1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_085 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_085() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_085()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2bd1fedc424f97128600ddf65b2380d127ac9c3c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in template fields) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_086 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_086() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(mw_test); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_086()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4e0c667b68ed3883ab9362b1807c9ac80d2e5700 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_087 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_087() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_087()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a1be7a150b5d9bc11ddd21cc904ffb704db22b76 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_088 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_088() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_088()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..984a05a10e39bdd5f8aba649f4100b6e91a4f875 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_089 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_089() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_089()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d344810b2b3136de33106e0ca9fceae14af0f488 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_090 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_090() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_090()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1fcd9e7f2c065e89cd53b66d5dda07efe781c3e5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_091 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_091() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_091()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d28c3934b8b5dfd08f33456d5d7552e7241fdf1b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_092 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_092() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_092()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a7aff3e83896a246fce3e3218da64db1aeb9db27 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_093 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_093() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_093()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c1a02c733f55fa244075c0099f84feb79eef37c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_094 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_094() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_ptc) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_094()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d15387b76689c93573277a08c106dde6fd55c00f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_095 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_095() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_095()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3eca6e09d7d59a1ff352c54dd376635f48c2cc34 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_096 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_096() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_096()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..db1e93c48b17a727a390b51fd84db174cae27964 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_097 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_097() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_097()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c935f0733fc54d55f8a2bad171bb8585c1d0ac0d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_098 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_098() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(R:{ field1 := f_test() }) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_098()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..faba622859dd0d2edf58201e539bf75e766fb4df --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_099 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_099() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_099()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ccdc8288e17d2a6bf68993f1228cc8d9c7d41a3e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_100 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_100() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_100()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3ccb7a4d91f7e2e046b611fab1eb98fc8af26988 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_101 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_101() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_101()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c129f8293f5a30ef3d56052e46c96cd607ff23bd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_102 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_102() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_102()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e5a85624f0ecfceb92979447b4b164d79db1a043 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_103 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_103() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_103()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..832770e1e8b96928fb4c7ca76c9ece4935a2fb97 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_104 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_104() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_104()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53823ed501076934db19ea9d3442020adb2e3b4a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn @@ -0,0 +1,75 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_105 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_105() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_105()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..92fdc55a6a601ac8f220e7f48daa4f8060dd37e3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_106 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:{}); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_106() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_106()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b5635c31c7fb60b8e746028018f2d7d90d413f51 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn @@ -0,0 +1,75 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_107 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_107() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_107()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..520fcb1ff28fa4e96316b1fdce6ed8a92f7a87b0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_108 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_108() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_108()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa89dc896853414f8e146aab595608606fdb9d6c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_109 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_109() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_109()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..160513b92769c6f92f8fddeda1ca79c187cd148e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_110 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_110() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_110()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d91d6f9f89cba4c6285ef5f5f6ba7634f8c9a5f4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_111 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_111() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_111()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..71d2040d891923d29bdb62e8748b759b02c80435 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_112 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_112() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_112()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a7a126b5780070f749c08af9e00bfc026564fea4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_113 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_113() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_113()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b88e0104ab952320515f372e1a062e49db4a08c5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_114 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_114() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_114()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0bac59f50a3052d0fa6725ff99d0f6616ec3afab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_115 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_115() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_115()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4bc04b2d7980fb979d7327af2efe6472cb6ed408 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_116 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_116() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_116()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6355f778c064166685cbc99708dbd89bfec068b8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_117 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_117() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_117()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6b2968bdebe5b3dd0dd4b1793a1c761fbb68a856 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_118 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_118() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_118()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2fffe72d24d2a16f75b2600aab319550139fbc58 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_119 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_119() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_119()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..782b6c25d9f23588342b65810fa63ae5ae7954cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_120 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_120() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_120()) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_120() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_120()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..baa6f7612e7a37b8afbe358e4f65af815c2b4479 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_121 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_121() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_121()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..37ac0a85098a00f3bf71b8b8057bbd27ce3da741 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_122 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_122() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_122()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53325c66bf3c812966936856ec6ecf89bae002e9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_123 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_123() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_123()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8bb20e1a5577c6593a7407762b6441ff5af6e3f7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_124 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_124() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_124()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8f5df02355431e1cca0c5d716844a8d8f431a306 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_125 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_125() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_125()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fdd42b1204fcecb8c8769efedeb7296a65bfa0b3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_126 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_126() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_126()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..66da6c4653fb87449b431c550297ff46b0321150 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_127 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_127() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test() }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_127()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b8f0e03f1ad227a6840081784c629a1ee536c8a4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an out parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_128 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_128() runs on GeneralComp system GeneralComp { + var integer v_int; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_128()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..31dde7862c50bd93133d063a30dad42da15c378e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an inout parameter (in in-line templates) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_129 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(inout integer p_inout) runs on GeneralComp return template integer { + p_inout := 1; + return ?; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_129() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(R:{ field1 := f_test(v_int) }); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_129()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b8da4fbbb4be2eeb568e6ad11229f40d0e25cdf --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_130 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return template integer { + var GeneralComp v_ptc := GeneralComp.create; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_130() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_130()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..87ee7bef4323f924b4d4d8a888b687610163fd4d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_131 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.start(f_ptcBehaviour()); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_131() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_131()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec5f1425bbb16d51830e10673a49087a2a4a804b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_132 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_132() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_132()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b2388afd09b49bc8936c1c9ea6e88a6561c1cbab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_133 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.kill; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_133() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_133()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..91936be9b8f02415698f09a17dd5e4d32725ea80 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_134 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.running) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_134() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_134()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..15b17d8542679d23e5be81cada5a3264895d5529 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_135 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return template integer { + if (p_ptc.alive) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_135() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_135()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23e8c7a3e267834e95991c625ba0e9d361f645ff --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_136 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.done; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_136() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_136()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6cbd4de71d829ac860fc170d0b4a132e0a326933 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_137 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return template integer { + p_ptc.killed; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_137() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_ptc))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_137()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..008a4a16bba53a4832c8b09039e47bb304d6c724 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_138 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.start; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_138() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_138()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..532d9190e9f8ceec5f165119bbcc92054ae8dcbb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_139 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_139() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_139()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..91b3b5362eeac1056b03d99feef9dd8df1592e24 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_140 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.halt; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_140() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_140()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fcf0e37b0004b3300efa96e516ca8bc21e7fe301 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_141 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.clear; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_141() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + alt { + [] p.receive(m_msg(f_test())) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_141()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5adc9cb78bf5172e0ea1950b7881dd1d102c0abd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_142 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (p.checkstate("Started")) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_142() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_142()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..41705d072d081cba7653626037c1a63b8b386cbc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_143 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.send(R:{ field1 := 2 }); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_143() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_143()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..be7273169e3dadfabe7214fb5be48a8475fceeac --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_144 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.receive(R:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_144() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_144()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..680836fc56497f0a00fd40f7042f72e707abc97c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_145 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.trigger(R:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_145() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_145()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0a06119d0d57526261bd90b218cc77ad6beb1080 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_146 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return template integer { + psig.call(S:{}, nowait); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_146() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_146()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f36db613a50117e4129ce72a2cbb7eb1ca6c0974 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn @@ -0,0 +1,78 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_147 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.getcall(S:{}); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_147() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_147()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6bd2c128660595b92ee653e8c818ed03c9f7f300 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn @@ -0,0 +1,79 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_148 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.reply(S:{}); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_148() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_148()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..05ab3c9c4bf5ecb72a638716cadf661c3b519a68 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn @@ -0,0 +1,80 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_149 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return template integer { + psig.getreply(S:{}); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_149() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_149()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5d9015ba2695674be4c3b8fd3ef8eeac0e571525 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn @@ -0,0 +1,79 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_150 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return template integer { + psig.raise(S, "UserException"); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_150() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(R:{ field1 := 1 }); + psig.getcall(S:{}); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_150()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..39b440d522f91a93382483574fd38e09c26725a2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn @@ -0,0 +1,80 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_151 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return template integer { + psig.catch(S, charstring:?); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_151() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_151()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..34b5b9b4b9af27a8e2b83c9fb60830cd1344b88d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_152 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + p.check; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_152() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_152()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a23c11f22b315ee4f0f4d420c0291d077d077055 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_153 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + connect(mtc:p, mtc:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_153() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_153()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..99699aa40de7900a1fc0754d6824bc3d5e8ff7b0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_154 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + disconnect(mtc:p, mtc:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_154() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_154()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..27e25de44ed5165552db7ab5468abb65d3f1f0e3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_155 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + map(mtc:p, system:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_155() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_155()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7b0cafc955ccc94c7f08d2c76ab29cc927b2775 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_156 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return template integer { + unmap(mtc:p, system:p); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_156() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_156()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bae558adabf07f7fd81dbf55b7810b6370a7c373 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_157 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + action("My action"); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_157() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_157()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b38d61cf0e883f500408e2dd0d1f6fed7f86bbaa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_158 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.start; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_158() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_158()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a424db58f0fbce4ebff85d3abab461c7a624395a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_159 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + tc_tmr.stop; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_159() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_159()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..87e054c695993206c01f5ccf7874cdd59473c0cb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_160 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.running) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_160() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_160()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8ff9272e2b27d4bf1ee5df0dbd55f78eac168a25 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_161 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + if (tc_tmr.read > 0.0) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_161() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_161()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..acb4c3d5476a4582d5b5cf39721a4a902a90f1c1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_162 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return template integer { + any timer.timeout; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_162() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_162()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..868edf7c6e301b6a3bca729fe29d3c08377e30c6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn @@ -0,0 +1,71 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_163 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_163() return boolean; + + function f_test() runs on GeneralComp return template integer { + if (xf_NegSem_160104_invoking_functions_from_specific_places_163()) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_163() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_163()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4e13ff4ac8c728368e8baab2999e272a52213a79 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_164 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + if (rnd() > 0.5) { return ?; } + else { return 1; } + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_164() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_164()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..50341759945000caee9cce9b33cf7463a145d680 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an assignment of a component variable (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_165 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return template integer { + vc_int := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_165() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_165()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8474ed6f3b3d8006fcd6af27567d3ed3408a2b90 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_166 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_out(vc_int); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_166() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_166()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3acedb72e8d223c8d2ff676927ad30b49a2631e5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_167 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return template integer { + f_inout(vc_int); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_167() runs on GeneralComp system GeneralComp { + template @fuzzy R mw_test := { field1 := f_test() }; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_167()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7c20ef1b96f50c11d259dafc10abd4c8bd2cf303 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_168 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return template integer { + setverdict(pass); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_168() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_168()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ba5825c4c6f9c035c33a050f4084ae9828ac0d02 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_169 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + activate(a_anyTimer()); + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_169() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_169()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..559ded7fe2b60f1d0046641b0bff5e69de6a0a16 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in a function called during receiving operation (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_170 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return template integer { + deactivate; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_170() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test())); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_170()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b15686931311ff298fac665133af2e7d14ac486e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an out parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_171 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(out integer p_out) runs on GeneralComp return template integer { + p_out := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_171() runs on GeneralComp system GeneralComp { + var integer v_int; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_171()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..86c1af54e44cfeba03a94abbe178f480981af75c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called during receiving operation cannot contain an inout parameter (as actual parameters) + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_172 { + type record R { + integer field1 + } + + type port P message { + inout R; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test(inout integer p_inout) runs on GeneralComp return template integer { + p_inout := 1; + return ?; + } + + template R m_msg (template integer p_par) := { + field1 := p_par + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_172() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(R:{ field1 := 1 }); + p.receive(m_msg(f_test(v_int))); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_172()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25c6feebde14fafbb77b561de5a967b97a3d8e61 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_173 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_173() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_173()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5d5e0566632083ea2b5676b3a1ab0e782e11707f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_174 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_174() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_174()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..963778544c1e7dcae81a32b502959cdfc69eecb7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_175 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_175() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_175()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a887931e9a2226105eab5afa748f854e7c8cccb7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_176 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_176() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_176()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c5f045c6bf65ad965b323aef3d0e6521857fd53 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_177 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_177() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_177()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..58ba634911dcfee17811842570621e485c836385 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_178 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_178() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_178()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ebe7880afcb365d115aba76e99b99c97ac176e06 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_179 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_179() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_179()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ed23493bcdfb4d1392d3614cc0a0ebf732831aea --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_180 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_180() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_ptc)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_180()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..389142cef1fb2b952b4916a9d7ca0fa6447da883 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_181 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_181() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_181()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..14f4f7a815794c9c1a89b372a5b52b62c96f37c0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_182 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_182() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_182()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a53c649b62b1715792a3570f3eb02fc0adf435c0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_183 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_183() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_183()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4f816f293b47eed6dae24fb61c2c922ae1c06a21 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_184 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_184() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_184()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c9af21a5734f9fe5bc59bffa4ccad7097636d75d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_185 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_185() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_185()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1e1dbbd1de9ae748da5a4c28cd113e06bd00e574 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_186 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_186() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_186()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..51439e70c213138a34378bfd9891e1d5f742511d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_187 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_187() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_187()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ef9a2fa1fae5129ab1e78c523669097463216c39 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_188 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_188() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_188()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..918590fd58588c93fb2201f374354e856de27fb9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_189 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_189() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_189()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0cf83054da5baf9ebb0e0ccbed800ebbc8f75932 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_190 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:{}); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_190() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_190()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3acacddf2b358e8cd72b433de4d9468a00b1b1e7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_191 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_191() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_191()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..483a406805287818b4414fed3a844eafc6910cf2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_192 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:{}); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_192() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_192()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e6397a58064741e9781a169877c6cf4915fa3eda --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_193 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_193() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_193()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f5612b12e713b871da4dd2f4c202011d49568ee6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_194 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_194() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_194()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f0a82d6706b1a5215296118270c48b82ab1c9bdc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_195 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_195() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_195()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ba27c803d866452b974b3a8aa37c6c07af878b9b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_196 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_196() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_196()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ffb539a4053d1ca489d4284496c4a08212177c6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_197 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_197() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_197()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bfa50543604c601d15abb80a5189b6197fc495ec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_198 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_198() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_198()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..af5598b625c9e8ab8a22fb87259e36bb16e781fe --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_199 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_199() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_199()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3dc7eb831400c4477a80fa3ee33a4140692c036a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_200 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_200() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_200()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fe8ea723d90cbfd6064bad5a3322c5f86f26e66c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_201 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_201() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_201()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..696e28507002b59d34b80c62f534ae37d10a57e1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_202 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_202() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_202()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0d562a20bec475e3e68af369d9cbc1156e8e9d31 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_203 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_203() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_203()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5002a861cf4526450953ebd26b34ff298f6e1600 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_204 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_204() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_204()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20a19c1e28aa129e22f5828ab2ad576475d72a26 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_205 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_205() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_205()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..09eb48a78869d98d967f3465b153f0917537d430 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_206 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_206() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_206()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a8432108a6bb306333cb7652f90e8ed84528e655 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_207 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_207() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_207()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2535c1d34292d6a95ce3cb9506efab2d5bcce17a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an alt statement cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_208 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_208() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_208()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ea316a1f7b5d1560c7cf5bad0022f55a447c3ef --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_209 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_209() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_209()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..44050180c0ec5f1b3ddc8892789e7d599c26df65 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in guards of alt statements + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_210 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_210() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test()] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_210()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2fe8d885304a9a350cf1e42eab88088e97c990f3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an alt operation cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_211 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_211() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [f_test(v_int)] p.receive(integer:?) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_211()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fcb527394d49aeb2dc93d752a9d3c415bf37fb60 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_212 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_212() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_212()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6afd5055df925ab78b4a744477d29a47651a21a0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_213 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_213() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_213()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f225618a171205f19027491f28b8325efde2bbaa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_214 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_214() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_214()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6fe98928bffdc48cc2b1f84729f9f4d448b83148 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_215 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_215() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_215()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6d3961e35db14b579d9f4c0cd5bfabde21c1aa2b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_216 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_216() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_216()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..860f82d1d2092f229e736ce4a0eaa447f891dcb9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_217 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_217() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_217()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..684872e07981c656bfb03bf02268fd338101ae4e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_218 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_218() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_218()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d736424269ce643af29b0b084142ec6219eec4b6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_219 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + [f_test(p_ptc)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_219() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_219()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dfb31d5d429a456573b760b96037c22b4799d3f9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_220 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_220() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_220()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7837f844a1128756a807abd55baee59bf24a6d3b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_221 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_221() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_221()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c82e446c08b98ab793fe254e0cda85545fef42f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_222 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_222() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_222()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f6cd1751236f337089184be21f479a3925d3bd38 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_223 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_223() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_223()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0c878d87b918d02bcf978f476dd1607c32d392ab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_224 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_224() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_224()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..60b6ebed30289dc2f481782e48068b8cbcbe70eb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_225 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_225() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_225()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..143b0f29f6a78a0c79080ed6a132a6d3a6d525b6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_226 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_226() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_226()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d3b46094e750963428128b8966fd2963f5d5a5f1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_227 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_227() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_227()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..28190ca9654d855afbbb2a45d7a8eafd4f364cc6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_228 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_228() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_228()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b5632670d5d31ad9b0be3a352a92828b4763d10f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_229 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_229() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_229()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..213a9830f832b2e49c0b857b3704a93649eba3bd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn @@ -0,0 +1,75 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_230 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_230() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_230()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..db115391ec49fc69a4787d85d77601e6b9c845f9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_231 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_231() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_231()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..aa24437d322956bea4ded8453fc7c1784678ec5a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn @@ -0,0 +1,75 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_232 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_232() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_232()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2586ad030a1e90699285f4fa93c6ed004ccf8e40 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_233 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_233() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_233()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9233364a4adb92e80a8b0030b08ce58529c96154 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_234 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_234() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_234()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..22dfdc3e7d7594d7de687f2d21f6e6602f69bad7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_235 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_235() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_235()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f9e1bef2c39b1c49d9ee6dcb5925403d2e0de2a3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_236 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_236() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_236()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..234a26ceaf50206fbf1f961f494020929e9eff4b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_237 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_237() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_237()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1e0e97a739b6d2d11d355abb8dd1cbc7da464502 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_238 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_238() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_238()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9144cf73327de6d6c1e00ff3a52611ad8f574380 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_239 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_239() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_239()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2f5bce7cc9fb138024a5873ddb1ac5c88835c1ec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_240 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_240() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_240()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bae694c83681ec843fc0b030ecb12390b770f2b6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_241 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_241() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_241()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3e7032e97c11ebeff0dfcc2d0d238e9de42483f9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_242 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_242() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_242()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ae2973c72efc28d67175553f1772a51154d3a4a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_243 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_243() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_243()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..66cddb76c81d124efb3927d6b093ea21ee5a1128 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_244 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_244() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_244()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c926024ee968ec49c4169c29ad36960c6012ae48 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in guards of altsteps + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_245 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_245() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_160104_invoking_functions_from_specific_places_245()) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_245() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_245()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..39fca5ea2b78458166feceff89cf6f9d2db6639e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_246 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_246() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_246()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7555961a465f4267c624ed2582dccd326ec6889c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_247 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_247() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_247()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4cd1430c3843f1a159c388cb17ff079f85470285 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_248 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_248() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_248()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..722b91853991883a0685eb028d3a230743a50a33 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in a guard of an altstep cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_249 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_249() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_249()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23696bbace67f610fae23179f16516428e74def9 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_250 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_250() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_250()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3cc963a6804f976f12a8be49aab2340407dec3f4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_251 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_251() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_251()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8e4a374848e3557a3058b189d036b826cc25f975 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in guards of altsteps + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_252 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv() runs on GeneralComp { + [f_test()] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_252() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_252()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..46ae73d85fce1e9db7badfcde9c2b357856b0d3b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an altstep cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_253 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_253() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_253()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e292f39e0da30a661317b54010d1d93d6e9e45eb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called from a guard statement of an altstep cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_254 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + [f_test(v_int)] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_254() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_254()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5f62d0b5212bf00004ca71a25e6be3216edb2b16 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the create operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_255 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_255() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_255()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ebc3e1ca6fccbfc415917640bfccb49e5d864577 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_256 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_256() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_256()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1f98dd1728d9012796e9ad45456ec0c577fe05df --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_257 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_257() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_257()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ff174c56865e39760f0a99b2b056c7985fd1f10e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the kill operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_258 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_258() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_258()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7881400dc6bbbe69bd11a6caea6fd73fff1fe7fd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the component.running operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_259 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_259() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_259()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..12b6f71cc4e11043142b411ecc7502c0cef9a9dd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the alive operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_260 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_260() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_260()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7dde1ee63392fb3d321b34e97a82e7fbe8186ae8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the done operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_261 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_261() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_261()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8954059f6086d30070842cb6bba25ea1c8124640 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the killed operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// a) All component operations, i.e. create, start (component), stop (component), kill, running (component), +// alive, done and killed (see notes 1, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_262 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(GeneralComp p_ptc) runs on GeneralComp { + var boolean v_guard := f_test(p_ptc); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_262() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(v_ptc); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_262()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..eb45d4fa8693c89250bd74fb7dbeb5f410c03293 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_263 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_263() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_263()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cbeef9df5535f744487db35f678dcee9af49acbf --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the port.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_264 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_264() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_264()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..529d8c53f6ff14972a001fec0d05af0957a01e96 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the halt operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_265 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_265() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_265()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5e02e1d9a976f9a5c312ce0c36782faf7ea01b01 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the clear operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_266 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_266() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv() {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_266()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..64e75da74c51322ff41562afbe764bbd360bc14d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the checkstate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_267 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_267() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_267()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..53213f3a9a1b78965538dba9469933b5182ea25f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the send operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_268 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_268() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_268()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2dda7a590bfc569cce1656f5dfa8e2e6746c5565 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the receive operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_269 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_269() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_269()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..496b9dc08ed6e0db2837298b7fb047a698d8d5d3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the trigger operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_270 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_270() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_270()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b56b6ee98725c9c56360084248d4adc1545623f3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the call operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_271 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_271() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_271()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c30b4aea9f506580bb53f53990b97de010a78308 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn @@ -0,0 +1,75 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getcall operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_272 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_272() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_272()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..799ee3b3719e35febdf1128cabd570a05a0ff6e6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the reply operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_273 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_273() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_273()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4f39701d3bd01df9b97e811cfe9a4315da22de9d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn @@ -0,0 +1,77 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the getreply operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_274 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:{}); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_274() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_274()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2496d85c04f7602a589dc18117116e83a1fa01c3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the raise operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_275 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_275() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_275()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e902f998ffe16baa4af6806bf447cbc42ffd8a49 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn @@ -0,0 +1,77 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the catch operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_276 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_276() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_276()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5b6144005bdd303a6a59c49399029834234ee487 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the check operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_277 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_277() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_277()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d2323f04548c1b91a854f60eadbc116aa2ed0b21 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the connect operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_278 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_278() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_278()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ef0c31196914da632ecee7d2860f3b7fdf466db8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the disconnect operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_279 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_279() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_279()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a512055574cb9e5c7cd3e0e29b1c8555b5d184a6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the map operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_280 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_280() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_280()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0c2c437ca99312955466a7fcb702f852d04f3243 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the unmap operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// b) All port operations, i.e. start (port), stop (port), halt, clear, checkstate, send, receive, trigger, call, +// getcall, reply, getreply, raise, catch, check, connect, disconnect, map and unmap (see notes 1, 2, 3, 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_281 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv() runs on GeneralComp system GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_281() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_281()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..042ce8b1e4842e3cdfb0ee99fb2899e452cc7a2c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the action operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// c) The action operation (see notes 2 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_282 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_282() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_282()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d0cb1daf29cd7c7fc72d5d53b6df7a5df6415794 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.start operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_283 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_283() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_283()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a063930c9fdcd71164adc64cfd04cd19860152d4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.stop operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_284 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_284() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_284()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7f24f7e7d1cd1ae3e10ab977095d3f409922dca4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timer.running operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_285 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_285() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_285()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..96ff6bb6b074560fd1aa6cd7fc18ca5cc2a6c243 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the read operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_286 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_286() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_286()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3dc06d655b1eb5d572f36ccaf8013ae6e4732189 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the timeout operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// d) All timer operations, i.e. start (timer), stop (timer), running (timer), read, timeout (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_287 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_287() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_287()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a09ead32bb3a3c3a80f3b7bd1a4c51a665eeb165 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn @@ -0,0 +1,68 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a non-deterministic external function call cannot be used in altstep local definitions + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// e) Calling non-deterministic external functions, i.e. external functions where the resulting values for actual +// inout or out parameters or the return value may differ for different invocations with the same actual in and +// inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_288 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_160104_invoking_functions_from_specific_places_288() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_160104_invoking_functions_from_specific_places_288()) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_288() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_288()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e2619c80433984afba4c8257cf89b56c9d95b745 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the predefined rnd function cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// f) Calling the rnd predefined function (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_289 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_289() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_289()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..95439ddd7ac46d80dba39e0522b78f5f474805c6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_290 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_290() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_290()); + } +} + diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cd5ddc923c23a89953db5eb42752a407aff5b9f0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_291 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_291() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_291()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..58a475605a372aef82809c88ef5d9638884582e6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify a function called in an altstep local definition cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// g) Changing of component variables, i.e. using component variables on the left-hand side of assignments, +// and in the instantiation of out and inout parameters (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_292 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_292() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_292()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c92b7979566b3508ad94040961334ac3d79a2937 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// h) Calling the setverdict operation (see notes 4 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_293 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_293() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_293()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3279f83b509917e3327e3a50cd72a15595926007 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the activate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_294 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_294() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_294()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..66c2edd0d0add03bcc5035c9af332d0a8b2bf869 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that the deactivate operation cannot be used in altstep local definitions + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// i) Activation and deactivation of defaults, i.e. the activate and deactivate statements (see notes 5 and 6). + +module NegSem_160104_invoking_functions_from_specific_places_295 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_guard := f_test(); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_295() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_295()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6652fef544431462a4206a6c92ae08a27fa26ff5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in altstep altstep local definitions cannot contain out parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_296 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_296() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_296()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cf138cd7e7fdf2cab193d9fcf336ed36ff88ef34 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1.4, verify that a function called in altstep altstep local definitions cannot contain inout parameters + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// If value returning functions are called in receiving communication operations (in templates, template fields, +// in-line templates, or as actual parameters), in guards or events of alt statements or altsteps (see clause 20.2), +// or in initializations of altstep local definitions (see clause 16.2), the following operations shall not be +// used in functions called in the cases specified above, in order to avoid side effects that cause changing the +// state of the component or the actual snapshot and to prevent different results of subsequent evaluations +// on an unchanged snapshot: +// j) Calling functions and deterministic external functions with out or inout parameters (see notes 7 and 8). + +module NegSem_160104_invoking_functions_from_specific_places_297 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv() runs on GeneralComp { + var integer v_int := 0; + var boolean v_guard := f_test(v_int); + [v_guard] p.receive(integer:?) {} + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_297() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + a_rcv(); + setverdict(pass); + } + + control { + execute(TC_NegSem_160104_invoking_functions_from_specific_places_297()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_038.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_038.cc new file mode 100644 index 0000000000000000000000000000000000000000..ac4297430a9575988ec52ae973fe3f95f38e7a3b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_038.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_038.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__038 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__038() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_079.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_079.cc new file mode 100644 index 0000000000000000000000000000000000000000..2207262f5be530942fdf63103f502e2dacda7216 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_079.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_079.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__079 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__079() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_120.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_120.cc new file mode 100644 index 0000000000000000000000000000000000000000..dc94547dc4fe772e7b67c328448753769402effb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_120.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_120.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__120 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__120() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_163.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_163.cc new file mode 100644 index 0000000000000000000000000000000000000000..d273cf7eafd66a04ced62929aebfbd27d48ddcb3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_163.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_163.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__163 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__163() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_245.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_245.cc new file mode 100644 index 0000000000000000000000000000000000000000..226c6bfecd21490a411d0f3289c69da55105ca9f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_245.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_245.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__245 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__245() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_288.cc b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_288.cc new file mode 100644 index 0000000000000000000000000000000000000000..a58af41b23cf7862c9b56bbbfcd17df920744356 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_288.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_160104_invoking_functions_from_specific_places_288.hh" + +namespace NegSem__160104__invoking__functions__from__specific__places__288 +{ + + BOOLEAN xf__NegSem__160104__invoking__functions__from__specific__places__288() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..72aad047df684e5afbca56918acdc57367e8ceb1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep without a runs on clause cannot be started as component behaviour + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module NegSem_1602_toplevel_007 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_test() { + [] any port.receive { + setverdict(pass); + } + } + + testcase TC_NegSem_1602_toplevel_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + } + + control { + execute(TC_NegSem_1602_toplevel_007()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f03e1ec051010425689df995c7cbd075fcc62dc5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep with a runs on clause can be started as component behaviour + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module Sem_1602_toplevel_002 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp{ + [] any port.receive { + setverdict(pass); + } + } + + testcase TC_Sem_1602_toplevel_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + } + + control { + execute(TC_Sem_1602_toplevel_002()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f718fd5a87b3984f99e65e3c70e74d83c500a2e3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:16.1, verify that altstep with a runs on clause can be started as component behaviour from a context without a runs on clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// Restriction f) +// Altsteps started by using the start test component operation shall always have a runs on clause (see clause 22.5) +// and are considered to be invoked in the component to be started, i.e. not locally. However, the start test component +// operation may be invoked within behaviours without a runs on clause. + +module Sem_1602_toplevel_003 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp{ + [] any port.receive { + setverdict(pass); + } + } + + function f_startPtc(GeneralComp v_ptc) { + v_ptc.start(a_test()); + } + + testcase TC_Sem_1602_toplevel_003() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, v_ptc:p); + p.send(1); + f_startPtc(v_ptc); + v_ptc.done; + } + + control { + execute(TC_Sem_1602_toplevel_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6d313649d1820c34389522d788b8a7ff3f34dda0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_005 { + + type component GeneralComp { + } + + testcase TC_Sem_190301_select_case_statement_005 () runs on GeneralComp{ + var charstring v_i:="aBcDeFg"; + + select (v_i) { + case(charstring:"aBc") { + setverdict(fail); + } + case(charstring:"aBcDeFg") { + setverdict(pass); + } + case(charstring:"aBcD") { + setverdict(fail); + } + case else { + setverdict(fail); + } + } + } + + + control{ + + execute(TC_Sem_190301_select_case_statement_005()); + + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ebe9a8b2d4c55fee1ed728b5beacc79a4a6829db --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:19.3, Ensure that the IUT properly evaluates select-case statements + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +module Sem_190301_select_case_statement_006 { + modulepar charstring c_par := "aBcDeFg"; + + type component GeneralComp { + } + + testcase TC_Sem_190301_select_case_statement_006 () runs on GeneralComp{ + + select (c_par) { + case(charstring:"aBc") { + setverdict(fail); + } + case(charstring:"aBcDeFg") { + setverdict(pass); + } + case(charstring:"aBcD") { + setverdict(fail); + } + case else { + setverdict(fail); + } + } + } + + control{ + + execute(TC_Sem_190301_select_case_statement_006()); + + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a1c995cbd552c1dac018ecb130a4770ea88a2f3f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use a select union statement with several branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// c) No two cases in a select union statement shall have the same caseIdentifier or TypeIdentifier. +module NegSem_190302_select_union_statement_006 { + + type component GeneralComp { + } + + testcase TC_NegSem_190302_select_union_statement_006() runs on GeneralComp { + var anytype v_any; + v_any.integer := 2; + v_any.charstring := "abc"; + v_any.float := 1.2; + + select union (v_any) { + case (charstring) { + if(match(v_any.charstring,"abc")) + {setverdict(pass, v_any.charstring);} + } case (integer) { + if(match(v_any.integer,2)) + {setverdict(pass, v_any.integer);} + } case (charstring) { // error + if(match(v_any.charstring,"abc")) + {setverdict(fail, v_any.charstring);} + } + case else { + setverdict(fail); + } + } + } + + control { + execute(TC_NegSem_190302_select_union_statement_006()); + } +} +with { + extension "anytype integer, charstring, float" +} diff --git a/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_007.ttcn b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8cfea028993960015e9a634a7c46036fc4f15ed4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_007.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:19.3.2, verify that it is possible to use a select union statement with several branches + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirement is tested: +// If the template instance has type anytype, each branch shall start with the case keyword followed by one or more type names (a list branch) or the else keyword (an else branch) and a statement block. + +module Sem_190302_select_union_statement_007 { + + type component GeneralComp { + } + + testcase TC_Sem_190302_select_union_statement_007() runs on GeneralComp { + var anytype v_any; + v_any.integer := 2; + v_any.charstring := "abc"; + v_any.float := 1.2; + + select union (v_any) { + case (charstring) { + if(match(v_any.charstring,"abc")) + {setverdict(pass, v_any.charstring);} + } case (integer) { + if(match(v_any.integer,2)) + {setverdict(pass, v_any.integer);} + } case (float) { + if(match(v_any.float,1.2)) + {setverdict(pass, v_any.float);} + } + case else { + setverdict(fail); + } + } + } + + control { + execute(TC_Sem_190302_select_union_statement_007()); + } +} +with { + extension "anytype integer, charstring, float" +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn index 23342efc512f5c85585fd86a533047a87490ae3b..c10b6335c250b633cd3e1c3c8583defd4a6ad4f0 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn @@ -15,13 +15,15 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, create in guard statements + ** @purpose 1:20.2, verify that the create operation cannot be used in guard statements ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the guard expression shall not use of the operations create, running, -// alive and activate. +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. module NegSem_2002_TheAltStatement_002 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn index 235eb744beff8274900bdc53904e6334d5b31554..09673d791175c12c8992af17051adbf1835f7f94 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn @@ -15,13 +15,15 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (timer) in guard statements + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in guard statements ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the guard expression shall not use of the operations create, running, -// alive and activate. +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. module NegSem_2002_TheAltStatement_003 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn index 2e286caf5a074fc5c353391145d411e41ece6a69..54044fb89e942922fd95cf1db65f2b57de942620 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn @@ -15,13 +15,15 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (component) in guard statements + ** @purpose 1:20.2, verify that the component.running operation cannot be used in guard statements ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the guard expression shall not use of the operations create, running, -// alive and activate. +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. module NegSem_2002_TheAltStatement_004 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn index b4b89ef677c2c08138a9e73e902e1eba40be60a1..823d2809bdc70dd509332af9e436280420d821eb 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_005.ttcn @@ -15,13 +15,15 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, alive in guard statements + ** @purpose 1:20.2, verify that the alive operation cannot be used in guard statements ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the guard expression shall not use of the operations create, running, -// alive and activate. +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. module NegSem_2002_TheAltStatement_005 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn index 99e3d5bab30192a657f6cc09245567fb1910487d..1d67296f0b2bfc3018c33d78ca56c6b7389cee7c 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_006.ttcn @@ -15,13 +15,15 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, activate in guard statements + ** @purpose 1:20.2, verify that the activate operation cannot be used in guard statements ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the guard expression shall not use of the operations create, running, -// alive and activate. +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. module NegSem_2002_TheAltStatement_006 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn index bc18b479a60fa837ca752a02d9707ca98d10bdf6..d494f676559c8e4953fe08c952668b321ba63882 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_007.ttcn @@ -15,13 +15,16 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, create in alt branch event + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the event operation shall not use the operations create, running, alive -// and activate. +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. module NegSem_2002_TheAltStatement_007 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn index 070141dba80161f74835f62574d7333280238131..06fc6c2d7a40085cf93fe3fa8a638581b5b4f019 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_008.ttcn @@ -15,13 +15,16 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (timer) in alt branch event + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in inline templates) ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the event operation shall not use the operations create, running, alive -// and activate. +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. module NegSem_2002_TheAltStatement_008 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn index a490d9571b3b21b6c7a82718517241077b2ecab7..b295a63bedb19480a451d4c44ac697c876ab4b8c 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_009.ttcn @@ -15,13 +15,16 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (component) in alt branch event + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in inline templates) ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the event operation shall not use the operations create, running, alive -// and activate. +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. module NegSem_2002_TheAltStatement_009 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn index 4bc4b6664a9eaf4850a8605153b0e4ac22e78cc9..4d02754d9cddb7d2bc4525cffde7176a2e6b9a9b 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_010.ttcn @@ -15,13 +15,16 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, alive in alt branch event + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in inline templates) ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the event operation shall not use the operations create, running, alive -// and activate. +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. module NegSem_2002_TheAltStatement_010 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn index 157cd582d36e6759953ec903fff16419b638cb44..071b94d1d26b34826fa94eb143777b7d9be41950 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_011.ttcn @@ -15,13 +15,16 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, create in alt branch event + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in inline templates) ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the event operation shall not use the operations create, running, alive -// and activate. +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. module NegSem_2002_TheAltStatement_011 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn index 278d8e475e7d98e9fbfa68c0af5e29375748171e..bdcdd19178454fba1c4770969c869f465cdc2be2 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_012.ttcn @@ -15,13 +15,14 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, create in altstep branch + ** @purpose 1:20.2, verify that the create operation cannot be used in parameters of alt branch events ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the altstep invocation parameters shall not use the operations create, -// running, alive and activate. +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. module NegSem_2002_TheAltStatement_012 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn index cd08249f707df85ce2abe54581074d8ff13eb610..4525a4e50f721a2d0a956b4c74468a0bf05341c4 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_013.ttcn @@ -15,13 +15,14 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (timer) in altstep branch + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in parameters of alt branch events ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the altstep invocation parameters shall not use the operations create, -// running, alive and activate. +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. module NegSem_2002_TheAltStatement_013 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn index 23ebcc949aec0cf38d28da2771c968bd24debb26..4a8560aa2d1f79c56423a5c78c73354d08ca7ff1 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn @@ -15,13 +15,14 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, running (component) in altstep branch + ** @purpose 1:20.2, verify that the component.running operation cannot be used in parameters of alt branch events ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the altstep invocation parameters shall not use the operations create, -// running, alive and activate. +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. module NegSem_2002_TheAltStatement_014 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn index 1c87062f49ebbbe22c01744ca718e5ad0b7e9631..7d47d58b8088448655ab026ecb0fd21b2cb01124 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn @@ -15,13 +15,14 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, alive in altstep branch + ** @purpose 1:20.2, verify that the alive operation cannot be used in parameters of alt branch events ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the altstep invocation parameters shall not use the operations create, -// running, alive and activate. +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. module NegSem_2002_TheAltStatement_015 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn index a1edf864afc1d7948d2e3811cbab25af64dbd0b9..f5b7fea982eca54f162c094241b17e8aad492c94 100644 --- a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn @@ -15,13 +15,14 @@ * Modified by: Adrien Kirjak * ** @version 0.0.1 - ** @purpose 1:20.2, create in altstep branch + ** @purpose 1:20.2, verify that the activate operation cannot be used in parameters of alt branch events ** @verdict pass reject *****************************************************************/ // The following requirement is tested: -// Also, the altstep invocation parameters shall not use the operations create, -// running, alive and activate. +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. module NegSem_2002_TheAltStatement_016 { diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f3ea293f226a62128ffec176c82d2d69a19cf004 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the create operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_017 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() return boolean { + var GeneralComp v_ptc := GeneralComp.create; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_017() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_017()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4d33cbeb39a6db0f9d6be28e0cbb90ad0dda0358 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_018 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + log("PTC running"); + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.start(f_ptcBehaviour()); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_018()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7afcf25ecd38d52312dc400febfe1e7add849a8b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_019 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_019()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4233778c37efd9c239527236cce2439e7d6cda57 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the kill operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_020 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.kill; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_020()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..accf7962235e5cab599771019a13bd665e028507 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_021 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_021()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d429f7fef1afd200adc29320b2d6eeebaa2c46bf --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the alive operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_022 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 10.0; + t_tmr.start; + t_tmr.timeout; + } + + function f_test(GeneralComp p_ptc) return boolean { + if (p_ptc.alive) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_022()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7d4efadc7718cd860d9552909f80b6e920a40985 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the done operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_023 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.done; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_023() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_023()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1a634cdfdb8cd0bcbbc685e082d059ccded1edd5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the killed operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_024 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ptcBehaviour() runs on GeneralComp { + } + + function f_test(GeneralComp p_ptc) return boolean { + p_ptc.killed; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_024() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_ptcBehaviour()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_ptc)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_024()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..55f6106f1cfd33537700c5b3afd0103eaef3771b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the port.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_025 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.start; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_025() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_025()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fdd986c68718268bcc1dfa4d70a5b0a3a4992d24 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the port.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_026 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_026() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_026()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8f649477c40084ed8f32af8594656f317fc1c416 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the halt operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_027 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.halt; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_027() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_027()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ceb5d3f81a07eebe6a0b7d8727b5c9122a1f7099 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the clear operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_028 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.clear; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_028() runs on GeneralComp system GeneralComp { + timer t_tmr := 0.1; + t_tmr.start; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()) {} + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_028()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..88a6cbe7c9d34b9df273503ec3e47858a0d976bc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_029 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (p.checkstate("Started")) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_029() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_029()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..afbb6253ab026a9bc46199101bd7657e5fabe9db --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the send operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_030 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.send(2); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_030() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_030()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..56970b9698d1f8354e1803e3e23f7b08dc1389fa --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the receive operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_031 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.receive(integer:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_031() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_031()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6651da8ea367d2b8e0609d1039dde3e848381bf2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the trigger operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_032 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.trigger(integer:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_032() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_032()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2214bfee12686591cae8df91d9b8e7b7efd7a1dc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the call operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_033 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_test() runs on GeneralComp return boolean { + psig.call(S:{}, nowait); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_033() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_033()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0c32dbb566c5e24ef2fd0f6c2561150fef017e2d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the getcall operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_034 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.getcall(S:{}); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_034() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_034()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bb7a97a976924581ab7bfe04fba3865165881dee --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the reply operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_035 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.reply(S:{}); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_035() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_035()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d633f378a4c32c613f0812fd98dc64b1731adb2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the getreply operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_036 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S(); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.reply(S:{}); + } + + function f_test() runs on GeneralComp return boolean { + psig.getreply(S:{}); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_036() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_036()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fdc08faba7fffa91ac067f0accf7189919d4ec2f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn @@ -0,0 +1,73 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the raise operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_037 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.call(S:{}, nowait); + } + + function f_test() runs on GeneralComp return boolean { + psig.raise(S, "UserException"); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_037() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + p.send(1); + psig.getcall(S:{}); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_037()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..341776b0c6000aa16f4a01908a39eb8354ddbef2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the catch operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_038 { + type port P message { + inout integer; + } with {extension "internal"} + + signature S() exception (charstring); + + type port PSig procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + port PSig psig; + } + + function f_ptcBehaviour() runs on GeneralComp { + psig.getcall(S:{}); + psig.raise(S, "UserException"); + } + + function f_test() runs on GeneralComp return boolean { + psig.catch(S, charstring:?); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_038() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(mtc:p, mtc:p); + connect(mtc:psig, v_ptc:psig); + v_ptc.start(f_ptcBehaviour()); + psig.call(S:{}, nowait); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_038()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ea796fbe52461b25695d54fc57dd9acdf39622c6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the check operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_039 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + p.check; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_039() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_039()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7f289bd527568999d1b45e76a8a29a43c6cd5133 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the connect operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_040 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + connect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_040() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_040()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..91cc62a1736efd95342a6a1715dcb193966d7a87 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the disconnect operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_041 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + disconnect(mtc:p, mtc:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_041() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_041()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..488266f2e75162607806971459e329ca045bc3f2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the map operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_042 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + map(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_042() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_042()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bbf8f8575aef1a49989d11682d4f54c8df16452b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the unmap operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_043 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp system GeneralComp return boolean { + unmap(mtc:p, system:p); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp system GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_043() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + disconnect(mtc:p, mtc:p); + map(mtc:p, system:p); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_043()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b1d6fda22488d14f5cda6f1708dfe4b0138fd74 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the action operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_044 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + action("My action"); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_044() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_044()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..94510217c95a6c218c02fb9ac696cc9ad22a5078 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.start operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_045 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.start; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_045() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_045()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..25e02aa9405811e7c77ba7d4cc43e95508ec3d23 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.stop operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_046 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + tc_tmr.stop; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_046() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_046()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0410c0ea7541a97696cf5938054871f9d2db9418 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_047 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 5.0; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.running) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_047() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_047()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9b66e4e9ad6bf813e5c2bf1e04c66e8b2f06628c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_048 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + if (tc_tmr.read > 0.0) { return true; } + else { return false; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_048() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_048()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cba7424ebe9fbc06e1a6d2c40940e2abbe7a5f4b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timeout operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_049 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + timer tc_tmr := 0.1; + } + + function f_test() runs on GeneralComp return boolean { + any timer.timeout; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_049() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + tc_tmr.start; + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_049()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..051cbac9f7977a6de5edad2f8d05d09f36f744f5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a non-deterministic external function call cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ** @configuration external_functions + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_050 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + /** + * @return always true + */ + external function xf_NegSem_2002_TheAltStatement_050() return boolean; + + function f_test() runs on GeneralComp return boolean { + if (xf_NegSem_2002_TheAltStatement_050()) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_050() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_050()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6223575074d0c2ca5b641ccd8da16a4d5f1afa4a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the predefined rnd function cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_051 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + if (rnd() > 0.5) { return true; } + else { return true; } + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_051() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_051()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24bcf7263c428b6765d787cf8e88ff2173cb8cf7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain an assignment of a component variable + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_052 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_test() runs on GeneralComp return boolean { + vc_int := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_052() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_052()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4a468b57b281927c05331d6b9ed76eb6053486dd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain a component variable used as an actual out parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_053 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int; + } + + function f_out (out integer p_out) { + p_out := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_out(vc_int); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_053() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_053()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d623ba785b210c5ee440c6c0d0738d7ecbd7fea6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify a function called in a guard of an altstep cannot contain a component variable used as an actual inout parameter + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_054 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer vc_int := 0; + } + + function f_inout (inout integer p_inout) { + p_inout := 1; + } + + function f_test() runs on GeneralComp return boolean { + f_inout(vc_int); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_054() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_054()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5590b241e102ebba2b00618a52f579370477312c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the setverdict operation cannot be used in guard statements of altstep + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_055 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test() runs on GeneralComp return boolean { + setverdict(pass); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_055() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_055()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f2a44a68e4b17d65aef4c17831fe1e8ce84230bb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the activate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_056 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + activate(a_anyTimer()); + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_056() runs on GeneralComp system GeneralComp { + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_056()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..784ce5ca52fa16420b70f9fe042a14a1dea5c746 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the deactivate operation cannot be used in parameters of altsteps invoked from an alt branch + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_057 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + altstep a_anyTimer() runs on GeneralComp { + [] any timer.timeout {} + } + + function f_test() runs on GeneralComp return boolean { + deactivate; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_057() runs on GeneralComp system GeneralComp { + activate(a_anyTimer()); + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test()); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_057()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..144a7366e7135cc271f885b7e61430d0c676c240 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain out parameters + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_058 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(out integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_058() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_058()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0e1daa23f1a43c1614a9dc648eef8a02055af38c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that a function used in a parameter of an altstep invoked from an alt branch cannot contain inout parameters + ** @verdict pass reject +***************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_059 { + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_test(inout integer p_par) runs on GeneralComp return boolean { + p_par := 1; + return true; + } + + altstep a_rcv(boolean p_par) runs on GeneralComp { + [] p.receive(integer:?) {} + } + + testcase TC_NegSem_2002_TheAltStatement_059() runs on GeneralComp system GeneralComp { + var integer v_int := 0; + connect(mtc:p, mtc:p); + p.send(1); + alt { + [] a_rcv(f_test(v_int)); + [] any timer.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_059()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..84c7e8093f3fcc097ab933f4b9fdbe93daddec63 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_060 { + + type port MyPort message { + inout charstring + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_060() runs on GeneralComp { + timer t_tmr := 1.0; + t_tmr.start; + + connect(self:p, self:p); + p.send(m_test); + + alt { + [t_tmr.read > 0.0] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_060()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c41aa0ba8dbd7b7005f774a3d0bc6e1d792b2c6f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in guard statements + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// b) The evaluation of a Boolean expression guarding an alternative shall not have side effects. To avoid side effects +// that cause an inconsistency between the actual snapshot and the state of the component, the same restrictions +// as the restrictions for the initialization of local definitions within altsteps (clause 16.2) and the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply. + +module NegSem_2002_TheAltStatement_061 { + + type port MyPort message { + inout charstring + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template charstring m_test := "ping"; + + testcase TC_NegSem_2002_TheAltStatement_061() runs on GeneralComp { + connect(self:p, self:p); + p.send(m_test); + + alt { + [p.checkstate("Started")] p.receive(charstring:?) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_061()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..499b0c3f0dbb67d73946895da1d18775b4a7d51e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_062 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_062() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + + connect(self:p, self:p); + t_tmr.start; + p.send(true); + + alt { + [] p.receive(boolean:t_tmr.read > 0.0) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_062()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8a7b594aa969e711ebe64d7be7eb9606500af67a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in inline templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_063 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_063() runs on GeneralComp system GeneralComp { + + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(boolean:p.checkstate("Started")) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_063()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..24a35e1047f7fc40e6aef5172998e1f1ca9903ef --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_064 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_064() runs on GeneralComp system GeneralComp { + timer t_tmr := 1.0; + connect(self:p, self:p); + t_tmr.start; + p.send(true); + alt { + [] a_receive(t_tmr.read > 0.0); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_064()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0f620342a2f303c77e86d6c85c5e1979f775b479 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in parameters of alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_065 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_receive(boolean p_bool) runs on GeneralComp { + [] p.receive(p_bool) { + setverdict(pass); + } + } + + testcase TC_NegSem_2002_TheAltStatement_065() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] a_receive(p.checkstate("Started")); + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_065()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3438b3a12cbfc3b55c6451b3926e9019cfdbb232 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_066 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_066() runs on GeneralComp system GeneralComp { + var template @fuzzy boolean mw_msg := (GeneralComp.create != null); + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_066()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..868d8ebdcc42a8bc53669546553269abeef79b9c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_067 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + function f_test() runs on GeneralComp { + } + + testcase TC_NegSem_2002_TheAltStatement_067() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_test()); + + var template @fuzzy boolean mw_msg := v_ptc.running; + connect(self:p, self:p); + + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_067()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d80d77775e86da7245271e41f39bda6bd680e47a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_068 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_068() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + + var template @fuzzy boolean mw_msg := v_ptc.alive; + connect(self:p, self:p); + p.send(true); + + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_068()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d92983cb5743ef5f03f513e5d41831d9cced7c7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_069 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_069() runs on GeneralComp system GeneralComp { + var template @fuzzy boolean mw_msg := p.checkstate("Started"); + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_069()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b7ae46e010953130811966216d7f176a8242e618 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_070 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_070() runs on GeneralComp system GeneralComp { + timer t_tmr := 4.0; + t_tmr.start; + + var template @fuzzy boolean mw_msg := t_tmr.running; + + connect(self:p, self:p); + + p.send(true); + + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_070()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1f0e63eb33408e5a2cc573aeecb2e373d38db8c6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_071 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + testcase TC_NegSem_2002_TheAltStatement_071() runs on GeneralComp system GeneralComp { + timer t_tmr := 4.0; + t_tmr.start; + + connect(self:p, self:p); + + var template @fuzzy boolean mw_msg := t_tmr.read > 0.0; //the program is too quick, do not to put this earlier in the code + p.send(true); + + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_071()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..043edbfb539afc0d9ca90acc486102eb0e2e883b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in templates) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_072 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + testcase TC_NegSem_2002_TheAltStatement_072() runs on GeneralComp system GeneralComp { + var template @fuzzy boolean mw_msg := activate(a_timeout()) != null; + + connect(self:p, self:p); + p.send(true); + + alt { + [] p.receive(mw_msg) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_072()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2bbdb800867dca628645a13797022210705fbbff --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_073 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_073() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg(GeneralComp.create != null)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_073()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..352985e3cb928a11d78b10a2cac04eae85a9be37 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_074 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + function f_test() runs on GeneralComp { + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_074() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + v_ptc.start(f_test()); + + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg(v_ptc.running)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_074()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7845e98d16cadd2876db7e54864a3ed1707dd30d --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the alive operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_075 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_075() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + + connect(self:p, self:p); + p.send(true); + + alt { + [] p.receive(mw_msg(v_ptc.alive)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_075()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9d44241690b8e5d60dd7798faacfc9d242cb8ede --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_076 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_076() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg(p.checkstate("Started"))) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_076()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bdba5ae75121c6e73016fdaa8ddd37e5e0130735 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_077 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_077() runs on GeneralComp system GeneralComp { + timer t_tmr := 4.0; + connect(self:p, self:p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg(t_tmr.running)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_077()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c60cfe9900b654cb6094084c3397a6f4b2ec86c5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_078 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_078() runs on GeneralComp system GeneralComp { + timer t_tmr := 4.0; + connect(self:p, self:p); + t_tmr.start; + p.send(true); + alt { + [] p.receive(mw_msg(t_tmr.read > 0.0)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_078()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..842d4f1f6c194dcaeaea566717eed743f2355fda --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the activate operation cannot be used in alt branch events (in template parameters) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// c) The evaluation of the event of an alt branch shall not have side effects. To avoid side effects that cause +// an inconsistency between the actual snapshot and the state of the component or introduce indeterminism +// in the evaluation of the following alt branches or the re-evaluation of the same alt branch, the restrictions +// imposed on the contents of functions called from special places (clause 16.1.4) shall apply to expressions +// occurring in the matching part of an alternative. + +module NegSem_2002_TheAltStatement_079 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout { + } + } + + template boolean mw_msg (boolean p_par) := (false, p_par); + + testcase TC_NegSem_2002_TheAltStatement_079() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] p.receive(mw_msg(activate(a_timeout()) != null)) { + setverdict(pass); + } + } + } + + control { + execute(TC_NegSem_2002_TheAltStatement_079()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ec11ebd3af34a2c4fdf1484811a6a913f3ede172 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the create operation cannot be used in alt branch events (in inline template) + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_080 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := GeneralComp.create != null; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_080() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_080()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b559119603d690ad89271cf0868c154e78b01d17 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the component.running operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_081 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + var GeneralComp v_ptc; + } + + function f_test() runs on GeneralComp { + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := v_ptc.running; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_081() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create; + v_ptc.start(f_test()); + + connect(self:p, self:p); + p.send(true); + + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_081()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f360238054127e1f1852e2cd43ccbc59e7259711 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the alive operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_082 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + var GeneralComp v_ptc; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := v_ptc.alive; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_082() runs on GeneralComp system GeneralComp { + v_ptc := GeneralComp.create alive; + + connect(self:p, self:p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_082()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0b3dcbbe2dbf9ddc9546e7b9a40341514fa049e3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the checkstate operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_083 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := p.checkstate("Started"); + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_083() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_083()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c556d7dfd18c4b7b9b8854c8716a0a1f08b642a7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the timer.running operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_084 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + timer t_tmr := 1.0; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := t_tmr.running; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_084() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + t_tmr.start; + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_084()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ccb1ecfb74f1f357b439cdbf268c1cfa9b071ef3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the read operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_085 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + timer t_tmr := 1.0; + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := t_tmr.read > 0.0; + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_085() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + t_tmr.start; + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_085()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e227895452dd31b61cc272a7f9d8c4c0f16c4c75 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:20.2, verify that the activate operation cannot be used in altstep declarations + ** @verdict pass reject + *****************************************************************/ + +// The following requirement is tested: +// d) The evaluation of an altstep invoked from an alt branch, if none of the alternatives in the altstep is chosen, shall +// not have side effects. To avoid side effects the restrictions imposed on the contents of functions called from special +// places (clause 16.1.4) shall apply to the actual parameters of the invoked altstep. + +module NegSem_2002_TheAltStatement_086 { + + type port MyPort message { + inout boolean + } with {extension "internal"} + + type component GeneralComp { + port MyPort p; + } + + altstep a_timeout() { + [] any timer.timeout{ + } + } + + altstep a_rcv() runs on GeneralComp { + var boolean v_bool := (activate(a_timeout()) != null); + [v_bool] p.receive(boolean:?){ + } + } + + testcase TC_NegSem_2002_TheAltStatement_086() runs on GeneralComp system GeneralComp { + connect(self:p, self:p); + p.send(true); + alt { + [] a_rcv(); + [] any timer.timeout { + } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2002_TheAltStatement_086()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/xf_NegSem_2002_TheAltStatement_050.cc b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/xf_NegSem_2002_TheAltStatement_050.cc new file mode 100644 index 0000000000000000000000000000000000000000..f27cbad8a1e9940daaca02fc4085b3bd43a835cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/20_statement_and_operations_for_alt/2002_the_alt_statement/xf_NegSem_2002_TheAltStatement_050.cc @@ -0,0 +1,17 @@ +/***************************************************************** + ** @author STF 470 + ** @version 0.0.1 + ** @purpose 1:8.2.3.1, Verify that identifiers of parameter types are not imported together with external functions + ** @verdict pass reject + *****************************************************************/ + +#include "NegSem_2002_TheAltStatement_050.hh" + +namespace NegSem__2002__TheAltStatement__050 +{ + + BOOLEAN xf__NegSem__2002__TheAltStatement__050() + { + return true; + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn index 67d8a27b61c47e28300cd041a998a25b6dfb0f20..b1b62daf4d12f931b9f2e30c4d19c5ceec393954 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_001.ttcn @@ -28,7 +28,7 @@ // 4) inlist-PORT2 defines the messages or procedures of the in-direction of PORT2; and // 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. // b) The connect operation is allowed if and only if: -// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. +// outlist-PORT1 ⊆ inlist-PORT2 and outlist-PORT2 ⊆ inlist-PORT1. // // In this test, outlist-PORT1 == inlist-PORT2 and outlist-PORT2 == inlist-PORT1 diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn index efb466629b96d3653b8cd1043a63d79a8b34d5a8..b5b9f3ae5f273c0668587584878cafb355455832 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_005.ttcn @@ -29,7 +29,7 @@ // 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. // c) The map operation (assuming PORT2 is the test system interface port) is allowed if // and only if: -// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. // // In this test, outlist-PORT1 == outlist-PORT2 and inlist-PORT2 == inlist-PORT1 diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn index cc86d631180d330691c67e1f467665d3068c4626..40127867175f6d1a0bb916235b15b01ba74ae7b8 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_006.ttcn @@ -29,9 +29,9 @@ // 5) outlist-PORT2 defines the messages or procedures of the out-direction of PORT2. // c) The map operation (assuming PORT2 is the test system interface port) is allowed if // and only if: -// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. +// outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 ⊆ inlist-PORT1. // -// In this test, outlist-PORT1 ⊂ outlist-PORT2 and inlist-PORT2 == inlist-PORT1 +// In this test, outlist-PORT1 ⊆ outlist-PORT2 and inlist-PORT2 == inlist-PORT1 module Sem_210101_connect_and_map_operations_006 { type record R { diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn index 75ad8a9ccd7ae7b2281fa9531d50bb1f3b2d9766..0e99cb546203a8756c99adbb4f5bd0a12f16cccd 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_009.ttcn @@ -1,5 +1,19 @@ -/***************************************************************** - ** @author STF 433, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.1, Ensure that map param statements are allowed in testcase block ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn index a335eafceef04f44c8e14b8a73168ab4c9c31a47..4a93b347de4adc3c7715ebc8e31bc14ab6bf87d8 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_and_unmap_operations_011.ttcn @@ -1,5 +1,19 @@ -/***************************************************************** - ** @author STF 433, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.2, Ensure that unmap param statements are allowed in testcase block ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn index 91e5dee3e798bcb1c74eb7ef44fb40b15ac35ed1..a6be261d247dbc58427c46a65ef4f580233c52a4 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_001.ttcn @@ -1,5 +1,19 @@ -/*************************************************** - ** @author STF 451, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.2, Ensure that all component notation work correctly in disconnect operation ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn index 161623c2b2cf592411211981498c05b8b8b44278..b3cee5d92921e9fb2514151453675a24ed590463 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_disconnect_operation_002.ttcn @@ -1,5 +1,19 @@ -/*************************************************** - ** @author STF 451, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.1, Ensure that disconnect has no effect on components that are not connected ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn index 6bfe9e45b5d425a2039ace2782ed361c7c2879b7..0986fa046ff6ae78a44e3e2b92f976cf221e6f04 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_001.ttcn @@ -1,5 +1,19 @@ -/*************************************************** - ** @author STF 451, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.2, Ensure that umnap operation of a system and component port works correctly ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn index 4c144f12da2f9fa82bb61ae924ca2695cde12458..a4bd449dbefa9180c3ec6388b2b354648e3ebc18 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210102_disconnect_and_unmap_operations/Sem_210102_unmap_operation_002.ttcn @@ -1,5 +1,19 @@ -/*************************************************** - ** @author STF 451, STF 470 +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * ** @version 0.0.2 ** @purpose 1:21.1.2, Ensure that umnap operation of a component and system port works correctly ** @verdict pass accept, ttcn3verdict:pass diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..715e42f98958736d253946b07b5c26bc8d4666df --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.2, altstep in test component start operation + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The start operation shall bind the required behaviour to the test component. This +// behaviour is defined by reference to an already defined function or altstep. +// NOTE: altstep support added in TTCN-3:2016 -> the test was changed to positive one. + +module Sem_210302_Start_test_component_011 { + + type port P message { + inout integer; + } + + type component GeneralComp { + port P p; + } + + altstep a_test() runs on GeneralComp { + [] p.receive(integer:?) { + setverdict(pass); + } + } + + testcase TC_Sem_210302_Start_test_component_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.send(1); + v_ptc.start(a_test()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Sem_210302_Start_test_component_011()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..561cef92e5ef04df5a2ab872bc77264ab0ea26c7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that start operation works with parametered altsteps + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// The following requirement is tested: The start operation shall bind the required behaviour to the test component. +// This behaviour is defined by reference to an already defined function or altstep. + +module Sem_210302_Start_test_component_012 { + + type port myPortType message { + inout integer; + } + + type component GeneralComp { + port myPortType myPort; + } + + altstep a_myBehaviour(in integer p_int) runs on GeneralComp { + + [] any port.receive { + setverdict(pass); + } + } + + + testcase TC_Sem_210302_Start_test_component_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + + connect(mtc:myPort, v_ptc:myPort); + myPort.send(1); + + v_ptc.start(a_myBehaviour(1)); + v_ptc.done; + + setverdict(pass); + } + + control { + execute(TC_Sem_210302_Start_test_component_012()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4db4af567380b481c46270bab4d2cea24ebffbf1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that inout parameters will be passed to the function by value, i.e. like in-parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Actual inout parameters will be passed to the function by value, i.e. like in-parameters. + +module Sem_210302_Start_test_component_013 { + + type component GeneralComp {} + + function f(inout integer v_in) runs on GeneralComp { + if( match(v_in, 5) ) { + setverdict(pass); + } + else { + setverdict(fail); + } + } + + testcase TC_Sem_210302_Start_test_component_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + var integer v_var := 5; + v_ptc.start(f(v_var)); + v_ptc.done; + } + + control { + execute(TC_Sem_210302_Start_test_component_013()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2512eed3fe58079486a531981793a3766b3009c3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.2, Ensure that inout parameters will be passed to the function by value, i.e. like in-parameters. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// Possible return values of a function invoked in a start test component operation, +// i.e. templates denoted by return keyword or inout and out parameters, have no effect +// when the started test component terminates. + +module Sem_210302_Start_test_component_014 { + + type component GeneralComp { + var integer v_var := 5; + } + + function f() runs on GeneralComp return integer { + v_var := 1; + return v_var; // return value v_var:=1 + } + + testcase TC_Sem_210302_Start_test_component_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create alive; + v_ptc.start(f()); + v_ptc.done; + + if(match(v_var,5)){ + setverdict(pass); + } + else { + setverdict(fail,v_var); + } + } + + control { + execute(TC_Sem_210302_Start_test_component_014()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn index 9943d4955016fe2fe68c4da1a5d93b87ce504a01..73a32d9070b6e96ab4579cd0dc33999b5d36a0ba 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210303_stop_test_component/Sem_210303_Stop_test_component_005.ttcn @@ -30,6 +30,9 @@ module Sem_210303_Stop_test_component_005 { } function f_ptcBehaviour() runs on GeneralComp { + timer t_tmr := 1.0; + t_tmr.start; + t_tmr.timeout; } function f_ptcSecondBehaviour() runs on GeneralComp { 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.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn index 5b04a7801aa551ae7f2050ccdfbf6bf0935b3bdd..d31288d444895d0a0caf2227c9bda2106eda9fba 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_002.ttcn @@ -32,8 +32,6 @@ module NegSem_210305_alive_operation_002 { t.timeout; } - function f_done() runs on GeneralComp {} - testcase TC_NegSem_210305_alive_operation_002() runs on GeneralComp system GeneralComp { var boolean v_isAlive; const integer c_size := 4; @@ -41,7 +39,7 @@ module NegSem_210305_alive_operation_002 { 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].start(f_done()); } //quick done components on even indices + if (i mod 2 == 0) { v_ptc[i].kill; } //kill components on even indices else { v_ptc[i].start(f());} // activate v_ptc } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn index c8d1c73a0e54ecb0e3fcfc2cd99f30dc3a151c54..473baf9e5ffcf08ebd4e2b8d388f5fec86ae21a4 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_003.ttcn @@ -32,8 +32,6 @@ module NegSem_210305_alive_operation_003 { 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; @@ -41,7 +39,7 @@ module NegSem_210305_alive_operation_003 { 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 + 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 value v_index; diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn index 79828c438201b1992685e11de3f87efad9e11407..95d0d0e056c6daccd994f061b730ef9e30e4d156 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_004.ttcn @@ -34,8 +34,6 @@ module NegSem_210305_alive_operation_004 { 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; @@ -44,7 +42,7 @@ module NegSem_210305_alive_operation_004 { 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 + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i].kill; } //kill components on even i or odd j else { v_ptc[i][j].start(f());} // activate v_ptc } } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn index c972de4938bd7aa7e72029a0d58cd7c44f181ded..c135c7f0b8b28cd9bea607ac48578d2242fe5d14 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/NegSem_210305_alive_operation_005.ttcn @@ -34,8 +34,6 @@ module NegSem_210305_alive_operation_005 { 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; @@ -44,7 +42,7 @@ module NegSem_210305_alive_operation_005 { 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 + if (i mod 2 == 0 or j mod 2 == 1) { v_ptc[i].kill; } //kill components on even i or odd j else { v_ptc[i][j].start(f());} // activate v_ptc } } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn index af582425fd3ac6b4f193b5c323dd8d598a54ae43..bac3f2abb7401c347ceb447adb9863fa5af398ea 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_009.ttcn @@ -31,8 +31,6 @@ module Sem_210305_alive_operation_009 { t.timeout; } - function f_done() runs on GeneralComp {} - testcase TC_Sem_210305_alive_operation_009() runs on GeneralComp system GeneralComp { var boolean v_isAlive; const integer c_size := 4; @@ -41,7 +39,7 @@ module Sem_210305_alive_operation_009 { 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 + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices else { v_ptc[i].start(f());} // activate v_ptc } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn index 40a2254f25b811da5ef117ad3024f4f014bbc17f..e521056b46c88f1de7110dea5fef599e58c04e2f 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_010.ttcn @@ -31,8 +31,6 @@ module Sem_210305_alive_operation_010 { t.timeout; } - function f_done() runs on GeneralComp {} - testcase TC_Sem_210305_alive_operation_010() runs on GeneralComp system GeneralComp { var boolean v_isAlive; const integer c_size := 4; @@ -41,7 +39,7 @@ module Sem_210305_alive_operation_010 { 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 + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices else { v_ptc[i].start(f());} // activate PTC } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn index 547334ada09444a115638efbf6a9b8ceb84bfecb..e7e74b2b11afbfae1fe18c1e2957e1933ca4e495 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_011.ttcn @@ -34,8 +34,6 @@ module Sem_210305_alive_operation_011 { t.timeout; } - function f_done() runs on GeneralComp {} - testcase TC_Sem_210305_alive_operation_011() runs on GeneralComp system GeneralComp { var boolean v_isAlive; const integer c_size := 3; @@ -45,7 +43,7 @@ module Sem_210305_alive_operation_011 { 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 + 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 } } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn index 50ea094c109871fa6a752658542da82dd0a17b0c..b6745932a3307d1c8597fb3e16cf4d6d956b14c2 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn @@ -33,8 +33,6 @@ module Sem_210305_alive_operation_013 { t.start; t.timeout; } - - function f_done() runs on GeneralComp {} testcase TC_Sem_210305_alive_operation_013() runs on GeneralComp system GeneralComp { var boolean v_isAlive; @@ -44,7 +42,7 @@ module Sem_210305_alive_operation_013 { 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 + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices else { v_ptc[i].start(f());} // activate v_ptc } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn index 9b82f59b819d2bda7902c7e576c6a612164b2c4b..b241b09563879e00f8a3bb2d88a28489c3789b78 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn @@ -34,8 +34,6 @@ module Sem_210305_alive_operation_014 { t.timeout; } - function f_done() runs on GeneralComp {} - testcase TC_Sem_210305_alive_operation_014() runs on GeneralComp system GeneralComp { var boolean v_isAlive; const integer c_size := 4; @@ -44,7 +42,7 @@ module Sem_210305_alive_operation_014 { 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 + if (i mod 2 == 0) { v_ptc[i].kill; } // kill components on even indices else { v_ptc[i].start(f());} // activate v_ptc } diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b351fba308f4568bd28f3a4581254d2d03fc3378 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn @@ -0,0 +1,42 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.5, Ensure that alive applied on the mtc the operation returns true. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +//// The following requirement is tested: Alive operation applied on the mtc the operation returns true. + +module Sem_210305_alive_operation_015 { + + type component GeneralComp {} + + testcase TC_Sem_210305_alive_operation_015() runs on GeneralComp system GeneralComp { + + if (mtc.alive) { + setverdict(pass); + } + else + { + setverdict(fail); + } + + } + + control { + execute(TC_Sem_210305_alive_operation_015()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f3e800f3d6ce89de145df9ff838dc162d10349f6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:21.3.6, Check that running operator provides information about mtc. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ +// // The following requirement is tested: The running operation returns true for the mtc and PTCs that have been started but not yet terminated or stopped. + +module Sem_210306_running_operation_013 { + + type component GeneralComp {} + + function f1 ( ) runs on GeneralComp { + timer t := 100.0; + t.start; + t.timeout; + } + + testcase TC_Sem_210306_running_operation_013() runs on GeneralComp system GeneralComp { + var GeneralComp ptc := GeneralComp.create alive; + + ptc.start(f1()); + + // Check that ptc is running, and mtc component is running + if (match(ptc.running, true) and match(mtc.running, true)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + control { + execute(TC_Sem_210306_running_operation_013()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn index e486ecbec8934a7238815e9e5c9bfefbf976d0ac..650f04a06366ca550a6dc9f4d5f7b480abb224ea 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_008.ttcn @@ -20,8 +20,9 @@ *****************************************************************/ // 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 send operation. +// All AddressRef items in the to clause shall be of type address, component or of the +// address type bound to the port type (see clause 6.2.9) of the port instance referenced +// in the send operation. module NegSem_220201_SendOperation_008 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn index 0f7dd4c9c480dfaa315e0ac79f8f3e1eb9b53177..fe2349f2a0112fea562873e704ea08645ae0edcd 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_009.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220201_SendOperation_009 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn index 27580385e856a5496662b2079cbc8914614e4576..5f7882b7629b1a34ce708a16067e36f3aa4c73f5 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220201_send_operation/NegSem_220201_SendOperation_010.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220201_SendOperation_010 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fad13ad0bbc883bcf8a55ed27b55d95dcc9bcd1c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.2.2, verify that a variable of a different but compatible type can be used in a redirect assignment + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The assignment part in a receiving operation is optional. For message-based ports it is used when it is +// required to store received messages. In the case of procedure-based ports it is used for storing the in +// and inout parameters of an accepted call, for storing the return value or for storing exceptions. +// For the message or parameter value assignment part strong typing is not required, e.g. the variable used +// for storing a message shall be type-compatible to the type of the incoming message. + +module Sem_220202_ReceiveOperation_030 { + + type port P message { + inout integer; + } with {extension "internal"} + + type integer UInt8 (0..255); + + type component GeneralComp + { + port P p; + } + + testcase TC_Sem_220202_ReceiveOperation_030() runs on GeneralComp { + var UInt8 v_int; + connect(self:p, self:p); + + p.send(10); + p.receive(integer:?) -> value v_int; + + if (v_int == 10) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220202_ReceiveOperation_030(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cb748ff08860509e5c8eef40f413e03ee14f267f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_024.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.2.3, trying to store an incompatible component value in the sender clause of a trigger operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// Type mismatch at storing the received value or parts of the received value and storing +// the sender shall cause an error. + +module NegSem_220203_TriggerOperation_024 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp + { + port P p; + } + + type component CustomComp { + var integer vc_int; + } + + testcase TC_NegSem_220203_TriggerOperation_024() runs on GeneralComp system GeneralComp { + var CustomComp v_sender; + timer t_tmr := 0.1; + t_tmr.start; + connect(self:p, self:p); + p.send(10); + alt { + // this alternative shall be selected, but the assignment shall generate an error + [] p.trigger(integer:?) -> sender v_sender { } + [] t_tmr.timeout {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220203_TriggerOperation_024(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn index 0a3862c99ada551e3a679f3e092084ed39749e4e..d7dd701a29094c41524d5bff66a54a1d66b2f93c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_006.ttcn @@ -20,11 +20,10 @@ *****************************************************************/ // The following requirements are tested: -// The matching criteria as defined in clause 22.2.2 apply also to the trigger -// operation. -// In the case of one-to-many connections the [trigger] operation may be restricted +// In the case of one-to-many connections the trigger operation may be restricted // to a certain communication partner. This restriction shall be denoted using the -// from keyword. +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. module Sem_220203_TriggerOperation_006 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn index 802a637f32cd29eaf09e20ddba32fe4641d7529e..793b39751adbf74c8e8730093dffe4afff94d4af 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_007.ttcn @@ -20,11 +20,10 @@ *****************************************************************/ // The following requirements are tested: -// The matching criteria as defined in clause 22.2.2 apply also to the trigger -// operation. -// In the case of one-to-many connections the [trigger] operation may be restricted +// In the case of one-to-many connections the trigger operation may be restricted // to a certain communication partner. This restriction shall be denoted using the -// from keyword. +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. module Sem_220203_TriggerOperation_007 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn index 740a912d64e4fc86016bb5f979733e1d4a255581..7d15d61e52019c4632d8d8863547ec36f9227322 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2202_message_based_communication/220203_trigger_operation/Sem_220203_TriggerOperation_008.ttcn @@ -20,11 +20,10 @@ *****************************************************************/ // The following requirements are tested: -// The matching criteria as defined in clause 22.2.2 apply also to the trigger -// operation. -// In the case of one-to-many connections the [trigger] operation may be restricted +// In the case of one-to-many connections the trigger operation may be restricted // to a certain communication partner. This restriction shall be denoted using the -// from keyword. +// from keyword followed by a specification of an address or component reference, +// a list of address or component references or any component. module Sem_220203_TriggerOperation_008 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn index 9faec93918eaf0fde45f6da80cc0f5445bd7fd7a..53af1de25611a461667ef43dff7fa131e9279049 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220301_CallOperation_003 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn index 72cc149f662b73b96ecd6211999ccde1232c92e5..6eef39eed3b2bfe4797c445823c2ed56b2dc5ec6 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220301_CallOperation_004 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f4116362afb769caf2112da404046424b915f4fb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, incompatible template in the to clause of the call operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the to clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the call operation. + +module NegSem_220301_CallOperation_005 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_005() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + p.call(S:{}, nowait) to v_addr; + setverdict(pass); + } + + control { + execute(TC_NegSem_220301_CallOperation_005(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cc99c01940faabf9c1910d067dae596087c0c808 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking calls cannot have a response and exception handling part + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// In case of non-blocking procedure-based communication the handling of exceptions +// to call operations is done by using catch (see clause 22.3.6) operations as +// alternatives in alt statements. +// A non-blocking procedure has no out and inout parameters, no return value and the +// non-blocking property is indicated in the corresponding signature definition by means +// of a noblock keyword. Possible exceptions raised by non-blocking procedures have to be +// removed from the port queue by using catch operations in subsequent alt or interleave +// statements. + +module NegSem_220301_CallOperation_006 { + + signature S() noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_006() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + v_ptc.start(f_called); + p.call(S:{}) { + [] p.getreply(S:{}) {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_006(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1e54c9c197d81d598c7a0954348a899b3fea6aad --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that signature that are not listed in the port inout and out list cannot be used in call operations + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// a) The call operation shall only be used on procedure-based ports. The type definition +// of the port at which the call operation takes place shall include the procedure name +// in its out or inout list i.e. it shall be allowed to call this procedure at this port. + +module NegSem_220301_CallOperation_007 { + + signature S1() noblock; + signature S2() noblock; + + type port P procedure { + inout S1; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_007() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(S2:{}); // error expected + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_007(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a3653b9bcb548806f352a420df3ba4463c50844e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot contain matching symbols + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_008 { + + signature S(in integer p_par) noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_NegSem_220301_CallOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_008(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2aebb629809b33fbb8513fbc796a23d4312099b7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that in parameters of a signature used in a call operation cannot be omitted + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_009 { + + signature S(in integer p_par) noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_NegSem_220301_CallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_009(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..16cb18967fdca5201507af164f6278fddfe1e42e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot contain matching symbols + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_010 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_NegSem_220301_CallOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_010(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a0d0c45568959a42fd2171aa8adb99628077359c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn @@ -0,0 +1,51 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that inout parameters of a signature used in a call operation cannot be omitted + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// b) All in and inout parameters of the signature shall have a specific value i.e. the use +// of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220301_CallOperation_011 { + + signature S(inout integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_NegSem_220301_CallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220301_CallOperation_011(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6d2ad4e5c45277a706e629ca18aff1bfa38ba77a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn @@ -0,0 +1,66 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, missing to clause in case of one-to-many connections + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// e) A to clause shall be present in case of one-to-many connections. + +module NegSem_220301_CallOperation_012 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + + p.call(S:{}) { // error expected as the to clause is missing + [] p.getreply(S:{}) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); } + } + } + } + + control { + execute(TC_NegSem_220301_CallOperation_012(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..646cb6d6c5a8e0b75479421010715dc5aa17f3f5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn @@ -0,0 +1,56 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that type mismatch error is issued for incorrect call timer values + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// g) CallTimerValue shall be of type float. + +module NegSem_220301_CallOperation_013 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 2) { // error expected as 2 is an integer literal + [] p.getreply(S:{}) {} + [] p.catch(timeout) {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220301_CallOperation_013(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fe469a972c5b08083c2a4c51bf5bc7a746842f2b --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that getreply signature mismatch in the response and exception handling causes an error + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module NegSem_220301_CallOperation_014 { + + signature S1(); + signature S2(); + + type port P procedure { + inout S1, S2; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.reply(S1:{}); + } + + testcase TC_NegSem_220301_CallOperation_014() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.getreply(S1:{}) { setverdict(pass, "Reply accepted"); } + [] p.getreply(S2:{}) {} // error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_014(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..84156eb02d695d35dcc6d3a9430fda3d4e0e28b4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that exception signature mismatch in the response and exception handling causes an error + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module NegSem_220301_CallOperation_015 { + + signature S1() exception(integer); + signature S2() exception(charstring); + + type port P procedure { + inout S1, S2; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.raise(S1, 1); + } + + testcase TC_NegSem_220301_CallOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}) { + [] p.catch(S1, integer:?) { setverdict(pass, "Exception caught!"); } + [] p.catch(S2, charstring:?) {} // expected error + } + } + + control { + execute(TC_NegSem_220301_CallOperation_015(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ea8e3248ca65d57c72d8346286619b7adc12c3bc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that forbidden calls cannot appear in response and exception handling part guards + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// i) The evaluation of the Boolean expressions guarding the alternatives in the response +// and exception handling part may have side effects. In order to avoid unexpected side +// effects, the same rules as for the Boolean guards in alt statements shall be applied +// (see clause 20.2). + + +module NegSem_220301_CallOperation_016 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + timer t_tmr := 5.0; + t_tmr.start; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [t_tmr.read > 0.0] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_016(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1205b5bde2e49241ca74644b051d0e30b7069a19 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that forbidden functions cannot appear in response and exception handling part guards + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// i) The evaluation of the Boolean expressions guarding the alternatives in the response +// and exception handling part may have side effects. In order to avoid unexpected side +// effects, the same rules as for the Boolean guards in alt statements shall be applied +// (see clause 20.2). + +module NegSem_220301_CallOperation_017 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + var integer v_int := 0; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + function f_guard() runs on GeneralComp return boolean { + v_int := v_int + 1; + return v_int < 10; + } + + testcase TC_NegSem_220301_CallOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [f_guard()] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_017(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..966edfefd6944c9cae7d39da88162f0b428cb98e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain timeout values + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. + +module NegSem_220301_CallOperation_018 { + + signature S() noblock; + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 1.0); + alt { + [] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + } + } + + control { + execute(TC_NegSem_220301_CallOperation_018(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d04faf328564bbe3f246f0d834f80b987a554465 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn @@ -0,0 +1,57 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that non-blocking procedure calls cannot contain nowait parameter + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) The call operation for a non-blocking procedure shall have no response and exception +// handling part, shall raise no timeout exception and shall not use the nowait keyword. + +module NegSem_220301_CallOperation_019 { + + signature S() noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + //p.getcall(S:{}); + //p.reply(S:{}); + } + + testcase TC_NegSem_220301_CallOperation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, nowait); + /*alt { + [] p.getreply(S:{}) + { setverdict(pass, "Reply accepted"); } // guard error expected + }*/ + } + + control { + execute(TC_NegSem_220301_CallOperation_019(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..712fbf51e12d62eb129795413584bb96c300c110 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn @@ -0,0 +1,45 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that calls cannot be used on disconnected ports + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// m) Applying a call operation to an unmapped or disconnected port shall cause a test +// case error. + +module NegSem_220301_CallOperation_020 { + + signature S() noblock; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220301_CallOperation_020() runs on GeneralComp system GeneralComp { + p.call(S:{}); + } + + control { + execute(TC_NegSem_220301_CallOperation_020(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9f82bd4b0d2e3ac27e8a5e3b335bedc8d1885754 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn @@ -0,0 +1,55 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an else clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_001 { + + signature S(); + + type port P procedure { + inout S; + } + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSyn_220301_CallOperation_001() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:{}) { setverdict(pass); } + [else] {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_001(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..203816e5a7211e56243494cdb7945f42a6279645 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that the response and exception handling part cannot contain an altstep + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// h) The use of else branches and the invocation of altsteps is not allowed. + +module NegSyn_220301_CallOperation_002 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + altstep a_handleReply() runs on GeneralComp { + [] p.getreply {} + } + + testcase TC_NegSyn_220301_CallOperation_002() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:{}) { setverdict(pass); } + [] a_handleReply() {} // expected error + } + } + + control { + execute(TC_NegSyn_220301_CallOperation_002(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn index 2171512e489b6b3d787e220ba5b6aa28c37cab38..70a90355f063bcde38e9647342e8b54484d875d9 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_005.ttcn @@ -21,9 +21,7 @@ module Sem_220301_CallOperation_005 { - type charstring address; - const address c_client1Addr := "client1Addr"; - const address c_client2Addr := "client2Addr"; + type charstring address; /** * @desc testing of inline return template for remote procedure call @@ -59,14 +57,12 @@ module Sem_220301_CallOperation_005 { type component GeneralComp { port remotePort PCO; - var address v_myAddress; } - function f_ClientQuery(address p_myAddress) runs on GeneralComp { + function f_ClientQuery() runs on GeneralComp { var integer v_zero:=0; var integer v_one:=1; var boolean first:=true; - v_myAddress := p_myAddress; PCO.call(p_Sem_220301_CallOperation_005:s_callTemplate, 5.0) { @@ -75,7 +71,7 @@ module Sem_220301_CallOperation_005 { setverdict(pass); } [] PCO.catch (timeout) { - setverdict(fail, v_myAddress&" did not receive a response"); + setverdict(fail, "Component did not receive a response"); } } } @@ -107,11 +103,7 @@ module Sem_220301_CallOperation_005 { } } - - function f_setAddress(address p_myAddress) runs on GeneralComp { - v_myAddress := p_myAddress; - } - + testcase TC_Sem_220301_CallOperation_005() runs on GeneralComp system GeneralComp { var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); @@ -122,8 +114,8 @@ module Sem_220301_CallOperation_005 { server.start(f_ServerResponses()); - client.start(f_ClientQuery(c_client1Addr)); - client2.start(f_ClientQuery(c_client2Addr)); + client.start(f_ClientQuery()); + client2.start(f_ClientQuery()); interleave { [] client.done {} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn index 918084b66be310f0216048a780c0a8a043a761cb..84db3bb921a76bda8e7d5716ebaec4f27d239a32 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn @@ -24,7 +24,6 @@ module Sem_220301_CallOperation_006 { type charstring address; const address c_server1Addr := "server1Addr"; const address c_server2Addr := "server2Addr"; - const address c_clientAddr := "clientAddr"; /** * @desc testing of inline return template for remote procedure call @@ -59,15 +58,12 @@ module Sem_220301_CallOperation_006 { type component GeneralComp { port remotePort PCO; - var address v_myAddress; } - function f_ClientQuery(address p_myAddress) runs on GeneralComp { + function f_ClientQuery() runs on GeneralComp { var integer v_zero:=0; var integer v_one:=1; timer t_timer:=5.0; - - v_myAddress := p_myAddress; // validate broadcast calling PCO.call(p_Sem_220301_CallOperation_006:s_callTemplate, nowait) to all component; @@ -103,12 +99,9 @@ module Sem_220301_CallOperation_006 { var integer v_par1; var integer v_par3; timer t_timeout:=30.0; - v_myAddress := p_myAddress; - - t_timeout.start; - + alt { [] PCO.getcall(p_Sem_220301_CallOperation_006:s_acceptTemplate) -> param(v_par1, v_par3) sender v_clientAddress { PCO.reply(p_Sem_220301_CallOperation_006:{p_par1 := 0, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; // p_par1 := -, core dump @@ -121,11 +114,6 @@ module Sem_220301_CallOperation_006 { } - - function f_setAddress(address p_myAddress) runs on GeneralComp { - v_myAddress := p_myAddress; - } - testcase TC_Sem_220301_CallOperation_006() runs on GeneralComp system GeneralComp { var GeneralComp server := GeneralComp.create("RemoteProcedure Service") alive; var GeneralComp server2 := GeneralComp.create("RemoteProcedure Service2") alive; @@ -135,10 +123,10 @@ module Sem_220301_CallOperation_006 { connect(server2:PCO, client:PCO); // set server address and start operation - server.start(f_ServerResponses(c_server1Addr)); - server2.start(f_ServerResponses(c_server2Addr)); + server.start(f_ServerResponses()); + server2.start(f_ServerResponses()); - client.start(f_ClientQuery(c_clientAddr)); + client.start(f_ClientQuery()); alt { [] client.done { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn index 93ca05ae9c144e67ee70145257ce49ccba5a2e3e..6d4bc1350c30e9ea038e8d96d33e00a5537de559 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn @@ -24,7 +24,6 @@ module Sem_220301_CallOperation_007 { type charstring address; const address c_server1Addr := "server1Addr"; const address c_server2Addr := "server2Addr"; - const address c_clientAddr := "clientAddr"; /** * @desc testing of inline return template for remote procedure call @@ -59,15 +58,12 @@ module Sem_220301_CallOperation_007 { type component GeneralComp { port remotePort PCO; - var address v_myAddress; } - function f_ClientQuery(address p_myAddress) runs on GeneralComp { + function f_ClientQuery() runs on GeneralComp { var integer v_zero:=0; var integer v_one:=1; timer t_timer:=5.0; - - v_myAddress := p_myAddress; // validate multicast calling PCO.call(p_Sem_220301_CallOperation_007:s_callTemplate, nowait) to (c_server1Addr,c_server2Addr); @@ -103,11 +99,9 @@ module Sem_220301_CallOperation_007 { var integer v_par1; var integer v_par3; timer t_timeout:=30.0; - v_myAddress := p_myAddress; - - + t_timeout.start; - + alt { [] PCO.getcall(p_Sem_220301_CallOperation_007:s_acceptTemplate) -> param(v_par1, v_par3) sender v_clientAddress { PCO.reply(p_Sem_220301_CallOperation_007:{p_par1 := 0, p_par2 := v_par1+v_par3, p_par3 := v_par1+v_par3+1} value v_par1) to v_clientAddress; // p_par1 := -, core dump @@ -120,11 +114,6 @@ module Sem_220301_CallOperation_007 { } - - function f_setAddress(address p_myAddress) runs on GeneralComp { - v_myAddress := p_myAddress; - } - testcase TC_Sem_220301_CallOperation_007() runs on GeneralComp system GeneralComp { var GeneralComp server := GeneralComp.create("RemoteProcedure Service") alive; var GeneralComp server2 := GeneralComp.create("RemoteProcedure Service2") alive; diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3ac7b950cda33d15b1f3c1d1c24543ef12c578b0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that defaults are not executed in response and exception handling part of a call operation + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The response and exception handling part of a call operation is executed like an alt +// statement without any active default. + +module Sem_220301_CallOperation_009 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + timer t_tmr := 1.0; + p.getcall(S:{}); + t_tmr.start; + t_tmr.timeout; + p.reply(S:{}); + } + + altstep a_timeout() runs on GeneralComp { + [] any timer.timeout { setverdict(fail, "Timer timeout"); } + } + + testcase TC_Sem_220301_CallOperation_009() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + timer t_tmr := 0.1; + t_tmr.start; + activate(a_timeout()); // activates a default which shouldn't be triggered in the call block + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}, 4.0) { // the local t_tmr timer should time out first, because the reply is delayed + [] p.getreply(S:{}) { setverdict(pass, "Reply received"); } + [] p.catch(timeout) { setverdict(fail, "Call timeout"); } + } + setverdict(pass); + } + + control { + execute(TC_Sem_220301_CallOperation_009(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..10f1ee97cb53e51ca69fe6ed7492e88a4b1c35f2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn @@ -0,0 +1,54 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking call with no timeout + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// The call operation may optionally include a timeout. + +module Sem_220301_CallOperation_010 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_010() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}) { + [] p.getreply(S:{}) { setverdict(pass, "Reply received"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_010(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..99958ce538508e1a5725fe4e52d6aa85f424468f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking broadcast call with response and exception handling part and subsequent alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. Either, +// only one response or exception is handled in the response and exception handling part of the call +// operation. Then, further responses and exceptions can be handled in subsequent alt or interleave +// statements. + +module Sem_220301_CallOperation_011 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_011() 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_called()); + v_ptc2.start(f_called()); + + p.call(S:{}) to all component { + [] p.getreply(S:{}) { setverdict(pass, "First reply received"); } // first reply + } + alt { + [] p.getreply(S:{}) { setverdict(pass, "Second reply received"); } // second reply + } + } + + control { + execute(TC_Sem_220301_CallOperation_011(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6a0ff03e2fa7f905c94427625dd0cfa1dd0641d0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking broadcast call with response and exception handling part handling all replies + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. +// [2nd option:] +// Several responses or exceptions are handled by the use of repeat statements in one or more of the +// statement blocks of the response and exception handling part of the call operation: the execution +// of a repeat statement causes the re-evaluation of the call body. + +module Sem_220301_CallOperation_011 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_011() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + var integer v_counter := 0; + + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + + p.call(S:{}) to all component { + [] p.getreply(S:{}) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); } // expected result + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_011(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7c2b4af1f24761fad70d8f78ed2e3dbba77006f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn @@ -0,0 +1,83 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking multicast call with response and exception handling part and subsequent alt + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. Either, +// only one response or exception is handled in the response and exception handling part of the call +// operation. Then, further responses and exceptions can be handled in subsequent alt or interleave +// statements. + +module Sem_220301_CallOperation_012 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_012() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + + p.call(S:{}) to (v_ptc1, v_ptc3) { + [] p.getreply(S:{}) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + setverdict(pass, "First reply received"); + } else { + setverdict(fail, "Wrong component"); + } + } + } + + alt { + [] p.getreply(S:{}) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + setverdict(pass, "Second reply received"); + } else { + setverdict(fail, "Wrong component"); + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_012(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e415fe7291cbb446e042b2f4b5bcf937ee0e5fe8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn @@ -0,0 +1,81 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, blocking multicast call with response and exception handling part handling all replies + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a blocking procedure, two options exist. +// [2nd option:] +// Several responses or exceptions are handled by the use of repeat statements in one or more of the +// statement blocks of the response and exception handling part of the call operation: the execution +// of a repeat statement causes the re-evaluation of the call body. + +module Sem_220301_CallOperation_013 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:?); + p.reply(S:{}); + } + + testcase TC_Sem_220301_CallOperation_013() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + + var integer v_counter := 0; + + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + + p.call(S:{}) to (v_ptc1, v_ptc3) { + [] p.getreply(S:?) -> sender v_comp { + if (v_comp == v_ptc1 or v_comp == v_ptc3) { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both replies received"); // expected result + } + } else { + setverdict(fail, "Wrong component"); + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_013(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..72f652c42ae3650789f9edfbdd3cf4464e5c1967 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking broadcast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a non-blocking procedure, all exceptions which +// may be raised from the different communication partners can be handled in subsequent catch, alt or +// interleave statements. + +module Sem_220301_CallOperation_015 { + + signature S() noblock exception (integer); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.raise(S, 1); + } + + testcase TC_Sem_220301_CallOperation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create; + + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + + p.call(S:{}) to all component; + alt { + [] p.catch { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both exception received"); // both exception received + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_015(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5a3dc0a43a891ed51633ee46ac971fcce6ab9178 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn @@ -0,0 +1,74 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking broadcast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of a multicast or broadcast call operation of a non-blocking procedure, all exceptions which +// may be raised from the different communication partners can be handled in subsequent catch, alt or +// interleave statements. + +module Sem_220301_CallOperation_016 { + + signature S() noblock exception (integer); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.raise(S, 1); + } + + testcase TC_Sem_220301_CallOperation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc1 := GeneralComp.create, + v_ptc2 := GeneralComp.create, + v_ptc3 := GeneralComp.create, + v_comp; + + var integer v_counter := 0; + connect(self:p, v_ptc1:p); + connect(self:p, v_ptc2:p); + connect(self:p, v_ptc3:p); + v_ptc1.start(f_called()); + v_ptc2.start(f_called()); + v_ptc3.start(f_called()); + + p.call(S:{}) to (v_ptc1, v_ptc3); + alt { + [] p.catch { + v_counter := v_counter + 1; + if (v_counter < 2) { + repeat; + } else { + setverdict(pass, "Both exception received"); // both exception received + } + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_016(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bd4718edae85927a75e9ff525dea5a33e00b0ce3 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, non-blocking unicast call + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// In case of non-blocking procedure-based communication the handling of exceptions to call operations +// is done by using catch (see clause 22.3.6) operations as alternatives in alt statements. + +module Sem_220301_CallOperation_017 { + + signature S() noblock exception (integer); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S:{}); + p.raise(S, 1); + } + + testcase TC_Sem_220301_CallOperation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S:{}); + alt { + [] p.catch { + setverdict(pass, "Exception received"); // success: exception received + } + } + } + + control { + execute(TC_Sem_220301_CallOperation_017(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4c9b264b66084166305abe12d99e2cd2c0b0d233 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that out parameters of a signature used in a call operation can be omitted + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) Only out parameters may be omitted or specified with a matching attribute. + +module Sem_220301_CallOperation_018 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := - }; + + testcase TC_Sem_220301_CallOperation_018() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_Sem_220301_CallOperation_018(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..796241ef9f570d8887c9e266fa603fff695e01ce --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn @@ -0,0 +1,50 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that out parameters of a signature used in a call operation can contain matching symbols + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) Only out parameters may be omitted or specified with a matching attribute. + +module Sem_220301_CallOperation_019 { + + signature S(out integer p_par); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + template S s_signature1 := { p_par := ? }; + + testcase TC_Sem_220301_CallOperation_019() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create("PTC"); + connect(self:p, v_ptc:p); + p.call(s_signature1, nowait); + setverdict(pass); + } + + control{ + execute(TC_Sem_220301_CallOperation_019(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..271a3600018fcc3cf269c1cea083d57b4f666763 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that replies that are not related to the actual call are ignored in unqualified getreply statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module Sem_220301_CallOperation_020 { + + signature S1(); + signature S2(); + + type port P procedure { + inout S1, S2; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.getcall(S2:{}); + p.reply(S1:{}); + } + + testcase TC_Sem_220301_CallOperation_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}, 1.0) { + [] p.catch(timeout) {}; + }; // non-blocking call (but the script "forgets" to handle the reply - this should clog the port + p.call(S2:{}, 1.0) { + [] p.getreply { setverdict(fail, "The reply is not the expected one!"); } // this one should receive only S2 replies, but there's S1 in the port queue + [] p.catch(timeout) { setverdict(pass, "Timeout as expected"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_020(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b9b1d7deec408a23b802f31ebe56f0c8761abdf2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_021.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.1, verify that exceptions that are not related to the actual call are ignored in unqualified catch statements + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// h) The selection of the alternatives to a call shall only be based on getreply and catch operations +// for the called procedure. Unqualified getreply and catch operations shall only treat replies from +// and exceptions raised by the called procedure. + +module Sem_220301_CallOperation_021 { + + signature S1() noblock exception(integer); + signature S2() exception(charstring); + + type port P procedure { + inout S1, S2; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_called() runs on GeneralComp { + p.getcall(S1:{}); + p.getcall(S2:{}); + p.raise(S1, 1); + p.raise(S2, "exc"); + } + + testcase TC_Sem_220301_CallOperation_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f_called()); + p.call(S1:{}); // non-blocking call (but the script "forgets" to handle the exception - this should clog the port + p.call(S2:{}, 1.0) { + [] p.catch { setverdict(fail, "The exception is not the expected one!"); } // this one should receive only S2 exceptions, but there's S1 in the port queue + [] p.catch(timeout) { setverdict(pass, "Timeout as expected"); } + } + } + + control { + execute(TC_Sem_220301_CallOperation_021(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_009.ttcn index 605fd6e8c70cc7b6f93301a3d3c056487dde5aac..8a704d8b8a1ba9714a1efbecfbd46f3cdaee3afe 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_009.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_009.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220302_GetcallOperation_009 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_010.ttcn index baa404aeb1024a2053027a81aff5c5f4ee811575..ba580fa5d9c3a53664b809a640f8f50a553aa456 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_010.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_010.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220302_GetcallOperation_010 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_017.ttcn index da30aed40c7847e59b55f746ad3334a45a552320..a91b168020fffd5ded6b7fc79e3e10c17a27a8a8 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_017.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_017.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:22.3.2, incompatible decmatch and @decoded value redirect - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // The following requirements are tested: diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_018.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8c21f6cb9fe6b111c378c4b46d0f2d65efcbd73c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_018.ttcn @@ -0,0 +1,58 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.2, incompatible template in the from clause of the getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the getcall operation. + +module NegSem_220302_GetcallOperation_018 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + testcase TC_NegSem_220302_GetcallOperation_018() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + alt { + [] p.getcall(S:{}) from v_addr {} // error expected + [] p.getcall {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220302_GetcallOperation_018(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_019.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ae78caf0e1a329525599285f3dbbc739b5f4a8c5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_019.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.2, trying to store an incompatible component value in the sender clause of a getcall operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220302_GetcallOperation_019 { + + 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 AltComp v_compRef := null; + alt { + [] p.getcall(S:{}) -> sender v_compRef { } // error expected + [] p.getcall(S:{}) { } + } + setverdict (pass); + } + + testcase TC_NegSem_220302_GetcallOperation_019() 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_019(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_020.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d8d161b9b12a816410a6c4f4128eb3bf58e5dcc5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_020.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_GetcallOperation_020 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_GetcallOperation_020() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:{}) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.getcall(S:{}) { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220302_GetcallOperation_020(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..09bba1909c4fc1359a05ce1d1d68b519bdef5e46 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_021.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_GetcallOperation_021 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_GetcallOperation_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:{}) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.getcall(S:{}) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220302_GetcallOperation_021(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_022.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1879314410880109ca34a6a6506abe95965e11f8 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_022.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.2, getcall with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getcall operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220302_GetcallOperation_022 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f() runs on GeneralComp { + p.call(S:{}, nowait); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220302_GetcallOperation_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getcall(S:{}) from any component { setverdict(pass); } + [] p.getcall(S:{}) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220302_GetcallOperation_022(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn index 2441df49fbb56ef845962341115d60b192b1c31f..cd47470d4d649c5ac06907003f6cb726978c2905 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn @@ -20,7 +20,8 @@ ***************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220303_ReplyOperation_002 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn index 6f2b2210092b840ded1df38a63ff934a625c6576..06db03f048c3735022fbfe17c3dd75320b49937c 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn @@ -20,7 +20,8 @@ ***************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220303_ReplyOperation_003 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5f91e069eaac8e3071f262e481d200402befb82e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that reply operation cannot be used on a message port + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// a) A reply operation shall only be used at a procedure-based port. + +module NegSem_220303_ReplyOperation_004 { + + signature S() return integer; + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_220303_ReplyOperation_004() runs on GeneralComp { + p.reply(S:{} value 1); + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_004(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..565448b61a5a2283a15e44fcc08c4e4864341ceb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that signature not listed in the port definition cannot be used in the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// The type definition of the port shall include the name of the procedure +// to which the reply operation belongs. + +module NegSem_220303_ReplyOperation_005 { + + signature S(); + signature SNotListed(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall; + p.reply(SNotListed:{}); + } + + testcase TC_NegSem_220303_ReplyOperation_005() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_005(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b9d157e317cdea253a7e3eb4c3db024729e81c2e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in out signature parameters in reply operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220303_ReplyOperation_006 { + + type record R { + integer field1, + integer field2 + } + + signature S(out R par1); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? }; + p.getcall(S:{-}); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_NegSem_220303_ReplyOperation_006() 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:{-}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_006(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6575686736d07ba058173edaf16d9242d916a5e2 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that matching symbols cannot be used in inout signature parameters in reply operations + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module NegSem_220303_ReplyOperation_007 { + + type record R { + integer field1, + integer field2 + } + + signature S(inout R par1); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:{par1 := {field1 := 0, field2 := 5}}); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_NegSem_220303_ReplyOperation_007() 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:{par1 := {field1 := 0, field2 := 5} }, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_007(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d1df3de005e4cf944e4af0be0a296ef531b2cbe5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn @@ -0,0 +1,92 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that error is issued for a missing to clause in a reply operation in case of one-to-many connections + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// c) A to clause shall be present in case of one-to-many connections. + +module NegSem_220303_ReplyOperation_008 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_ClientQuery() runs on GeneralComp { + + p.call(S:{}, 1.0) { + + [] p.getreply(S:{}) { + } + [] p.catch (timeout) { + } + } + setverdict(pass); + } + + function f_ServerResponses() runs on GeneralComp { + var GeneralComp v_client1 := null, v_client2 := null; + + alt { + [v_client1 == null] p.getcall(S:{}) -> sender v_client1 { + if (v_client2 == null) { repeat; } + } + [v_client2 == null] p.getcall(S:{}) -> sender v_client2 { + if (v_client1 == null) { repeat; } + } + } + p.reply(S:{}); // to clause missing, but there are 2 clients! + setverdict(pass); + } + + testcase TC_NegSem_220303_ReplyOperation_008() runs on GeneralComp system GeneralComp { + var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); + var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); + var GeneralComp client2 := GeneralComp.create("RemoteProcedure Client"); + // map the PTCs to the system port + connect(server:p, client:p); + connect(server:p, client2:p); + + server.start(f_ServerResponses()); + + client2.start(f_ClientQuery()); + client.start(f_ClientQuery()); + + interleave { + [] client.done {} + [] client2.done {} + } + server.stop; + + alt { + [] all component.done {} + } + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_008()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bdf9b575aa5c1f2f5e97ce06b802bafb1268fa0c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that values that are not addresses or components cannot be used in the to clause of the reply operation + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// d) All AddressRef items in the to clause shall be of type address, component or of the address +// type bound to the port type (see clause 6.2.9) of the port instance referenced in the reply +// operation. + +module NegSem_220303_ReplyOperation_009 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var integer v_addr := 10; + p.getcall(S:{}); + p.reply(S:{}) to v_addr; + } + + testcase TC_NegSem_220303_ReplyOperation_009() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_009(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1392d5d58c2b752150e8c60b99fac9be189a5fec --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn @@ -0,0 +1,60 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that reply operation on a disconnected port causes an error + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// f) Applying a reply operation to an unmapped or disconnected port shall cause a test +// case error. + +module NegSem_220303_ReplyOperation_010 { + + signature S(); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + p.getcall(S:{}); + disconnect(self:p, mtc:p); + p.reply(S:{}); + } + + testcase TC_NegSem_220303_ReplyOperation_010() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_NegSem_220303_ReplyOperation_010(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b5ebe16529b4a6f6667540d16b3c9d1776d272e0 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that functionality of a simple reply operation (implicit unicast, no return value) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The value part of the reply operation consists of a signature reference with an associated +// actual parameter list and (optional) return value. The signature may either be defined in +// the form of a signature template or it may be defined in-line. + +// In case of one-to-one connections, the to clause may be omitted, because the receiving entity +// is uniquely identified by the system structure. + +module Sem_220303_ReplyOperation_003 { + + signature S(); + + 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.reply(S:{}); + } + + testcase TC_Sem_220303_ReplyOperation_003() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_003(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c6c40a51f0a401782f53f6c64bdf6529a24a060e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that functionality of a simple reply operation (explicit unicast, return value) + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// The value part of the reply operation consists of a signature reference with an associated +// actual parameter list and (optional) return value. The signature may either be defined in +// the form of a signature template or it may be defined in-line. + +// Responses to one or more call operations may be sent to one, several or all peer entities +// connected to the addressed port. This can be specified in the same manner as described in +// clause 22.2.1. This means, the argument of the to clause of a reply operation is for unicast +// responses the address of one receiving entity, for multicast responses a list of addresses +// of a set of receivers and for broadcast responses the all component keywords. + +module Sem_220303_ReplyOperation_004 { + + signature S() return integer; + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var GeneralComp v_sender; + p.getcall(S:{}) -> sender v_sender; + p.reply(S:{} value 2) to v_sender; + } + + testcase TC_Sem_220303_ReplyOperation_004() 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:{}, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_004(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f54634e09701f55a15d4735b39855c13a40c7a07 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn @@ -0,0 +1,65 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.3, verify that in signature parameters of reply operations can contain matching symbols + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// b) All out and inout parameters of the signature shall have a specific value i.e. +// the use of matching mechanisms such as AnyValue is not allowed. + +module Sem_220303_ReplyOperation_005 { + + type record R { + integer field1, + integer field2 + } + + signature S(in R par1); + + type port P procedure { + inout S; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + function f_server() runs on GeneralComp { + var template R v_rec := { field1 := 0, field2 := ? } + p.getcall(S:{ par1 := { field1 := 0, field2 := 10 } }); + p.reply(S:{par1 := v_rec}); + } + + testcase TC_Sem_220303_ReplyOperation_005() 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:{ par1 := { field1 := 0, field2 := 10 } }, nowait); + alt { + [] p.getreply {} + [] v_ptc.done {} + } + setverdict(pass); + } + + control{ + execute(TC_Sem_220303_ReplyOperation_005(), 5.0); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn index c2dc021a24b1c9fe86d15d0e8eb9a020787c61b4..c5343ef5a2e55d394e7b5fec77f5c8a969f284f3 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_006.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220304_getreply_operation_006 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn index 647a213b169f0a1e217024a9b9e707daad150ce1..3aaa8cd6082206af7166bb7404a5f2e2de5f1385 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_007.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220304_getreply_operation_007 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..167f83a080626f00e56c5acb54827fac9e439c35 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn @@ -0,0 +1,59 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.4, incompatible template in the from clause of the getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// section 6.2.9) of the port instance referenced in the getcall operation. + +module NegSem_220304_getreply_operation_021 { + + signature S() return 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.reply(S:{} value 1); + } + + testcase TC_NegSem_220304_getreply_operation_021() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) from v_addr {} // error expected + [] p.getreply {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_021(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..621fe8440da6f86c92c94af55caba4bcb5e0bd2a --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.4, trying to store an incompatible component value in the sender clause of a getreply operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// j) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220304_getreply_operation_022 { + + 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 { + p.getcall(S:{}); + p.reply(S:{}); + } + + testcase TC_NegSem_220304_getreply_operation_022() runs on GeneralComp system GeneralComp { + var AltComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.getreply(S:{}) -> sender v_compRef { } // error expected + [] p.getreply(S:{}) { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220304_getreply_operation_022(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7837a811dfc9d1835ed901cc9f7a3c30f5abd3d7 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_021 { + + signature S() return 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.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_021() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:{}) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.getreply(S:{}) + { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220304_getreply_operation_021(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cee1566e89658a34518aa435dd66b1af39c4a1c4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn @@ -0,0 +1,70 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_022 { + + signature S() return 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.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_022() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:{}) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.getreply(S:{}) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220304_getreply_operation_022(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ac813b62692c801958eb2be75cb0bf6d6a978103 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.4, getreply with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A getreply operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220304_getreply_operation_023 { + + signature S() return 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.reply(S:{} value 1); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220304_getreply_operation_023() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.getreply(S:{}) from any component { setverdict(pass); } + [] p.getreply(S:{}) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220304_getreply_operation_023(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn index ed8a3dc9598d40ff9323035a7cb16c3ae29ef1e4..2416aa744724555012835d2b6656b6a5ef62fa72 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn @@ -21,10 +21,10 @@ // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_001 { signature S() exception(charstring, octetstring); diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn index a1f4f88eab84f713fa6a216c840451b0d9cae2da..a7e6a1149de49036d8f0506c8ace58e7d55cf362 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn @@ -21,10 +21,10 @@ // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_002 { signature S(); diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn index 77112720ad594911207eec58ec24120d9cb3c496..4bac31cc3fe2feaf66ccd84ce591ab09265237e5 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn @@ -21,10 +21,10 @@ // 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. +// from a template conforming to the template(value) restriction 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. module NegSem_220305_raise_operation_003 { type integer MyInt1 (1..10); diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn index e43a887fbcbc24a7be7a423fcb39793e74a00828..bff9a7fb6d4606a40b4b6fc41a1894415cb2e933 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn @@ -18,9 +18,11 @@ ** @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: -// 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. +// All AddressRef items in the to clause shall be of type address, component or of the +// address type bound to the port type (see clause 6.2.9) of the port instance referenced +// in the raise operation. module NegSem_220305_raise_operation_007 { signature S() exception(integer); diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn index a0c9f1cf141c2749fd5cf10253ffc65b2aefa9bb..38e6fdfd761548d7d1d6d059538fbbd188a7a0ae 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn @@ -18,8 +18,10 @@ ** @purpose 1:22.3.5, null in the to clause of the raise operation ** @verdict pass reject *****************************************************************/ + // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220305_raise_operation_008 { signature S() exception(integer); diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..84a7862622dcd192b7196f63b9a6e4a9fc1f3169 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.5, exception template not conforming to template(value) restriction + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) The TemplateInstance shall conform to the template(value) restriction (see clause 15.8). + +module NegSem_220305_raise_operation_010 { + signature S() exception(charstring, octetstring); + + 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, charstring:?); + setverdict(pass); + } + + testcase TC_NegSem_220305_raise_operation_010() 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_010(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn index 187d47e209eba28d2699a6fe5f47a28f20366c98..c7aa344918038998b96490891205584c30cf0a2d 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_006.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220306_catch_operation_006 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn index 9533034a221c1eae041e7d28c83fa5d349fac40b..e879c4d6a029a85f38f044187d284a52ab1403cd 100644 --- a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_007.ttcn @@ -20,7 +20,8 @@ *****************************************************************/ // The following requirements are tested: -// No AddressRef shall contain the special value null at the time of the operation. +// No AddressRef in the to clause shall contain the special value null at the time +// of the operation. module NegSem_220306_catch_operation_007 { diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6a5f44b654c79a56363fd9ef4c4377bd97c6d628 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.6, incompatible template in the from clause of the catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// f) All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type (see +// clause 6.2.9) of the port instance referenced in the catch operation. + +module NegSem_220306_catch_operation_015 { + + signature S() exception (charstring); + + 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, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_015() runs on GeneralComp system GeneralComp { + var charstring v_addr := "addr"; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) from v_addr {} // error expected + [] p.catch {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_015(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23811b971d46d5e726e8575a4e883b15d8d81ff4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn @@ -0,0 +1,64 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.6, trying to store an incompatible component value in the sender clause of a catch operation + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// l) If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the type of the variable or parameter referenced in the sender clause. + +module NegSem_220306_catch_operation_016 { + + signature S() exception (charstring); + + 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 { + p.getcall(S:{}); + p.raise(S, "exc"); + } + + testcase TC_NegSem_220306_catch_operation_016() runs on GeneralComp system GeneralComp { + var AltComp v_compRef := null; + var GeneralComp v_ptc := GeneralComp.create; + connect(self:p, v_ptc:p); + v_ptc.start(f()); + p.call(S:{}) { + [] p.catch(S, charstring:?) -> sender v_compRef { } // error expected + [] p.catch { } + } + setverdict(pass); + } + + control { + execute(TC_NegSem_220306_catch_operation_016(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..889a86c2eeb181e4196e7b8914b0ff7bf442c483 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (single item) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_015 { + + signature S() exception (charstring); + + 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, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_015() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_receiveCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from v_ptcs[0] { setverdict(pass); } // expected 1 from match + [] p.catch(S, charstring:?) + { v_receiveCounter := v_receiveCounter + 1; } // expected 2 other received exceptions + } + } + if (v_receiveCounter != c_ptcCount - 1) { setverdict(fail); } + } + + control { + execute(TC_Sem_220306_catch_operation_015(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e5467ff817a40132fe71ed469eae7e2e845037d1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn @@ -0,0 +1,72 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (multiple items) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_016 { + + signature S() exception (charstring); + + 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, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_016() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + var integer v_fromCounter := 0, v_noFromCounter := 0; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from (v_ptcs[0], v_ptcs[1]) { v_fromCounter := v_fromCounter + 1; } + [] p.catch(S, charstring:?) { v_noFromCounter := v_noFromCounter + 1; } + } + } + if (v_fromCounter == 2 and v_noFromCounter == 1) { setverdict(pass); } + else { setverdict(fail); } + } + + control { + execute(TC_Sem_220306_catch_operation_016(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..01f20b4d29a3a47d1ce67d188b9a008d5d4c17c1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.3.6, catch with a from clause (any component) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// A catch operation may be restricted to a certain communication partner in case +// of one-to-many connections. This restriction shall be denoted by using the from +// keyword followed by a specification of an address or component reference, a list +// of address or component references or any component. + +module Sem_220306_catch_operation_017 { + + signature S() exception (charstring); + + 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, "exc"); + } + + const integer c_ptcCount := 3; + + testcase TC_Sem_220306_catch_operation_017() runs on GeneralComp system GeneralComp { + var GeneralComp v_ptcs[c_ptcCount]; + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + v_ptcs[i] := GeneralComp.create; + connect(self:p, v_ptcs[i]:p); + v_ptcs[i].start(f()); + p.call(S:{}, nowait) to v_ptcs[i]; + } + + for (var integer i := 0; i < c_ptcCount; i := i + 1) { + alt { + [] p.catch(S, charstring:?) from any component { setverdict(pass); } + [] p.catch(S, charstring:?) { setverdict(fail); } + } + } + } + + control { + execute(TC_Sem_220306_catch_operation_017(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c263d8ccb1ef2f6e96f9ac4a90e6bf5b2f1dd3eb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.4, incompatible value in the from clause + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// All AddressRef items in the from clause and all VariableRef items in the sender clause +// shall be of type address, component or of the address type bound to the port type +// (see clause 6.2.9) of the port instance referenced in the check operation. + +module NegSem_2204_the_check_operation_004 { + + type integer address; + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_004() runs on GeneralComp { + var address v_addr := 2; + var charstring v_addr2 := ""; + p.send(100) to v_addr; + alt { + [] p.check(from (v_addr, v_addr2)) { } + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_004(), 5.0); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c7aed5c1e354e13aadf66de7a6054a4f10e3acd5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:22.4, verify that a runtime error is generated if the real sender is incompatible with the variable in sender redirect assignment + ** @verdict pass reject + *****************************************************************/ + +// The following requirements are tested: +// If the operation contains a sender clause but no from clause, the sender shall be type +// compatible with the variable or parameter referenced in the sender clause. + +module NegSem_2204_the_check_operation_005 { + + type integer address; + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + testcase TC_NegSem_2204_the_check_operation_005() runs on GeneralComp { + var address v_addr := 2; + var GeneralComp v_ptc; + p.send(100) to v_addr; + alt { + [] p.check(-> sender v_ptc) { } + [] p.check {} + } + setverdict(pass); + } + + control { + execute(TC_NegSem_2204_the_check_operation_005()/*, 5.0*/); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn index 7bbd35d0fc5dc36e8916ba6347346d7bc8ebb42d..e24f33bd04182e484a39b0d99ad7420a26a9cc76 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_001.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:23, Ensure timer runs from zero to stated value - ** @verdict pass accept, ttnc3verdict:pass + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer clock runs from 0 to the value set diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn index c4b8554735be2049870096ae9b6a043f08e7bc2b..c7799968c136afb330681833f1879d1204c184ea 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_002.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:23, Ensure timer can be restarted - ** @verdict pass accept, ttnc3verdict:pass + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer can be restarted by repeated start operation diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn index 8551764f24a72f325876e5163eb66bb4ff0e9b4f..fe8d76ea3572fba749161fd3a1338c8acebffaaf 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_003.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:23, Ensure timer default value can be modified by start value - ** @verdict pass accept, ttnc3verdict:pass + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // #reqname /Requirements/23 Timer operations/23.2 The start timer operation/timer clock runs from 0 to the value set // #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Overridden timer value applies only to current instance diff --git a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn index 3ce5ec331080b89354a78d91032c48ec149fb9ed..740cd48cbdf453e103d4e3d606154b554980bbea 100644 --- a/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn +++ b/conformance_test/core_language_tests/positive_tests/23_timer_operations/2302_the_start_timer_operataion/Sem_2302_timer_start_004.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:23, Ensure timer with value 0.0 expires immediately - ** @verdict pass accept, ttnc3verdict:pass + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // #reqname /Requirements/23 Timer operations/23.2 The start timer operation/Timer with the timer value 0.0 times out immediately. diff --git a/conformance_test/core_language_tests/positive_tests/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn b/conformance_test/core_language_tests/positive_tests/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f91b601de9ba647d01d73346589682d9b4c4c306 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn @@ -0,0 +1,53 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:26.1, verify that test cases can be executed from altsteps called from the control block + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +// The following requirements are tested: +// c) The execute statement shall not be called from within an existing executing test behaviour +// chain called from a test case, i.e. test cases can only be executed from the control part or +// from functions or altsteps called directly or indirectly from the control part. + +module Sem_2601_ExecuteStatement_010 { + + type component GeneralComp { } + + testcase TC_Sem_2601_ExecuteStatement_010() runs on GeneralComp { + setverdict(pass); + } + + altstep a() { + [] any timer.timeout { + execute(TC_Sem_2601_ExecuteStatement_010()); + } + } + + control { + var verdicttype v_result; + timer t_tmr1 := 0.5, t_tmr2 := 2.0; + t_tmr1.start; + t_tmr2.start; + activate(a()); + alt { // t_tmr1 shall time out first triggering the default and thus executing the test case + [] t_tmr2.timeout { + } + } + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn b/conformance_test/core_language_tests/positive_tests/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0502b88ad089dc8553a68ccba836c25cdc5d291f --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn @@ -0,0 +1,109 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:27.7, Ensure that the IUT correctly handles attribute definitions and their scoping rules + ** @verdict pass reject + ***************************************************/ + +module NegSem_2707_OptionalAttributes_001 { + + type enumerated EnumeratedType {e_black, e_white}; + + type record RecordType { + integer a optional, + integer b optional, + boolean c + } + + type set SetType { + integer a optional, + integer b optional, + boolean c + } + + type record length (1..2) of integer IntegerList; + + type set length (1..2) of integer IntegerUList; + + type union UnionType { + integer a, + EnumeratedType b, + boolean c + } + + type record MessageType { + integer field1, + charstring field2, + boolean field3, + integer field4[4], + EnumeratedType field5, + RecordType field6, + SetType field7, + UnionType field8, + IntegerList field9, + IntegerUList field10 + } + + type port loopbackPort message { + inout MessageType + } with { optional "implicit omit"} + // the optional keyword is forbidden here, because according to the restriction 27.7.a + // a port type shall not have an optional attribute associated to them directly. + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_2707_OptionalAttributes_001() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= + { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=1,b:=2,c:=true}, + field7 := {a:=1,b:=2,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + v_testMessage:= { + field1 := 1, + field2 := "test string", + field3 := true, + field4 := {1,2,3,4}, + field5 := e_black, + field6 := {a:=omit,b:=omit,c:=true}, + field7 := {a:=omit,b:=omit,c:=true}, + field8 := {a:=1}, + field9 := {1}, + field10 := {1,2} + } + + } + + control{ + execute(TC_NegSem_2707_OptionalAttributes_001()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..530b8ddb5118a6ca02046baeee183944bf6de16e --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn @@ -0,0 +1,63 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//The type of the template list and the member type of the template in the all from clause shall be compatible. +// Restriction B + +module NegSem_B010201_value_list_001 { + + type set of integer SoI; + + template SoI m_SoI := {1,2,3,4}; + template float mw_SoI := (all from m_SoI); //error: m_SoI is integer, mw_SoI is float + + type port loopbackPort message { + inout float + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_001() runs on GeneralComp { + + var float v_testMessage := 2.0; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_001()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d1fe8eaff037950682f35ba43001d37e417972c5 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_002 { + + type set of integer SoI; + + template SoI m_SoI := {1,*,4}; + template integer mw_SoI := (all from m_SoI); //error: m_SoI contains AnyElementsOrNone + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_002() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_002()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0d96317c8c049defedff19b7fae349d35ee5fdc6 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Restriction D,E: Individual members of the template in the all from clause shall not resolve to any of the following matching mechanisms: AnyElementsOrNone, permutation. + +module NegSem_B010201_value_list_003 { + + type record of integer RoI; + + template RoI m_RoI := {permutation(0,1,3,*),2}; + template integer mw_RoI := (all from m_RoI); //error: m_RoI contains permutation + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_003() runs on GeneralComp { + + var integer v_testMessage; + v_testMessage:= 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_RoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_003()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b25466f74cdb3451cd480f03ed513603101d98ca --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn @@ -0,0 +1,71 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template list corretly + ** @verdict pass accept reject + ***************************************************/ + +// The following requirements are tested: +// e) Templates in the template list shall obey the template (present) restriction + +module NegSem_B010201_value_list_004 { + + type record MessageType { + integer field1, + charstring field2 + } + + template integer t_omit := omit; + + template MessageType t_mes := { + field1 := (1, 2, t_omit), // present restriction does not allow omit + field2 := ("abc", "bc") + } + + type port loopbackPort message { + inout MessageType + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_NegSem_B010201_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage := { + field1:= 1, + field2:= "abc" + } + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(t_mes) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_NegSem_B010201_value_list_004()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6c25b113e7da80b836d107eb1bb75d03c501eff1 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +//A template list may contain values, templates obeying the template(present) restriction, and members added by all from clauses. + +module Sem_B010201_value_list_002 { + + type record of integer RoI; + + template RoI m_RoI := {1,2,3,4}; + template integer mw_RoI := (all from m_RoI); + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_B010201_value_list_002() runs on GeneralComp { + + var integer v_testMessage := 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_RoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_B010201_value_list_002()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f3d4585ca6ad14af7b689bf1a9c7a49691236079 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn @@ -0,0 +1,61 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template matching with all from clause + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +//A template list may contain values, templates obeying the template(present) restriction, and members added by all from clauses. + +module Sem_B010201_value_list_003 { + + type set of integer SoI; + + template SoI m_SoI := {1,2,3,4}; + template integer mw_SoI := (all from m_SoI); + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_B010201_value_list_003() runs on GeneralComp { + + var integer v_testMessage := 2; + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_SoI) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_B010201_value_list_003()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..659abaf1b026ac8443befec6d24a2ff422f30ddb --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn @@ -0,0 +1,71 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.1, Ensure that the IUT correctly handles template list corretly + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +// Restriction C: Templates in the template list shall obey the template(present) restriction + +module Sem_B010201_value_list_004 { + + type record MessageType { + integer field1, + charstring field2 optional + } + + template integer t_present := ?; + + template MessageType t_mes := { + field1 := (1, 2, t_present), // present restriction allows AnyValue + field2 := ("abc", "bc") + } + + type port loopbackPort message { + inout MessageType + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_B010201_value_list_004() runs on GeneralComp { + + var MessageType v_testMessage := { + field1:= 1, + field2:= "abc" + } + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(t_mes) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail); + } + } + } + + control{ + execute(TC_Sem_B010201_value_list_004()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn index 52262d7f231b7bc39f6c4ab4db198f61b0a1c6f9..dcbb787db166cd37b536a3b40815f1ef5e77757f 100644 --- a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/Sem_B010202_complemented_value_list_007.ttcn @@ -16,7 +16,7 @@ * ** @version 0.0.1 ** @purpose 1:B.1.2.2, Ensure that the IUT correctly handles template matching of complemented value listing - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_B010202_complemented_value_list_007 { diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0ddb19df67e8d58ae577b268608664f667947448 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone cannot be used for matching non-optional value + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// At the time of matching, it shall be applied to optional fields of record and set +// templates only. + +module Sem_B010204_any_value_or_none_004 { + + type set Set1 { + integer field1, + integer field2 optional + } + + template Set1 t_anyOrNone := *; // top-level static template + + type component GeneralComp { + } + + testcase TC_Sem_B010204_any_value_or_none_004() runs on GeneralComp { + var Set1 v_val := { field1 := 5, field2 := 23 }; + if (match(v_val, t_anyOrNone)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_004()); + } + +} + diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1b1c66e5e9478901de3f11316de3b9c329a779cd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn @@ -0,0 +1,52 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.4, Ensure that AnyValueOrNone cannot be used for matching compulsory fields + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// At the time of matching, it shall be applied to optional fields of record and set +// templates only. + +module Sem_B010204_any_value_or_none_005 { + + type set Set1 { + integer field1, + integer field2 optional + } + + template integer t_anyOrNone := *; // top-level static template + + type component GeneralComp { + } + + testcase TC_Sem_B010204_any_value_or_none_005() runs on GeneralComp { + var Set1 v_val := { field1 := 5, field2 := 23 }; + if (match(v_val.field1, t_anyOrNone)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_Sem_B010204_any_value_or_none_005()); + } + +} + diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_003.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_003.ttcn index b1fb5b26cf24424518686b922a1cc45e960bfd08..3809fa4717420a43a02c336eaf7ab647d57789ec 100644 --- a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_003.ttcn +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010208_omit_value/NegSem_B010208_omit_value_003.ttcn @@ -22,37 +22,36 @@ module NegSem_B010208_omit_value_003 { type record MessageType { - integer field1, - MyRecordof field2 optional, - boolean field3 optional + integer field1, + MyRecordof field2 optional, + boolean field3 optional } type record of integer MyRecordof; type port loopbackPort message { - inout MessageType + inout MessageType } with {extension "internal"} - type component GeneralComp { + type component GeneralComp { port loopbackPort messagePort } testcase TC_NegSem_B010208_omit_value_003() runs on GeneralComp { - var MessageType v_testMessage; var boolean v_boolean; template MyRecordof mw_MyRecofTemplate := omit; // this assignment is allowed template boolean mw_MyBoolTemplate := omit; // this assignment is allowed template MessageType mw_matchingTemplate:= - { + { field1 := ?, field2 := mw_MyRecofTemplate, field3 := mw_MyBoolTemplate } - v_testMessage:= { + var MessageType v_testMessage:= { field1 := 2, field2 := omit, field3 := omit @@ -64,7 +63,7 @@ module NegSem_B010208_omit_value_003 { alt { [] messagePort.receive(mw_matchingTemplate) { v_boolean := match({},mw_MyRecofTemplate); - // causes an error as a record of template shall not be “omit†at the time of matching + // causes an error as a record of template shall not be omit at the time of matching setverdict(pass); } [] messagePort.receive { diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..23af12b51ebcbf44ecba8dd244bb8eacfb2b1d47 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn @@ -0,0 +1,67 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.2.10, Ensure that the IUT correctly handles enum matching + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ + +// The following requirements are tested: +/*The template matches only those enumerated values of the same name where the associated integer values is matched by at least one of the integer templates.*/ + + +module Sem_B010210_enumerated_value_list_001 { + + type enumerated MyFirstEnum { + First_enum(0), Second_enum(1), other_enum(2..200) + } + + type port messagePortType message { + inout MyFirstEnum; + } with {extension "internal"} + + template integer m_Int := (10..100); + + + type component GeneralComp { + port messagePortType messagePort; + } + + + testcase TC_Sem_B010210_enumerated_value_list_001() runs on GeneralComp { + + template MyFirstEnum mw_matchingTemplate:= other_enum(m_Int); // matches other_enum(10..100) + + var MyFirstEnum v_message := other_enum(11); + + connect(self:messagePort, self:messagePort); + messagePort.send(v_message); //send message + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(pass); + } + [] messagePort.receive { + setverdict(fail, mw_matchingTemplate); + } + } + } + + control{ + execute(TC_Sem_B010210_enumerated_value_list_001()); + } + +} diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn index 30e136f5428df2ec86ec70e90fa67650ca76623b..56f49651b313c77cb03870eb96015745e49a38b5 100644 --- a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn @@ -45,16 +45,16 @@ module NegSem_B010401_length_restrictions_001 { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { - field1 := pattern "test mess*ge" length (6 .. 8),//pattern is longer than length restriction + field1 := pattern "test s*g" length (6 .. 15), field2 := '10*'B length (3 .. 5), - field3 := '89*ABC'H length (5), + field3 := '89?AB'H length (6), //pattern is shorter than length restriction field4 := pattern "tes?" length (4 .. 13), field5 := '10?'B length (3 .. 5), field6 := '89?ABC'H length (6) } v_testMessage:= { - field1 := "test message", + field1 := "test string", field2 := '10101'B, field3 := '89ABC'H, field4 := "test", @@ -62,19 +62,19 @@ module NegSem_B010401_length_restrictions_001 { field6 := '899ABC'H } - connect(self:messagePort, self:messagePort); - messagePort.send(v_testMessage); + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { setverdict(fail); } [] messagePort.receive { - setverdict(pass); + setverdict(pass); } } } - + control{ execute(TC_NegSem_B010401_length_restrictions_001()); } diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn index ee42d3cc9b8484459e7c4bd4b7bd7efb32929d6b..897911ae6961c9cb62040671d8e85f142fe971c8 100644 --- a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn @@ -23,19 +23,18 @@ module NegSem_B010401_length_restrictions_002 { type record MessageType { - charstring field1, - bitstring field2, - hexstring field3, - charstring field4, - bitstring field5, - hexstring field6 + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4, + record of integer field5, + record of integer field6 } type port loopbackPort message { inout MessageType } with {extension "internal"} - type component GeneralComp { port loopbackPort messagePort } @@ -45,25 +44,21 @@ module NegSem_B010401_length_restrictions_002 { var MessageType v_testMessage; template MessageType mw_matchingTemplate:= { - field1 := pattern "test s*g" length (6 .. 15), - field2 := '10*'B length (3 .. 5), - field3 := '89?AB'H length (6), //pattern is shorter than length restriction - field4 := pattern "tes?" length (4 .. 13), - field5 := '10?'B length (3 .. 5), - field6 := '89?ABC'H length (6) + field1 := { permutation ( 1, 2, 3 ), * } length (3..4), + field2 := { (1,2),* } length (2 .. 5), + field3 := { permutation ( 1, 2, 3 ), ? } length (2..3), // message length is too long + field4 := { (1,2),? } length (2 .. 5) } v_testMessage:= { - field1 := "test string", - field2 := '10101'B, - field3 := '89ABC'H, - field4 := "test", - field5 := '101'B, - field6 := '899ABC'H + field1 := {2,1,3}, + field2 := {2,1,3,5}, + field3 := {2,1,3,5}, + field4 := {1,1} } - connect(self:messagePort, self:messagePort); - messagePort.send(v_testMessage); + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); alt { [] messagePort.receive(mw_matchingTemplate) { @@ -74,7 +69,7 @@ module NegSem_B010401_length_restrictions_002 { } } } - + control{ execute(TC_NegSem_B010401_length_restrictions_002()); } diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ad66942c489d27be5e6937dedeedb241dd05adb4 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn @@ -0,0 +1,83 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass reject + ***************************************************/ + +module Sem_B010401_length_restrictions_003 { + + + type record MessageType { + charstring field1, + bitstring field2, + hexstring field3, + charstring field4, + bitstring field5, + hexstring field6 + } + + type port loopbackPort message { + inout MessageType + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_B010401_length_restrictions_003() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= { + field1 := pattern "test mess*ge" length (6 .. 8),//pattern is longer than length restriction + field2 := '10*'B length (3 .. 5), + field3 := '89*ABC'H length (5), + field4 := pattern "tes?" length (4 .. 13), + field5 := '10?'B length (3 .. 5), + field6 := '89?ABC'H length (6) + } + + v_testMessage:= { + field1 := "test message", + field2 := '10101'B, + field3 := '89ABC'H, + field4 := "test", + field5 := '101'B, + field6 := '899ABC'H + } + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { //pattern is longer than length restriction, never matches + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } + } + + control{ + execute(TC_Sem_B010401_length_restrictions_003()); + } + +} + diff --git a/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6e7429de267f89254a8df3078bada7ee3fed4913 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:B.1.4.1, Ensure that the IUT correctly handles template matching of value length definitions + ** @verdict pass reject + ***************************************************/ + +module Sem_B010401_length_restrictions_004 { + + + type record MessageType { + record of integer field1, + record of integer field2, + record of integer field3, + record of integer field4 + } + + type port loopbackPort message { + inout MessageType + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + testcase TC_Sem_B010401_length_restrictions_004() runs on GeneralComp { + + var MessageType v_testMessage; + + template MessageType mw_matchingTemplate:= { + field1 := { permutation ( 1, 2, 3 ), * } length (4), // message length is too short + field2 := { (1,2),* } length (2 .. 5), + field3 := { permutation ( 1, 2, 3 ), ? } length (4), + field4 := { (1,2),? } length (2 .. 5) + } + + v_testMessage:= { + field1 := {2,1,3}, + field2 := {2,1,3,5}, + field3 := {2,1,3,5}, + field4 := {1,1} + } + + connect(self:messagePort, self:messagePort); + messagePort.send(v_testMessage); + + alt { + [] messagePort.receive(mw_matchingTemplate) { + setverdict(fail); + } + [] messagePort.receive { + setverdict(pass); + } + } + } + + control{ + execute(TC_Sem_B010401_length_restrictions_004()); + } + +} + diff --git a/conformance_test/core_language_tests/positive_tests/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn b/conformance_test/core_language_tests/positive_tests/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn index 161714165eff52f58c53432f0ad816c2577c6410..1f87910f49ffe29f38b4fea05eafddd644e41764 100644 --- a/conformance_test/core_language_tests/positive_tests/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn +++ b/conformance_test/core_language_tests/positive_tests/D_preprocessing_macros/D05_macro_scope/Sem_D05_macro_scope_001.ttcn @@ -1,8 +1,22 @@ -/***************************************************************** - * @author STF 451 - * @version 0.0.1 - * @purpose 1:D, Ensure that __SCOPE__ replaces the actual higher basic unit - * @verdict pass accept, ttcn3verdict:pass +/****************************************************************************** + * Copyright (c) ETSI 2017. + * + * This file is subject to copyrights owned by ETSI. Non-exclusive permission + * is hereby granted, free of charge, to copy, reproduce and amend this file + * under the following conditions: It is provided "as is", without warranty of any + * kind, expressed or implied. + * + * ETSI shall never be liable for any claim, damages, or other liability arising + * from its use or inability of use.This permission does not apply to any documentation + * associated with this file for which ETSI keeps all rights reserved. The present + * copyright notice shall be included in all copies of whole or part of this + * file and shall not imply any sub-license right. + * + * Modified by: Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:D, Ensure that __SCOPE__ replaces the actual higher basic unit + ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ // __SCOPE__ replaces the actual higher basic unit (name of the test component) module Sem_D05_macro_scope_001 { diff --git a/conformance_test/core_language_tests/positive_tests/README.txt b/conformance_test/core_language_tests/positive_tests/README.txt index 54a7c2eb465e1176bc38e801dc202adfd0df596b..49636fc93e770535c24dc7d5310001e3b6197666 100644 --- a/conformance_test/core_language_tests/positive_tests/README.txt +++ b/conformance_test/core_language_tests/positive_tests/README.txt @@ -1,20 +1,11 @@ // README to positive conformance tests How to run: - -A. (Makefile) - 1. Build and run tests using Makefile in positive tests folder: - make - 2. Clean everything in bin folder: - make clean - - -B. (Without the Makefile) - 1. Generate a Makefile from pos_conf_test.tpd in positive_tests folder: - ttcn3_makefilegen -R -f -t pos_conf_tests.tpd - 2. Compile Makefile in bin folder: +1. Generate a Makefile from pos_conf_test.tpd in positive_tests folder: + ttcn3_makefilegen -f -t pos_conf_tests.tpd +2. Compile Makefile in bin folder: make - 3. Run tests in bin folder: - ttcn3_start pos_conf_tests ../pos_conf_tests.cfg - 4. Clean everything in bin folder: +3. Run tests in bin folder: + ttcn3_start pos_conf_tests +4. Clean everything in bin folder: make clean 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 fd672910feb014fb46aff9b99ee1e903efdbb403..dd38d90bf751ae37aa014cfeb4c7ad5edb547a72 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 @@ -12,6 +12,8 @@ Sem_050201_Scope_of_parameters_002.control Sem_050202_Uniqueness_001.control Sem_050202_Uniqueness_002.control Sem_050202_Uniqueness_003.control +Sem_050202_Uniqueness_004.control +Sem_050202_Uniqueness_005.control Sem_0502_Scope_001.control Sem_0502_Scope_002.control Sem_0502_Scope_003.control @@ -71,7 +73,10 @@ Sem_05040102_parameters_of_kind_template_035.control Sem_05040102_parameters_of_kind_template_037.control Sem_05040102_parameters_of_kind_template_038.control Sem_05040103_parameters_of_kind_timer_001.control +Sem_05040103_parameters_of_kind_timer_002.control +Sem_05040103_parameters_of_kind_timer_003.control Sem_05040104_parameters_of_kind_port_001.control +Sem_05040104_parameters_of_kind_port_002.control Sem_050401_top_level_001.control Sem_050401_top_level_003.control Sem_050401_top_level_004.control @@ -291,6 +296,14 @@ Sem_050402_actual_parameters_198.control Sem_050402_actual_parameters_199.control Sem_050402_actual_parameters_200.control Sem_050402_actual_parameters_201.control +Sem_050402_actual_parameters_203.control +Sem_050402_actual_parameters_205.control +Sem_050402_actual_parameters_206.control +Sem_050402_actual_parameters_207.control +Sem_050402_actual_parameters_212.control +Sem_050402_actual_parameters_214.control +Sem_050402_actual_parameters_215.control +Sem_050402_actual_parameters_216.control Sem_0505_cyclic_definitions_001.control Sem_0505_cyclic_definitions_002.control Sem_0505_cyclic_definitions_003.control @@ -421,6 +434,8 @@ Sem_06020501_referencing_fields_of_union_type_003.control Sem_06020501_referencing_fields_of_union_type_004.control Sem_06020501_referencing_fields_of_union_type_005.control Sem_06020501_referencing_fields_of_union_type_006.control +Sem_06020501_referencing_fields_of_union_type_007.control +Sem_06020501_referencing_fields_of_union_type_008.control Sem_060206_anytype_001.control Sem_060206_anytype_002.control Sem_060206_anytype_003.control @@ -592,6 +607,8 @@ Sem_070103_RelationalOperators_044.control Sem_070103_RelationalOperators_045.control Sem_070103_RelationalOperators_046.control Sem_070103_RelationalOperators_047.control +Sem_070103_RelationalOperators_048.control +Sem_070103_RelationalOperators_049.control Sem_070104_LogicalOperators_001.control Sem_070104_LogicalOperators_002.control Sem_070105_BitwiseOperators_001.control @@ -612,6 +629,9 @@ Sem_07_toplevel_003.control Sem_07_toplevel_004.control Sem_07_toplevel_005.control Sem_07_toplevel_006.control +Sem_07_toplevel_007.control +Sem_07_toplevel_008.control +Sem_07_toplevel_009.control Sem_080201_ModuleParameters_001.control Sem_08020301_GeneralFormatOfImport_001.control Sem_08020301_GeneralFormatOfImport_002.control @@ -671,6 +691,7 @@ Sem_1101_ValueVars_002.control Sem_1101_ValueVars_003.control Sem_1101_ValueVars_004.control Sem_1101_ValueVars_005.control +Sem_1101_ValueVars_006.control Sem_1102_TemplateVars_001.control Sem_1102_TemplateVars_002.control Sem_1102_TemplateVars_003.control @@ -782,6 +803,11 @@ Sem_1509_MatchOperation_006.control Sem_1509_MatchOperation_007.control Sem_1509_MatchOperation_008.control Sem_1509_MatchOperation_010.control +Sem_1509_MatchOperation_011.control +Sem_1509_MatchOperation_012.control +Sem_1509_MatchOperation_013.control +Sem_1509_MatchOperation_015.control +Sem_1509_MatchOperation_016.control Sem_1510_ValueOfOperation_001.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.control @@ -843,6 +869,7 @@ Sem_160102_predefined_functions_058.control Sem_160102_predefined_functions_059.control Sem_160102_predefined_functions_060.control Sem_160102_predefined_functions_061.control +Sem_160102_predefined_functions_062.control Sem_160102_predefined_functions_063.control Sem_160102_predefined_functions_064.control Sem_160102_predefined_functions_065.control @@ -871,6 +898,11 @@ Sem_160102_predefined_functions_089.control Sem_160102_predefined_functions_090.control Sem_160102_predefined_functions_091.control Sem_160102_predefined_functions_092.control +Sem_160102_predefined_functions_095.control +Sem_160102_predefined_functions_096.control +Sem_160102_predefined_functions_097.control +Sem_160102_predefined_functions_098.control +Sem_160102_predefined_functions_099.control Sem_160103_external_functions_001.control Sem_160103_external_functions_002.control Sem_1601_toplevel_001.control @@ -890,12 +922,15 @@ Sem_190301_select_case_statement_001.control Sem_190301_select_case_statement_002.control Sem_190301_select_case_statement_003.control Sem_190301_select_case_statement_004.control +Sem_190301_select_case_statement_005.control +Sem_190301_select_case_statement_006.control Sem_190302_select_union_statement_001.control Sem_190302_select_union_statement_002.control Sem_190302_select_union_statement_003.control Sem_190302_select_union_statement_004.control Sem_190302_select_union_statement_005.control Sem_190302_select_union_statement_006.control +Sem_190302_select_union_statement_007.control Sem_1904_for_statement_001.control Sem_1904_for_statement_002.control Sem_1904_for_statement_003.control @@ -982,6 +1017,8 @@ Sem_210302_Start_test_component_006.control Sem_210302_Start_test_component_007.control Sem_210302_Start_test_component_008.control Sem_210302_Start_test_component_010.control +Sem_210302_Start_test_component_013.control +Sem_210302_Start_test_component_014.control Sem_210303_Stop_test_component_001.control Sem_210303_Stop_test_component_002.control Sem_210303_Stop_test_component_003.control @@ -1074,6 +1111,7 @@ Sem_220202_ReceiveOperation_024.control Sem_220202_ReceiveOperation_026.control Sem_220202_ReceiveOperation_027.control Sem_220202_ReceiveOperation_029.control +Sem_220202_ReceiveOperation_030.control Sem_220203_TriggerOperation_001.control Sem_220203_TriggerOperation_002.control Sem_220203_TriggerOperation_003.control @@ -1100,6 +1138,11 @@ Sem_220301_CallOperation_002.control Sem_220301_CallOperation_003.control Sem_220301_CallOperation_004.control Sem_220301_CallOperation_008.control +Sem_220301_CallOperation_009.control +Sem_220301_CallOperation_010.control +Sem_220301_CallOperation_017.control +Sem_220301_CallOperation_018.control +Sem_220301_CallOperation_019.control Sem_220302_GetcallOperation_001.control Sem_220302_GetcallOperation_002.control Sem_220302_GetcallOperation_003.control @@ -1117,6 +1160,10 @@ Sem_220302_GetcallOperation_015.control Sem_220302_GetcallOperation_016.control Sem_220302_GetcallOperation_017.control Sem_220302_GetcallOperation_018.control +Sem_220302_GetcallOperation_020.control +Sem_220303_ReplyOperation_003.control +Sem_220303_ReplyOperation_004.control +Sem_220303_ReplyOperation_005.control Sem_220304_getreply_operation_001.control Sem_220304_getreply_operation_002.control Sem_220304_getreply_operation_003.control @@ -1135,6 +1182,8 @@ Sem_220304_getreply_operation_016.control Sem_220304_getreply_operation_017.control Sem_220304_getreply_operation_018.control Sem_220304_getreply_operation_019.control +Sem_220304_getreply_operation_021.control +Sem_220304_getreply_operation_022.control Sem_220305_raise_operation_001.control Sem_220305_raise_operation_002.control Sem_220306_catch_operation_001.control @@ -1149,6 +1198,8 @@ Sem_220306_catch_operation_010.control Sem_220306_catch_operation_011.control Sem_220306_catch_operation_012.control Sem_220306_catch_operation_013.control +Sem_220306_catch_operation_015.control +Sem_220306_catch_operation_016.control Sem_2204_the_check_operation_001.control Sem_2204_the_check_operation_003.control Sem_2204_the_check_operation_005.control @@ -1265,6 +1316,7 @@ Sem_2403_getverdict_005.control Sem_2601_ExecuteStatement_001.control Sem_2601_ExecuteStatement_002.control Sem_2601_ExecuteStatement_005.control +Sem_2601_ExecuteStatement_010.control Sem_2602_TheControlPart_001.control Sem_2602_TheControlPart_002.control Sem_2707_OptionalAttributes_001.control @@ -1288,6 +1340,9 @@ Sem_B0101_matching_specific_value_009.control Sem_B0101_matching_specific_value_010.control Sem_B0101_matching_specific_value_011.control Sem_B010201_value_list_001.control +Sem_B010201_value_list_002.control +Sem_B010201_value_list_003.control +Sem_B010201_value_list_004.control Sem_B010202_complemented_value_list_001.control Sem_B010202_complemented_value_list_002.control Sem_B010202_complemented_value_list_003.control @@ -1301,6 +1356,8 @@ Sem_B010203_any_value_002.control Sem_B010204_any_value_or_none_001.control Sem_B010204_any_value_or_none_002.control Sem_B010204_any_value_or_none_003.control +Sem_B010204_any_value_or_none_004.control +Sem_B010204_any_value_or_none_005.control Sem_B010205_value_range_001.control Sem_B010205_value_range_002.control Sem_B010205_value_range_003.control @@ -1357,6 +1414,8 @@ Sem_B010303_permutation_008.control Sem_B010303_permutation_009.control Sem_B010401_length_restrictions_001.control Sem_B010401_length_restrictions_002.control +Sem_B010401_length_restrictions_003.control +Sem_B010401_length_restrictions_004.control Sem_B010402_ifPresent_indicator_001.control Sem_B010402_ifPresent_indicator_002.control Sem_B010501_set_expression_001.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 106af07321968aa8e9480fb3ba987fffffd04268..b9c2429f3060ec67cb949d098be364e8a05d3f29 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 @@ -281,6 +281,8 @@ <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001_import.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_001_import.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_002.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_003.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_004.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/050202_Uniqueness_of_identifiers/Sem_050202_Uniqueness_005.ttcn"/> <!-- <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_001.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_002.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn" relativeURI="05_basic_language_elements/0502_scope_rules/0502_toplevel/NegSem_0502_Scope_003.ttcn"/>--> @@ -366,6 +368,8 @@ <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_015.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_016.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_017.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_018.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_019.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn"/>--> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn"/> @@ -405,8 +409,23 @@ <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_036.ttcn"/>--> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_037.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_038.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSem_05040103_parameters_of_kind_timer_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_002.ttcn"/>--> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn"/> - <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_003.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_001.ttcn"/> --> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_002.ttcn"/> --> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn"/> --> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_004.ttcn"/> --> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_005.ttcn"/> --> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_006.ttcn"/> --> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn"/> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_001.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_002.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050401_formal_parameters/050401_top_level/NegSem_050401_top_level_003.ttcn"/>--> @@ -584,6 +603,43 @@ <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_143.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_144.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_145.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_146.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_147.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_148.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_149.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_150.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_151.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_152.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_153.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_154.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_155.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_156.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_157.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_158.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_159.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_160.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_161.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_162.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_163.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_164.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_165.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_166.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_167.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_168.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_169.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_170.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_171.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_172.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_173.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_174.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_175.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_176.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_177.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_178.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_179.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_180.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_181.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_182.ttcn"/>--> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_003.ttcn"/> @@ -785,6 +841,30 @@ <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_200.ttcn"/> <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_201.ttcn"/> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_202.ttcn"/>--> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_203.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_204.ttcn"/>--> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_205.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_206.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_207.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_208.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_209.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_210.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_211.ttcn"/>--> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_212.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_213.ttcn"/>--> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_214.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_215.ttcn"/> + <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_216.ttcn"/> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_217.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_218.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_219.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_220.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_221.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_222.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_223.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_224.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_225.ttcn"/>--> +<!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_226.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSem_0504_parametrization_incompatibility_001.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_001.ttcn"/>--> <!-- <FileResource projectRelativePath="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn" relativeURI="05_basic_language_elements/0504_parametrization/0504_toplevel/NegSyn_0504_forbidden_parametrization_002.ttcn"/>--> @@ -813,6 +893,12 @@ <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_004.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_005.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060100_simple_basic_types_and_values/Syn_060100_SimpleBasicTypes_006.ttcn"/> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_003.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_004.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_005.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_006.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_006.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_002.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/Sem_06010101_AccessStringElements_003.ttcn"/> @@ -839,6 +925,14 @@ <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_005.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_006.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_007.ttcn"/> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_008.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_009.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_010.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_011.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_012.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_013.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_014.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Sem_060101_TopLevel_015.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_002.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn" relativeURI="06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/060101_toplevel/Syn_060101_TopLevel_003.ttcn"/> @@ -1047,6 +1141,8 @@ <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010_import.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_010_import.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011_import.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_011_import.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_012.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSem_060204_enumerated_type_and_values_012.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_002.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_003.ttcn"/> @@ -1054,6 +1150,7 @@ <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_005.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006_import.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_006_import.ttcn"/> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Sem_060204_enumerated_type_and_values_007.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_002.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/Syn_060204_enumerated_type_and_values_003.ttcn"/> @@ -1072,6 +1169,8 @@ <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_004.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_005.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_006.ttcn"/> + <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_007.ttcn"/> + <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020501_referencing_fields_of_union_type/Sem_06020501_referencing_fields_of_union_type_008.ttcn"/> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020502_option_and_union/NegSyn_06020502_option_and_union_001.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/06020503_nested_type_definition_for_field_types/Syn_06020503_nested_type_definition_for_field_types_001.ttcn"/> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060205_unions/060205_toplevel/NegSem_060205_top_level_001.ttcn"/>--> @@ -1140,6 +1239,7 @@ <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_002.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_003.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/NegSyn_060207_arrays_005.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_001.ttcn"/> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_002.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060207_arrays/Sem_060207_arrays_003.ttcn"/> @@ -1209,6 +1309,8 @@ <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_002.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_003.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/NegSem_06021301_LengthSubtyping_006.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021301_length_subtyping/Syn_06021301_LengthSubtyping_002.ttcn"/> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/060213_subtyping_of_structured_types/06021302_list_subtyping/NegSem_06021302_ListSubtyping_001.ttcn"/>--> @@ -1223,6 +1325,10 @@ <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_001.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_002.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/NegSyn_0602_TopLevel_007.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_002.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn" relativeURI="06_types_and_values/0602_structured_types_and_values/0602_toplevel/Sem_0602_TopLevel_003.ttcn"/> @@ -1435,6 +1541,9 @@ <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_045.ttcn"/> <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_046.ttcn"/> <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_047.ttcn"/> + <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_048.ttcn"/> + <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_049.ttcn"/> +<!-- <FileResource projectRelativePath="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn" relativeURI="07_expressions/0701_operators/070103_relational_operators/Sem_070103_RelationalOperators_050.ttcn"/>--> <FileResource projectRelativePath="07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn" relativeURI="07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_001.ttcn"/> <FileResource projectRelativePath="07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn" relativeURI="07_expressions/0701_operators/070104_logical_operators/Sem_070104_LogicalOperators_002.ttcn"/> <FileResource projectRelativePath="07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn" relativeURI="07_expressions/0701_operators/070105_bitwise_operators/Sem_070105_BitwiseOperators_001.ttcn"/> @@ -1460,6 +1569,9 @@ <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_004.ttcn"/> <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_005.ttcn"/> <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_006.ttcn"/> + <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_007.ttcn"/> + <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_008.ttcn"/> + <FileResource projectRelativePath="07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn" relativeURI="07_expressions/07_toplevel/Sem_07_toplevel_009.ttcn"/> <!-- <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn" relativeURI="08_modules/0801_definition_of_a_module/NegSyn_0801_DefinitionOfAModule_001.ttcn"/>--> <!-- <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_001.ttcn"/> <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_002.ttcn"/>--> @@ -1469,7 +1581,16 @@ <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_006.ttcn"/> <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_007.ttcn"/> <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_008.ttcn"/> - <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn"/>--> + <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_009.ttcn"/> + <FileResource projectRelativePath="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn" relativeURI="08_modules/0801_definition_of_a_module/Syn_0801_DefinitionOfAModule_010.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSem_080201_ModuleParameters_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/NegSyn_080201_ModuleParameters_002.ttcn"/>--> <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/Sem_080201_ModuleParameters_001.ttcn"/> <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_001.ttcn"/> <FileResource projectRelativePath="08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn" relativeURI="08_modules/0802_module_definitions_part/080201_module_parameters/Syn_080201_ModuleParameters_002.ttcn"/> @@ -1748,18 +1869,21 @@ <!-- <FileResource projectRelativePath="11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn" relativeURI="11_variables/1101_value_variables/NegSem_1101_ValueVars_002.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn" relativeURI="11_variables/1101_value_variables/NegSem_1101_ValueVars_003.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn" relativeURI="11_variables/1101_value_variables/NegSem_1101_ValueVars_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn" relativeURI="11_variables/1101_value_variables/NegSem_1101_ValueVars_005.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn" relativeURI="11_variables/1101_value_variables/NegSyn_1101_ValueVars_001.ttcn"/>--> <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_001.ttcn"/> <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_002.ttcn"/> <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_003.ttcn"/> <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_004.ttcn"/> <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_005.ttcn"/> + <FileResource projectRelativePath="11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn" relativeURI="11_variables/1101_value_variables/Sem_1101_ValueVars_006.ttcn"/> <FileResource projectRelativePath="11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn" relativeURI="11_variables/1101_value_variables/Syn_1101_ValueVars_001.ttcn"/> <!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn" relativeURI="11_variables/1102_template_variables/NegSem_1102_TemplateVars_001.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn" relativeURI="11_variables/1102_template_variables/NegSem_1102_TemplateVars_002.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn" relativeURI="11_variables/1102_template_variables/NegSem_1102_TemplateVars_003.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn" relativeURI="11_variables/1102_template_variables/NegSem_1102_TemplateVars_004.ttcn"/>--> <!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn" relativeURI="11_variables/1102_template_variables/NegSyn_1102_TemplateVars_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn" relativeURI="11_variables/1102_template_variables/NegSyn_1102_TemplateVars_002.ttcn"/>--> <FileResource projectRelativePath="11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn" relativeURI="11_variables/1102_template_variables/Sem_1102_TemplateVars_001.ttcn"/> <FileResource projectRelativePath="11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn" relativeURI="11_variables/1102_template_variables/Sem_1102_TemplateVars_002.ttcn"/> <FileResource projectRelativePath="11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn" relativeURI="11_variables/1102_template_variables/Sem_1102_TemplateVars_003.ttcn"/> @@ -2018,6 +2142,8 @@ <FileResource projectRelativePath="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn" relativeURI="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_003.ttcn"/> <FileResource projectRelativePath="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn" relativeURI="15_templates/1508_template_restrictions/Syn_1508_TemplateRestrictions_004.ttcn"/> <!-- <FileResource projectRelativePath="15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn" relativeURI="15_templates/1509_match_operation/NegSem_1509_MatchOperation_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn" relativeURI="15_templates/1509_match_operation/NegSem_1509_MatchOperation_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn" relativeURI="15_templates/1509_match_operation/NegSem_1509_MatchOperation_003.ttcn"/>--> <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_001.ttcn"/> <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_002.ttcn"/> <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_003.ttcn"/> @@ -2028,6 +2154,12 @@ <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_008.ttcn"/> <!-- <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_009.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_009.ttcn"/>--> <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_010.ttcn"/> + <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_011.ttcn"/> + <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_012.ttcn"/> + <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_013.ttcn"/> +<!-- <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_014.ttcn"/>--> + <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_015.ttcn"/> + <FileResource projectRelativePath="15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn" relativeURI="15_templates/1509_match_operation/Sem_1509_MatchOperation_016.ttcn"/> <!-- <FileResource projectRelativePath="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn" relativeURI="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn" relativeURI="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn" relativeURI="15_templates/1510_valueof_operation/NegSem_1510_ValueOfOperation_003.ttcn"/>--> @@ -2092,6 +2224,8 @@ <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_036.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_038.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_039.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_040.ttcn"/>--> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn"/> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_002.ttcn"/>--> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_003.ttcn"/> @@ -2153,6 +2287,7 @@ <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_059.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_060.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_061.ttcn"/> +<FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_062.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_063.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_064.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_065.ttcn"/> @@ -2183,6 +2318,13 @@ <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_090.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_091.ttcn"/> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_092.ttcn"/> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_093.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_094.ttcn"/>--> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_096.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_099.ttcn"/> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160103_external_functions/xf_NegSem_160103_external_functions_001.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160103_external_functions/xf_NegSem_160103_external_functions_001.cc"/>--> <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160103_external_functions/Sem_160103_external_functions_001.ttcn"/> @@ -2194,6 +2336,306 @@ <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_002.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_003.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_007.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_008.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_009.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_010.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_011.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_012.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_013.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_014.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_015.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_016.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_017.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_018.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_019.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_020.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_021.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_022.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_023.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_024.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_025.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_026.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_027.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_028.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_029.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_030.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_031.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_032.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_033.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_034.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_035.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_036.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_037.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_038.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_038.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_038.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_039.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_040.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_041.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_042.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_043.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_044.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_045.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_046.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_047.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_048.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_049.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_050.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_051.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_052.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_053.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_054.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_055.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_056.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_057.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_058.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_059.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_060.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_061.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_062.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_063.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_064.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_065.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_066.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_067.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_068.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_069.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_070.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_071.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_072.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_073.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_074.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_075.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_076.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_077.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_078.ttcn"/>--> +<!--<FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_079.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_079.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_079.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_080.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_081.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_082.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_083.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_084.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_085.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_086.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_087.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_088.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_089.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_090.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_091.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_092.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_093.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_094.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_095.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_096.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_097.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_098.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_099.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_100.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_101.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_102.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_103.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_104.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_105.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_106.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_107.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_108.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_109.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_110.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_111.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_112.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_113.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_114.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_115.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_116.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_117.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_118.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_119.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_120.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_120.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_120.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_121.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_122.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_123.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_124.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_125.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_126.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_127.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_128.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_129.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_130.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_131.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_132.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_133.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_134.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_135.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_136.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_137.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_138.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_139.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_140.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_141.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_142.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_143.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_144.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_145.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_146.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_147.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_148.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_149.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_150.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_151.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_152.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_153.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_154.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_155.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_156.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_157.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_158.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_159.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_160.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_161.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_162.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_163.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_163.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_163.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_164.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_165.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_166.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_167.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_168.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_169.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_170.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_171.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_172.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_173.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_174.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_175.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_176.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_177.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_178.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_179.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_180.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_181.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_182.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_183.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_184.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_185.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_186.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_187.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_188.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_189.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_190.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_191.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_192.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_193.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_194.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_195.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_196.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_197.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_198.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_199.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_200.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_201.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_202.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_203.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_204.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_205.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_206.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_207.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_208.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_209.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_210.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_211.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_212.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_213.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_214.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_215.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_216.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_217.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_218.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_219.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_220.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_221.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_222.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_223.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_224.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_225.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_226.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_227.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_228.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_229.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_230.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_231.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_232.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_233.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_234.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_235.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_236.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_237.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_238.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_239.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_240.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_241.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_242.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_243.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_244.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_245.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_245.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_245.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_246.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_247.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_248.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_249.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_250.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_251.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_252.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_253.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_254.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_255.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_256.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_257.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_258.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_259.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_260.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_261.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_262.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_263.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_264.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_265.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_266.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_267.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_268.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_269.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_270.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_271.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_272.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_273.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_274.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_275.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_276.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_277.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_278.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_279.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_280.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_281.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_282.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_283.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_284.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_285.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_286.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_287.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_288.ttcn"/> + <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_288.cc" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/xf_NegSem_160104_invoking_functions_from_specific_places_288.cc"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_289.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_290.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_291.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_292.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_293.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_294.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_295.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_296.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/160104_invoking_functions_from_specific_places/NegSem_160104_invoking_functions_from_specific_places_297.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_001.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_002.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn" relativeURI="16_functions_altsteps_testcases/1601_functions/1601_toplevel/NegSem_1601_toplevel_003.ttcn"/>--> @@ -2219,8 +2661,11 @@ <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_004.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_005.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSem_1602_toplevel_007.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/NegSyn_1602_toplevel_001.ttcn"/>--> <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_001.ttcn"/> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn" relativeURI="16_functions_altsteps_testcases/1602_altsteps/1602_toplevel/Sem_1602_toplevel_003.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn" relativeURI="16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_001.ttcn"/>--> <!-- <FileResource projectRelativePath="16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn" relativeURI="16_functions_altsteps_testcases/1603_testcases/NegSem_1603_testcases_002.ttcn"/>--> <FileResource projectRelativePath="16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn" relativeURI="16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_001.ttcn"/> @@ -2242,17 +2687,21 @@ <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_002.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_003.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_004.ttcn"/> + <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_005.ttcn"/> + <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190301_select_case_statement/Sem_190301_select_case_statement_006.ttcn"/> <!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_001.ttcn"/>--> <!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_002.ttcn"/>--> <!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_003.ttcn"/>--> <!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_004.ttcn"/>--> <!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/NegSem_190302_select_union_statement_006.ttcn"/>--> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_001.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_002.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_003.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_004.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_005.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_006.ttcn"/> + <FileResource projectRelativePath="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_007.ttcn" relativeURI="19_basic_program_statements/1903_select_statements/190302_select_union_statement/Sem_190302_select_union_statement_007.ttcn"/> <!-- <FileResource projectRelativePath="19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn" relativeURI="19_basic_program_statements/1904_for_statement/NegSem_1904_for_statement_001.ttcn"/>--> <FileResource projectRelativePath="19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn" relativeURI="19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_001.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn" relativeURI="19_basic_program_statements/1904_for_statement/Sem_1904_for_statement_002.ttcn"/> @@ -2289,7 +2738,7 @@ <FileResource projectRelativePath="19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn" relativeURI="19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_004.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn" relativeURI="19_basic_program_statements/1911_log_statement/Sem_1911_log_statement_005.ttcn"/> <FileResource projectRelativePath="19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn" relativeURI="19_basic_program_statements/1913_continue_statement/Sem_1913_continue_statement_001.ttcn"/> - <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_001.ttcn"/>--> <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_002.ttcn"/>--> <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_003.ttcn"/>--> <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_004.ttcn"/>--> @@ -2305,6 +2754,77 @@ <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_014.ttcn"/>--> <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_015.ttcn"/>--> <!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_016.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_017.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_018.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_019.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_020.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_021.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_022.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_023.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_024.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_025.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_026.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_027.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_028.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_029.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_030.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_031.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_032.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_033.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_034.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_035.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_036.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_037.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_038.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_039.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_040.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_041.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_042.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_043.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_044.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_045.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_046.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_047.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_048.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_049.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_050.ttcn"/> + <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/xf_NegSem_2002_TheAltStatement_050.cc" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/xf_NegSem_2002_TheAltStatement_050.cc"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_051.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_052.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_053.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_054.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_055.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_056.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_057.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_058.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_059.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_060.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_061.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_062.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_063.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_064.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_065.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_066.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_067.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_068.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_069.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_070.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_071.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_072.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_073.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_074.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_075.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_076.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_077.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_078.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_079.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_080.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_081.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_082.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_083.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_084.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_085.ttcn"/>--> +<!-- <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/NegSem_2002_TheAltStatement_086.ttcn"/>--> <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_001.ttcn"/> <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_002.ttcn"/> <FileResource projectRelativePath="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn" relativeURI="20_statement_and_operations_for_alt/2002_the_alt_statement/Sem_2002_TheAltStatement_003.ttcn"/> @@ -2473,6 +2993,10 @@ <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_008.ttcn"/> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_009.ttcn"/> --> <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_010.ttcn"/> +<!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_011.ttcn"/> --> +<!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_012.ttcn"/> --> + <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_013.ttcn"/> + <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210302_start_test_component/Sem_210302_Start_test_component_014.ttcn"/> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_001.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_002.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210303_stop_test_component/NegSem_210303_Stop_test_component_003.ttcn"/>--> @@ -2523,6 +3047,7 @@ <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_012.ttcn"/> <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_013.ttcn"/> <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_014.ttcn"/> +<!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210305_alive_operation/Sem_210305_alive_operation_015.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/NegSem_210306_running_operation_003.ttcn"/>--> @@ -2545,6 +3070,7 @@ <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_010.ttcn"/> <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_011.ttcn"/> <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_012.ttcn"/> +<!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210306_running_operation/Sem_210306_running_operation_013.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn" relativeURI="21_configuration_operations/2103_test_component_operations/210307_done_operation/NegSem_210307_done_operation_003.ttcn"/>--> @@ -2669,6 +3195,7 @@ <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_027.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_028.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_029.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220202_receive_operation/Sem_220202_ReceiveOperation_030.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn" relativeURI="22_communication_operations/2202_message_based_communication/220203_trigger_operation/NegSem_220203_TriggerOperation_003.ttcn"/>--> @@ -2724,6 +3251,25 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_003.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_007.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_008.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_009.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_011.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_012.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_013.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_014.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_015.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_016.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_017.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_018.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_019.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_020.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSem_220301_CallOperation_010.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/NegSyn_220301_CallOperation_002.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_001.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_002.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_003.ttcn"/> @@ -2732,6 +3278,19 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_006.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_007.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_008.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_009.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_010.ttcn"/> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_011.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_012.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_013.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_014.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_015.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_016.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_017.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_018.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_019.ttcn"/> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_020.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_021.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220301_call_operation/Sem_220301_CallOperation_021.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/NegSem_220302_GetcallOperation_003.ttcn"/>--> @@ -2770,11 +3329,24 @@ <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_017.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_017.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_018.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_018.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_019.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_019.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_020.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_020.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_021.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_021.ttcn"/> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_022.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220302_getcall_operation/Sem_220302_GetcallOperation_022.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_007.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_008.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_009.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/NegSem_220303_ReplyOperation_010.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_002.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_003.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_004.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_003.ttcn"/>--> @@ -2795,6 +3367,8 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_018.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_019.ttcn"/>--> <!-- <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/NegSem_220304_getreply_operation_021.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_021.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/NegSem_220304_getreply_operation_022.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"/> @@ -2817,6 +3391,9 @@ <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_018.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_019.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_020.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_021.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_022.ttcn"/> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220304_getreply_operation/Sem_220304_getreply_operation_023.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_003.ttcn"/>--> @@ -2826,6 +3403,7 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_007.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_008.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_009.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/NegSem_220305_raise_operation_010.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_001.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_002.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220305_raise_operation/Sem_220305_raise_operation_003.ttcn"/>--> @@ -2844,6 +3422,8 @@ <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_012.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_013.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_014.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_015.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/NegSem_220306_catch_operation_016.ttcn"/>--> <!-- <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"/>--> @@ -2861,9 +3441,14 @@ <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_012.ttcn"/> <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_013.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_014.ttcn"/>--> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_015.ttcn"/> + <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_016.ttcn"/> +<!-- <FileResource projectRelativePath="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn" relativeURI="22_communication_operations/2203_procedure_based_communication/220306_catch_operation/Sem_220306_catch_operation_017.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_001.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_002.ttcn"/>--> <!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/NegSem_2204_the_check_operation_005.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_001.ttcn"/> <!-- <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_002.ttcn"/>--> <FileResource projectRelativePath="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn" relativeURI="22_communication_operations/2204_the_check_operation/Sem_2204_the_check_operation_003.ttcn"/> @@ -3115,6 +3700,7 @@ <!-- <FileResource projectRelativePath="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn" relativeURI="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_007.ttcn"/>--> <!-- <FileResource projectRelativePath="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn" relativeURI="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_008.ttcn"/>--> <!-- <FileResource projectRelativePath="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn" relativeURI="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_009.ttcn"/>--> + <FileResource projectRelativePath="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn" relativeURI="26_module_control/2601_execute_statement/Sem_2601_ExecuteStatement_010.ttcn"/> <!-- <FileResource projectRelativePath="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn" relativeURI="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_001.ttcn"/>--> <!-- <FileResource projectRelativePath="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn" relativeURI="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_002.ttcn"/>--> <!-- <FileResource projectRelativePath="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn" relativeURI="26_module_control/2602_the_control_part/NegSem_2602_TheControlPart_003.ttcn"/>--> @@ -3173,6 +3759,7 @@ <FileResource projectRelativePath="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn" relativeURI="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_002.ttcn"/> <FileResource projectRelativePath="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn" relativeURI="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_003.ttcn"/> <FileResource projectRelativePath="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn" relativeURI="27_specifying_attributes/2701_attribute_mechanism/270101_scope_of_attributes/Syn_270101_ScopeOfAttributes_004.ttcn"/> +<!-- <FileResource projectRelativePath="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn" relativeURI="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_001.ttcn"/>--> <!-- <FileResource projectRelativePath="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn" relativeURI="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_002.ttcn"/>--> <!-- <FileResource projectRelativePath="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn" relativeURI="27_specifying_attributes/2707_optional_attributes/NegSem_2707_OptionalAttributes_003.ttcn"/>--> <FileResource projectRelativePath="27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn" relativeURI="27_specifying_attributes/2707_optional_attributes/Sem_2707_OptionalAttributes_001.ttcn"/> @@ -3197,8 +3784,15 @@ <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_008.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_009.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_010.ttcn"/> - <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0101_matching_specific_values/B0101_toplevel/Sem_B0101_matching_specific_value_011.ttcn"/> +<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_001.ttcn"/>--> +<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/NegSem_B010201_value_list_004.ttcn"/>--> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_001.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_002.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_003.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010201_value_list/Sem_B010201_value_list_004.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_001.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_002.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010202_complemented_value_list/NegSem_B010202_complemented_value_list_003.ttcn"/>--> @@ -3215,11 +3809,11 @@ <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010203_any_value/Sem_B010203_any_value_002.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_001.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_002.ttcn"/>--> -<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_003.ttcn"/>--> -<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/NegSem_B010204_any_value_or_none_004.ttcn"/>--> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_001.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_002.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_003.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_004.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010204_any_value_or_none/Sem_B010204_any_value_or_none_005.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_001.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_002.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/NegSem_B010205_value_range_003.ttcn"/>--> @@ -3276,6 +3870,7 @@ <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_003.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_004.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010209_decoded_content/Sem_B010209_decoded_content_005.ttcn"/> +<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010210_enumerated_value_list/Sem_B010210_enumerated_value_list_001.ttcn"/>--> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_001.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_002.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010301_any_element/Sem_B010301_any_element_003.ttcn"/> @@ -3304,10 +3899,10 @@ <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_001.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_002.ttcn"/>--> -<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_003.ttcn"/>--> -<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/NegSem_B010401_length_restrictions_004.ttcn"/>--> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_001.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_002.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_003.ttcn"/> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010401_length_restrictions/Sem_B010401_length_restrictions_004.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/NegSem_B010402_ifPresent_indicator_001.ttcn"/>--> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_001.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0104_matching_attributes_of_values/B010402_ifPresent_indicator/Sem_B010402_ifPresent_indicator_002.ttcn"/> diff --git a/usrguide/SoC_TITAN.docx b/usrguide/SoC_TITAN.docx index f9a82c1067ed3401b596fabbcb97176d0fd6c973..0a48e55e1b0d2c8d2fab93059e34faed59a29327 100644 Binary files a/usrguide/SoC_TITAN.docx and b/usrguide/SoC_TITAN.docx differ