Parsing and querying
Load DIPL definitions, evaluate environments, and retrieve values.
-
enum class snt::dip::ArchivedDocumentKind
Values:
-
enumerator DIPL
-
enumerator Table
-
enumerator Plain
-
enumerator Override
-
enumerator DIPL
-
enum class snt::dip::ArtifactKind
Classification by conventional filename; it does not validate file contents.
Values:
-
enumerator Unknown
-
enumerator Project
-
enumerator DIPL
-
enumerator TableText
-
enumerator DIPH5
-
enumerator Unknown
-
enum class snt::dip::RequestType
Type of an environment request
Values:
-
enumerator Reference
Search in the node list.
-
enumerator Function
Search in the function list.
-
enum class snt::dip::ExportFormat
List of available DIP generators that produce static parameter lists
Values:
-
enumerator CPP
-
enumerator C
-
enumerator FORTRAN
-
enumerator RUST
-
enumerator R
-
enumerator JULIA
-
enumerator JSON
-
enumerator JSON_METADATA
-
enumerator TOML
-
enumerator YAML
-
enum class snt::dip::ExperimentStatus
Values:
-
enumerator Prepared
-
enumerator Running
-
enumerator Completed
-
enumerator Failed
-
enumerator Aborted
-
enumerator Prepared
-
enum class snt::dip::DependencyEventKind
Values:
-
enumerator Value
-
enumerator Condition
-
enumerator Decision
-
enumerator Value
-
enum class snt::dip::SourceEntityKind
A live DIP entity whose source can be inspected. For Path, source_name selects a named source; an empty source_name selects the evaluated project. ProjectEntry uses index instead of name.
Values:
-
enumerator Path
-
enumerator NamedSource
-
enumerator Schema
-
enumerator Unit
-
enumerator ProjectEntry
-
enumerator Path
-
enum class snt::dip::SourceLocationRole
Values:
-
enumerator Source
-
enumerator Declaration
-
enumerator Modification
-
enumerator Override
-
enumerator Definition
-
enumerator Registration
-
enumerator Source
-
enum class snt::dip::ValueChangeKind
Owned, read-only facts about one evaluated value.
Values:
-
enumerator Declaration
-
enumerator Modification
-
enumerator Override
-
enumerator Declaration
-
enum class snt::dip::OverrideTargetKind
What an override may target in this evaluated model. This is a static guide, not validation of a proposed value or a substitute for preview.
Values:
-
enumerator ExistingValue
-
enumerator ExistingItem
-
enumerator NewItem
-
enumerator ExistingValue
-
enum class snt::dip::CaseType
Values:
-
enumerator IF
-
enumerator ELIF
-
enumerator ELSE
-
enumerator END
-
enumerator IF
-
enum class snt::dip::ValueOrigin
Values:
-
enumerator Empty
-
enumerator None
-
enumerator Keyword
-
enumerator Boolean
-
enumerator Number
-
enumerator String
-
enumerator Array
-
enumerator Reference
-
enumerator ReferenceRaw
-
enumerator ReferenceRel
-
enumerator ReferenceSelf
-
enumerator Function
-
enumerator FunctionRes
-
enumerator Expression
-
enumerator Concatenation
-
enumerator Schema
-
enumerator Empty
-
enum class snt::dip::NodeDtype
Values:
-
enumerator None
-
enumerator Empty
-
enumerator Unit
-
enumerator Source
-
enumerator Group
-
enumerator Case
-
enumerator Schema
-
enumerator Override
-
enumerator Import
-
enumerator Boolean
-
enumerator Integer
-
enumerator Float
-
enumerator String
-
enumerator Link
-
enumerator Table
-
enumerator Deferred
-
enumerator Modification
-
enumerator Property
-
enumerator None
-
enum class snt::dip::PropertyType
Values:
-
enumerator None
-
enumerator Constant
-
enumerator Condition
-
enumerator Tags
-
enumerator Format
-
enumerator Options
-
enumerator Labels
-
enumerator Setup
-
enumerator Description
-
enumerator Authors
-
enumerator Title
-
enumerator Journal
-
enumerator Year
-
enumerator Volume
-
enumerator Issue
-
enumerator Pages
-
enumerator DOI
-
enumerator URL
-
enumerator Version
-
enumerator Created
-
enumerator Modified
-
enumerator License
-
enumerator Rationale
-
enumerator Native
-
enumerator Requires
-
enumerator Conflicts
-
enumerator Implies
-
enumerator See
-
enumerator Example
-
enumerator RecommendedRange
-
enumerator PerformanceImpact
-
enumerator ScientificImpact
-
enumerator Deprecated
-
enumerator Replacement
-
enumerator Since
-
enumerator Category
-
enumerator Visibility
-
enumerator Delimiter
-
enumerator MetadataConstraint
-
enumerator None
-
using snt::dip::ExperimentValues = std::variant<std::vector<int64_t>, std::vector<uint64_t>, std::vector<double>>
-
std::unordered_map<ValueOrigin, std::string> snt::dip::ValueOriginNames
-
ArtifactKind snt::dip::detect_artifact(const std::filesystem::path &path)
-
Environment snt::dip::open_artifact(const std::filesystem::path &path, bool record_dependency_graph = false, bool retain_block_inputs = false)
Load a project, DIPL file, or DIPH5 snapshot into a new environment. .dipt is table input within DIPL, not a standalone environment. Recording is opt-in for parsed sources; snapshots retain their saved graph state regardless of record_dependency_graph. Parsed string blocks are retained only when retain_block_inputs is true for a live parse.
-
void snt::dip::reload_artifact(Environment ¤t, const std::filesystem::path &path, bool record_dependency_graph = false, bool retain_block_inputs = false)
Replace the current environment only after the new artifact loads successfully. Pass recording options again when refreshing a parsed source.
-
std::optional<std::filesystem::path> snt::dip::nearest_project_manifest(const std::filesystem::path &input)
Find the nearest parent DIPfile for a source or project path.
-
Environment snt::dip::parse_project_manifest(const std::filesystem::path &project_file, ProjectFileReader reader = {}, std::string source_name = "DIPfile")
Parse and validate a DIPfile without loading its referenced model files.
-
const Line *snt::dip::current_exception_line() noexcept
Return the active DIPL line, if one is being evaluated.
-
core::Diagnostic snt::dip::diagnostic_from_exception(const std::exception &error)
Convert an existing DIP or core exception without parsing its formatted what() text. The code identifies the exception category; individual messages do not yet have codes.
-
PreviewResult snt::dip::preview(const std::filesystem::path &input, const std::vector<PreviewOverride> &overrides, bool record_dependency_graph = false, const ComparisonOptions &options = {})
Evaluate independent baseline and candidate parses without writing outputs.
-
std::string snt::dip::read_project_file(const std::filesystem::path &path)
Read a local text file, throwing an IOException if it is unavailable.
-
ProjectBundle snt::dip::package_project(const std::filesystem::path &project_file, const std::vector<std::filesystem::path> &additional_files = {}, bool allow_unset_setup_values = false)
Collect every local file opened while evaluating a DIPfile, plus optional files for source paths selected by later overrides. Files outside the DIPfile directory, including symlinks escaping it, are rejected.
-
std::string snt::dip::project_bundle_json(const ProjectBundle &bundle)
Stable JSON representation accepted by the browser parseBundle API.
-
void snt::dip::initialize_project(const std::filesystem::path &directory)
Create a starter DIPfile and main.dip in an existing directory. Existing entries are preserved; a partial source file is removed if creating the DIPfile fails.
-
std::filesystem::path snt::dip::create_project_from_source(const std::filesystem::path &source_file)
Register an existing standalone .dip/.dipl file in a new sibling DIPfile. The source is left untouched. The new manifest is removed if the resulting project cannot be evaluated, and an existing DIPfile is never replaced.
-
std::string snt::dip::tools::format(std::string_view source, const FormatOptions &options = {})
Format DIPL source text without evaluating values or changing node order.
-
LintResult snt::dip::tools::lint_environment(const Environment &environment, const LintOptions &options = {})
Lint an already evaluated environment without reparsing or modifying it.
-
LintResult snt::dip::tools::lint_text(std::string_view source, std::string source_name = "<memory>", const LintOptions &options = {})
Validate and lint in-memory DIPL. Invalid input reports validation errors only.
-
LintResult snt::dip::tools::lint_file(const std::filesystem::path &input, bool project = false)
Validate and lint a source file or DIPfile project. The nearest DIPfile supplies settings.
-
ValidationResult snt::dip::tools::validate_text(std::string_view source, std::string source_name = "<memory>", const ValidationOptions &options = {})
Validate in-memory DIPL using the ordinary C++ parser and evaluator.
-
ValidationResult snt::dip::tools::validate_file(const std::filesystem::path &input, bool project = false)
Validate a DIPL file or DIPfile project without writing output files. A file named DIPfile is treated as a project; project=true also accepts a manifest with another filename. Independent statement syntax errors are collected; semantic evaluation remains fail-fast. The nearest parent DIPfile supplies max_syntax_errors for a standalone source file.
-
struct AppliedOverrideSource
Exact applied override source, retained separately from resolved values. A v3 archive needs these bytes to explain how its effective values arose.
-
struct ArchivedDocument
Editable archived text and the identity needed to reopen it.
Public Members
-
std::string name
Name accepted by the editing API.
-
std::string source_id
Stable archive source ID, when recorded.
-
std::string path
Original source path, if available.
-
ArchivedDocumentKind kind
Content syntax or override role.
-
std::string name
-
struct ArchivedSource
-
class ArchiveEditSession
Edit the source bytes embedded in a DIPH5 v3 archive.
Public Functions
-
explicit ArchiveEditSession(std::filesystem::path archive)
Load an archive and retain its resolved environment as the baseline.
-
std::vector<ArchivedDocument> documents() const
List editable model and override sources in archive order.
-
std::optional<ArchivedDocument> document(const std::string &name) const
Resolve a recorded source name, including a table companion, to editable text.
-
const std::string &document_text(const std::string &name) const
Return the archived text identified by its source name.
-
PreviewResult preview_document(const std::string &name, const std::string &text) const
Evaluate one replacement using the archived inputs and report diagnostics.
-
std::string save_document(const std::string &name, const std::string &text)
Evaluate and atomically replace the archive with the new environment.
- Returns:
The source name after re-evaluation, which may have changed.
-
explicit ArchiveEditSession(std::filesystem::path archive)
-
struct BlockInput
Original string literal parsed into an array or table during a live parse.
-
class Cursor
Access a known environment path; the cursor must not outlive its environment.
Public Functions
-
explicit Cursor(const Environment *env, std::string_view path = "")
-
std::unordered_map<std::string, Cursor> children() const
Return direct named children of the root, a group, or a collection item. Dotted paths without an explicit group node are traversable as implied groups.
- Returns:
A map keyed by direct child name; throws for list and map cursors.
-
std::vector<Cursor> elements() const
Return cursors for elements of the current sequence node in index order.
- Returns:
A vector of element cursors; throws if the cursor is not a sequence.
-
std::unordered_map<std::string, Cursor> items() const
Return cursors for entries of the current mapping node.
- Returns:
A map keyed by entry name; throws if the cursor is not a mapping.
-
std::vector<CursorEntry> entries() const
Return immediate group children, list elements, or map items.
Named entries have a name; list elements have a zero-based index. Each entry holds a cursor into this cursor’s environment. Recorded children retain declaration order; unrecorded implied-group children are sorted.
- Returns:
Direct entries, or an empty vector for a leaf.
-
std::vector<std::string> entry_names() const
Return just the direct entry names in the same order as entries().
Group children and map items use their names; list elements use their zero-based indices as decimal strings.
- Returns:
Direct entry names, or an empty vector for a leaf.
-
bool has_item(const std::string &item) const
Test if keyed item exists for the current path
- Returns:
true if item exists, false if not
-
const std::string &get_path() const
Get current cursor path
- Returns:
Fully qualified path of the cursor
-
val::BaseValue::PointerType get_value() const
Return the value stored at this path.
- Returns:
A newly allocated VAL value, or nullptr for a DIPL
nonevalue. Throws when the path is absent or not a value node.
-
std::optional<puq::Quantity> get_units() const
Return the physical quantity metadata attached to the value at this path.
- Returns:
The quantity metadata, or
std::nulloptwhen the node has no units.
-
dip::ValueNode::PointerType get_node() const
Get the environment-owned value node at the current cursor path. Unlike Environment::select(), this is not an independent snapshot.
- Returns:
A value node pointer
-
Provenance get_provenance() const
Return source and citation provenance for the value at this path.
The source manifest entry is present when the environment has a registered source (after parsing) or a DIPH5 v3 source archive.
-
ValueMetadata get_metadata() const
Return effective metadata on a value, explicit group, collection, or collection item.
-
val::Array::ShapeType get_shape() const
Get shape of a value node at the current cursor path
- Returns:
Shape array of a value node
-
const std::string to_string() const
Get string representation of the cursor
- Returns:
String representation of a cursor
-
template<typename T>
inline T as() const Cast cursor as a specific scalar/array/vector type
- Template Parameters:
Expected – value type
-
explicit Cursor(const Environment *env, std::string_view path = "")
-
struct CursorEntry
One direct hierarchy entry and its name or list index.
-
struct DependencyEdge
An evaluated read of a DIP value or raw source. IDs use ?path, source?path, or source? for an entire raw source.
-
struct DependencyEvent
One evaluation of a value, validation condition, or branch decision.
Public Members
-
std::string owner
-
DependencyEventKind kind
-
std::optional<core::SourceLocation> location
-
std::vector<std::string> controlled_by
Active branch decision IDs for a value event.
-
std::string expression
-
std::optional<exs::CompositionGraph> composition
-
std::vector<DependencyEdge> reads
-
std::string owner
-
class DependencyGraph
Retains evaluation order and provides effective forward and reverse links.
Public Functions
-
inline const DependencyEvent *latest(std::string_view owner, DependencyEventKind kind) const
Latest event for this owner and kind.
-
inline std::vector<DependencyEdge> dependencies(std::string_view owner) const
Effective reads of the value, excluding superseded declarations.
-
inline std::vector<std::string> referenced_by(std::string_view target) const
Value nodes whose current evaluation read the target.
Public Members
-
std::vector<DependencyEvent> events
-
inline const DependencyEvent *latest(std::string_view owner, DependencyEventKind kind) const
-
struct DependencyNeighbor
One distinct value or source adjacent to a selected dependency-graph ID. request and operand describe the first effective read connecting the pair.
-
struct DependencyNeighborhood
Local effective dependency graph for a value or source ID. Dependencies combine value and condition reads in that order, once per target. Readers are values whose latest evaluation reads the selected ID. The latest value and condition events remain separate so clients can inspect both expressions.
Public Members
-
std::string id
-
bool recorded
-
std::vector<DependencyNeighbor> dependencies
-
std::vector<DependencyNeighbor> readers
-
std::optional<DependencyEvent> value_event
-
std::optional<DependencyEvent> condition_event
-
std::string id
-
class DIP
Public Functions
-
DIP()
Empty class constructor
-
void add_string(const std::string &source_code)
Add DIPL code from a string
- Parameters:
source_code – Text with a DIPL code
-
void add_string(const std::string &source_code, const std::string &source_name)
Add in-memory DIPL code with a stable source name for diagnostics.
-
void add_schema_string(const std::string &name, const std::string &source_code)
Register a named schema body without a $schema wrapper. Leading ? metadata properties describe the schema definition; properties beneath a value node describe that value in every instance. The schema is available in the Environment::schemas registry after parse().
-
void add_schema_file(const std::string &name, const std::filesystem::path &source_file)
Register a named schema body from a file, with the same rules as add_schema_string().
-
void add_override_string(const std::string &source_code)
Atomically register an unwrapped $override body. Value paths resolve to existing targets; terminal collection item groups may create schema-backed items. An empty or comment-only body makes no changes.
-
void add_override_string(const std::string &source_code, const std::string &source_name)
Add an override body with a stable source name for diagnostics.
-
void add_override_file(const std::filesystem::path &source_file)
Register an unwrapped override body from a file, retaining its source path. An empty or comment-only file makes no changes.
-
void add_file(const std::filesystem::path &source_file, std::string source_name = {}, bool absolute = false)
Add DIPL code from a file. Use add_project() for a DIPfile manifest.
- Parameters:
source_file – File name of a DIPL code file
source_name – Specific source name of the nodes
absolute –
-
void add_source(const std::string &source_name, const std::string &source_file)
Add DIPL source
- Parameters:
source_name – Name of the new source
source_file – File name of a DIPL source file
-
void add_unit(const std::string &unit_name, const std::string &unit_expression)
Add unit definition
- Parameters:
unit_name – Name of the new units
unit_expression – Unit definition
-
void add_project(const std::filesystem::path &project_file)
Add a DIP project manifest.
The manifest is ordinary DIPL containing diplfile[], units[], sources[], schemas[], overrides[], and ordered code[] records. Included DIPfiles are loaded first in declaration order, with paths relative to the including manifest. Each schemas[] item has a name and exactly one file or string body, without a $schema wrapper. Each overrides[] item has a file containing an unwrapped $override body. Schemas and overrides are registered before model evaluation. Relative paths are resolved from the manifest’s directory.
- Parameters:
project_file – Path to the DIPfile manifest.
-
void add_project(const ProjectBundle &bundle)
Evaluate a self-contained text bundle with the normal DIPfile rules.
-
void add_project(const ProjectInput &project)
Register a project entirely from memory, without filesystem access.
-
inline void set_project_file_reader(ProjectFileReader reader)
-
void add_function_value(const std::string &name, FunctionList::DataFunctionType func)
Add function that returns a value
- Parameters:
name – Name of the function
func – Function pointer
-
void add_function_nodes(const std::string &name, FunctionList::NodesFunctionType func)
Add function that returns list of nodes
- Parameters:
name – Name of the function
func – Function pointer
-
Environment parse(bool record_dependency_graph = false, bool retain_block_inputs = false, bool allow_unset_setup_values = false)
Parse DIPL code lines and return an environment with registered schemas. Dependency recording and retention of parsed string blocks are opt-in.
-
std::vector<core::Diagnostic> collect_syntax_diagnostics(std::size_t max_diagnostics = 100) const
Collect recoverable statement syntax errors without evaluating the model. Normal parse() remains fail-fast. A malformed multiline statement may consume following lines, so diagnostics are limited to safe boundaries.
-
std::string to_string()
Get a string representation of the current DIPL instance
- Returns:
String representation of this class
Public Static Functions
-
static Environment load(const std::filesystem::path &path, bool record_dependency_graph = false, bool retain_block_inputs = false)
Load one DIPL file, DIPfile project, or DIPH5 snapshot into a new environment.
The filename selects the input kind: .dip/.dipl are parsed as source, DIPfile loads its project registrations, and .diph5 restores a snapshot. The optional flags apply to source and project parsing; snapshots keep the graph state saved in the file.
- Parameters:
path – Path to the input artifact.
record_dependency_graph – Record evaluation dependencies when parsing source.
retain_block_inputs – Retain parsed string blocks in a live environment.
- Returns:
The evaluated or restored environment.
-
DIP()
-
class EditSession
A source editing session for a file-backed DIP project or standalone DIPL file.
The session retains the project as an in-memory bundle. Candidate text is evaluated by replaying that bundle, so relative includes and normal DIP phase ordering are identical to a regular project load. The viewer can use this API without implementing parsing, evaluation, or diff logic.
Public Functions
-
explicit EditSession(const std::filesystem::path &artifact, bool allow_unset_setup_values = false)
Load a project or standalone .dip/.dipl file for editing.
-
inline const ProjectBundle &bundle() const
Return the original packaged project.
-
bool contains_document(const std::string &path) const
Test whether a normalized project-relative path is in the bundle.
-
const std::string &document_text(const std::string &path) const
Return the current session text for a bundled document.
-
PreviewResult preview_document(const std::string &path, const std::string &text) const
Evaluate a candidate replacement for an existing project-relative document, returning baseline/candidate diagnostics and a comparison. The path must name a file already present in the packaged project.
-
PreviewResult preview_block(const std::string &path, const std::string &text) const
Validate edited text using the recorded array or table block format.
-
void save_document(const std::string &path, const std::string &text)
Write a document back only if its on-disk contents still match the version loaded by this session. The path must be an existing bundled document. After a successful write, the session’s baseline is updated.
-
void save_block(const std::string &path, const std::string &text)
Replace and save one block value inside its original bundled source document.
-
void create_code_source(const std::string &filename)
Create a new project-root .dip source and register it as a code[] entry.
-
void create_named_source(const std::string &name, const std::string &filename)
Create a new project-root .dip source and register it as a named sources[] entry.
-
void delete_override(std::size_t project_entry_index)
Delete one file-backed override and its DIPfile registration after validating the remaining project.
-
bool save_as(const std::filesystem::path &destination_directory, const std::optional<std::string> &edited_path = std::nullopt, const std::string &edited_text = {})
Copy the bundled project into a new directory. The destination must not exist. An optional document replacement is included in the copy. Throws on filesystem errors; returns false without creating a copy when its candidate project does not evaluate successfully.
-
explicit EditSession(const std::filesystem::path &artifact, bool allow_unset_setup_values = false)
-
class Environment
Object of this class holds the whole DIP parsing environment
Public Functions
-
Environment()
Constructor of the Environment class
-
inline void set_project_file_reader(ProjectFileReader reader)
File access used by DIPfile registrations and $source nodes.
-
inline const ProjectFileReader &project_file_reader() const
-
inline std::string read_project_file(const std::filesystem::path &path) const
-
inline void set_dependency_recording(bool enabled)
Enable graph capture for this parse.
-
inline void set_dependency_graph(DependencyGraph graph)
Restore a graph from a versioned snapshot.
-
exs::CompositionGraph *active_composition(const std::string &expression)
Attach the operation tree produced by the numerical or logical solver.
-
void set_active_dependency_owner(std::string owner)
-
void set_value_controls(const std::string &owner, const std::vector<size_t> &case_ids)
-
void record_import_origin(const std::string &source_node_id)
-
inline bool is_loaded_snapshot() const
Whether this environment was loaded from a DIPH5 snapshot.
-
inline const std::optional<OutputPlan> &output_plan() const
-
inline void set_output_plan(OutputPlan plan)
-
inline const std::filesystem::path &source_path_base() const
Base directory for relative source paths in a loaded snapshot.
-
inline const std::vector<ProjectEntry> &project_entries() const
Registrations from parsed DIPfiles. Snapshot loading does not restore these entries.
-
inline void record_project_entry(ProjectEntry entry)
-
inline const std::map<std::string, BlockInput> &block_inputs() const
String blocks from a live parse. Snapshots retain values, not source text.
-
inline bool block_input_recording() const
-
inline void set_block_input_recording(bool enabled)
-
void record_block_input(const BaseNode &declared, const BaseNode &input, const std::string &path, char delimiter = ' ')
Capture the effective source literal after successful evaluation.
-
inline void erase_block_input(const std::string &path)
-
inline const ExplicitDeclarations &declarations() const
Explicit declarations in the evaluated scope.
-
inline const std::vector<SchemaApplicationEvent> &schema_applications() const
Evaluation-order schema applications. Snapshots do not retain this history.
-
inline void record_schema_application(std::string path, std::string schema_name, bool inherited, const Line &line)
-
void load(const std::filesystem::path &file)
Load a DIPH5 v3 archive, including its resolved values and source bytes. Reusable schema definitions are not reconstructed from the resolved tree.
- Parameters:
file – Path to the v3 archive.
-
void save(const std::filesystem::path &file) const
Save a source-complete DIPH5 v3 archive with resolved values and provenance.
- Parameters:
file – Destination archive path.
-
void save(const std::filesystem::path &file, const OutputPlan &output_plan) const
Save with a resolved adapter output plan.
- Parameters:
file – Destination archive.
output_plan – Plan to preserve in the archive.
-
inline const std::vector<AppliedOverrideSource> &applied_override_sources() const
-
inline void record_applied_override_source(AppliedOverrideSource source)
-
inline const std::vector<ArchivedSource> &archived_sources() const
-
inline void set_archived_sources(std::vector<ArchivedSource> sources)
-
void extract_sources(const std::filesystem::path &destination) const
Extract archived source bytes under destination using generated safe filenames.
-
void generate(ExportFormat format, const std::filesystem::path &file) const
Generate static parameter lists from the environment nodes
- Parameters:
format – Output format of a generated parameter list
file – File name of the generated parameter list
-
std::vector<SourceInfo> get_source_manifest() const
Return durable source identities for the parsed or loaded environment.
Parsed environments derive the manifest from their registered sources; loaded DIPH5 environments return the manifest stored in the file.
-
std::optional<SourceInfo> get_source_info(const std::string &name) const
Return the durable identity of a named DIPL source, when available.
-
void set_source_manifest(std::vector<SourceInfo> manifest)
Replace persisted source-manifest information during environment loading. This does not recreate executable source definitions or source code.
-
std::vector<TraceInfo> get_trace_manifest() const
Return durable identities for registered units, schemas, and functions.
-
void set_trace_manifest(std::vector<TraceInfo> manifest)
Replace persisted trace-registry information during environment loading.
-
std::vector<SchemaInfo> get_schema_manifest() const
Return schema descriptions and source provenance without executable definitions.
-
void set_schema_manifest(std::vector<SchemaInfo> manifest)
Replace persisted schema provenance during DIPH5 loading.
-
std::vector<SchemaInfo> get_applied_schemas(const std::string &path) const
Return schemas applied along a value or collection path, in path order.
-
std::optional<SchemaInfo> get_contributing_schema(const std::string &path) const
Return the schema that supplied a value node, if known.
-
std::string request_code(const std::string &source_name) const
Get a source code
- Parameters:
source_name – Name of a source
- Returns:
Source code
-
ValueNodeData request_node_data(const std::string &request, const RequestType rtype = RequestType::Reference, std::string_view operand = {}) const
Get node data (value + units) from a reference or a function based on a request expression
- Parameters:
request – Request expression
rtype – Request type: reference, or function
- Returns:
Selected value node data
-
val::BaseValue::PointerType request_value(const std::string &request, const RequestType rtype = RequestType::Reference, const std::optional<std::string_view> to_unit = std::nullopt) const
Get value from a reference or a function based on a request expression
- Parameters:
request – Request expression
rtype – Request type: reference, or function
to_unit – Request values with a specific unit
- Returns:
Selected ArrayValue object (in specified units)
-
ValueNode::ListType request_group(const std::string &request, const RequestType rtype = RequestType::Reference, const std::vector<std::string> &tags = {}, const std::string &target_prefix = {}) const
Request nodes from a reference or function. Reference results are snapshots with paths relative to the requested root. Tag filtering uses any-match semantics; an empty tag list imposes no restriction. Empty results throw.
- Parameters:
request – Request expression
rtype – Request type: reference, or function
tags – Tags of which at least one must occur on each returned node
target_prefix – Optional import path prepended to each selected node
- Returns:
Group of selected nodes
-
std::unordered_map<std::string, ValueNode::ListType> request_map(const std::string &request, const RequestType rtype = RequestType::Reference, const std::vector<std::string> &tags = {}) const
Get a keyed collection of nodes from a reference or a function based on a request expression
- Parameters:
request – Request expression
rtype – Request type: reference, or function
tags – List of tags that filter selected set
- Returns:
Keyed collection of nodes
-
std::vector<ValueNode::ListType> request_list(const std::string &request, const RequestType rtype = RequestType::Reference, const std::vector<std::string> &tags = {}) const
Get a indexed collection of nodes from a reference or a function based on a request expression
- Parameters:
request – Request expression
rtype – Request type: reference, or function
tags – List of tags that filter selected set
- Returns:
Indexed collection of nodes
-
val::BaseValue::PointerType get_value(size_t index) const
Get parsed node value at the specific index
- Parameters:
index – Index of a node
- Returns:
ArrayValue of a selected node
-
ValueNode::PointerType get_node(const std::string &path, const std::string &source_name = {}) const
Get an environment-owned pointer to a node with a specific name. The pointer refers to the stored node, unlike the snapshots from select().
- Parameters:
path – Path name of a searched node
- Returns:
Pointer to a selected node
-
ResolvedPath resolve_link_path(const std::string &path, const std::string &source_name = {}) const
Resolve a local path through links while retaining named-source identity.
-
void validate_write_path(const std::string &path) const
Reject writes addressed through a link; callers must use its canonical target path.
-
void validate_links() const
Validate live link targets after all local and named sources are parsed.
-
const std::string to_string() const
Represent environment as a string
- Returns:
String representation of an environment
Public Members
-
HierarchyList hierarchy
List of node hierarchy (parent nodes).
-
BranchingList branching
List of code branching (case, else).
-
SourceList sources
List of code sources.
-
SchemaList schemas
Reusable definitions; not restored from DIPH5.
-
OverrideList overrides
Collected value modifications for initial evaluation.
-
FunctionList functions
List of functions.
-
class DependencyScope
Scope one parser evaluation. Restores the previous context on exit.
Public Functions
-
DependencyScope(Environment &env, std::string owner, DependencyEventKind kind, std::optional<core::SourceLocation> location = std::nullopt)
-
~DependencyScope()
-
DependencyScope(const DependencyScope&) = delete
-
DependencyScope &operator=(const DependencyScope&) = delete
-
DependencyScope(Environment &env, std::string owner, DependencyEventKind kind, std::optional<core::SourceLocation> location = std::nullopt)
-
class EnvironmentException : public snt::dip::Exception
Environment exceptions signal problems with DIP environments
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
class Exception : public snt::core::ExceptionBase<dip::ExceptionInfo>
Subclassed by snt::dip::EnvironmentException, snt::dip::IOException, snt::dip::MissingException, snt::dip::ParserException, snt::dip::PybindException, snt::dip::SolverException, snt::dip::SyntaxException, snt::dip::UnitException
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct ExceptionInfo : public snt::core::ExceptionInfo
Public Members
-
std::optional<core::SourceLocation> location
DIPL code line where exception occured.
-
std::optional<core::SourceLocation> location
-
class ExceptionLocationScope
Current DIPL line for diagnostics created during nested evaluation.
Public Functions
-
~ExceptionLocationScope()
-
ExceptionLocationScope(const ExceptionLocationScope&) = delete
-
ExceptionLocationScope &operator=(const ExceptionLocationScope&) = delete
-
~ExceptionLocationScope()
-
class Experiment
One execution record per DIPH5 file. Methods reopen the file at each lifecycle boundary.
Public Functions
-
void start(const ExperimentCommand &command) const
Record the command before execution.
- Parameters:
command – Observed invocation and runtime context.
-
void finish(ExperimentStatus status, std::optional<int> exit_code = {}, const std::string &message = {}, std::optional<int> termination_signal = {}) const
Close a running record.
- Parameters:
status – Terminal status.
exit_code – Process exit code if known.
message – Human-readable outcome.
termination_signal – Signal if known.
-
void import(ExperimentStatus status, std::optional<int> exit_code = {}, const std::string &message = {}, std::optional<int> termination_signal = {}) const
Record a past run when no live start event was observed.
- Parameters:
status – Terminal status.
exit_code – Reported exit code, if known.
message – Human-readable outcome.
termination_signal – Reported signal, if known.
-
std::string add_dataset(const std::string &name, const std::vector<double> &values, const std::vector<uint64_t> &shape, const std::string &units = {}, const std::vector<std::string> &dimensions = {}, const std::string &description = {}) const
Add an embedded numeric result.
- Parameters:
name – Result name.
values – Values in row-major order.
shape – Array dimensions, empty for a scalar.
units – PUEL unit spelling.
dimensions – Optional axis names.
description – Human-readable description.
- Returns:
Stable result identifier.
-
std::string add_typed_dataset(const std::string &name, const ExperimentValues &values, const std::string &dtype, const std::vector<uint64_t> &shape, const std::string &units = {}, const std::vector<std::string> &dimensions = {}, const std::string &description = {}) const
Store values using their declared DIPL numeric type. Values must fit the requested type.
-
std::string attach_artifact(const std::filesystem::path &artifact, const std::string &name, const std::string &format = {}) const
Register a result file without embedding it.
- Parameters:
artifact – File to inspect.
name – Result name.
format – Format label.
- Returns:
Stable result identifier.
-
std::string add_diagnostic(const std::string &name, double value, const std::string &category, const std::string &description = {}) const
Add one observed diagnostic.
- Parameters:
name – Diagnostic name.
value – Numeric value.
category – Diagnostic category.
description – Human-readable description.
- Returns:
Stable result identifier.
-
std::vector<ExperimentResult> results() const
List registered results in archive order.
-
void finalize_results() const
Seal the result inventory and its checksums.
-
ExperimentVerification verify() const
Check archive structure, hashes, and external artifact availability.
-
ExperimentOutcome outcome() const
Read the current execution status and command record.
-
inline const std::filesystem::path &path() const
Return the archive path used by this handle.
Public Static Functions
-
static Experiment prepare(const Environment &environment, const std::filesystem::path &file)
Create a prepared archive from a parsed model.
- Parameters:
environment – Parsed configuration with source bytes.
file – New archive path.
-
static Experiment prepare_from_archive(const std::filesystem::path &environment_file, const std::filesystem::path &experiment_file)
Copy a prepared environment archive into a new experiment record.
- Parameters:
environment_file – Source archive.
experiment_file – New archive path.
-
static core::ProcessResult run_from_archive(const std::filesystem::path &environment_file, const std::filesystem::path &experiment_file, ExperimentCommand command)
Prepare, launch, and close a recorded experiment using observed process data.
-
static Experiment open(const std::filesystem::path &file)
Open an existing experiment.
- Parameters:
file – Archive path.
-
void start(const ExperimentCommand &command) const
-
struct ExperimentCommand
Public Members
-
std::vector<std::string> argv
Observed argument vector, including the executable.
-
std::filesystem::path working_directory
Directory used to launch the command.
-
std::string command_role
Whether argv identifies the program or a launcher.
-
std::string capture_origin
How the command details were obtained.
-
bool argv_redacted
Whether sensitive arguments were removed.
-
std::vector<std::string> launcher_argv
Outer launcher arguments when separately known.
-
std::string reported_executable_path
Executable path supplied by an external host.
-
std::string reported_executable_sha256
Executable digest supplied by an external host.
-
std::optional<uint64_t> reported_executable_size_bytes
Reported executable size, when known.
-
std::vector<std::string> argv
-
struct ExperimentOutcome
Public Members
-
ExperimentStatus status
Current lifecycle state.
-
std::string record_id
Stable identity of this execution attempt.
-
std::string created_at
Archive creation timestamp.
-
std::string started_at
Start timestamp, if observed.
-
std::string finished_at
Terminal timestamp, if observed.
-
std::optional<int> exit_code
Process exit status, when known.
-
std::optional<int> termination_signal
Signal that ended the process, when known.
-
std::string message
Human-readable outcome detail.
-
std::string capture_origin
Provenance of the outcome report.
-
std::optional<ExperimentCommand> command
Recorded invocation, if available.
-
std::string resolved_executable_path
Resolved executable path, if available.
-
std::string executable_sha256
Digest of the executable bytes, if available.
-
std::optional<uint64_t> executable_size_bytes
Size of the executable bytes, if available.
-
std::string system_os
Operating system recorded at start.
-
std::string system_architecture
Machine architecture recorded at start.
-
std::optional<uint32_t> hardware_threads
Hardware thread count, if observed.
-
ExperimentStatus status
-
struct ExperimentResult
Public Members
-
std::string result_id
Stable identifier within the archive.
-
std::string name
User-facing result name.
-
std::string kind
Dataset, artifact, or diagnostic kind.
-
std::string storage
Embedded or external storage mode.
-
std::string status
Result lifecycle state.
-
std::string path_or_uri
External artifact location, when applicable.
-
std::string verification
Artifact verification state.
-
std::string sha256
Hash of the result payload, when available.
-
std::optional<uint64_t> size_bytes
External artifact size, when available.
-
std::string units
Unit spelling for a numeric result.
-
std::string description
User-provided result description.
-
std::vector<std::string> dimensions
Ordered names of array axes.
-
std::vector<uint64_t> shape
Numeric dataset extents.
-
std::vector<double> values
Numeric values converted to double for display.
-
std::string logical_dtype
Declared DIPL numeric type.
-
ExperimentValues typed_values
Values retained at their declared numeric width.
-
std::string result_id
-
struct ExperimentVerification
Public Members
-
std::string structural
Archive structure check status.
-
std::string integrity
Internal checksum check status.
-
std::string external_artifacts
External file availability and checksum status.
-
std::string reexecutability
Whether recorded inputs could support rerunning.
-
std::vector<std::string> details
Human-readable verification findings.
-
std::string configuration_fingerprint
Resolved configuration digest status.
-
std::string structural
-
class ExplicitDeclarations
Explicit path declarations in one evaluated source scope. Inferred parent paths are intentionally absent. The first active declaration is retained.
-
struct FormatOptions
Style options defined by the built-in DIPfile format schema.
-
struct InspectedSourceLocation
A semantic source location. When embedded text has a host registration, source and line identify that physical location while logical_source_name and logical_line retain the original declaration. All lines are one-based.
Public Members
-
SourceLocationRole role
-
SourceInfo source
-
std::size_t line
-
std::string logical_source_name
-
std::size_t logical_line
-
std::size_t modification_index
-
bool embedded_registration
-
bool source_text_available
Parsed text is retained in this environment.
-
SourceLocationRole role
-
class Inspector
Read-only queries over one evaluated environment. The environment must outlive this view. Value and description results are owned; graph and retained block references belong to the environment.
Public Functions
-
inline explicit Inspector(const Environment &env)
-
Inspector(Environment&&) = delete
-
Inspector(const Environment&&) = delete
-
ValueNode::ListType select(const std::string &query = "?", const TagFilter &tags = {}) const
Select independent value snapshots in environment order. ? selects all values; ?path selects one, and ?path. selects a subtree. Tag filters match explicit tags.
-
std::vector<std::string> select_paths(const std::string &query = "?", const TagFilter &tags = {}) const
Select matching path names without cloning values or arrays.
-
inline Cursor cursor(std::string_view path) const
Traverse a known path without cloning the underlying value.
-
ValueInspection value(std::string_view path) const
Owned value and its type, shape, units, metadata, provenance, and applied changes.
-
std::vector<ValueInspection> values() const
All evaluated values, each with its full path.
-
ValueSummary value_summary(std::string_view path) const
Type, shape, element count, units, and metadata without copying value data.
-
val::BaseValue::PointerType value_slice(std::string_view path, const val::Array::RangeType &ranges) const
Inclusive zero-based ranges from an evaluated in-memory value; no lazy DIPH5 I/O.
-
TableInspection table(std::string_view path) const
Row count and ordered column metadata without copying table cells.
-
std::vector<TableInspection> tables() const
All evaluated tables in environment order.
-
inline std::vector<SourceInfo> sources() const
Source manifest entries, including source-level metadata.
-
inline std::optional<SourceInfo> source(std::string_view name) const
Find one source by its DIPL source name.
-
InspectionCapabilities capabilities(std::string_view path) const
Available facts and operations for a value, group, collection, table, or named-source path.
-
OverrideContract override_contract(std::string_view path) const
Static override target and known constraints; preview decides candidate validity.
-
SchemaHierarchyInspection schema_hierarchy() const
Reusable schema definitions and evaluated application sites.
-
std::vector<InspectedSourceLocation> source_locations(const SourceEntity &entity) const
Semantic source locations in precedence order; retained source text may be unavailable.
-
const std::map<std::string, BlockInput> &block_inputs() const
Original array/table string blocks retained by an opt-in live parse; empty for snapshots.
-
const BlockInput *block_input(std::string_view path) const
A retained block by evaluated path, or nullptr when unavailable.
-
SemanticDescription describe(std::string_view path, std::size_t max_value_elements = 16) const
Bounded semantic description of one value, group, collection, or table.
-
SemanticList list_descriptions(const std::string &query = "?", const TagFilter &tags = {}, std::size_t limit = 100, std::size_t max_value_elements = 0) const
Bounded descriptions selected by a ? query and tags; includes the total match count.
-
RecordResult records(const RecordQuery &query) const
Query scalar fields of keyed collection items in declaration order.
-
inline const DependencyGraph &graph() const
Recorded evaluation events and effective dependency queries. Empty when capture was disabled.
-
DependencyNeighborhood dependency_neighborhood(std::string_view path) const
One-hop inputs and readers of a path, with latest value and condition events.
-
inline explicit Inspector(const Environment &env)
-
class IOException : public snt::dip::Exception
In/Out exceptions is triggered by problems with a file system (e.g. missing files, timeouts, …)
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct LintOptions
Advisory checks applied only after DIPL has been parsed and evaluated.
Public Members
-
bool require_public_descriptions
Warn when public values or schemas lack ?descr.
-
bool warn_deprecated_values
Warn when an evaluated value carries ?deprecated.
-
bool warn_duplicate_options
Warn when a choice occurs more than once in !options.
-
bool require_public_option_labels
Warn when public numeric choices lack !labels.
-
bool warn_broken_metadata_references
Check path-like advisory metadata against evaluated paths.
-
bool warn_unused_schemas
Warn about definitions with no evaluated application.
-
bool require_public_descriptions
-
struct LintResult
Validation errors or advisory findings for one input.
Public Functions
-
inline bool clean() const noexcept
True when the input is valid and no enabled rule reported a finding.
Public Members
-
bool input_valid
False when validation prevented linting.
-
std::vector<core::Diagnostic> diagnostics
Errors or lint warnings with source locations.
-
inline bool clean() const noexcept
-
struct MetadataConstraintInspection
Public Members
-
std::string property
-
std::string rule
-
std::string schema
-
core::SourceLocation origin
-
std::string property
-
class MissingException : public snt::dip::Exception
Missing exception is triggered when functionality is not implemented yet
-
struct OverrideContract
Public Members
-
std::string path
-
OverrideTargetKind kind
-
std::string reason
Stable reason when unavailable.
-
std::string resolved_path
New list items receive the next index at this moment.
-
std::optional<std::string> units
-
std::vector<std::string> enforced_options
-
std::vector<std::string> option_labels
-
std::string enforced_condition
-
std::vector<std::string> item_schemas
-
bool snapshot_input
A snapshot has no parser input to preview directly.
-
std::string path
-
class ParserException : public snt::dip::Exception
Parser exceptions occurs when internal DIP parsers fails
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct PreviewOverride
-
struct PreviewResult
Public Members
-
bool baseline_valid
-
bool candidate_valid
-
std::vector<core::Diagnostic> baseline_diagnostics
-
std::vector<core::Diagnostic> candidate_diagnostics
-
std::vector<std::string> accepted_override_targets
-
ComparisonResult comparison
-
bool baseline_valid
-
struct ProjectBundle
-
struct ProjectBundleFile
Text files needed to evaluate one DIPfile without external I/O. Paths are relative to the directory containing the DIPfile and use forward slashes.
-
struct ProjectEntry
One DIPfile registration, retained in manifest order for live inspection.
Public Types
Public Members
-
std::string name
Public name, when the entry has one.
-
std::string value
Declared unit, path, or inline text.
-
std::string resolved_path
Absolute file path for file entries; empty for inline entries.
-
std::string source_name
DIPfile source identity.
-
size_t line
One-based DIPfile assignment line.
-
std::string name
-
struct ProjectInput
Text-backed project registrations, processed in DIPfile phase order.
Public Members
-
std::vector<ProjectText> units
Unit definitions in declaration order.
-
std::vector<ProjectText> schemas
Schema definitions in declaration order.
-
std::vector<ProjectText> code
Model source texts in declaration order.
-
std::vector<ProjectText> overrides
Applied override texts in declaration order.
-
std::vector<ProjectText> units
-
struct ProjectText
-
struct Provenance
Read-only provenance associated with the value selected by a cursor.
Public Members
-
size_t source_line
One-based declaration line, if known.
-
std::string source_code
Declaration text, if retained.
-
ValueMetadata metadata
Effective metadata on the selected value.
-
std::optional<SourceInfo> source
Durable declaration source information.
-
std::optional<SourceInfo> override_source
Source of an applied override, if any.
-
size_t override_line
One-based override line, if known.
-
std::string override_code
Applied override text, if retained.
-
size_t source_line
-
class PybindException : public snt::dip::Exception
Pybind exceptions are thrown during incorrect Python binding
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct RecordField
-
struct RecordFilter
Equality against a scalar field of a keyed collection item.
-
struct RecordItem
-
struct RecordQuery
-
struct RecordResult
-
struct ResolvedPath
Canonical location reached by following zero or more links.
-
struct SchemaApplicationEvent
One schema relationship observed while evaluating a live input.
-
struct SchemaApplicationInspection
-
struct SchemaDefinitionInspection
Public Members
-
std::string id
Registered, project-scoped schema name.
-
std::string name
-
ValueMetadata metadata
-
std::vector<MetadataConstraintInspection> instance_metadata_constraints
-
core::SourceLocation origin
-
std::vector<SchemaMemberInspection> members
-
std::string id
-
struct SchemaHierarchyInspection
Definitions and evaluated application sites. Snapshot applications are reconstructed from retained associations and are explicitly incomplete.
Public Members
-
bool definitions_available
-
bool applications_complete
-
std::vector<SchemaDefinitionInspection> definitions
-
std::vector<SchemaApplicationInspection> applications
-
std::vector<SchemaValueAssociation> values
-
std::map<std::string, SourceInfo> sources
Resolve origin source IDs to physical source identities.
-
bool definitions_available
-
struct SchemaInfo
Descriptive schema provenance; contains no reusable schema nodes.
Public Members
-
std::string id
Stable schema trace identifier.
-
std::string name
Registered schema name.
-
size_t source_line
Declaration line in that source.
-
ValueMetadata metadata
Descriptive schema metadata.
-
std::optional<SourceInfo> source
Source identity and fingerprint when available.
-
std::string id
-
struct SchemaMemberInspection
A declared schema member. Children preserve source declaration order.
Public Members
-
std::string name
-
std::string relative_path
-
std::string kind
-
std::string type
-
std::string units
-
std::string default_value
Declared schema default, if present.
-
bool setup
Included in guided setup.
-
std::vector<std::string> schema_refs
-
std::vector<std::string> options
-
std::vector<std::string> option_labels
-
std::string condition
-
ValueMetadata metadata
-
std::vector<MetadataConstraintInspection> metadata_constraints
-
core::SourceLocation origin
-
std::vector<SchemaMemberInspection> members
-
std::string name
-
struct SchemaValueAssociation
-
struct SemanticDescription
Bounded, owned description of one evaluated path. Values use DIPL text.
Public Members
-
std::string path
-
std::string kind
-
std::optional<std::string> canonical_path
-
std::optional<std::string> link_source
-
std::optional<std::string> link_target
-
std::string link_status
Empty for ordinary nodes; otherwise resolved or unresolved.
-
std::string declared_type
-
std::string stored_type
-
std::size_t elements
-
std::optional<std::string> value_text
-
std::optional<std::string> units
-
ValueMetadata metadata
-
std::vector<std::string> tags
-
bool overridden
-
std::optional<core::SourceLocation> declaration
-
std::optional<core::SourceLocation> override_location
-
bool source_text_available
-
std::vector<std::string> enforced_options
-
std::vector<std::string> option_labels
Parallel to enforced_options when labels are declared.
-
std::string enforced_condition
-
bool dependencies_recorded
-
std::vector<DependencyEdge> dependencies
-
std::string path
-
struct SemanticList
-
class SetupInputError : public std::runtime_error
A guided setup answer failed validation; path identifies the form field.
-
struct SetupOption
-
struct SetupQuestion
A user-editable value discovered from a DIPL
!setupannotation.
-
class SetupSession
Collect setup inputs, construct overrides, and validate them as one project.
Subclassed by snt::api::DIPSetup
Public Functions
-
explicit SetupSession(const std::filesystem::path &project_file)
-
inline const std::vector<SetupQuestion> &questions() const
-
inline std::size_t registered_override_count() const
Number of guided setup override files registered in the project.
-
void answer(const std::string &path, const std::string &input)
Set a string as plain text, or other scalar/array values as DIPL expressions.
-
void choose(const std::string &path, std::size_t option_index)
Select one of the DIPL
!optionsvalues by its zero-based index.
-
void answer_batch(const std::map<std::string, std::string> &answers, const std::map<std::string, std::size_t> &choices)
Stage a complete form and validate the combined answers once.
-
std::string override_text() const
The generated unwrapped DIPL override body.
-
Environment preview() const
Parse the project with all answers and run its ordinary validation.
-
void save(const std::filesystem::path &output_file) const
Validate and write the override body, refusing to replace an existing file.
-
void save_and_register(const std::filesystem::path &output_file) const
Validate and save answers, then register the new override in the DIPfile.
-
void remove_registered_overrides() const
Unregister and delete guided setup override files without touching other overrides.
-
explicit SetupSession(const std::filesystem::path &project_file)
-
class SolverException : public snt::dip::Exception
Solver exceptions occurs when solver cannot process an expression
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct Source
-
struct SourceEntity
-
struct SourceInfo
Durable identity and source-level metadata for one DIPL source.
The digest covers the exact UTF-8 bytes parsed by DIP. It is a fingerprint, not embedded source content.
Public Members
-
std::string name
Registered source identity.
-
std::string path
Original source path, if file backed.
-
size_t parent_line
Include line in the parent source.
-
std::string hash_algorithm
Algorithm used for the source fingerprint.
-
std::string hash
Fingerprint of exact source bytes.
-
ValueMetadata metadata
Source-level descriptive metadata.
-
std::string name
-
class SyntaxException : public snt::dip::Exception
Syntax exceptions are triggered by incorrect DIPL syntax
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct TableColumnInspection
Metadata for a table column; values remain in the environment.
-
struct TableInspection
A read-only view of an evaluated DIPL table.
Public Members
-
std::string path
-
size_t rows
-
ValueMetadata metadata
-
std::vector<TableColumnInspection> columns
-
std::string path
-
struct TagFilter
Forward declaring.
Match explicitly assigned node tags; fields combine with AND.
Public Functions
-
bool matches(const std::vector<std::string> &tags) const
Empty filter fields impose no restriction.
-
bool matches(const std::vector<std::string> &tags) const
-
struct TraceInfo
Durable identity information for one registered DIPL construct.
-
class UnitException : public snt::dip::Exception
Unit exceptions indicate problems with units, conversions and operations
Public Functions
-
inline explicit Exception(dip::ExceptionInfo info)
-
inline explicit Exception(dip::ExceptionInfo info)
-
struct ValidationOptions
Limits for diagnostic collection without changing validity rules.
Public Members
-
int max_syntax_errors
Maximum independent syntax errors reported; 1 to 1000.
-
int max_syntax_errors
-
struct ValidationResult
Diagnostics produced while validating one DIPL input.
Public Functions
-
inline bool valid() const noexcept
Return true when parsing and evaluation completed without an error.
Public Members
-
std::vector<core::Diagnostic> diagnostics
Empty when the input is valid.
-
inline bool valid() const noexcept
-
struct ValueChange
-
struct ValueInspection
Public Members
-
std::string path
-
val::BaseValue::PointerType value
-
ValueMetadata metadata
-
std::vector<std::string> tags
-
Provenance provenance
-
core::SourceLocation declaration_location
-
std::optional<core::SourceLocation> override_location
-
std::vector<SchemaInfo> applied_schemas
-
std::optional<SchemaInfo> contributing_schema
-
std::string table_path
Empty unless the value is a table column.
-
std::vector<ValueChange> changes
Applied changes in evaluation order.
-
std::string path
-
struct ValueSummary
Value facts without copying its potentially large array. Accepts an evaluated path or a source-qualified source?path ID.