From native formats to execution
Standard and Pro provide explicit import adapters and bounded analysis profiles. Reading a literal preserves a description; calling its adapter admits a bounded profile to an existing native…
From native formats to execution
Standard and Pro provide explicit import adapters and bounded analysis profiles. Reading a literal preserves a description; calling its adapter admits a bounded profile to an existing native owner. None of these functions starts a solver, statistical fit, external job or resource fetch by itself.
| Imported value | Adapter | Existing execution owner |
|---|---|---|
lp or mps |
OPTIMIZATION_MODEL(model[, options]) |
LINEAR_PROGRAM.REPORT / MIXED_INTEGER_PROGRAM.REPORT |
rformula |
RFORMULA_SPEC(formula[, options]) |
MODEL.FIT, then MODEL.PREDICT |
textgrid, eaf, conllu, brat |
ANNOTATION_TABLES(value, {document, revision}) |
FROM_RANGE, native Frame queries and Graph |
LP and MPS optimization
The allocation example
maximizes 3x + 2y under capacity and per-variable constraints. Its solution is
x=2, y=2, objective 10; reducing shared capacity to 3 gives objective 8.
Use MIXED_INTEGER_PROGRAM.REPORT for a descriptor with a nonblank integer_mask.
The LP report refuses such a descriptor. A missing integer solver capability
remains unavailable; the import never relaxes the model to a continuous problem.
LP carries its objective sense. MPS requires {sense: "maximize"} or
{sense: "minimize"}. Select objective_row if there is more than one N row.
Select rhs_set, range_set and bound_set whenever the corresponding section
contains multiple sets; an unknown selection refuses. Unselected sets and free
rows remain in source_records, with the chosen options in import_options.
Duplicate coefficients sum in source order. Default continuous bounds are zero
and positive infinity. FR, MI, PL, LO, UP, FX, BV, LI, UI, row
ranges and objective RHS offsets are supported. MPS integer-marker dialects
differ: explicitly choose integer_default: "binary" (default upper bound one)
or "nonnegative" (unbounded above). An explicit upper bound overrides the default upper bound.
Negative upper bounds require an explicit lower bound. Duplicate bound sides,
duplicate RHS/range rows, conflicting bounds and SC semicontinuous bounds
refuse admission. The existing descriptive reader's linear syntax limits apply. See the
Gurobi MPS reference
and lp_solve MPS dialect notes
for the source-format distinctions behind the explicit integer-default choice.
The output uses grid.linear-program.import.v1: sorted named variables,
canonical CSR rows, an objective offset, and nulls for infinite column bounds.
This null convention is specific to the import schema; finite sparse schemas
retain their existing contract. Equality/ranged rows become two inequalities.
source_rows maps each normalized row back to its authored name. Original
coefficient spellings remain in source_records. Preparation is bounded to
1,000 variables, 10,000 authored rows and 1,000,000 normalized nonzeros, within
the parser's input/output limits. Variable names are limited to 512 bytes and
authored row labels to 480 bytes (leaving room for normalized row identity).
Use MERGE to construct an explicit numeric scenario from the immutable imported
descriptor; the report revalidates its shape and values. Retain the original,
the scenario descriptor and both reports together. Structural changes should
go through admission again. A diagnostic report can use the existing
grid.linear-program.diagnostic.v1 wrapper with base_schema set to the import
schema and the existing explicit diagnostic options; see the function reference.
R formulas and portable fits
The regression example
recovers y=10-2x and predicts 0 and -2 at x=5 and x=6.
The adapter accepts a named response, named predictors, parentheses, +, -,
:, *, and outer intercept controls 0, 1, -1. x*z expands to x,
z, and x:z; x:z adds only the interaction. Duplicate terms/factors collapse,
term removal uses feature identity, and main effects precede interactions.
Supported one-column calls are log, log10, sqrt, abs, exp, factor, and
I(column ^ finite-number). Backticks may quote an otherwise valid FIT column
identifier; escaped/non-ASCII column identifiers remain outside FIT's contract.
Options select method (linear, logistic, probit), missing (error,
drop), and the existing covariance, cluster, lags, confidence settings.
Defaults are linear fitting and an error on missing data. categories maps a
column name to an explicit reference label or null for the native default.
factor(group) also selects categorical encoding. This profile uses Grid's
deterministic level ordering and treatment contrasts, not R's ambient factor
levels, locale, contrasts setting or package environment. A reference level
requires an intercept. Prediction reuses the learned native design and refuses
unseen levels; it never relearns categories or normalizers.
At least one predictor is required. The adapter refuses dot expansion, formula
degree powers, division/nesting shorthand, offsets, random effects, arbitrary
calls, scale, general I arithmetic, and intercept controls inside crossing
operands. Limits are 4,096 AST nodes/visits, 64 nesting levels, 128 expanded
terms, eight factors per term and 8,192 source bytes. Existing FIT level/design
work budgets also apply. The resulting spec retains formula_source; MODEL.FIT
preserves it alongside the admitted features and learned design for transfer.
See studies for the owning fit/prediction contract. The formula notation follows the documented subset of R formula algebra.
Annotation Frames and Graph
The corpus example
feeds header-row scalar tables into FROM_RANGE and constructs a Graph using
explicit column bindings. Computed objects do not use Graph's literal-only
shorthand. Frame execution uses the existing native ETL owner.
Supply a nonempty document and revision (at most 512 bytes each). These are
caller-declared source identities, not computed hashes. Change the revision when
the source document or annotations change. Node keys encode document, revision,
format, scope and local ID as an unambiguous tuple. CoNLL-U identities also carry
the sentence ordinal; token 1, multiword 1-2, and empty node 1.1 stay distinct.
The result retains original records and four header-row tables:
| Table | Contents |
|---|---|
annotations |
Stable ID, local ID, document/revision/format, tier/sentence, kind, start/end, unit, text, segment, raw parsed coordinates, coordinate status and end exclusivity |
nodes |
One annotation/tier/token node with a stable ID and scalar properties; CoNLL-U includes a root per sentence |
references |
Every projected relationship, its authored target and whether that target exists |
edges |
Resolved relationships only, suitable for Graph construction |
TextGrid coordinates remain seconds, EAF remains milliseconds, Brat remains
Unicode code-point offsets with exclusive ends, and CoNLL-U remains token identity.
No milliseconds-to-seconds, byte/code-point or token-to-text conversion is inferred.
start_raw/end_raw preserve parsed numeric values as strings, not necessarily
their original lexical spelling. EAF integers above the exact binary64 range keep
raw values with blank numeric coordinates and outside_exact_range status.
Missing EAF times remain unresolved. The EAF reader rejects dangling IDs before
projection; Brat/enhanced CoNLL-U dangling references stay visible in references.
Brat discontinuous spans produce one row per segment sharing an annotation ID.
TextGrid points have equal start and end. Time-boundary inclusivity is unspecified
(end_exclusive blank); Brat sets it to true. Basic and enhanced dependency edges
both point from dependent to head and retain their relation names. Annotation
edges point from annotation to tier/reference; no alignment or inference is added.
For interval analysis, first require equal document, revision and unit and known
coordinates. Use a.start < b.end AND b.start < a.end for positive-duration
overlap; handle points separately according to the study's chosen boundary rule.
Cross-file alignment requires an explicit mapping table. Frame joins and filters
can then produce a result table for ordinary export. This is query-result export,
not round-trip editing of the annotation source. Each table is limited to 100,000
rows and shares the native parser's cumulative node/output budget.
The corpus example also selects overlapping spans within one coordinate domain
and lists unresolved references. Use EXPORT_ARROW(result_frame, destination, {})
with an explicitly selected writable destination to export a derived table.
Original annotation files are not rewritten by result export. Reopening a saved
model preserves the source description; retained materialized Frames and exports
remain separate artifacts with their own identities.
Bounded analysis profiles
The following bounded profiles extend the same native execution path. Their exact integration and cost evidence is recorded in the completion ledger.
Fault probabilities and sensitivities
RELIABILITY_REPORT(openpsa_value, options) evaluates one named top event.
Set independent: TRUE to assert independence of distinct basic events.
Repeated references to one event remain the same variable. Scalar probabilities
must be finite and between zero and one; probabilities may override named basic
events for a scenario. Missing reachable probabilities and unknown overrides refuse.
The profile admits the selected top's reachable acyclic Boolean formulas, constant house events, AND/OR/XOR, NOT, cardinalities, and binary IFF/NAND/NOR/IMPLY. The last four are restricted to two operands. Enumeration evaluates every assignment with binary64 arithmetic; "exact" describes the finite enumeration, not arbitrary-precision probabilities. Sensitivities retain the top probability with each event forced true, forced false, and their difference, leaving the other event probabilities unchanged. These equal conditional probabilities when the conditioning state has nonzero probability; the forced-state definition also applies at zero or one.
Default limits are 65,536 assignments and 20 million work units; options
max_assignments and max_work may select up to 1,048,576 and 100 million.
At most 20 distinct reachable basic events, 4,096 compiled operations, 4,096
operands per gate and depth 64 are admitted. A work/assignment limit returns
complete: false, status: "limit", and no probability. Invalid models and
cancellation return errors. Reports retain source and scenario options.
Distribution expressions, common causes, dynamic gates, event trees, cut sets
and general reliability-block models remain outside this profile.
The supply example
compares 0.02 with 0.005 under changed backup reliability. Boolean identities
follow the Open-PSA fault-tree contract.
Exact RDF datasets and native shapes
RDF_DATASET(value, {document, revision}) accepts native RDF, Turtle, N-Triples,
JSON-LD and PROV-O values. It preserves lexical literal values, datatypes,
languages, default/named graphs and blank-node identity scoped by the supplied
nonempty document/revision (at most 512 bytes each). Duplicate quads collapse
under exact term equality. Numeric value equality never collapses distinct
lexical literals. statements and terms are header-row scalar tables for
FROM_RANGE, native queries and ordinary export. The source remains retained.
RDF_VALIDATE(dataset, shapes, {graph: "default", entailment: "none"})
selects one graph. A named graph is an IRI string or scoped blank-node term;
there is no implicit union or inference. Shapes are native records with unique
id, explicit targets, properties, optional closed and
ignoredProperties. Targets are IRI strings or exact term records. Each
property's path is a sequence of 1–8 predicate IRIs. Supported constraints:
minCount/maxCountcount distinct reached terms.nodeKindisiri,blank, orliteral.datatypeselects XSD string, Boolean, integer, decimal, double, float or RDF langString. Numeric values must be finite. Integers are limited to the exact binary64 integer range; float uses binary32 rounding, and double/decimal comparisons use binary64 conversion. Nonfinite and arbitrary-precision numeric validation remain outside this profile. Integer/decimal spellings use an optional sign and decimal digits (one optional decimal point for decimal); numeric whitespace is not normalized.minInclusive/maxInclusivecompare finite numeric literals.- Closed shapes allow single-predicate property paths and explicitly ignored predicates; other outgoing properties produce findings.
Unknown fields/constraints fail even when targets are empty. Invalid shapes, work exhaustion and cancellation never publish a conforming result. Limits are 100,000 input quads, 128 shapes, 1,024 targets/128 properties per shape, one million traversal/check units and 10,000 findings. Reports retain exact focus/path/value, shape, component, severity, graph and source revision. This is a native validation profile with SHACL-shaped findings, not a SHACL shapes-graph reader or full standards implementation. Recursive shapes, executable constraints, entailment and SPARQL remain separate. See the catalog validation example.
Static PNML execution
Inside either NET declaration spelling, use one IMPORT pnml"…" clause and
END. The literal is admitted once by the compiler into ordinary count-place
NET operations; imported XML is never interpreted during firing. Parameters,
additional authored places/transitions, dynamic references and computed import
expressions are refused. Editing the source requires recompilation/readmission.
The first profile accepts exactly one ordinary weighted PT net with pages,
places, transitions, initial markings, positive integer arc inscriptions and
same-kind reference-place/reference-transition chains. Omitted initial counts
are zero and omitted weights are one. Counts must fit the exact numeric integer
range. IDs used as native place/transition names must be distinct case-insensitive
Grid identifiers; marking is reserved. No artificial place capacity is added.
Admission is bounded to 16,384 XML elements, 256 places, 256 transitions and
256 arcs per transition phase; reference chains are bounded to 64 nodes.
Unknown semantic elements/attributes, colored/timed nets, inhibitor/reset arcs,
tool-specific extensions, bad ancestry/references and reference cycles refuse.
Name/graphics metadata remains descriptive in the retained source owner.
Use the existing INITIAL, FIRE, ENABLED and REPORT members. FIRE proposes an immutable next marking; it does not commit live state. Saved LIR uses the same native firing implementation without needing the parser. See the delivery example.
The ordinary source library count-net-analysis.gs
provides explore_count_net(initial, enabled, max_states) over a pure count NET's
ENABLED callback. It performs bounded breadth-first exploration, retains traces
to deadlocks, and reports incomplete/error outcomes without asserting safety.
The 1–256-state budget is an exploration limit, not a modeled place capacity.
State identity includes definition, parameters, counts and capacities; it
explicitly excludes the firing counter. Exhaustion establishes closure of this
count-configuration abstraction, not infinite execution without bookkeeping
overflow, fairness, timed behavior or general temporal verification. Use this
profile only where successors depend on those count configurations; typed nets,
external effects and arbitrary callbacks do not establish that condition.
Calibrated waveform tables
WAVEFORM_TABLES(record, {document, revision, channel}, annotations?) consumes
READ_WFDB output and an explicit zero-based channel. Calibration and an explicitly
authored sample frequency are required. It returns sample/event tables and
validValues for native statistical summaries. Sample rows retain missing values,
digital samples, units and time (sample + firstSampleOffset) / sampleFrequency.
validValues omits gaps for summaries only; it must not be used as an evenly
sampled replacement signal. No interpolation, resampling, filter or rate change
is performed.
Optional MIT annotation records require explicit positive annotation_hz;
annotation ticks are never assumed to share the sample clock. Tick/offset values
must fit exact binary64 integer coordinates. Annotations are point events;
intervals and boundary inclusion must be chosen explicitly by the analysis.
Both tables are bounded to 100,000 data rows and the normal parser output budget.
Reports retain source samples, annotation input, channel and chosen clocks.
The waveform example
computes a mean of 1 mV and produces a queryable sample table. These are signal
analysis operations, not clinical interpretations.