I wrote the following model:
#define inc(sn)if :: sn < 255 -> sn = sn + 1; ::else -> sn = 1; fi; #define inc_twice(sn) if :: sn+2 >255 -> sn= s