---
title: "mlab-fileio-csv-parser — Mova code model"
description: "Mova code model of mlab/src/fileio.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/mlab/src/fileio.rs.groupant/csv-parser.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/mlab/src/fileio.rs.groupant/csv-parser.groupant/>

# mlab-fileio-csv-parser

The groupant beside mlab/src/fileio.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`mlab/src/fileio.rs`](https://github.com/ElamurAI/mova-free/blob/main/mlab/src/fileio.rs)
- **source SHA-256:** `547a259326432436…`
- **covers:** Strip leading BOM chars, skip blank LF/CRLF lines; each field records starting line/col, quoted strings decode doubled quotes and embedded LF before delimiter/end handling. (bytes 814–3469)
- **part of:** [mlab-fileio](https://md.groupants.elamur.ai/free/en/mova/mlab/src/fileio.rs.groupant/)
- **repository folder:** [`mlab/src/fileio.rs.groupant/csv-parser.groupant`](https://github.com/ElamurAI/mova-free/tree/main/mlab/src/fileio.rs.groupant/csv-parser.groupant)
- **repository commit:** `855da7bd4a7b`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial | [approximant](#approximant) |
| **ast** | partial | `../syntax.json` |
| **cost** | symbolic source derived | [invariant](#invariant) |
| **descriptant** | present | [descriptant](#descriptant) |
| **invariant** | partial | [invariant](#invariant) |
| **tests** | executed bounded checks | [tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |
| `state_invariant` | state_invariant | partial source derived model | [state_invariant](#state-invariant) |
| `failure_precedence` | failure_precedence | partial source derived model | [failure_precedence](#failure-precedence) |
| `representation_transport` | representation_transport | partial source derived model | [representation_transport](#representation-transport) |
| `resource_cost` | resource_cost | partial source derived model | [resource_cost](#resource-cost) |

## Model text


### descriptant

#### mlab-fileio-csv-parser

Strip leading BOM chars, skip blank LF/CRLF lines; each field records starting line/col, quoted strings decode doubled quotes and embedded LF before delimiter/end handling.

##### Modeling epoch — 2026-10-31

Prospective source read preceded edits. Bounded synthetic checks and selected existing safe tests exercise actual code; paired debug/release results and compiled negative-control assertions are retained externally. Frozen scenario, corpus, external measurement, full-school and training effects are unexecuted. Partial lexical syntax supplies no macro-expanded or semantic proof.

### approximant

#### Forward relation

Strip leading BOM chars, skip blank LF/CRLF lines; each field records starting line/col, quoted strings decode doubled quotes and embedded LF before delimiter/end handling.

##### Domain

Valid Rust value/storage invariants and available bounded resources; exact branch and effect observations only.

##### Executable approximant gap

No useful percentage-error surrogate is established for these categorical, textual or effectful observations. Supported future caps are 1%, 2%, 5%, 10%; no executable approximation or production substitution is claimed.

### invariant

#### Invariants and costs

Field coordinates are Unicode scalar indices, one-based; each record retains start line and end column.

##### Failure ordering

Closing quote followed by a non-delimiter/non-newline/non-CR fails immediately; lone CR behavior differs between quoted and unquoted paths.

##### Cost

O(input characters + copied field bytes), O(input characters + field storage).

### models

## Typed models — mlab-fileio-csv-parser

Source-derived partial relations; finite checks do not prove universality.

### behavior_complement

Unterminated quoted input excludes a Record result; quotes in unquoted fields are retained rather than rejected.

### reverse_reconstruction

Field text plus quoted flag admits CRLF/LF record-separator and leading-BOM variations; CR inside quoted payload is retained and is not interchangeable with LF. Coordinate metadata narrows but does not uniquely recover separators or doubled-quote encoding.

### state_invariant

Field coordinates are Unicode scalar indices, one-based; each record retains start line and end column.

### failure_precedence

Closing quote followed by a non-delimiter/non-newline/non-CR fails immediately; lone CR behavior differs between quoted and unquoted paths.

### representation_transport

Empty lines skipped, trailing delimiter creates empty last field; text is Vec<char>, so indices are not UTF-8 bytes.

### resource_cost

O(input characters + copied field bytes), O(input characters + field storage).

### tests

#### Evidence and limitations

Parent source checks: fileio::wave30_tests::csv_inference_and_json_loss. The fragment's actual statements lie in the recorded byte range; parent checks need not exercise every branch in this fragment. See ../tests.md for source-level control and limitations.

AST projection generated twice to fresh files and compared byte-for-byte. Runtime evidence is finite and does not establish every branch, allocation failure, backend implementation or effect path. No optimization or speed claim.
