Category:CafeOBJ: Difference between revisions
Content added Content deleted
Line 47: | Line 47: | ||
vars N N' : Nat |
vars N N' : Nat |
||
-- A very short sorting program using |
-- A very short sorting program using one transition equation in POA logic, which is a type of rewrite logic. |
||
-- The program is in the form of a condition transition, which will swap N and N' if N is larger or equal to N'. |
-- The program is in the form of a condition transition, which will swap N and N' if N is larger or equal to N'. |
||
-- This is a equation in POA logic so there is no need for an intermediate variable to do the swap. |
-- This is a equation in POA logic so there is no need for an intermediate variable to do the swap. |