// ************************************************************************** //
//                                                                            //
//    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                                             //
//                                                                            //
// ************************************************************************** //
// Again, this program is in analogy to CondStat4. Similar to CondStat4, the  //
// value of local variable a remains unknown. However, the assignment to      //
// variable d is without doubt executed this time, and its rhs expression can //
// be evaluated since b=c=1 holds, and a built-in simplification of expressions//
// reduces this to 1. The compiler generates the following guarded actions:   //
//    a => a = True                                                           //
//    True => b = 1                                                           //
//    True => c = 1                                                           //
//    True => d = a?b:c                                                       //
// ************************************************************************** //


module CondExpr4(nat b,c,d) {
    event a;
    if(a) emit(a);
    b = 1;
    c = 1;
    d = (a?b:c);
}
drivenby {
    nothing;
}