arXiv:2610.24492cs.CLOct 2026

Manuscript Offprint

arXiv:2610.24492

Backend-Frontend Converter: Component-Based Conversion of .NET Computational Models to TypeScript

Petr Ivankov, Max Shestov

Abstract

Purpose Computational models developed in .NET often need to run locally within web applications. We present Backend–Frontend Converter, an architecture for generating TypeScript implementations of component-based models from BP_Simulator.

Methods The converter maps components, connections, aliases, and formula trees to model-specific TypeScript code. Reusable runtime libraries provide numerical integration, data access, and state handling. We evaluate stored generated implementations through four orbital scenarios and a recorded trading-strategy comparison. Orbital calculations execute in a browser and are paired with C# results by crossing event and timestamp; trading outputs are aligned by date. Analytic scheduler tests and deliberately perturbed outputs assess the validation procedure.

Results Each orbital scenario produces 91 paired events with identical timestamps. Position and velocity differences remain below 10−610^{-6} km and 10−910^{-9} km/s. All 20 analytic scheduler checks pass, and the comparator detects each of three prescribed state and time perturbations. The trading comparison contains 501 aligned daily records with matching indicator values, positions, and order events.

Conclusion The evaluated implementations preserve the compared outputs across the C#/TypeScript boundary. Component-specific generation and reusable execution libraries provide a practical route from supported .NET computational models to TypeScript applications.

Keywords: Model-driven engineering, Code generation, Component-based software engineering, Model migration, TypeScript, Computational models

1 Introduction

Computational models developed in .NET often combine numerical algorithms, domain-specific components, and execution logic tied to a backend or desktop environment. Running these models locally in a web application supports interactive feedback and reduces the need for server communication. A manual rewrite, however, duplicates domain logic and requires developers to maintain corresponding implementations.

This paper presents Backend–Frontend Converter, a converter from .NET computational component models to TypeScript. The input is a graph of components and connections in the BP_Simulator modeling environment. Component mappings translate its configuration, formula trees, value bindings, and connections into executable TypeScript code. Runtime libraries provide the numerical processors and domain behavior used by the generated model.

The central engineering problem is to preserve how a computational model uses its components: formulas must read the intended measurements, aliases must identify the same state variables, and processors must advance and collect that state in the intended order. The migration contract in Table 1 connects these model roles to generation rules and runtime responsibilities.

The paper contributes an implementation of this contract for computational component graphs and an evaluation spanning continuous and discrete calculations. Orbital forecasting combines numerical integration with event-based trajectory collection; a trading strategy combines filters, recursive state, and order generation. Comparisons with the corresponding C# implementations use explicit alignment rules, numerical tolerances, and reproducible comparison scripts to assess output agreement in both cases.