File: example.lp

package info (click to toggle)
gringo 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,260 kB
  • ctags: 10,755
  • sloc: cpp: 55,049; python: 629; yacc: 569; sh: 124; makefile: 23
file content (4 lines) | stat: -rw-r--r-- 156 bytes parent folder | download | duplicates (7)
1
2
3
4
atom(p(1..10);q).
{ holds(X) : atom(X) } 3.
holds(p(X)) :- holds(p(X-1)), atom(p(X)),     holds(q).
holds(p(X)) :- holds(p(X+1)), atom(p(X)), not holds(q).