// ************************************************************************** //
//                                                                            //
//    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                                             //
//                                                                            //
// ************************************************************************** //
// This module is analogous to CondStat2.qrz in that the conditional statement//
// has been replaced by a conditional expression. The following guarded       //
// actions are obtained:                                                      //
//  * True => error = 0<i&a[i+2]                                              //
//  * True => assert i+2<2                                                    //
// While there is a big difference between CondStat1 and CondExpr1, the       //
// difference between CondStat2 and CondExpr2 is marginal. In both cases, the //
// expression "0<i&a[i+2]" evaluates to false, so that variable "error" is    //
// assigned false. However, in both cases, the assertion fails.               //
// ************************************************************************** //


module CondExpr2(nat ?i,[2]bool ?a,event !error) {
    error = (i>0 & a[i+2] ? true : false);
}
drivenby {
    nothing;
}