Skip to content

API reference

pd2af does one thing in three steps, and the package follows them: core checks the arguments and runs the transformation, asp asks clingo what the activities and influences are, and building turns the answer into a map.

Top level

  • Core: the public transform() entry point and the TransformerResult it returns
  • Modes: everything a user chooses from, the input languages, the layout modes, the influence pairings and the transformation modes
  • CLI: command-line entry point

asp: the question asked to clingo

  • Solver: build the clingo control, solve, and return the answer with the element registry
  • Rules: the rule groups and the composition of a mode's ASP program
  • Predicates: the clorm predicates the program and the builders share

building: turning the answer into a map

Shared by both output languages:

  • Context: the slots the model pass fills and the layout pass reads back
  • Model: the model pass steps that are the same for either language
  • Layout: the layout helpers that are the same for either language, styling, arcs and dot
  • Provenance: where each output element comes from, and the annotations and notes it inherits

CellDesigner output:

SBGN-AF output: