Jump to content

Category:CafeOBJ: Difference between revisions

m
Line 57:
vars N N' : Nat
-- The program is in the form of a conditionsingle conditional equation, which will swap N and N' if N is larger or equal to N'.
-- 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 equation, which will swap N and N' if N is larger or equal to N'.
-- There is no need for an intermediate variable to do the swap.
ceq[swap] : (N N') = (N' N) if N' <= N .
101

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.