File: README

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 (23 lines) | stat: -rw-r--r-- 551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
This example just starts an ipython interpreter, which allows for working
with a logic program interactively. A session could looks like this:
    $ clingo ipython.py
    clingo version 4.1
    Reading from ipython.py
    In [1]: prg.add("base", [], "a.")

    In [2]: prg.ground("base", [])

    In [3]: prg.solve()
    Solving...
    Answer: 1
    a
    Out[3]: SAT

    In [4]: exit

    SATISFIABLE

    Models       : 1+    
    Calls        : 1
    Time         : 22.762s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
    CPU Time     : 0.170s