// **************************************************************************
//
//    eses                   eses
//   eses                     eses
//  eses    eseses  esesese    eses   Embedded Systems Group
//  ese    ese  ese ese         ese
//  ese    eseseses eseseses    ese   Department of Computer Science
//  eses   eses          ese   eses
//   eses   eseses  eseseses  eses    University of Kaiserslautern
//    eses                   eses
//
// **************************************************************************
//
// The example has a loop statement inside of which there is a flow statement 
// that contains an exponetial function.
// The difference of the three ExpFlowLoop files is the release condition.
// 
// **************************************************************************




module ExpFlowLoop1(){
    hybrid real x;
    hybrid real y;

    x = 1.0;
    y = 2.0;
       
    loop{
	flow{
	    drv(y) <- -exp(cont(x),2);
	    drv(x) <- 1.0;
	}until(cont(y)<=0.0);
	next(y) = 1.0;
	flow{}until(true);
    }
} drivenby {
    for(i = 0..4)
        pause;
}