Commit 457192af authored by Lucas Bourneuf's avatar Lucas Bourneuf

use parse_args, that includes careful_parsing, for clyngor solving

parent e1c560a6
......@@ -133,7 +133,7 @@ class Module:
def solve_context(context:str, *, nb_model:int=0) -> clyngor.Answers:
"""Uniformized way to solve an ASP context"""
return clyngor.solve(inline=context, nb_model=nb_model, options='--project').by_predicate.careful_parsing.int_not_parsed
return clyngor.solve(inline=context, nb_model=nb_model, options='--project').by_predicate.parse_args.int_not_parsed
def call_script(script, context:str, verbosity:int=0) -> str:
......@@ -155,7 +155,7 @@ def call_script(script, context:str, verbosity:int=0) -> str:
def aggregated(asp:str) -> str:
"Yield aggregated ASP code, but with atoms of each model merged into a single one"
models = clyngor.solve(inline=asp).careful_parsing.by_predicate.int_not_parsed
models = clyngor.solve(inline=asp).parse_args.by_predicate.int_not_parsed
for idx, model in enumerate(models):
for pred, arglist in model.items():
for args in arglist:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment