File: test4.elpi

package info (click to toggle)
elpi 2.0.7-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 50,296 kB
  • sloc: ml: 18,791; makefile: 229; python: 95; sh: 7
file content (16 lines) | stat: -rw-r--r-- 344 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
:functional 
pred p i:int, o:int.

:functional
pred q i:int, o:int.

q 1 1.
      /* the local premise keeps q functional! */
p 1 X :- (pi x\ q 2 x :- x = 4) => q 1 X.

p 2 X :- pi x\ q x 2 => q 1 X.

         /* two new local clauses q x 2 and q y 3 are not overlapping, p is functional! */
p 3 X :- pi x\ q x 2 => pi y\ q y 3 => q 1 X.

main.