Skip to content

Preprocessor

Contains functions for preprocessing COOM ASP facts and checking user input

log = get_logger('main') module-attribute

_parse_user_input_warnings(warning: Symbol) -> str

Parses the warning/2 predicates of the user input check

check_user_input(facts: str) -> None

Checks if the user input is valid and returns a clingo.SolveResult

get_encoding(file_name: str) -> str

Gets the path to a given ASP encoding in the encodings folder

Parameters:

Name Type Description Default
file_name str

The name of the ASP encoding with the extension

required

Returns:

Name Type Description
str str

The string for the path to the ASP encoding

get_logger(name: str) -> logging.Logger

Get a logger with the given name.

preprocess(files: List[str], max_bound: int = 99, discrete: bool = False) -> List[str]

Preprocesses COOM ASP facts into a "grounded" configuration fact format