使用 clingo 输出作为 clingo 输入
Use clingo output as clingo input
我想将一些 clingo 调用的输出通过管道传输到另一个 clingo 调用中,这样第一个 clingo 调用的答案集就被视为第二个 clingo 调用的事实。它看起来应该有点像这样:clingo foo.lp | clingo bar.lp
,但是 clingo foo.lp
的输出包含一些额外的行并且答案集的格式在语法上无效。我怎样才能做到这一点?
摘自 https://github.com/potassco/asprilo-encodings/
的 README.md
clingo foo.lp -V0 --out-atomf=%s. | head -n 1 | clingo - bar.lp
我想将一些 clingo 调用的输出通过管道传输到另一个 clingo 调用中,这样第一个 clingo 调用的答案集就被视为第二个 clingo 调用的事实。它看起来应该有点像这样:clingo foo.lp | clingo bar.lp
,但是 clingo foo.lp
的输出包含一些额外的行并且答案集的格式在语法上无效。我怎样才能做到这一点?
摘自 https://github.com/potassco/asprilo-encodings/
的 README.mdclingo foo.lp -V0 --out-atomf=%s. | head -n 1 | clingo - bar.lp