Parameter Viewer

snt view is an optional graphical browser and source editor for DIPL parameters. It uses the evaluated DIP environment to show values, provenance, and recorded dependencies. The viewer is part of the main snt executable; it does not need a separate application binary.

Parameter Viewer showing the parameter tree and inspector for a selected scientific input node.

Browse nodes and inspect values, provenance, and dependencies.

Parameter Viewer displaying tabular parameter data.

Inspect array and table values in the data view.

Parameter Viewer displaying a syntax-highlighted DIPL source with its source inspector.

View source text and navigate to the nodes it defines.

Parameter Viewer editing a DIPL source with line numbers and editing controls.

Edit, check, format, and search source documents in the viewer.

Select either image to open it at full size.

Build and open

Enable the viewer and initialize its Dear ImGui and GLFW submodules before building:

git submodule update --init external/imgui external/glfw
cmake -S . -B build -DENABLE_SNT_VIEW=ON
cmake --build build --target snt
build/bin/snt view examples/dip/ParameterViewer/DIPfile

The command accepts a live DIPfile, a .dip or .dipl source, or an evaluated .diph5 snapshot. Viewer support requires ENABLE_EXEC_APPS_SNT=ON. With ENABLE_SNT_VIEW=OFF, Dear ImGui, GLFW, and OpenGL are not compiled or linked into snt. See Dependencies for the general source-build requirements.

On Debian or Ubuntu, these packages provide the native files for the OpenGL, X11, and Wayland backends:

sudo apt-get install libgl-dev libglvnd-dev libx11-dev libxext-dev libxrandr-dev \
  libxinerama-dev libxcursor-dev libxi-dev libwayland-dev libwayland-bin \
  libxkbcommon-dev wayland-protocols pkg-config

If the X11 development library is unavailable, the build skips X11. GLFW needs wayland-scanner from libwayland-bin when its Wayland backend is enabled.

Browse a project

The browser separates Overridden nodes, Resolved nodes, schemas, custom units, Local sources, Block value sources, Named sources, and Raw named sources. A live DIPfile also has a top branch, grouping its registered inputs by type with their order preserved within each group. Use Search paths to filter the tree, or the adjacent controls to expand and collapse its branches. Double-click a tree node to expand or collapse it, or single-click to select it. Select a parameter to inspect its value, units, metadata, source locations, and dependencies. Arrays and tables expose a Data tab with bounded pages; arrays of higher rank allow choosing two displayed axes and fixed indices for the others. Use the < and > buttons beside a fixed index to step through that dimension. Data columns initially fit the visible values up to a readable maximum width. Drag a header divider to resize a column, scroll horizontally to see more columns, or hover over a clipped cell to read its full value. Values with recorded dependencies or readers expose a Graph tab with a local, navigable graph and retained expression composition when available. Follow a dependency to its input, then use the back and forward buttons to return to earlier selections. Local sources lists the DIPfile’s code[] inputs, which define local ?path values. File inputs open their original DIPL text; inline inputs open at their DIPfile declaration. Their evaluated parameters appear under Resolved nodes.

Block value sources contains string literals parsed into non-string array or table values. Array blocks are shown as plain text. Table blocks highlight DIPL column declarations before --- and show data rows as plain text. The viewer enables this opt-in retention for live parses. Evaluated table nodes and their columns link back to the DIPL table declaration through Open source. For inline table text, Block value sources also opens the parsed header and rows directly.

Named sources lists parsed DIPL sources[] inputs, whose values are addressed as source?path. Raw named sources lists unparsed text inputs registered by sources[]. A value that injects raw source content links back to its entry when dependency recording is enabled. Raw table files use the same header and data presentation as table block values.

The Sources graph tab on a source or project file shows direct reads between source files and named sources. Sources read by the selected source appear above it; sources that read it appear below. Click a source card to open the relevant declaration or reading line. The graph includes schema files such as schemas/probe.dip in the ParameterViewer example when dependency recording captures their reads.

The top path bar shows the argument supplied to snt view. Source file locations in the inspector are displayed relative to the opened artifact’s directory. The ParameterViewer example provides a project with groups, collections, overrides, schemas, sources, units, expressions, arrays, and a table for exploring these views.

The Files section above Project shows the directory structure of files loaded by a DIPfile project, or the file opened as a standalone .dip or .dipl source. Select Files to see only the top-level files and folders in the Inspector. Select a folder to see its immediate children in the Inspector. Select an individual file to see its metadata and source links, then choose a link to open the source. The file also has a Source tab using the same editor as the corresponding source entry. A file used by multiple named sources lists each source separately. The file list updates when the project is reloaded or its sources are changed in the viewer. File details include size and modification time, plus creation time where the filesystem provides it. Referenced .dipt table files appear alongside other project files.

Guided setup

For a live DIPfile project with !setup parameters, select Setup in the top menu. The menu entry appears only when setup parameters are available. The form shows every setup parameter at once, including its description and current value. Declared !options appear as a choice list; Boolean values use True/False controls. Other values accept text, numbers with units, or a DIPL array expression as appropriate. Leave a field unchanged to keep its current value. Source files remain editable while required setup values are still unset.

After entering the answers, click Commit setup. The core validates the complete answer set before writing. A successful commit creates a new DIPL override file beside the DIPfile, registers it in the project, and reloads the viewer so the resolved values update immediately. Invalid answers leave the project untouched. If validation identifies an input, the form scrolls to it and highlights it alongside the error notification. To revise a committed answer, edit the generated override source in the viewer. Remove override deletes the guided setup override file and unregisters it from the DIPfile. Other project overrides remain active. The button is disabled until a guided setup override has been committed.

Open source and reload

For live DIPfile projects and standalone .dip or .dipl files, selecting a source opens it in the source section; Open source from a node inspector navigates to the line that defines it. The opened source can be edited in the built-in editor, which provides syntax highlighting, line numbers, and diagnostics with line references. Check validates the current buffer using its source type: DIPL documents use the normal DIP parser, while array and table block values use their corresponding value parsers. Format formats DIPL code. Find and replace supports previous/next navigation, replace current or all matches, and a case-sensitivity option. Save writes the document and reloads the values; Discard abandons unsaved edits. For DIPfile projects, Save As copies the complete bundled project to a chosen directory and switches the viewer to that copy. File → Export DIPH5… writes the currently evaluated live project to a .diph5 snapshot in a chosen directory. The dialog lets you choose the file name and reports the saved path. Save or discard source edits and commit any setup changes before exporting. Export leaves the open project in place and does not replace an existing file. Each file-backed override source also has a Delete override button. It removes that file and its DIPfile registration after validating the remaining project. Save or discard unsaved edits before deleting a source. If the document changed on disk after it was opened, saving is rejected to avoid overwriting that change. Opening another source or reloading is blocked while the current document has unsaved edits.

Standalone .dip and .dipl files appear under Local sources and can be checked, edited, and saved. They do not offer project-only actions such as Save As, guided setup, or DIPH5 export. Use File → Convert to Project… to create a DIPfile beside a standalone source and open it as a project. The source stays in place. Conversion refuses to replace an existing DIPfile. An overridden parameter offers its effective override and original declaration. Custom units and schemas link to their definitions. The source tab also has a Copy source button. For code embedded as a string in a DIPfile, the action points to the string’s registration line; its internal line numbers do not refer to physical file lines.

Use File → Reload or Ctrl+R after editing an input file externally. If the updated input fails to parse, the viewer keeps the last valid state and displays the error. The Source tab remains open when selecting another browser object; use Open source to switch to a different document.

Snapshot limits

A DIPH5 v3 archive stores evaluated values, provenance, and complete source bytes. The viewer lists the archived sources and opens them in the same editor as live project sources. Check evaluates a proposed edit against archived inputs; Save writes a new v3 archive and refreshes the resolved nodes. The original project files are not modified. Completed experiment records cannot be rewritten through this editor. Named source nodes are still browsed through a live project parse. Standalone .dipt opening and scalable access to large numerical datasets are not yet available.

For the C++ inspection functions behind these views, see DIP inspection.