Relation Encoding - Zistack/program-modeling-language GitHub Wiki


relation <relation_identifier> encoding <encoding_identifier> with alphabet <enum_identifier> = <encoded_graph>

This primitive allows internal relations to be encoded. The enum identifier specifies an enum type to be used as an alphabet for the node declarations in the encoded graph.

In addition to declared nodes, nodes from the encodings of the variables in the relation may be specified as endpoints for edges in the encoded graph. To refer to such a node, use the identifier <relation_record_variable_identifier>.<encoding_node_identifier>. When the relation relates a node to an instance, and we want a node from an instance, we may use the node identifiers '<internal_relation>.initial' and '<internal_relation>.terminal' to refer to the initial and terminal nodes of the named internal relation over that instance. When those identifiers identify multiple nodes, multiple edges will be specified.

⚠️ **GitHub.com Fallback** ⚠️