/***************************************************
 ** @author   STF 572
 ** @version  0.0.1
 ** @purpose  1:15.0, verify that a function called during evaluation of a deterministic fuzzy template cannot contain fuzzy variables
 ** @verdict  pass reject
 ***************************************************/

// The following requirement is tested:
// For a fuzzy template that is declared deterministic the template body shall fulfill the restrictions imposed
// on content of functions used in special places given in clause 16.1.4.
// The following operations shall not be used:
// k) Calling functions and external functions with @fuzzy formal parameters and variables (see notes 4 and 9).

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

    type component GeneralComp {
        port P p;
	}

	function f_test() return template integer {
        var @fuzzy integer v_int := f_eval();
		return (0..v_int);
	}

    function f_eval() return integer {
        return 100;
    }

    testcase TC_NegSem_1500_general_048() runs on GeneralComp system GeneralComp {
        template @fuzzy @deterministic integer mw_test := f_test();
        log(mw_test); // causes evaluation
		setverdict(pass);
	}

	control {
		execute(TC_NegSem_1500_general_048());
	}
}
