Institutional Grammar Book Website

   Home    Book Content    Errata    IG 2.0 Features    FAQ    Coder's Corner    IG Parser    Resources    Events

IG Parser Article Examples

This page lists IG Script-encoded institutional statements examples used as part of the IG Parser introductory article.

Below you find all statements encoded as part of the article, with corresponding links that prepopulate the parser. By default, the links with open the visual output version of the parser. You can interactively switch between visual and tabular output by clicking on the Switch to tabular version of IG Parser link in the UI. While switching between the different UIs all statement information is retained. After clicking on Generate visual output (for the visual output version) and Generate tabular output (for the tabular output version) respectively, you will see the corresponding output generated at the bottom. For tabular output, you can copy the CSV or Google Sheets output (using the corresponding button) and paste it into Excel (using the Text-to-Column feature with pipe (|) as delimiter) or into Google Sheets respectively (it will automatically parse the individual columns into the spreadsheet structure).

UI Parameters relevant to see specific features exemplified in the statements are highlighted alongside the link for the corresponding example.

More details about the supported IG Script features is provided in the IG Parser Readme. To explore more complex examples beyond the ones displayed below, please consider testing the various example statements provided in the IG Parser UI.

Examples in IG Script Section

Cac(If officer observes or is made aware of violation), A(officer) D(must) I(fine and report) Bdir(violator) to Bind(authority).

Open in IG Parser

Cac(If officer observes or is made aware of violation), A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).

Open in IG Parser

Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)}}, A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).

Open in IG Parser

Cac{Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac{if A(officer) I(deems) Bdir(intervention) Cex(safe)}}, A(officer) D(must) I(fine [AND] report) Bdir(violator) to Bind(authority).

Open in IG Parser

Cac{Cac{If A(officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac{if A(officer) I(deems) Bdir(intervention) Cex(safe)}}, A(officer) D(must) {I(fine) Bdir(violator) [AND] I(file) Bdir(report) with Bind(district court)}

Open in IG Parser

Cac{Cac[condition=violation]{If A[role=enforcer](officer) I(observes [XOR] is made aware of) Bdir(violation)} [AND] Cac[condition=safety]{if A[role=enforcer](officer) I(deems) Bdir(intervention) Cex(safe)}}, A[role=enforcer](officer) D[stringency=high](must) {I[act=sanction](fine) Bdir(violator) [AND] I[act=report](file) Bdir(report) with Bind[act=authority](district court)}

Open in IG Parser

Illustrative Example

Cac{Cac[condition=violation]{If A[role=enforcer](officer) I[act=detection](observes [XOR] is made aware of) Bdir(violation)} [AND] Cac[condition=safety]{if A[role=enforcer](officer) I(deems) Bdir(intervention) Cex(safe)}}, A[role=enforcer](officer) D[stringency=high](must) I[act=sanction](fine [AND] report) Bind[role=violator](violator).

Open in IG Parser