prodigy.web.examples

The example library of the web GUI: the programs in pgfexamples/.

The first line of every example says how it is meant to be run (see pgfexamples/README.md), e.g. # check_equality prog.pgcl invariants/prog_invariant.pgcl. From that line the library derives a suggested setup for the GUI: an invariant for the loop, invariant synthesis, or plain analysis.

default_examples_dir()[source]

pgfexamples of the source checkout this package lives in, or the copy inside the installed package (prodigy/pgfexamples, see pyproject.toml), if present.

Return type:

Path | None

class Example(id, title, category, command, args=list(), known_issue=False)[source]

Bases: object

Parameters:
id: str
title: str
category: List[str]
command: str
args: List[str]
known_issue: bool = False
to_json()[source]
Return type:

Dict[str, Any]

class ExampleLibrary(root)[source]

Bases: object

Parameters:

root (str | PathLike | None)

property examples: List[Example]
list()[source]
Return type:

List[Dict[str, Any]]

load(example_id)[source]
Parameters:

example_id (str)

Return type:

Dict[str, Any]