Definition of the standard frog.table value and primitive surface for FROG v0.1
FROG - Free Open Graphical Language
- 1. Overview
- 2. Boundary
- 3. Value Shape
- 4. Published Surface
- 5. Primitive Contracts
- 6. Effects, Status, and FIR
- 7. Candidate Deferrals
- 8. Non-goals
- 9. Summary
frog.table defines a portable tabular value contract and the
first value-only primitives for constructing, inspecting, extracting, updating,
and formatting table data. It is a data library, not a table-widget helper
library and not a database or spreadsheet engine.
Table widgets may display or edit frog.table values, but the
computation that builds or transforms those values remains in ordinary diagram
nodes.
frog.table
owns portable rectangular table values and pure table transforms
table widgets
display/edit table values and expose widget interaction
frog.text
owns general text operations
profiles
own database, spreadsheet, CSV file I/O, and external data-frame integrationThe v0.1 table surface is intentionally flat and rectangular. It does not define hierarchical tables, pivot tables, formula cells, database result-set handles, or host-native grid virtualization.
The minimal table value shape is:
{
"kind": "frog.table",
"columns": array<string>,
"rows": array<array<string>>
}Rules:
columnscontains display headers and stable column order.rowscontains row-major cell text.- Every row length MUST equal
column_count. - Column count MAY be zero only when row count is also zero.
The v0.1 table value is text-cell oriented on purpose. Typed cells, column
schemas, variants, row identifiers, metadata, and validation states remain
deferred until the record/cluster and status corridors are settled. This keeps
the first frog.table value compatible with the current public type
system's built-in arrays and strings.
| Primitive | Inputs | Outputs | Role |
|---|---|---|---|
frog.table.build |
columns, rows |
table |
Create a table value. |
frog.table.empty |
columns |
table |
Create an empty table with headers. |
frog.table.row_count |
table |
count |
Return the number of rows. |
frog.table.column_count |
table |
count |
Return the number of columns. |
frog.table.columns |
table |
columns |
Return column headers. |
frog.table.rows |
table |
rows |
Return row-major cell text. |
frog.table.cell |
table, row, column |
value |
Return one cell. |
frog.table.with_cell |
table, row, column, value |
result |
Return a table with one replaced cell. |
frog.table.row |
table, row |
values |
Return one row. |
frog.table.column |
table, column |
values |
Return one column. |
frog.table.append_row |
table, values |
result |
Return a table with one row appended. |
frog.table.with_columns |
table, columns |
result |
Return a table with replacement headers. |
frog.table.to_delimited_text |
table, delimiter, include_header |
text |
Format a table as simple delimited text. |
columns:array<string>rows:array<array<string>>- Every row length MUST equal the number of columns.
- If
columnsis empty,rowsMUST also be empty.
- Creates a table with the supplied columns and zero rows.
- Duplicate column names are allowed as display text in v0.1; stable typed column ids are deferred.
frog.table.row_countreturnsu64.frog.table.column_countreturnsu64.frog.table.columnsreturnsarray<string>.frog.table.rowsreturnsarray<array<string>>.
rowandcolumnindex inputs have typeu64.- Indexes MUST be in range.
frog.table.cellreturnsstring.frog.table.rowreturnsarray<string>with lengthcolumn_count.frog.table.columnreturnsarray<string>with lengthrow_count.
frog.table.with_cellreturns a new table value; it does not mutate the input table in place.frog.table.append_rowrequires the new row length to equalcolumn_count.frog.table.with_columnsrequires the replacement header count to equal the currentcolumn_count.
delimiterhas typestringand MUST be non-empty.include_headerhas typebool.- The result has type
string. - Cells containing the delimiter, quotes, or line breaks are quoted with double quotes. Embedded double quotes are escaped by doubling them.
- This is value formatting only; it does not read or write files.
Every published frog.table primitive has:
call_class = standard_library_valueeffect = purestatus_model = none- no provider requirement
The library uses validation preconditions rather than local status outputs. Non-rectangular row data, out-of-range indexes, invalid replacement row length, invalid replacement column length, and empty delimiters are validation or execution-profile failures until the uniform status corridor is standardized.
FIR SHOULD preserve table calls as named public library calls with
library_id = "frog.table". The table value may be represented as
a library value object with explicit columns and rows
fields, or as an equivalent FIR support value. FIR MUST NOT replace a table
value with a table-widget instance, a host grid handle, a database cursor, or a
private runtime cache.
- Typed cells, column schemas, and cell variants.
- Row ids, metadata, validation state, formatting state, and cell-level presentation state.
- Sorting and filtering as value transforms distinct from widget view state.
- CSV, TSV, spreadsheet, database, and data-frame import/export.
- Streaming table rows and lazy result sets.
- Record/cluster-backed rows after the base record/cluster value model is decided.
- Do not make
frog.tablea wrapper for one host grid control. - Do not hide database or spreadsheet connectivity inside the intrinsic table library.
- Do not treat Table widget viewport, selection, sorting, or editing state as the table value itself.
- Do not standardize arbitrary heterogeneous records through table rows in v0.1.
frog.table publishes a small text-cell rectangular table value and
pure table primitives for construction, inspection, extraction, replacement,
row append, header replacement, and delimited-text formatting. It keeps table
data separate from widgets, databases, spreadsheets, and private host grid
implementations.
End of FROG Table Library Specification