prodigy.pgcl.pysmt.context

Translation Context

The translation of pGCL programs to pySMT requires a few details to be known: How to translate variables to pySMT, how to handle infinities, and so on. The TranslationContext handles all that.

class TranslationContext(variables, infinity=None, id_subst=None)[source]

Bases: object

Context used for translation of pGCL parts.

Parameters:
variables: Dict[str, FNode]
infinity: FNode
id_subst: Dict[FNode, FNode]
static from_program(program)[source]

Create a new TranslationContext from a pGCL program’s declared variables.

Parameters:

program (Program)

Return type:

TranslationContext