cytoscapejs_graph_language — Logtalk 3.100.1

object

# `cytoscapejs_graph_language`

Predicates for generating diagram files in the Cytoscape Exchange (CX2) JSON format.

Availability:
`logtalk_load(diagrams(loader))`
Author: Paulo Moura
Version: 1:1:0
Date: 2026-03-14
Compilation flags:
`static, context_switching_calls`
Implements:
`public` graph_language_protocol
Imports:
`public` options
Provides:
graph_language_registry::language_object/2
Uses:
list
os
term_io
user
Remarks:
(none)
Inherited public predicates:
check_option/1 check_options/1 default_option/1 default_options/1 edge/6 file_footer/3 file_header/3 graph_footer/5 graph_header/5 node/7 option/2 option/3 output_file_name/2 valid_option/1 valid_options/1

## Public predicates

(no local declarations; see entity ancestors if any)

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

### `section_started_/1`

Tracks whether a JSON array section (`nodes` or `edges`) has already emitted at least one element.

Compilation flags:
`dynamic`
Template:
`section_started_(Section)`
Mode and number of proofs:
`section_started_(?atom)` - `zero_or_more`

### `in_nodes_section_/0`

Flag indicating if the exporter is currently writing the nodes section.

Compilation flags:
`dynamic`
Mode and number of proofs:
`in_nodes_section_` - `zero_or_one`

### `parent_stack_/1`

Current stack of open graph container identifiers.

Compilation flags:
`dynamic`
Template:
`parent_stack_(Stack)`
Mode and number of proofs:
`parent_stack_(?list(nonvar))` - `zero_or_one`

### `edge_counter_/1`

Current counter used to generate unique edge identifiers.

Compilation flags:
`dynamic`
Template:
`edge_counter_(Counter)`
Mode and number of proofs:
`edge_counter_(?integer)` - `zero_or_one`

### `node_counter_/1`

Current counter used to generate unique node identifiers.

Compilation flags:
`dynamic`
Template:
`node_counter_(Counter)`
Mode and number of proofs:
`node_counter_(?integer)` - `zero_or_one`

### `node_id_/2`

Maps source node identifiers to generated CX2 numeric identifiers.

Compilation flags:
`dynamic`
Template:
`node_id_(Identifier,NumericId)`
Mode and number of proofs:
`node_id_(?nonvar,?integer)` - `zero_or_more`

### `containment_edge_/2`

Stores pending containment edges between parent and child nodes.

Compilation flags:
`dynamic`
Template:
`containment_edge_(ParentId,ChildId)`
Mode and number of proofs:
`containment_edge_(?integer,?integer)` - `zero_or_more`

## Operators

(none)