Category:CafeOBJ: Difference between revisions
Content added Content deleted
m (→Examples) |
|||
Line 57: | Line 57: | ||
vars N N' : Nat |
vars N N' : Nat |
||
⚫ | |||
-- A very short sorting program using one transition equation in POA logic, which is a type of rewrite logic. |
|||
⚫ | |||
-- There is no need for an intermediate variable to do the swap. |
-- There is no need for an intermediate variable to do the swap. |
||
ceq[swap] : (N N') = (N' N) if N' <= N . |
ceq[swap] : (N N') = (N' N) if N' <= N . |