You can get the kernel language of any piece of code with the Mozart IDE.
You juste have to go under the tab Oz > Core Syntax > Whatever piece of code you want translate into KL
It gives
declare Add in
local UnnestApply1 UnnestApply2 in
proc {Add N Result1}
local IfArbiter1 UnnestApply3 in
UnnestApply3 = 0
IfArbiter1 = N == UnnestApply3
if IfArbiter1 then
Result1 = 0
else
local UnnestApply4 UnnestApply5 UnnestApply6 in
UnnestApply6 = 1
UnnestApply5 = N - UnnestApply6
{Add UnnestApply5 UnnestApply4}
Result1 = N + UnnestApply4
end
end
end
end
UnnestApply2 = 4
{Add UnnestApply2 UnnestApply1}
{Browse UnnestApply1}
end
It may be hard to read, but the tool is really helpful and powerful