[ :unit_def, [ :task_def, "Complete", [ :trackvar_def, "everyoneHappy", [ :event_set, "FirstTask:start" ], [ :event_set ], nil ], [ :fluent_def, "someoneHappy", [ :event_set, "DrinkBeer:start", "DrinkBeers:start" ], [ :event_set, "DoNothingSpecial:end" ], false ], [ :trackvar_def, "endOfTheDay", [ :event_set ], [ :event_set ], nil ], [ :trackvar_def, "somethingToDo", [ :event_set ], [ :event_set ], nil ], [ :trackvar_def, "nothingToDo", [ :event_set ], [ :event_set ], nil ], [ :task_def, "DrinkBeers", [ :while_st, [ :bool_expr, [ :bool_not, [ :var_ref, "drunk" ] ] ], [ :task_call_st, "DrinkBeer" ] ] ], [ :seq_st, [ :task_call_st, "FirstTask" ], [ :if_st, [ :bool_expr, [ :var_ref, "everyoneHappy" ] ], [ :par_st, [ :task_call_st, "MakeJoy" ], [ :task_call_st, "DrinkBeers" ] ], [ :else_clause, [ :if_st, [ :bool_expr, [ :var_ref, "someoneHappy" ] ], [ :task_call_st, "DrinkBeer" ], [ :else_clause, [ :task_call_st, "DoNothingSpecial" ] ] ] ] ], [ :while_st, [ :bool_expr, [ :bool_not, [ :var_ref, "endOfTheDay" ] ] ], [ :case_st, [ :var_ref, "curState" ], [ :when_clause, [ :bool_expr, [ :var_ref, "somethingToDo" ] ], [ :task_call_st, "DoSomething" ] ], [ :when_clause, [ :bool_expr, [ :var_ref, "nothingToDo" ] ], [ :task_call_st, "DoNothing" ] ], [ :else_clause, [ :task_call_st, "WaitAndSee" ] ] ] ] ] ] ]