PSyIR Examples#

Examples may all be found in the examples/psyir directory. Read the README.md file in this directory for full details.

Example 1: Constructing PSyIR and Generating Code#

create.py is a Python script that demonstrates the use of the various create methods to build a PSyIR tree from scratch.

Example 2: Creating PSyIR for Structure Types#

create_structure_types.py demonstrates the representation of structure types (i.e. Fortran derived types or C structs) in the PSyIR.