/***************************************************
 ** @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
 ***************************************************/
module NegSem_160104_invoking_functions_from_specific_places_004 {

    type port loopbackPort message {
        inout integer
    }


    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;

        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());

    }

}
