/***************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:5.4.1.2, verify that non-deterministic lazy template parameter cannot be used in deteministic context
 ** @verdict  pass reject
 ***************************************************/

// The following requirement is tested:
// Restriction j
// If a lazy or fuzzy template parameter is used in deterministic contexts (i.e. during the evaluation of a snapshot or initialization
// of global non-fuzzy templates), it shall be declared @deterministic.

module NegSem_05040102_parameters_of_kind_template_020 {
    type port P message {
        inout integer;
    }

    type component GeneralComp {
        port P p;
	}

	function f_test(template @lazy integer p_param1) runs on GeneralComp {
		p.send(1);
		p.receive(p_param1);
	}

    testcase TC_NegSem_05040102_parameters_of_kind_template_020() runs on GeneralComp system GeneralComp {
        connect(mtc:p, mtc:p);
		f_test(?);
		setverdict(pass);
	}

	control {
		execute(TC_NegSem_05040102_parameters_of_kind_template_020());
	}
}
