/***************************************************
 ** @author   STF 409
 ** @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
 ** @configuration  external_functions
 ***************************************************/
module NegSem_160104_invoking_functions_from_specific_places_001 {

    type port loopbackPort message {
        inout integer
    }


    type component GeneralComp {
        port loopbackPort messagePort
    }

	/**
	 * @return always true
	 */
    external function xf_NegSem_160104_invoking_functions_from_specific_places_001() return boolean;

    testcase TC_NegSem_160104_invoking_functions_from_specific_places_001 () runs on GeneralComp {
        var integer v_i;

        messagePort.send(1);
        alt {
            //calling an external function in boolean guard
            [xf_NegSem_160104_invoking_functions_from_specific_places_001()] messagePort.receive {
                v_i:=0;
                setverdict(fail);
            }
            [] messagePort.receive { v_i:=1; }
        }

    }

    control{

        execute(TC_NegSem_160104_invoking_functions_from_specific_places_001());

    }

}
