Duda
Duda

Reputation: 3736

clingo: separate answer set atoms with newline

I'd like to know if there is an easy possibility to separate the predicates within an answer set by a newline instead of spaces. Example:

node(1..3).

called with

clingo path.lp 

gives

clingo version 5.4.0
Reading from .../path.lp
Solving...
Answer: 1
node(1) node(2) node(3)
SATISFIABLE

But I would like to have this output

clingo version 5.4.0
Reading from .../path.lp
Solving...
Answer: 1
node(1) 
node(2) 
node(3) 
SATISFIABLE

Upvotes: 1

Views: 320

Answers (1)

Duda
Duda

Reputation: 3736

Found it. I call

clingo path.lp --out-ifs=\\n 

instead of

clingo path.lp 

Upvotes: 1

Related Questions