File: a.elpi

package info (click to toggle)
elpi 2.0.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 50,296 kB
  • sloc: ml: 18,791; makefile: 229; python: 95; sh: 7
file content (7 lines) | stat: -rw-r--r-- 262 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
type s num -> num.
type zero num.
pred ack i:num, i:num, o:num.
ack zero N V :- !, V = (s N).
ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
main :- ack (s (s (s zero))) (s zero) V, print "V =" V.