Blame view

code/drafts/explore_01.py 314 Bytes
808facfe   Francisco Coelho   Main text adapted...
1
2
3
4
5
6
7
8
from clingo.control import Control
from clingox.program import Program, ProgramObserver, Remapping

prg = Program()
ctl_a = Control()
ctl_a.register_observer(ProgramObserver(prg))
print(f"<1>\n{prg}\n</1>")

aa257377   Francisco Coelho   Post meeting 2022...
9
prog = "code/asp/alarm.lp"     
808facfe   Francisco Coelho   Main text adapted...
10
11
12
ctl_a.load(prog)
ctl_a.ground([('base', [])])
print(f"<2>\n{prg}\n</2>")