diff --git a/conformance_test/core_language_tests/negative_tests/16_invoking_functions.script b/conformance_test/core_language_tests/negative_tests/16_invoking_functions.script new file mode 100644 index 0000000000000000000000000000000000000000..c344b4107e72e5296953cb431d2570eb268cfdb0 --- /dev/null +++ b/conformance_test/core_language_tests/negative_tests/16_invoking_functions.script @@ -0,0 +1,11963 @@ +.****************************************************************************** +.* Copyright (c) ETSI 2017. +.* +.* This file is subject to copyrights owned by ETSI. Non-exclusive permission +.* is hereby granted, free of charge, to copy, reproduce and amend this file +.* under the following conditions: It is provided "as is", without warranty of any +.* kind, expressed or implied. +.* +.* ETSI shall never be liable for any claim, damages, or other liability arising +.* from its use or inability of use.This permission does not apply to any documentation +.* associated with this file for which ETSI keeps all rights reserved. The present +.* copyright notice shall be included in all copies of whole or part of this +.* file and shall not imply any sub-license right. +.* +.* Modified by: Adrien Kirjak +.* +.******************************************************************************/ +text. +:lang eng. +.* +:docname.Test Description +:docno.xz/152 91-CRL 113 200 Uen +:rev.PA1 +:date.2016-04-04 +.* +:prep.ETH/XZ EADRKIR +:subresp.EADRKIR +:appr.ETH/XZ (Elemer Lelik) +:checked. +.* +:title.ETSI TTCN3 Negative Conformance Test +:contents level=3. +.*---------------------------------------------------------------------* +:h1.PREREQUISITES AND PREPARATIONS +.*---------------------------------------------------------------------* +.*---------------------------------------------------------------------* +:h2.Scope of the Test Object +.*---------------------------------------------------------------------* +:xmp tab=1 nokeep. +This TD contains negative tests from ETSI TTCN3 Conformance Test's 16_functions_altsteps_testcases, 19_basic_program_statements and 20_statement_and_operations_for_alt folders. + +:exmp. + +.*---------------------------------------------------------------------* +:h2.Test Tools +.*---------------------------------------------------------------------* +:p.:us.Software Tools:eus. +:xmp tab=2 nokeep. + + SAtester.pl + +:exmp. +:np. + +.*---------------------------------------------------------------------* +:h1.REQUIREMENT-BASED TESTS +.*---------------------------------------------------------------------* +.*---------------------------------------------------------------------* +:h2. 16_functions_altsteps_testcases folder +.*---------------------------------------------------------------------* +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_002 Ensure that the IUT recognizes restrictions described in section 16.1.4. > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_002 NegSem_160104_invoking_functions_from_specific_places_002.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_002 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test() return boolean { + if (rnd() > 0.5) { //calling rnd within a function inside a boolean guard + return true; + } else { + return false; + } + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_002 () runs on GeneralComp { + var integer v_i; + + connect(self:messagePort,self:messagePort); + + messagePort.send(1); + alt { + [f_test()] messagePort.receive { v_i:=0; } + [] messagePort.receive { v_i:=1; } + } + + setverdict(fail); + + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_002()); + + } + +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_003 Ensure that the IUT recognizes restrictions described in section 16.1.4. > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_003 NegSem_160104_invoking_functions_from_specific_places_003.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_003 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test() return boolean { + setverdict(inconc); //setting verdict within a function inside a boolean guard + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_003 () runs on GeneralComp { + var integer v_i; + + connect(self:messagePort,self:messagePort); + + messagePort.send(1); + alt { + [f_test()] messagePort.receive { v_i:=0; } + [] messagePort.receive { v_i:=1; } + } + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_003()); + + } + +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_004 Ensure that the IUT recognizes restrictions described in section 16.1.4. > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_004 NegSem_160104_invoking_functions_from_specific_places_004.ttcn > +/*************************************************** + ** @version 0.0.1 + ** @purpose 1:16.1.4, Ensure that the IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions + ** @verdict pass reject + ***************************************************/ +module NegSem_160104_invoking_functions_from_specific_places_004 { + + type port loopbackPort message { + inout integer + } with {extension "internal"} + + + type component GeneralComp { + port loopbackPort messagePort + } + + function f_test(inout integer p_int) return boolean { //issue of inout parameter + p_int:=1; + return true; + } + + testcase TC_NegSem_160104_invoking_functions_from_specific_places_004 () runs on GeneralComp { + var integer v_i:=0; + + connect(self:messagePort,self:messagePort); + + messagePort.send(1); + alt { + [f_test(v_i)] messagePort.receive { + v_i:=0; + setverdict(fail, "function call not allowed in guard"); + } + [] messagePort.receive { + v_i:=1; + setverdict(pass); + } + } + } + + control{ + + execute(TC_NegSem_160104_invoking_functions_from_specific_places_004()); + + } + +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_i\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_087 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_087 verify that the create operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_087 NegSem_160104_invoking_functions_from_specific_places_087.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_088 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_088 verify that the component.start operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_088 NegSem_160104_invoking_functions_from_specific_places_088.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_089 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_089 verify that the component.stop operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_089 NegSem_160104_invoking_functions_from_specific_places_089.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_090 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_090 verify that the kill operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_090 NegSem_160104_invoking_functions_from_specific_places_090.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_091 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_091 verify that the component.running operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_091 NegSem_160104_invoking_functions_from_specific_places_091.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_092 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_092 verify that the alive operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_092 NegSem_160104_invoking_functions_from_specific_places_092.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_093 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_093 verify that the done operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_093 NegSem_160104_invoking_functions_from_specific_places_093.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_094 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_094 verify that the killed operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_094 NegSem_160104_invoking_functions_from_specific_places_094.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_095 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_095 verify that the port.start operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_095 NegSem_160104_invoking_functions_from_specific_places_095.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_096 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_096 verify that the port.stop operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_096 NegSem_160104_invoking_functions_from_specific_places_096.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_097 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_097 verify that the halt operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_097 NegSem_160104_invoking_functions_from_specific_places_097.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_098 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_098 verify that the clear operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_098 NegSem_160104_invoking_functions_from_specific_places_098.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_099 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_099 ((tc_desc))verify that the checkstate operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_099 NegSem_160104_invoking_functions_from_specific_places_099.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_100 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_100 verify that the send operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_100 NegSem_160104_invoking_functions_from_specific_places_100.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_101 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_101 verify that the receive operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_101 NegSem_160104_invoking_functions_from_specific_places_101.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_102 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_102 verify that the trigger operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_102 NegSem_160104_invoking_functions_from_specific_places_102.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_103 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_103 verify that the call operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_103 NegSem_160104_invoking_functions_from_specific_places_103.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_104 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_104 verify that the getcall operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_104 NegSem_160104_invoking_functions_from_specific_places_104.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_105 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_105 verify that the reply operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_105 NegSem_160104_invoking_functions_from_specific_places_105.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_106 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_106 verify that the getreply operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_106 NegSem_160104_invoking_functions_from_specific_places_106.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_107 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_107 verify that the raise operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_107 NegSem_160104_invoking_functions_from_specific_places_107.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_108 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_108 verify that the catch operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_108 NegSem_160104_invoking_functions_from_specific_places_108.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_109 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_109 verify that the check operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_109 NegSem_160104_invoking_functions_from_specific_places_109.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_110 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_110 verify that the connect operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_110 NegSem_160104_invoking_functions_from_specific_places_110.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_111 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_111 verify that the disconnect operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_111 NegSem_160104_invoking_functions_from_specific_places_111.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_112 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_112 verify that the map operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_112 NegSem_160104_invoking_functions_from_specific_places_112.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_113 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_113 verify that the unmap operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_113 NegSem_160104_invoking_functions_from_specific_places_113.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_114 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_114 verify that the action operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_114 NegSem_160104_invoking_functions_from_specific_places_114.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_115 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_115 verify that the timer.start operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_115 NegSem_160104_invoking_functions_from_specific_places_115.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_116 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_116 verify that the timer.stop operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_116 NegSem_160104_invoking_functions_from_specific_places_116.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_117 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_117 verify that the timer.running operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_117 NegSem_160104_invoking_functions_from_specific_places_117.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_118 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_118 verify that the read operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_118 NegSem_160104_invoking_functions_from_specific_places_118.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_119 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_119 verify that the timeout operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_119 NegSem_160104_invoking_functions_from_specific_places_119.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_120 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_120 verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_120 NegSem_160104_invoking_functions_from_specific_places_120.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_121 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_121 verify that the predefined rnd function cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_121 NegSem_160104_invoking_functions_from_specific_places_121.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_122 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_122 verify a function called during receiving operation cannot contain an assignment of a component variable (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_122 NegSem_160104_invoking_functions_from_specific_places_122.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_123 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_123 verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_123 NegSem_160104_invoking_functions_from_specific_places_123.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_124 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_124 verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_124 NegSem_160104_invoking_functions_from_specific_places_124.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_125 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_125 verify that the setverdict operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_125 NegSem_160104_invoking_functions_from_specific_places_125.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_126 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_126 verify that the activate operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_126 NegSem_160104_invoking_functions_from_specific_places_126.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_127 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_127 verify that the deactivate operation cannot be used in a function called during receiving operation (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_127 NegSem_160104_invoking_functions_from_specific_places_127.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_128 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_128 verify a function called during receiving operation cannot contain an out parameter (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_128 NegSem_160104_invoking_functions_from_specific_places_128.ttcn > +/**************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_129 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_129 verify a function called during receiving operation cannot contain an inout parameter (in in-line templates) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_129 NegSem_160104_invoking_functions_from_specific_places_129.ttcn > +/**************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_130 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_130 verify that the create operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_130 NegSem_160104_invoking_functions_from_specific_places_130.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_131 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_131 verify that the component.start operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_131 NegSem_160104_invoking_functions_from_specific_places_131.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_132 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_132 verify that the component.stop operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_132 NegSem_160104_invoking_functions_from_specific_places_132.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_133 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_133 verify that the kill operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_133 NegSem_160104_invoking_functions_from_specific_places_133.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_134 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_134 verify that the component.running operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_134 NegSem_160104_invoking_functions_from_specific_places_134.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_135 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_135 verify that the alive operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_135 NegSem_160104_invoking_functions_from_specific_places_135.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_136 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_136 verify that the done operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_136 NegSem_160104_invoking_functions_from_specific_places_136.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_137 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_137 verify that the killed operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_137 NegSem_160104_invoking_functions_from_specific_places_137.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_138 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_138 verify that the port.start operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_138 NegSem_160104_invoking_functions_from_specific_places_138.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_139 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_139 verify that the port.stop operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_139 NegSem_160104_invoking_functions_from_specific_places_139.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_140 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_140 verify that the halt operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_140 NegSem_160104_invoking_functions_from_specific_places_140.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_141 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_141 verify that the clear operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_141 NegSem_160104_invoking_functions_from_specific_places_141.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_142 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_142 verify that the checkstate operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_142 NegSem_160104_invoking_functions_from_specific_places_142.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_143 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_143 verify that the send operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_143 NegSem_160104_invoking_functions_from_specific_places_143.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_144 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_144 verify that the receive operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_144 NegSem_160104_invoking_functions_from_specific_places_144.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_145 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_145 verify that the trigger operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_145 NegSem_160104_invoking_functions_from_specific_places_145.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_146 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_146 verify that the call operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_146 NegSem_160104_invoking_functions_from_specific_places_146.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_147 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_147 verify that the getcall operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_147 NegSem_160104_invoking_functions_from_specific_places_147.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_148 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_148 verify that the reply operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_148 NegSem_160104_invoking_functions_from_specific_places_148.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_149 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_149 verify that the getreply operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_149 NegSem_160104_invoking_functions_from_specific_places_149.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_150 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_150 verify that the raise operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_150 NegSem_160104_invoking_functions_from_specific_places_150.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_151 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_151 verify that the catch operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_151 NegSem_160104_invoking_functions_from_specific_places_151.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_152 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_152 verify that the check operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_152 NegSem_160104_invoking_functions_from_specific_places_152.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_153 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_153 verify that the connect operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_153 NegSem_160104_invoking_functions_from_specific_places_153.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_154 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_154 verify that the disconnect operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_154 NegSem_160104_invoking_functions_from_specific_places_154.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_155 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_155 verify that the map operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_155 NegSem_160104_invoking_functions_from_specific_places_155.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_156 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_156 verify that the unmap operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_156 NegSem_160104_invoking_functions_from_specific_places_156.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_157 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_157 verify that the action operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_157 NegSem_160104_invoking_functions_from_specific_places_157.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_158 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_158 verify that the timer.start operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_158 NegSem_160104_invoking_functions_from_specific_places_158.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_159 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_159 verify that the timer.stop operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_159 NegSem_160104_invoking_functions_from_specific_places_159.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_160 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_160 verify that the timer.running operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_160 NegSem_160104_invoking_functions_from_specific_places_160.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_161 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_161 verify that the read operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_161 NegSem_160104_invoking_functions_from_specific_places_161.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_162 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_162 verify that the timeout operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_162 NegSem_160104_invoking_functions_from_specific_places_162.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_163 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_163 verify that a non-deterministic external function call cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_163 NegSem_160104_invoking_functions_from_specific_places_163.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_164 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_164 verify that the predefined rnd function cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_164 NegSem_160104_invoking_functions_from_specific_places_164.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_165 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_165 verify a function called during receiving operation cannot contain an assignment of a component variable (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_165 NegSem_160104_invoking_functions_from_specific_places_165.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_166 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_166 verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_166 NegSem_160104_invoking_functions_from_specific_places_166.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_167 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_167 verify a function called during receiving operation cannot contain a component variable used as an actual inout parameter (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_167 NegSem_160104_invoking_functions_from_specific_places_167.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_168 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_168 verify that the setverdict operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_168 NegSem_160104_invoking_functions_from_specific_places_168.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_169 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_169 verify that the activate operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_169 NegSem_160104_invoking_functions_from_specific_places_169.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_170 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_170 verify that the deactivate operation cannot be used in a function called during receiving operation (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_170 NegSem_160104_invoking_functions_from_specific_places_170.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_171 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_171 verify a function called during receiving operation cannot contain an out parameter (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_171 NegSem_160104_invoking_functions_from_specific_places_171.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_172 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_172 verify a function called during receiving operation cannot contain an inout parameter (as actual parameters) > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_172 NegSem_160104_invoking_functions_from_specific_places_172.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_173 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_173 verify that the create operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_173 NegSem_160104_invoking_functions_from_specific_places_173.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_174 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_174 verify that the component.start operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_174 NegSem_160104_invoking_functions_from_specific_places_174.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_175 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_175 verify that the component.stop operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_175 NegSem_160104_invoking_functions_from_specific_places_175.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_176 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_176 verify that the kill operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_176 NegSem_160104_invoking_functions_from_specific_places_176.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_177 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_177 verify that the component.running operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_177 NegSem_160104_invoking_functions_from_specific_places_177.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_178 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_178 verify that the alive operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_178 NegSem_160104_invoking_functions_from_specific_places_178.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_179 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_179 verify that the done operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_179 NegSem_160104_invoking_functions_from_specific_places_179.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_180 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_180 verify that the killed operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_180 NegSem_160104_invoking_functions_from_specific_places_180.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_181 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_181 verify that the port.start operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_181 NegSem_160104_invoking_functions_from_specific_places_181.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_182 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_182 verify that the port.stop operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_182 NegSem_160104_invoking_functions_from_specific_places_182.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_183 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_183 verify that the halt operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_183 NegSem_160104_invoking_functions_from_specific_places_183.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_184 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_184 verify that the clear operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_184 NegSem_160104_invoking_functions_from_specific_places_184.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_185 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_185 verify that the checkstate operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_185 NegSem_160104_invoking_functions_from_specific_places_185.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_186 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_186 verify that the send operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_186 NegSem_160104_invoking_functions_from_specific_places_186.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_187 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_187 verify that the receive operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_187 NegSem_160104_invoking_functions_from_specific_places_187.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_188 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_188 verify that the trigger operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_188 NegSem_160104_invoking_functions_from_specific_places_188.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_189 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_189 verify that the call operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_189 NegSem_160104_invoking_functions_from_specific_places_189.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_190 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_190 verify that the getcall operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_190 NegSem_160104_invoking_functions_from_specific_places_190.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_191 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_191 verify that the reply operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_191 NegSem_160104_invoking_functions_from_specific_places_191.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_192 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_192 verify that the getreply operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_192 NegSem_160104_invoking_functions_from_specific_places_192.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_193 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_193 verify that the raise operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_193 NegSem_160104_invoking_functions_from_specific_places_193.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_194 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_194 verify that the catch operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_194 NegSem_160104_invoking_functions_from_specific_places_194.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_195 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_195 verify that the check operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_195 NegSem_160104_invoking_functions_from_specific_places_195.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_196 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_196 verify that the connect operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_196 NegSem_160104_invoking_functions_from_specific_places_196.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_197 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_197 verify that the disconnect operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_197 NegSem_160104_invoking_functions_from_specific_places_197.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_198 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_198 verify that the map operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_198 NegSem_160104_invoking_functions_from_specific_places_198.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_199 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_199 verify that the unmap operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_199 NegSem_160104_invoking_functions_from_specific_places_199.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_200 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_200 verify that the action operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_200 NegSem_160104_invoking_functions_from_specific_places_200.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_201 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_201 verify that the timer.start operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_201 NegSem_160104_invoking_functions_from_specific_places_201.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_202 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_202 verify that the timer.stop operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_202 NegSem_160104_invoking_functions_from_specific_places_202.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_203 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_203 verify that the timer.running operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_203 NegSem_160104_invoking_functions_from_specific_places_203.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_204 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_204 verify that the read operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_204 NegSem_160104_invoking_functions_from_specific_places_204.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_205 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_205 verify that the timeout operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_205 NegSem_160104_invoking_functions_from_specific_places_205.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_206 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_206 verify a function called in a guard of an alt statement cannot contain an assignment of a component variable > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_206 NegSem_160104_invoking_functions_from_specific_places_206.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_207 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_207 verify a function called in a guard of an alt statement cannot contain a component variable used as an actual out parameter > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_207 NegSem_160104_invoking_functions_from_specific_places_207.ttcn > +/****************************************************************************** + ** @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()); + } +} + +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_208 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_208 verify a function called in a guard of an alt statement cannot contain a component variable used as an actual inout parameter > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_208 NegSem_160104_invoking_functions_from_specific_places_208.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_209 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_209 verify that the activate operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_209 NegSem_160104_invoking_functions_from_specific_places_209.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_210 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_210 verify that the deactivate operation cannot be used in guards of alt statements > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_210 NegSem_160104_invoking_functions_from_specific_places_210.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_211 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_211 verify that a function called from a guard statement of an alt operation cannot contain out parameters > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_211 NegSem_160104_invoking_functions_from_specific_places_211.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_212 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_212 verify that the create operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_212 NegSem_160104_invoking_functions_from_specific_places_212.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_213 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_213 verify that the component.start operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_213 NegSem_160104_invoking_functions_from_specific_places_213.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_214 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_214 verify that the component.stop operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_214 NegSem_160104_invoking_functions_from_specific_places_214.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_215 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_215 verify that the kill operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_215 NegSem_160104_invoking_functions_from_specific_places_215.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_216 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_216 verify that the component.running operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_216 NegSem_160104_invoking_functions_from_specific_places_216.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_217 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_217 verify that the alive operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_217 NegSem_160104_invoking_functions_from_specific_places_217.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_218 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_218 verify that the done operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_218 NegSem_160104_invoking_functions_from_specific_places_218.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_219 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_219 verify that the killed operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_219 NegSem_160104_invoking_functions_from_specific_places_219.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(p_ptc\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_220 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_220 verify that the port.start operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_220 NegSem_160104_invoking_functions_from_specific_places_220.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_221 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_221 verify that the port.stop operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_221 NegSem_160104_invoking_functions_from_specific_places_221.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_222 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_222 verify that the halt operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_222 NegSem_160104_invoking_functions_from_specific_places_222.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_223 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_223 verify that the clear operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_223 NegSem_160104_invoking_functions_from_specific_places_223.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_224 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_224 verify that the checkstate operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_224 NegSem_160104_invoking_functions_from_specific_places_224.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_225 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_225 verify that the send operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_225 NegSem_160104_invoking_functions_from_specific_places_225.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_226 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_226 verify that the receive operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_226 NegSem_160104_invoking_functions_from_specific_places_226.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_227 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_227 verify that the trigger operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_227 NegSem_160104_invoking_functions_from_specific_places_227.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_228 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_228 verify that the call operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_228 NegSem_160104_invoking_functions_from_specific_places_228.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_229 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_229 verify that the getcall operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_229 NegSem_160104_invoking_functions_from_specific_places_229.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_230 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_230 verify that the reply operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_230 NegSem_160104_invoking_functions_from_specific_places_230.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_231 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_231 verify that the getreply operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_231 NegSem_160104_invoking_functions_from_specific_places_231.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_232 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_232 verify that the raise operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_232 NegSem_160104_invoking_functions_from_specific_places_232.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_233 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_233 verify that the catch operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_233 NegSem_160104_invoking_functions_from_specific_places_233.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_234 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_234 verify that the check operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_234 NegSem_160104_invoking_functions_from_specific_places_234.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_235 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_235 verify that the connect operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_235 NegSem_160104_invoking_functions_from_specific_places_235.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_236 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_236 verify that the disconnect operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_236 NegSem_160104_invoking_functions_from_specific_places_236.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_237 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_237 verify that the map operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_237 NegSem_160104_invoking_functions_from_specific_places_237.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_238 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_238 verify that the unmap operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_238 NegSem_160104_invoking_functions_from_specific_places_238.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_239 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_239 verify that the action operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_239 NegSem_160104_invoking_functions_from_specific_places_239.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_240 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_240 verify that the timer.start operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_240 NegSem_160104_invoking_functions_from_specific_places_240.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_241 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_241 verify that the timer.stop operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_241 NegSem_160104_invoking_functions_from_specific_places_241.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_242 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_242 verify that the timer.running operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_242 NegSem_160104_invoking_functions_from_specific_places_242.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_243 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_243 verify that the read operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_243 NegSem_160104_invoking_functions_from_specific_places_243.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_244 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_244 verify that the timeout operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_244 NegSem_160104_invoking_functions_from_specific_places_244.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_245 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_245 verify that a non-deterministic external function call cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_245 NegSem_160104_invoking_functions_from_specific_places_245.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_246 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_246 verify that the predefined rnd function cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_246 NegSem_160104_invoking_functions_from_specific_places_246.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_247 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_247 verify a function called in a guard of an altstep cannot contain an assignment of a component variable > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_247 NegSem_160104_invoking_functions_from_specific_places_247.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_248 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_248 verify a function called in a guard of an altstep cannot contain a component variable used as an actual out parameter > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_248 NegSem_160104_invoking_functions_from_specific_places_248.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_249 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_249 verify a function called in a guard of an altstep cannot contain a component variable used as an actual inout parameter > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_249 NegSem_160104_invoking_functions_from_specific_places_249.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_250 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_250 verify that the setverdict operation cannot be used in guard statements of altstep > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_250 NegSem_160104_invoking_functions_from_specific_places_250.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_251 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_251 verify that the activate operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_251 NegSem_160104_invoking_functions_from_specific_places_251.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_252 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_252 verify that the deactivate operation cannot be used in guards of altsteps > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_252 NegSem_160104_invoking_functions_from_specific_places_252.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_253 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_253 verify that a function called from a guard statement of an altstep cannot contain out parameters > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_253 NegSem_160104_invoking_functions_from_specific_places_253.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_160104_invoking_functions_from_specific_places_254 negative test +*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 160104_254 verify that a function called from a guard statement of an altstep cannot contain inout parameters > + +<COMPILE> + +<MODULE TTCN NegSem_160104_invoking_functions_from_specific_places_254 NegSem_160104_invoking_functions_from_specific_places_254.ttcn > +/****************************************************************************** + ** @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()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +warning: Function invocation 'f_test\(v_int\)' may change the actual snapshot. +<END_RESULT> + + +<END_TC> +:exmp + +.*---------------------------------------------------------------------* +:h1.References +.*---------------------------------------------------------------------* +:list. +:li D='[1]'.1/174 02-CRL 113 200/5 Uen +:nl.Statement of Compliance for TITAN project +:li D='[2]'.ETSI ES 201 873-1, v4.7.1 Mockup v1 (2015-06): +:nl.Testing and Test Control Notation version 3., +:nl.Part 1: TTCN-3 Core Language +:elist. diff --git a/usrguide/SoC_TITAN/SoC_TITAN.adoc b/usrguide/SoC_TITAN/SoC_TITAN.adoc index b1f37f507718bd7ba5db95bb096aa2a9735f4772..59cfb71f15eb6ffcc16480cfc07fc5b03c45bbd0 100644 --- a/usrguide/SoC_TITAN/SoC_TITAN.adoc +++ b/usrguide/SoC_TITAN/SoC_TITAN.adoc @@ -3063,9 +3063,9 @@ NOTE: Nonsupported mandatory capabilities are to be identified in the ICS, with |===================================================================================================================================================================================================================================== |Item |TC/TP reference |purpose |Reference in ES 201 873-1 |Status |Support |1 |NegSem_160104_invoking_functions_from_specific_places_001 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |n -|2 |NegSem_160104_invoking_functions_from_specific_places_002 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |n -|3 |NegSem_160104_invoking_functions_from_specific_places_003 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |n -|4 |NegSem_160104_invoking_functions_from_specific_places_004 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |n +|2 |NegSem_160104_invoking_functions_from_specific_places_002 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |y +|3 |NegSem_160104_invoking_functions_from_specific_places_003 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |y +|4 |NegSem_160104_invoking_functions_from_specific_places_004 |The IUT recognizes restrictions described in section 16.1.4. STF409 assumes that the list given in section 16.1.4 describes mandatory restrictions |Clause 16.1.4 |m |y |5 |NegSem_160104_invoking_functions_from_specific_places_005 |verify that the `create` operation cannot be used in a function called during receiving operation (in templates) |Clause 16.1.4 |m |n |6 |NegSem_160104_invoking_functions_from_specific_places_006 |verify that the `component.start` operation cannot be used in a function called during receiving operation (in templates) |Clause 16.1.4 |m |n |7 |NegSem_160104_invoking_functions_from_specific_places_007 |verify that the `component.stop` operation cannot be used in a function called during receiving operation (in templates) |Clause 16.1.4 |m |n @@ -3148,174 +3148,174 @@ NOTE: Nonsupported mandatory capabilities are to be identified in the ICS, with |84 |NegSem_160104_invoking_functions_from_specific_places_084 |verify that the `setverdict` operation cannot be used in a function called during receiving operation (in template fields) |Clause 16.1.4 |m |n |85 |NegSem_160104_invoking_functions_from_specific_places_085 |verify that the `activate` operation cannot be used in a function called during receiving operation (in template fields) |Clause 16.1.4 |m |n |86 |NegSem_160104_invoking_functions_from_specific_places_086 |verify that the `deactivate` operation cannot be used in a function called during receiving operation (in template fields) |Clause 16.1.4 |m |n -|87 |NegSem_160104_invoking_functions_from_specific_places_087 |verify that the `create` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|88 |NegSem_160104_invoking_functions_from_specific_places_089 |verify that the `component.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|89 |NegSem_160104_invoking_functions_from_specific_places_089 |verify that the `component.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|90 |NegSem_160104_invoking_functions_from_specific_places_090 |verify that the `kill` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|91 |NegSem_160104_invoking_functions_from_specific_places_091 |verify that the `component.running` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|92 |NegSem_160104_invoking_functions_from_specific_places_092 |verify that the `alive` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|93 |NegSem_160104_invoking_functions_from_specific_places_093 |verify that the `done` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|94 |NegSem_160104_invoking_functions_from_specific_places_094 |verify that the `killed` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|95 |NegSem_160104_invoking_functions_from_specific_places_095 |verify that the `port.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|96 |NegSem_160104_invoking_functions_from_specific_places_096 |verify that the `port.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|97 |NegSem_160104_invoking_functions_from_specific_places_097 |verify that the `halt` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|98 |NegSem_160104_invoking_functions_from_specific_places_098 |verify that the `clear` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|99 |NegSem_160104_invoking_functions_from_specific_places_099 |verify that the `checkstate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|100 |NegSem_160104_invoking_functions_from_specific_places_100 |verify that the `send` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|101 |NegSem_160104_invoking_functions_from_specific_places_101 |verify that the `receive` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|102 |NegSem_160104_invoking_functions_from_specific_places_102 |verify that the `trigger` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|103 |NegSem_160104_invoking_functions_from_specific_places_103 |verify that the `call` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|104 |NegSem_160104_invoking_functions_from_specific_places_104 |verify that the `getcall` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|105 |NegSem_160104_invoking_functions_from_specific_places_105 |verify that the `reply` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|106 |NegSem_160104_invoking_functions_from_specific_places_106 |verify that the `getreply` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|107 |NegSem_160104_invoking_functions_from_specific_places_107 |verify that the `raise` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|108 |NegSem_160104_invoking_functions_from_specific_places_108 |verify that the `catch` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|109 |NegSem_160104_invoking_functions_from_specific_places_109 |verify that the `check` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|110 |NegSem_160104_invoking_functions_from_specific_places_110 |verify that the `connect` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|111 |NegSem_160104_invoking_functions_from_specific_places_111 |verify that the `disconnect` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|112 |NegSem_160104_invoking_functions_from_specific_places_112 |verify that the `map` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|113 |NegSem_160104_invoking_functions_from_specific_places_113 |verify that the `unmap` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|114 |NegSem_160104_invoking_functions_from_specific_places_114 |verify that the `action` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|115 |NegSem_160104_invoking_functions_from_specific_places_115 |verify that the `timer.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|116 |NegSem_160104_invoking_functions_from_specific_places_116 |verify that the `timer.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|117 |NegSem_160104_invoking_functions_from_specific_places_117 |verify that the `timer.running` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|118 |NegSem_160104_invoking_functions_from_specific_places_118 |verify that the `read` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|119 |NegSem_160104_invoking_functions_from_specific_places_119 |verify that the `timeout` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|120 |NegSem_160104_invoking_functions_from_specific_places_120 |verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|121 |NegSem_160104_invoking_functions_from_specific_places_121 |verify that the predefined `rnd` function cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|122 |NegSem_160104_invoking_functions_from_specific_places_122 |verify a function called during receiving operation cannot contain an assignment of a component variable (in in-line templates) |Clause 16.1.4 |m |n -|123 |NegSem_160104_invoking_functions_from_specific_places_123 |verify a function called during receiving operation cannot contain a component variable used as an actual `out` parameter (in in-line templates) |Clause 16.1.4 |m |n -|124 |NegSem_160104_invoking_functions_from_specific_places_124 |verify a function called during receiving operation cannot contain a component variable used as an actual `inout` parameter (in in-line templates) |Clause 16.1.4 |m |n -|125 |NegSem_160104_invoking_functions_from_specific_places_125 |verify that the `setverdict` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|126 |NegSem_160104_invoking_functions_from_specific_places_126 |verify that the `activate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|127 |NegSem_160104_invoking_functions_from_specific_places_127 |verify that the `deactivate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |n -|128 |NegSem_160104_invoking_functions_from_specific_places_128 |verify a function called during receiving operation cannot contain an `out` parameter (in in-line templates) |Clause 16.1.4 |m |n -|129 |NegSem_160104_invoking_functions_from_specific_places_129 |verify a function called during receiving operation cannot contain an `inout` parameter (in in-line templates) |Clause 16.1.4 |m |n -|130 |NegSem_160104_invoking_functions_from_specific_places_130 |verify that the `create` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|131 |NegSem_160104_invoking_functions_from_specific_places_131 |verify that the `component.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|132 |NegSem_160104_invoking_functions_from_specific_places_132 |verify that the `component.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|133 |NegSem_160104_invoking_functions_from_specific_places_133 |verify that the `kill` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|134 |NegSem_160104_invoking_functions_from_specific_places_134 |verify that the `component.running` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|135 |NegSem_160104_invoking_functions_from_specific_places_135 |verify that the `alive` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|136 |NegSem_160104_invoking_functions_from_specific_places_136 |verify that the `done` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|137 |NegSem_160104_invoking_functions_from_specific_places_137 |verify that the `killed` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|138 |NegSem_160104_invoking_functions_from_specific_places_138 |verify that the `port.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|139 |NegSem_160104_invoking_functions_from_specific_places_139 |verify that the `port.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|140 |NegSem_160104_invoking_functions_from_specific_places_140 |verify that the `halt` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|141 |NegSem_160104_invoking_functions_from_specific_places_141 |verify that the `clear` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|142 |NegSem_160104_invoking_functions_from_specific_places_142 |verify that the `checkstate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|143 |NegSem_160104_invoking_functions_from_specific_places_143 |verify that the `send` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|144 |NegSem_160104_invoking_functions_from_specific_places_144 |verify that the `receive` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|145 |NegSem_160104_invoking_functions_from_specific_places_145 |verify that the `trigger` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|146 |NegSem_160104_invoking_functions_from_specific_places_146 |verify that the `call` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|147 |NegSem_160104_invoking_functions_from_specific_places_147 |verify that the `getcall` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|148 |NegSem_160104_invoking_functions_from_specific_places_148 |verify that the `reply` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|149 |NegSem_160104_invoking_functions_from_specific_places_149 |verify that the `getreply` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|150 |NegSem_160104_invoking_functions_from_specific_places_150 |verify that the `raise` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|151 |NegSem_160104_invoking_functions_from_specific_places_151 |verify that the `catch` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|152 |NegSem_160104_invoking_functions_from_specific_places_152 |verify that the `check` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|153 |NegSem_160104_invoking_functions_from_specific_places_153 |verify that the `connect` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|154 |NegSem_160104_invoking_functions_from_specific_places_154 |verify that the `disconnect` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|155 |NegSem_160104_invoking_functions_from_specific_places_155 |verify that the `map` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|156 |NegSem_160104_invoking_functions_from_specific_places_156 |verify that the `unmap` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|157 |NegSem_160104_invoking_functions_from_specific_places_157 |verify that the `action` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|158 |NegSem_160104_invoking_functions_from_specific_places_158 |verify that the `timer.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|159 |NegSem_160104_invoking_functions_from_specific_places_159 |verify that the `timer.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|160 |NegSem_160104_invoking_functions_from_specific_places_160 |verify that the `timer.running` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|161 |NegSem_160104_invoking_functions_from_specific_places_161 |verify that the `read` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|162 |NegSem_160104_invoking_functions_from_specific_places_162 |verify that the `timeout` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|163 |NegSem_160104_invoking_functions_from_specific_places_163 |verify that a non-deterministic external function call cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|164 |NegSem_160104_invoking_functions_from_specific_places_164 |verify that the predefined `rnd` function cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|165 |NegSem_160104_invoking_functions_from_specific_places_165 |verify a function called during receiving operation cannot contain an assignment of a component variable (as actual parameters) |Clause 16.1.4 |m |n -|166 |NegSem_160104_invoking_functions_from_specific_places_166 |verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (as actual parameters) |Clause 16.1.4 |m |n -|167 |NegSem_160104_invoking_functions_from_specific_places_167 |verify a function called during receiving operation cannot contain a component variable used as an actual `inout` parameter (as actual parameters) |Clause 16.1.4 |m |n -|168 |NegSem_160104_invoking_functions_from_specific_places_168 |verify that the `setverdict` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|169 |NegSem_160104_invoking_functions_from_specific_places_169 |verify that the `activate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|170 |NegSem_160104_invoking_functions_from_specific_places_170 |verify that the `deactivate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |n -|171 |NegSem_160104_invoking_functions_from_specific_places_171 |verify a function called during receiving operation cannot contain an out parameter (as actual parameters) |Clause 16.1.4 |m |n -|172 |NegSem_160104_invoking_functions_from_specific_places_172 |verify a function called during receiving operation cannot contain an `inout` parameter (as actual parameters) |Clause 16.1.4 |m |n -|173 |NegSem_160104_invoking_functions_from_specific_places_173 |verify that the `create` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|174 |NegSem_160104_invoking_functions_from_specific_places_174 |verify that the `component.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|175 |NegSem_160104_invoking_functions_from_specific_places_175 |verify that the `component.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|176 |NegSem_160104_invoking_functions_from_specific_places_176 |verify that the `kill` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|177 |NegSem_160104_invoking_functions_from_specific_places_177 |verify that the `component.running` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|178 |NegSem_160104_invoking_functions_from_specific_places_178 |verify that the `alive` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|179 |NegSem_160104_invoking_functions_from_specific_places_179 |verify that the `done` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|180 |NegSem_160104_invoking_functions_from_specific_places_180 |verify that the `killed` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|181 |NegSem_160104_invoking_functions_from_specific_places_181 |verify that the `port.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|182 |NegSem_160104_invoking_functions_from_specific_places_182 |verify that the `port.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|183 |NegSem_160104_invoking_functions_from_specific_places_183 |verify that the `halt` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|184 |NegSem_160104_invoking_functions_from_specific_places_184 |verify that the `clear` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|185 |NegSem_160104_invoking_functions_from_specific_places_185 |verify that the `checkstate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|186 |NegSem_160104_invoking_functions_from_specific_places_186 |verify that the `send` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|187 |NegSem_160104_invoking_functions_from_specific_places_187 |verify that the `receive` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|188 |NegSem_160104_invoking_functions_from_specific_places_188 |verify that the `trigger` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|189 |NegSem_160104_invoking_functions_from_specific_places_189 |verify that the `call` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|190 |NegSem_160104_invoking_functions_from_specific_places_190 |verify that the `getcall` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|191 |NegSem_160104_invoking_functions_from_specific_places_191 |verify that the `reply` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|192 |NegSem_160104_invoking_functions_from_specific_places_192 |verify that the `getreply` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|193 |NegSem_160104_invoking_functions_from_specific_places_193 |verify that the `raise` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|194 |NegSem_160104_invoking_functions_from_specific_places_194 |verify that the `catch` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|195 |NegSem_160104_invoking_functions_from_specific_places_195 |verify that the `check` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|196 |NegSem_160104_invoking_functions_from_specific_places_196 |verify that the `connect` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|197 |NegSem_160104_invoking_functions_from_specific_places_197 |verify that the `disconnect` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|198 |NegSem_160104_invoking_functions_from_specific_places_198 |verify that the `map` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|199 |NegSem_160104_invoking_functions_from_specific_places_199 |verify that the `unmap` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|200 |NegSem_160104_invoking_functions_from_specific_places_200 |verify that the `action` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|201 |NegSem_160104_invoking_functions_from_specific_places_201 |verify that the `timer.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|202 |NegSem_160104_invoking_functions_from_specific_places_202 |verify that the `timer.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|203 |NegSem_160104_invoking_functions_from_specific_places_203 |verify that the `timer.running` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|204 |NegSem_160104_invoking_functions_from_specific_places_204 |verify that the `read` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|205 |NegSem_160104_invoking_functions_from_specific_places_205 |verify that the `timeout` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|206 |NegSem_160104_invoking_functions_from_specific_places_206 |verify a function called in a guard of an `alt` statement cannot contain an assignment of a component variable |Clause 16.1.4 |m |n -|207 |NegSem_160104_invoking_functions_from_specific_places_207 |verify a function called in a guard of an `alt` statement cannot contain a component variable used as an actual `out` parameter |Clause 16.1.4 |m |n -|208 |NegSem_160104_invoking_functions_from_specific_places_208 |verify a function called in a guard of an `alt` statement cannot contain a component variable used as an actual `inout` parameter |Clause 16.1.4 |m |n -|209 |NegSem_160104_invoking_functions_from_specific_places_209 |verify that the `activate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|210 |NegSem_160104_invoking_functions_from_specific_places_210 |verify that the `deactivate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |n -|211 |NegSem_160104_invoking_functions_from_specific_places_211 |verify that a function called from a `guard` statement of an `alt` operation cannot contain `out` parameters |Clause 16.1.4 |m |n -|212 |NegSem_160104_invoking_functions_from_specific_places_212 |verify that the `create` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|213 |NegSem_160104_invoking_functions_from_specific_places_213 |verify that the `component.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|214 |NegSem_160104_invoking_functions_from_specific_places_214 |verify that the `component.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|215 |NegSem_160104_invoking_functions_from_specific_places_215 |verify that the `kill` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|216 |NegSem_160104_invoking_functions_from_specific_places_216 |verify that the `component.running` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|217 |NegSem_160104_invoking_functions_from_specific_places_217 |verify that the `alive` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|218 |NegSem_160104_invoking_functions_from_specific_places_218 |verify that the `done` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|219 |NegSem_160104_invoking_functions_from_specific_places_219 |verify that the `killed` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|220 |NegSem_160104_invoking_functions_from_specific_places_220 |verify that the `port.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|221 |NegSem_160104_invoking_functions_from_specific_places_221 |verify that the `port.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|222 |NegSem_160104_invoking_functions_from_specific_places_222 |verify that the `halt` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|223 |NegSem_160104_invoking_functions_from_specific_places_223 |verify that the `clear` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|224 |NegSem_160104_invoking_functions_from_specific_places_224 |verify that the `checkstate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|225 |NegSem_160104_invoking_functions_from_specific_places_225 |verify that the `send` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|226 |NegSem_160104_invoking_functions_from_specific_places_226 |verify that the `receive` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|227 |NegSem_160104_invoking_functions_from_specific_places_227 |verify that the `trigger` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|228 |NegSem_160104_invoking_functions_from_specific_places_228 |verify that the `call` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|229 |NegSem_160104_invoking_functions_from_specific_places_229 |verify that the `getcall` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|230 |NegSem_160104_invoking_functions_from_specific_places_230 |verify that the `reply` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|231 |NegSem_160104_invoking_functions_from_specific_places_231 |verify that the `getreply` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|232 |NegSem_160104_invoking_functions_from_specific_places_232 |verify that the `raise` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|233 |NegSem_160104_invoking_functions_from_specific_places_233 |verify that the `catch` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|234 |NegSem_160104_invoking_functions_from_specific_places_234 |verify that the `check` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|235 |NegSem_160104_invoking_functions_from_specific_places_235 |verify that the `connect` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|236 |NegSem_160104_invoking_functions_from_specific_places_236 |verify that the `disconnect` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|237 |NegSem_160104_invoking_functions_from_specific_places_237 |verify that the `map` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|238 |NegSem_160104_invoking_functions_from_specific_places_238 |verify that the `unmap` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|239 |NegSem_160104_invoking_functions_from_specific_places_239 |verify that the `action` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|240 |NegSem_160104_invoking_functions_from_specific_places_240 |verify that the `timer.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|241 |NegSem_160104_invoking_functions_from_specific_places_241 |verify that the `timer.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|242 |NegSem_160104_invoking_functions_from_specific_places_242 |verify that the `timer.running` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|243 |NegSem_160104_invoking_functions_from_specific_places_243 |verify that the `read` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|244 |NegSem_160104_invoking_functions_from_specific_places_244 |verify that the `timeout` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|245 |NegSem_160104_invoking_functions_from_specific_places_245 |verify that a non-deterministic external function call cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|246 |NegSem_160104_invoking_functions_from_specific_places_246 |verify that the predefined `rnd` function cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|247 |NegSem_160104_invoking_functions_from_specific_places_247 |verify a function called in a guard of an `altstep` cannot contain an assignment of a component variable |Clause 16.1.4 |m |n -|248 |NegSem_160104_invoking_functions_from_specific_places_248 |verify a function called in a guard of an `altstep` cannot contain a component variable used as an actual `out` parameter |Clause 16.1.4 |m |n -|249 |NegSem_160104_invoking_functions_from_specific_places_249 |verify a function called in a guard of an `altstep` cannot contain a component variable used as an actual `inout` parameter |Clause 16.1.4 |m |n -|250 |NegSem_160104_invoking_functions_from_specific_places_250 |verify that the `setverdict` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|251 |NegSem_160104_invoking_functions_from_specific_places_251 |verify that the `activate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|252 |NegSem_160104_invoking_functions_from_specific_places_252 |verify that the `deactivate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |n -|253 |NegSem_160104_invoking_functions_from_specific_places_253 |verify that a function called from a `guard` statement of an altstep cannot contain `out` parameters |Clause 16.1.4 |m |n -|254 |NegSem_160104_invoking_functions_from_specific_places_254 |verify that a function called from a `guard` statement of an altstep cannot contain `inout` parameters |Clause 16.1.4 |m |n +|87 |NegSem_160104_invoking_functions_from_specific_places_087 |verify that the `create` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|88 |NegSem_160104_invoking_functions_from_specific_places_088 |verify that the `component.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|89 |NegSem_160104_invoking_functions_from_specific_places_089 |verify that the `component.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|90 |NegSem_160104_invoking_functions_from_specific_places_090 |verify that the `kill` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|91 |NegSem_160104_invoking_functions_from_specific_places_091 |verify that the `component.running` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|92 |NegSem_160104_invoking_functions_from_specific_places_092 |verify that the `alive` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|93 |NegSem_160104_invoking_functions_from_specific_places_093 |verify that the `done` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|94 |NegSem_160104_invoking_functions_from_specific_places_094 |verify that the `killed` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|95 |NegSem_160104_invoking_functions_from_specific_places_095 |verify that the `port.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|96 |NegSem_160104_invoking_functions_from_specific_places_096 |verify that the `port.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|97 |NegSem_160104_invoking_functions_from_specific_places_097 |verify that the `halt` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|98 |NegSem_160104_invoking_functions_from_specific_places_098 |verify that the `clear` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|99 |NegSem_160104_invoking_functions_from_specific_places_099 |verify that the `checkstate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|100 |NegSem_160104_invoking_functions_from_specific_places_100 |verify that the `send` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|101 |NegSem_160104_invoking_functions_from_specific_places_101 |verify that the `receive` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|102 |NegSem_160104_invoking_functions_from_specific_places_102 |verify that the `trigger` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|103 |NegSem_160104_invoking_functions_from_specific_places_103 |verify that the `call` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|104 |NegSem_160104_invoking_functions_from_specific_places_104 |verify that the `getcall` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|105 |NegSem_160104_invoking_functions_from_specific_places_105 |verify that the `reply` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|106 |NegSem_160104_invoking_functions_from_specific_places_106 |verify that the `getreply` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|107 |NegSem_160104_invoking_functions_from_specific_places_107 |verify that the `raise` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|108 |NegSem_160104_invoking_functions_from_specific_places_108 |verify that the `catch` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|109 |NegSem_160104_invoking_functions_from_specific_places_109 |verify that the `check` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|110 |NegSem_160104_invoking_functions_from_specific_places_110 |verify that the `connect` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|111 |NegSem_160104_invoking_functions_from_specific_places_111 |verify that the `disconnect` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|112 |NegSem_160104_invoking_functions_from_specific_places_112 |verify that the `map` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|113 |NegSem_160104_invoking_functions_from_specific_places_113 |verify that the `unmap` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|114 |NegSem_160104_invoking_functions_from_specific_places_114 |verify that the `action` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|115 |NegSem_160104_invoking_functions_from_specific_places_115 |verify that the `timer.start` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|116 |NegSem_160104_invoking_functions_from_specific_places_116 |verify that the `timer.stop` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|117 |NegSem_160104_invoking_functions_from_specific_places_117 |verify that the `timer.running` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|118 |NegSem_160104_invoking_functions_from_specific_places_118 |verify that the `read` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|119 |NegSem_160104_invoking_functions_from_specific_places_119 |verify that the `timeout` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|120 |NegSem_160104_invoking_functions_from_specific_places_120 |verify that a non-deterministic external function call cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|121 |NegSem_160104_invoking_functions_from_specific_places_121 |verify that the predefined `rnd` function cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|122 |NegSem_160104_invoking_functions_from_specific_places_122 |verify a function called during receiving operation cannot contain an assignment of a component variable (in in-line templates) |Clause 16.1.4 |m |y +|123 |NegSem_160104_invoking_functions_from_specific_places_123 |verify a function called during receiving operation cannot contain a component variable used as an actual `out` parameter (in in-line templates) |Clause 16.1.4 |m |y +|124 |NegSem_160104_invoking_functions_from_specific_places_124 |verify a function called during receiving operation cannot contain a component variable used as an actual `inout` parameter (in in-line templates) |Clause 16.1.4 |m |y +|125 |NegSem_160104_invoking_functions_from_specific_places_125 |verify that the `setverdict` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|126 |NegSem_160104_invoking_functions_from_specific_places_126 |verify that the `activate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|127 |NegSem_160104_invoking_functions_from_specific_places_127 |verify that the `deactivate` operation cannot be used in a function called during receiving operation (in in-line templates) |Clause 16.1.4 |m |y +|128 |NegSem_160104_invoking_functions_from_specific_places_128 |verify a function called during receiving operation cannot contain an `out` parameter (in in-line templates) |Clause 16.1.4 |m |y +|129 |NegSem_160104_invoking_functions_from_specific_places_129 |verify a function called during receiving operation cannot contain an `inout` parameter (in in-line templates) |Clause 16.1.4 |m |y +|130 |NegSem_160104_invoking_functions_from_specific_places_130 |verify that the `create` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|131 |NegSem_160104_invoking_functions_from_specific_places_131 |verify that the `component.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|132 |NegSem_160104_invoking_functions_from_specific_places_132 |verify that the `component.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|133 |NegSem_160104_invoking_functions_from_specific_places_133 |verify that the `kill` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|134 |NegSem_160104_invoking_functions_from_specific_places_134 |verify that the `component.running` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|135 |NegSem_160104_invoking_functions_from_specific_places_135 |verify that the `alive` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|136 |NegSem_160104_invoking_functions_from_specific_places_136 |verify that the `done` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|137 |NegSem_160104_invoking_functions_from_specific_places_137 |verify that the `killed` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|138 |NegSem_160104_invoking_functions_from_specific_places_138 |verify that the `port.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|139 |NegSem_160104_invoking_functions_from_specific_places_139 |verify that the `port.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|140 |NegSem_160104_invoking_functions_from_specific_places_140 |verify that the `halt` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|141 |NegSem_160104_invoking_functions_from_specific_places_141 |verify that the `clear` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|142 |NegSem_160104_invoking_functions_from_specific_places_142 |verify that the `checkstate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|143 |NegSem_160104_invoking_functions_from_specific_places_143 |verify that the `send` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|144 |NegSem_160104_invoking_functions_from_specific_places_144 |verify that the `receive` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|145 |NegSem_160104_invoking_functions_from_specific_places_145 |verify that the `trigger` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|146 |NegSem_160104_invoking_functions_from_specific_places_146 |verify that the `call` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|147 |NegSem_160104_invoking_functions_from_specific_places_147 |verify that the `getcall` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|148 |NegSem_160104_invoking_functions_from_specific_places_148 |verify that the `reply` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|149 |NegSem_160104_invoking_functions_from_specific_places_149 |verify that the `getreply` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|150 |NegSem_160104_invoking_functions_from_specific_places_150 |verify that the `raise` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|151 |NegSem_160104_invoking_functions_from_specific_places_151 |verify that the `catch` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|152 |NegSem_160104_invoking_functions_from_specific_places_152 |verify that the `check` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|153 |NegSem_160104_invoking_functions_from_specific_places_153 |verify that the `connect` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|154 |NegSem_160104_invoking_functions_from_specific_places_154 |verify that the `disconnect` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|155 |NegSem_160104_invoking_functions_from_specific_places_155 |verify that the `map` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|156 |NegSem_160104_invoking_functions_from_specific_places_156 |verify that the `unmap` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|157 |NegSem_160104_invoking_functions_from_specific_places_157 |verify that the `action` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|158 |NegSem_160104_invoking_functions_from_specific_places_158 |verify that the `timer.start` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|159 |NegSem_160104_invoking_functions_from_specific_places_159 |verify that the `timer.stop` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|160 |NegSem_160104_invoking_functions_from_specific_places_160 |verify that the `timer.running` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|161 |NegSem_160104_invoking_functions_from_specific_places_161 |verify that the `read` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|162 |NegSem_160104_invoking_functions_from_specific_places_162 |verify that the `timeout` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|163 |NegSem_160104_invoking_functions_from_specific_places_163 |verify that a non-deterministic external function call cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|164 |NegSem_160104_invoking_functions_from_specific_places_164 |verify that the predefined `rnd` function cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|165 |NegSem_160104_invoking_functions_from_specific_places_165 |verify a function called during receiving operation cannot contain an assignment of a component variable (as actual parameters) |Clause 16.1.4 |m |y +|166 |NegSem_160104_invoking_functions_from_specific_places_166 |verify a function called during receiving operation cannot contain a component variable used as an actual out parameter (as actual parameters) |Clause 16.1.4 |m |y +|167 |NegSem_160104_invoking_functions_from_specific_places_167 |verify a function called during receiving operation cannot contain a component variable used as an actual `inout` parameter (as actual parameters) |Clause 16.1.4 |m |y +|168 |NegSem_160104_invoking_functions_from_specific_places_168 |verify that the `setverdict` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|169 |NegSem_160104_invoking_functions_from_specific_places_169 |verify that the `activate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|170 |NegSem_160104_invoking_functions_from_specific_places_170 |verify that the `deactivate` operation cannot be used in a function called during receiving operation (as actual parameters) |Clause 16.1.4 |m |y +|171 |NegSem_160104_invoking_functions_from_specific_places_171 |verify a function called during receiving operation cannot contain an out parameter (as actual parameters) |Clause 16.1.4 |m |y +|172 |NegSem_160104_invoking_functions_from_specific_places_172 |verify a function called during receiving operation cannot contain an `inout` parameter (as actual parameters) |Clause 16.1.4 |m |y +|173 |NegSem_160104_invoking_functions_from_specific_places_173 |verify that the `create` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|174 |NegSem_160104_invoking_functions_from_specific_places_174 |verify that the `component.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|175 |NegSem_160104_invoking_functions_from_specific_places_175 |verify that the `component.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|176 |NegSem_160104_invoking_functions_from_specific_places_176 |verify that the `kill` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|177 |NegSem_160104_invoking_functions_from_specific_places_177 |verify that the `component.running` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|178 |NegSem_160104_invoking_functions_from_specific_places_178 |verify that the `alive` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|179 |NegSem_160104_invoking_functions_from_specific_places_179 |verify that the `done` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|180 |NegSem_160104_invoking_functions_from_specific_places_180 |verify that the `killed` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|181 |NegSem_160104_invoking_functions_from_specific_places_181 |verify that the `port.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|182 |NegSem_160104_invoking_functions_from_specific_places_182 |verify that the `port.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|183 |NegSem_160104_invoking_functions_from_specific_places_183 |verify that the `halt` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|184 |NegSem_160104_invoking_functions_from_specific_places_184 |verify that the `clear` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|185 |NegSem_160104_invoking_functions_from_specific_places_185 |verify that the `checkstate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|186 |NegSem_160104_invoking_functions_from_specific_places_186 |verify that the `send` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|187 |NegSem_160104_invoking_functions_from_specific_places_187 |verify that the `receive` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|188 |NegSem_160104_invoking_functions_from_specific_places_188 |verify that the `trigger` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|189 |NegSem_160104_invoking_functions_from_specific_places_189 |verify that the `call` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|190 |NegSem_160104_invoking_functions_from_specific_places_190 |verify that the `getcall` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|191 |NegSem_160104_invoking_functions_from_specific_places_191 |verify that the `reply` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|192 |NegSem_160104_invoking_functions_from_specific_places_192 |verify that the `getreply` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|193 |NegSem_160104_invoking_functions_from_specific_places_193 |verify that the `raise` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|194 |NegSem_160104_invoking_functions_from_specific_places_194 |verify that the `catch` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|195 |NegSem_160104_invoking_functions_from_specific_places_195 |verify that the `check` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|196 |NegSem_160104_invoking_functions_from_specific_places_196 |verify that the `connect` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|197 |NegSem_160104_invoking_functions_from_specific_places_197 |verify that the `disconnect` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|198 |NegSem_160104_invoking_functions_from_specific_places_198 |verify that the `map` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|199 |NegSem_160104_invoking_functions_from_specific_places_199 |verify that the `unmap` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|200 |NegSem_160104_invoking_functions_from_specific_places_200 |verify that the `action` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|201 |NegSem_160104_invoking_functions_from_specific_places_201 |verify that the `timer.start` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|202 |NegSem_160104_invoking_functions_from_specific_places_202 |verify that the `timer.stop` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|203 |NegSem_160104_invoking_functions_from_specific_places_203 |verify that the `timer.running` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|204 |NegSem_160104_invoking_functions_from_specific_places_204 |verify that the `read` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|205 |NegSem_160104_invoking_functions_from_specific_places_205 |verify that the `timeout` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|206 |NegSem_160104_invoking_functions_from_specific_places_206 |verify a function called in a guard of an `alt` statement cannot contain an assignment of a component variable |Clause 16.1.4 |m |y +|207 |NegSem_160104_invoking_functions_from_specific_places_207 |verify a function called in a guard of an `alt` statement cannot contain a component variable used as an actual `out` parameter |Clause 16.1.4 |m |y +|208 |NegSem_160104_invoking_functions_from_specific_places_208 |verify a function called in a guard of an `alt` statement cannot contain a component variable used as an actual `inout` parameter |Clause 16.1.4 |m |y +|209 |NegSem_160104_invoking_functions_from_specific_places_209 |verify that the `activate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|210 |NegSem_160104_invoking_functions_from_specific_places_210 |verify that the `deactivate` operation cannot be used in guards of `alt` statements |Clause 16.1.4 |m |y +|211 |NegSem_160104_invoking_functions_from_specific_places_211 |verify that a function called from a `guard` statement of an `alt` operation cannot contain `out` parameters |Clause 16.1.4 |m |y +|212 |NegSem_160104_invoking_functions_from_specific_places_212 |verify that the `create` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|213 |NegSem_160104_invoking_functions_from_specific_places_213 |verify that the `component.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|214 |NegSem_160104_invoking_functions_from_specific_places_214 |verify that the `component.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|215 |NegSem_160104_invoking_functions_from_specific_places_215 |verify that the `kill` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|216 |NegSem_160104_invoking_functions_from_specific_places_216 |verify that the `component.running` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|217 |NegSem_160104_invoking_functions_from_specific_places_217 |verify that the `alive` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|218 |NegSem_160104_invoking_functions_from_specific_places_218 |verify that the `done` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|219 |NegSem_160104_invoking_functions_from_specific_places_219 |verify that the `killed` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|220 |NegSem_160104_invoking_functions_from_specific_places_220 |verify that the `port.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|221 |NegSem_160104_invoking_functions_from_specific_places_221 |verify that the `port.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|222 |NegSem_160104_invoking_functions_from_specific_places_222 |verify that the `halt` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|223 |NegSem_160104_invoking_functions_from_specific_places_223 |verify that the `clear` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|224 |NegSem_160104_invoking_functions_from_specific_places_224 |verify that the `checkstate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|225 |NegSem_160104_invoking_functions_from_specific_places_225 |verify that the `send` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|226 |NegSem_160104_invoking_functions_from_specific_places_226 |verify that the `receive` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|227 |NegSem_160104_invoking_functions_from_specific_places_227 |verify that the `trigger` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|228 |NegSem_160104_invoking_functions_from_specific_places_228 |verify that the `call` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|229 |NegSem_160104_invoking_functions_from_specific_places_229 |verify that the `getcall` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|230 |NegSem_160104_invoking_functions_from_specific_places_230 |verify that the `reply` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|231 |NegSem_160104_invoking_functions_from_specific_places_231 |verify that the `getreply` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|232 |NegSem_160104_invoking_functions_from_specific_places_232 |verify that the `raise` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|233 |NegSem_160104_invoking_functions_from_specific_places_233 |verify that the `catch` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|234 |NegSem_160104_invoking_functions_from_specific_places_234 |verify that the `check` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|235 |NegSem_160104_invoking_functions_from_specific_places_235 |verify that the `connect` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|236 |NegSem_160104_invoking_functions_from_specific_places_236 |verify that the `disconnect` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|237 |NegSem_160104_invoking_functions_from_specific_places_237 |verify that the `map` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|238 |NegSem_160104_invoking_functions_from_specific_places_238 |verify that the `unmap` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|239 |NegSem_160104_invoking_functions_from_specific_places_239 |verify that the `action` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|240 |NegSem_160104_invoking_functions_from_specific_places_240 |verify that the `timer.start` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|241 |NegSem_160104_invoking_functions_from_specific_places_241 |verify that the `timer.stop` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|242 |NegSem_160104_invoking_functions_from_specific_places_242 |verify that the `timer.running` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|243 |NegSem_160104_invoking_functions_from_specific_places_243 |verify that the `read` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|244 |NegSem_160104_invoking_functions_from_specific_places_244 |verify that the `timeout` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|245 |NegSem_160104_invoking_functions_from_specific_places_245 |verify that a non-deterministic external function call cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|246 |NegSem_160104_invoking_functions_from_specific_places_246 |verify that the predefined `rnd` function cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|247 |NegSem_160104_invoking_functions_from_specific_places_247 |verify a function called in a guard of an `altstep` cannot contain an assignment of a component variable |Clause 16.1.4 |m |y +|248 |NegSem_160104_invoking_functions_from_specific_places_248 |verify a function called in a guard of an `altstep` cannot contain a component variable used as an actual `out` parameter |Clause 16.1.4 |m |y +|249 |NegSem_160104_invoking_functions_from_specific_places_249 |verify a function called in a guard of an `altstep` cannot contain a component variable used as an actual `inout` parameter |Clause 16.1.4 |m |y +|250 |NegSem_160104_invoking_functions_from_specific_places_250 |verify that the `setverdict` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|251 |NegSem_160104_invoking_functions_from_specific_places_251 |verify that the `activate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|252 |NegSem_160104_invoking_functions_from_specific_places_252 |verify that the `deactivate` operation cannot be used in guards of altsteps |Clause 16.1.4 |m |y +|253 |NegSem_160104_invoking_functions_from_specific_places_253 |verify that a function called from a `guard` statement of an altstep cannot contain `out` parameters |Clause 16.1.4 |m |y +|254 |NegSem_160104_invoking_functions_from_specific_places_254 |verify that a function called from a `guard` statement of an altstep cannot contain `inout` parameters |Clause 16.1.4 |m |y |255 |NegSem_160104_invoking_functions_from_specific_places_255 |verify that the `create` operation cannot be used in altstep local definitions |Clause 16.1.4 |m |n |256 |NegSem_160104_invoking_functions_from_specific_places_256 |verify that the `component.start` operation cannot be used in altstep local definitions |Clause 16.1.4 |m |n |257 |NegSem_160104_invoking_functions_from_specific_places_257 |verify that the `component.stop` operation cannot be used in altstep local definitions |Clause 16.1.4 |m |n