The Balance Between Specificity and Power
General-purpose languages (GPLs) do not compete with domain-specific languages (DSLs); their natures are different. It is not the intention of GPSS-Plus to replace object-oriented programming, which forms the foundation of almost all modern software.
This DSL is presented with a clear awareness of its limitations compared to general-purpose languages such as C or Python and their vast library ecosystems. However, it is necessary to define the boundaries between domain modeling, general-purpose languages, and purely mathematical approaches. In this regard, every model must be auditable and tested through a rigorous process, such as the V&V H-M-E framework we advocate.
The Modeler's Dilemma
Creating countless isolated scripts, connected only by what the modeler keeps in their own head, is not reasonable for a serious validation process. At the same time, however, limiting the ultimate goal of the model because of a limitation inherited from the DSL is an even greater mistake.
So, what is the solution?
The Hybrid Model
GPSS-Plus leaves the boundaries of the standard DSL open by allowing classes and external resources to be imported from the GPL Javascript environment. This capability transforms the model into a hybrid ecosystem:
-
The Native Model (Glass Box): The logic of blocks, flows, and resource management. It is fully transparent, auditable, and verifiable using the V&V H-M-E method.
-
Injected Resources (Black Box): Through
LOAD_CLASSandLOAD_MEDIA, the modeler integrates calculation libraries, sound systems, or graphical interfaces. The engine treats these components as "external entities" whose logic is opaque to semantic auditing. They must be validated before being integrated into the model.
These injected logical resources (not physical resources that affect entity flow) must be treated with the same operational hierarchy as a native resource. We could inject an FSM (Finite State Machine) to replace the native one, a solver specific to a field of knowledge —such as chemistry or botany—, or a matrix computation library.
These resources do not participate in the engine's internal mechanics; instead, they act as external components that the model can use. The engine treats them as logical entities whose internal behavior is opaque, thereby respecting the separation of responsibilities.
There is a deliberate reason why they have been denied an API for accessing the engine: for example, they cannot create virtual entities (VE) internally.
Under this philosophy, we have two main ways to inject class-based Javascript code:
-
Logical Resources: Creation of injectable libraries or classes for calculations and logic operating on the engine.
-
Multimedia Resources: Creation of injectable components for the visualizer and user interface.
The model remains the source of truth; external code only solves problems that the model defines.