newground.main_transformer module

Transforms a program according to newground.

class newground.main_transformer.MainTransformer(*args: Any, **kwargs: Any)

Bases: Transformer

Transforms a program according to newground.

handle_ground_rule(node)

Handle rule which shall be rewritten and is ground.

handle_no_rewrite_rule(node)

Handle rule which shall not be rewritten.

handle_non_ground_rule(node)

Handle rule which shall be rewritten and is non-ground.

visit_Comparison(node)

Visits a clinto-AST comparison. Left and right site of a comparison only supports a subset of possibilities, i.e., Variables, Constants, Binary-Operations, Unary-Operations and functions.

visit_Function(node)

Visits a clingo-AST function.

visit_Literal(node)

Visits a clingo-AST literal.

visit_Minimize(node)

Visit minimize-stmt. in clingo-AST.

visit_Program(node)

Visits a clingo-AST program stmt. (important for distinction for aggregates)

visit_Rule(node)

Visit Rule in clingo-AST.

visit_SymbolicTerm(node)

Visits a clingo-AST symbolic term (constant)

visit_Variable(node)

Visits a clingo-AST variable.