IG Script Syntax Guide for the Encoding of Institutional Statements in the IG Parser

 

Note: The guide provided below is intentionally brief, and primarily focuses on essential syntactic features. A comprehensive overview of the IG Script notation supported by the IG Parser, as well as resources covering the conceptual foundations of the IG 2.0 more generally, can be found here (opens new tab).

The 'Encoded Statement' field in the IG Parser UI is where the actual encoding of the institutional statement in the IG Script syntax occurs.

The IG Script syntax knows four distinct cases to facilitate the encoding:

1.) Basic component coding as well as component combinations:
The basic structure of a statement is the component symbol (e.g., A -- see the list of all component symbols supported by the IG Parser at the bottom), immediately followed by the coded text in parentheses, e.g., A(certifying agent).
Within the coded component, logical combinations of type [AND], [OR], and [XOR] are supported, e.g., A(Both (certifying agent [AND] inspector)) .... (In this example, only 'certifying agent' and 'inspector' are part of the combination; 'Both' is not part of it.)
Note the use of parentheses to indicate scope within the component text. As indicated above, parentheses are relevant if the scope of combinations lies within the component (e.g., A(Both (certifying agent [AND] inspector)) ... ) but also for the indication of precedence in the case of nested combinations of multiple values linked by different logical operators (e.g., A(farmer [XOR] (certifying agent [AND] inspector)) ... ). In all other cases the parser assumes that all component content is part of the combination (i.e., if a logical operator is present), (i.e., A(first [AND] second) is the same as A((first [AND] second))).

Example 1: A(Concert visitors) D(must) I(present) Bdir(tickets) to Bind(agent) at the Cex(venue).
Note: Text outside any encoded component (here: to and at the) is ignored during parsing.

Example 2: A(Both (concert visitors [AND] reporters)) D(must) I(present) Bdir,p(corresponding) Bdir(tickets) to Bind(agent [XOR] security personnel) at the Cex(venue).
Note: This example displays variably scoped component combinations as well as the coding of properties (in this case for the direct object; see supported property symbols for other components (e.g., A,p) in the table at the bottom).

2.) Nested components ("component-level nesting" in IG):
Component-level nesting (i.e., the substitution of component content with entire statements) applies when a single component is further decomposed into individual elements, e.g., an activation condition that captures a distinctive event such as Cac{A(certifier) I(observes) Bdir(violation)} (read: "if certifier observes violation, ..."), including the combination of components as in the previous case (e.g., Cac{A(certifier) I((observes [AND] reports)) Bdir(violation)})

Example: A(Agent) D(must) I(reject) Bdir(admission) Cac{A(concert visitor) I(refuses to present) Bdir(ticket)}.
Note: Nesting is supported on all property types (as detailed below), Activation conditions (Cac{}), Execution constraints (Cex{}), and the Or else component (O{}).

3.) Nested statement combinations:
Nested statement combinations occur if multiple distinct nested components are logically linked. For instance, if two functionally distinct activation conditions apply, such as "certifier observes violation" OR "certified agent requests revocation". Using braces (i.e., { and }), such combinations can be encoded as follows Cac{Cac{A(certifier) I(observes) Bdir(violation)} [OR] Cac{A,p(certified) A(agent) I(revokes) Bdir(revocation)}}. Central aspect here is to indicate the distinctive component type preceding the braces (activation conditions should only be combined with activation conditions, for instance).

Example: A(Agent) D(must) I(reject) Bdir(admission) Cac{Cac{A(visitor) I(refuses to present) Bdir(ticket)} [OR] Cac{A(organizer) I(cancels) Bdir(event)}}.
Note: This applies to all components that support component-level nesting (see table at the bottom). Nested statement combinations can, similar to nested components, contain component combinations.

4.) Component pair combinations:
Component pair combinations are similar to the previous case, but instead of applying to completely distinctive expressions, they apply in cases where some but not all parts of the statement (pairs of components, hence "component pairs") are different, such as "certifiers must review certification procedure and monitor compliance". This would be encoded as A(Certifiers) D(must) {I(review) Bdir(certification procedures) [AND] I(monitor) Bdir(compliance)}. Note the use of braces to signal the component pairs that are distinct (here "review certification procedures" and "monitor compliance", both of which consist of a distinct aim and direct object), but are, in this instance, executed by the same actor (here: "certifiers").

Example 1: A(Agent) D(must) {I(reject) Bdir(admission) [AND] I(report) Bdir(occurrence)}
Note: Component pairs can consist of any type and number of components (e.g., {A(actor1) D(must) I(perform action 1) [XOR] A(actor2) D(may) I(perform action2)} Cac(Under any circumstance)), and also applies to nested components (e.g., in an activation condition, such as Cac{A(actor) {I(action1) Bdir(object1) [XOR] I(action2) Bdir(object2)}}). Component pairs can further embed any form of the syntactic cases introduced above (component combinations, nested statements and nested statement combinations).

Example 2: A(Agent) D(must) {I(reject) Bdir(admission) [AND] {I(report) Bdir(occurrence) [OR] I(consult) Bdir(supervisor)}}
Note: This example shows the combination of multiple component pairs with explicit linkage via logical operators. On a given nesting level (e.g., on top-level statement, within nested component), only one component pair expression (including nested linkages as shown above) is necessary to capture any number of component pair alternatives. The parser will offer a corresponding indication if multiple separate component pairs are identified in the coded statement.

Additional features (Suffixes, Semantic Annotations)
IG Script supports additional features specifically aimed at handling property associations and facilitating semantic annotations:

Suffixes
This includes the use of suffixes to indicate exclusive linkages between properties and associated components (e.g., Bdir1,p(violating) Bdir1(citizens) as well as Bdir2,p(compliant) Bdir2(customers) indicating that the properties are exclusively associated with the given corresponding object, i.e., as "violating citizens" and "compliant customers", respectively). This principle applies to most component types and is described at greater detail in the comprehensive syntax overview (linked at the top of the page).

Semantic annotations
The parser further supports the encoding of semantic annotations, reflecting IG Logico's focus on capturing semantic information associated with component values (e.g., A[type=animate](Officer)). Such annotations apply to any component and can be combined with suffixes indicating private component relationships (e.g., A1,p[prop=qualitative](personal) A1[type=animate](agent)).They can further be used to annotate nested components (e.g., Cac[event=violation]{ A(actor) I(violates) ... }), as well as combinations thereof (e.g., Cac[state=condition]{Cac[event=violation]{ A(actor) I(violates) ... } [OR] Cac[event=non-compliance]{ A(actor) I(does not comply) ... }}).

Supported IG Script symbols for the encoding of components include (with indication of support for component-level nesting where applicable):

IG Script SymbolCorresponding IG 2.0 Component
AAttributes
A,pAttributes Property*
DDeontic
IAim
BdirDirect Object*
Bdir,pDirect Object Property*
BindIndirect Object*
Bind,pIndirect Object Property*
CacActivation Condition*
CexExecution Constraint*
EConstituted Entity
E,pConstituted Entity Property*
MModal
FConstitutive Function
PConstituting Properties*
P,pConstituting Properties Properties*
OOr Else**

* In addition to component annotation, these components support component-level nesting, with braces scoping the nested statements (e.g., Bdir{ ... }, Bdir,p{ ... }, etc.).
** The Or else component only allows component-level nesting (i.e., substitution by an entire statement).