Skip to content

Epic: Move DtRobust operators from hardcoded compiler constructs to dynamic standard library #247

@ztripez

Description

@ztripez

Epic: DtRobust Standard Library Migration

Overview

Move DtRobust operators (integrate, decay, relax, etc.) from hardcoded compiler constructs to dynamically registered standard library functions while preserving SSA optimizations and vectorized performance.

Current Problem

  • DtRobust operators are hardcoded in compiler with DtRobustOperator enum
  • Function names are hardcoded in parser/lowering phase
  • Math implementations are hardcoded in vectorized executor
  • Results in double implementation: hardcoded system AND stdlib functions
  • Violates principle of configurable/extensible standard library

Goals

  • ✅ Remove all hardcoded DtRobust logic from compiler
  • ✅ Make DtRobust operators dynamically registered in standard library
  • ✅ Preserve vectorized optimizations for performance
  • ✅ Use consistent kernel. prefix for all engine functions
  • ✅ Maintain SSA pipeline benefits

Migration Strategy

Phase 1: Enhance Kernel Registry

  • Extend kernel registry to support vectorized execution hints
  • Add vectorized function registration macros
  • Enable both scalar and vectorized implementations per function

Phase 2: Complete Standard Library

  • Add missing DtRobust operators to kernels/functions
  • Port vectorized implementations from compiler
  • Ensure all operators work with kernel.* syntax

Phase 3: Remove Hardcoded System

  • Remove DtRobustOperator enum and DtRobustCall variants
  • Remove hardcoded parsing precedence in expr lowering
  • Remove special SSA instruction handling

Phase 4: Update Execution Pipeline

  • Enhance execution engine for vectorized kernel calls
  • Update DSL syntax to require kernel. prefix
  • Performance validation and testing

Breaking Changes

  • DSL syntax changes: integrate()kernel.integrate()
  • IR API changes: Remove DtRobust types from public API

Success Criteria

  • All DtRobust operators available as stdlib functions
  • No hardcoded function names in compiler
  • Vectorized performance maintained or improved
  • Clean separation: compiler is operator-agnostic
  • Standard library is authoritative for available operators

Timeline

4 weeks total, one phase per week

Related Issues

Will be created as sub-issues of this epic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestepicHigh-level tracking issuerefactor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions