1. Introduction
Generative structures can provide significant advantages for streamlining system development and workflow orchestration. They extend the scope of design automation, enabling modelers and programmers to explore vast permutations within an accelerated pipeline. When such structures are semantically enhanced (e.g., from generative AI sources), the resulting artifacts can provide valuable insights. However, producing execution and sound simulations of such structures remains challenging. Even with the advent of generative models (e.g., code-writing assistants), the resulting implementations and proposals raise interpretability issues and lack correctness guarantees. They are also prone to context limits, training bias, semantic misalignment, and other known issues [
1]. The generated code could often lack an underlying model or an internal grasp of intent. The emerging tools clearly indicate the need for a significant paradigm shift in the ways we approach programming. However, without practical, advanced methods of validation and interpretation, the usability of such results can be challenging to realize.
To observe the structural aspects of generative models, we conducted a preliminary, exemplary experiment using one of the publicly available large language models (LLMs) to demonstrate the variability in generated results with minimal instructions. We prompted a generic GPT-4o [
2] to suggest domains and then generated a model or diagram for each domain. The generated list of domains included healthcare systems, e-commerce platforms, embedded systems, and many others. For example, we prompted a model that had not been personalized or fine-tuned with the following: “Generate a Bayesian graph example for a healthcare system ”. Then, we recorded the observed relevant metric of the resulting graph. We report the detailed observations of the selected metrics in
Table A1 and
Table A2 in
Appendix A. We recorded the total count for each feature (e.g., nodes, tables, or transitions) in the generated example. For instance, the generated database schema for a healthcare example consists of 6 tables and 6 relations. Whether it is a network, a process, or a diagram, the results in
Table 1 suggest some level of consistency in its general structural metrics. In extreme cases, such as the depth of a decision tree, the model generated almost all trees at the same depth. None of the generated activity diagrams included a fork node or input/output parameters, unless the model was explicitly instructed to do so. A relatively high variability score was achieved in generating transitions for state machine diagrams.
Table 1 shows the standard deviation result in each observed metric. We also conducted the same experiment on Gemini 2.5 Flash [
3] and observed similar patterns. While such consistency can be useful, some limitations remain to realize the potential of these models for generating large-scale, highly variable structures that are beneficial for exploratory design, combinatorial analysis, and the examination of exceptional cases [
4].
Thus, such issues may pose a limitation when scaling these models to address complex systems, where validating their reasoning capacity may be challenging. The generation process and the resulting structures may fail to evolve sufficiently to meet increasing needs. Some solutions attempt to explicitly introduce intermediate tokens to enhance LLM performance and improve results. Some target specific technical features, such as backtracking knowledge sources. Addressing context length [
5] is another approach to enabling larger windows in growing applications. It enhances the semantic enrichment in handling larger queries while still producing intact results [
6]. However, aside from predetermined benchmarks, the degradation of context remains a challenging issue, especially when it must be reliably addressed across the broader context and scale of systems.
A possible way to address this limitation is through human feedback and instruction. However, previous research has demonstrated cases of unfaithfulness and misalignment when such models are precisely instructed as they attempt to over-optimize for the predetermined measure, rather than focusing on overall quality and correctness. We demonstrated some cases in generating diagram structures with parallel flows [
4]. Other works have demonstrated inaccuracies in abstractive summarization when evaluated against historical facts [
7]. Some researchers frame these issues as a form of hallucination attributed to a variety of contributing factors [
1]. In this work, we address forms of misalignment and semantic misattribution, as the underlying model attempts to satisfy user-specific instructions while encountering domain limitations and imprecision.
In this article, we propose a neuro-symbolic approach to examine the expressive limits of generative models while benefiting from their ability to adapt to different domain semantics. We establish baselines for logic correctness using satisfiability encoding. We guide the model development process gradually, starting from a minimal yet continually growing set, and iteratively adding intermediary corrective and simulation layers. We aim to produce executable simulation artifacts that remain interpretable within a fully automated pipeline. Our approach relies on multiple layers of generic scaffolds that can be attached to the generative model to produce basic model-structure seeds. Afterward, the results undergo verification and enhancement steps to establish a sound, interpretable simulation.
2. Related Work
The advent of LLMs has spurred research across various fields, including verification and simulation modeling. Methods for utilizing these models are still emerging. Previous research has extensively investigated the use of SAT and SMT (satisfiability modulo theories) in software and system development (e.g., [
8,
9]), some with a particular interest in and application of execution and simulation modeling methodology [
10,
11]. The automated generation and refinement of system models from partial specifications has attracted interest not from a generative model perspective but rather according to formal verification rules. Some works propose the automated completion and verification of control-flow models [
8,
12] and transition systems [
9]. In domain-specific languages, a form of string transformation synthesis has been applied [
13]. SAT-based encodings have also been applied to the analysis of concurrent models such as Petri nets, including reachability and coverability problems [
14], as well as net synthesis from sequential observations [
15]. More recently, SAT solving has also been applied to workflow construction and composition [
16]. Symbolic reasoning techniques have long been used, demonstrating that large system state spaces can be analyzed by encoding system behavior into symbolic representations and solving the resulting logical constraints [
17].
Our approach elevates the application of formal methods at a different layer by connecting a generative model (e.g., an LLM) to SAT-based synthesis. The resulting model graph utilizes both the generative model and verifier as sources for auto-completion. We cast the formal encoding at the semi-formal specification and meta-layers, addressing the different diagram types used by practitioners that go beyond basic state-transition systems in program formulation. Additionally, the devised engine addresses both structural and behavioral specifications within a minimum set of execution semantics, while enabling full-cycle development and production for simulation artifacts in later stages. For example, activity flow and process models encompass a variety of control constructs that require different approaches to account for validation and execution at lower levels. Recent advances in generative models (i.e., LLMs) offer promising partial-input seeds to address such accounts but fail to provide a complete specification under formal guarantees without an extensive technical scaffold. Such checks are often delegated to an external engine, aka agentic workflow design.
Temporal and causal properties have also been extensively researched under formal modeling conditions. A wide variety of properties in software and systems are addressed using SAT/SMT solvers in conjunction with formal methods, such as timed automata and temporal logic. Several works employ SMT to validate timing constraints in dependencies in dataflow and workflow models [
18,
19,
20]. Linear temporal logic (LTL) and bounded model checking are also commonly used to verify reachability and safety in hardware design [
21]. The execution of partial models with defects has been applied to incomplete state machines, enabling early simulation and validation [
11]. Within the DEVS framework, several works explore verification through constrained finite-state spaces of simulation models [
10,
22]. Our approach enforces bounded checks at the design stage while enabling full-fledged simulation with open, unconstrained state spaces. We also add additional checks and corrections at the meta-layer for structural properties that are semantically significant. These additional checks enable the attainment of a richer set of executable simulations and leverage generative source regardless of their result quality. They enable the validation of generative structures with partial specifications.
Executable Modeling and Simulation
Using the DEVS formalism [
23] provides a computational foundation for attaining executable simulations [
24]. In contrast to traditional simulation techniques, we aim to use the DEVS-compliant set-theoretic foundation, combined with a minimal simulation engine, as a means to enable simulation models to evolve computationally. Such a trait is necessary in software and systems development due to the adaptive dynamics across multiple design and production layers and abstractions. The evolving dynamics in digital twins represent a case in point that demonstrates these needs. We adhere to the modular design to enforce explicit interface contracts. We use coupling features to facilitate communication among generative elements with distinct roles.
Several environments support DEVS-based simulation, including the open-source DEVS-Suite [
25] and the proprietary MS4 Me [
26]. Both primarily rely on the specification of atomic and coupled models with varying degrees of support for visualizations. Recent work [
27] explores the use of generic coding assistance tools to write simulation code. The study in [
28] surveys the literature on techniques for model execution.
In contrast, our approach automates the synthesis and generation of executable simulation artifacts from a high-level specification. SAT-based synthesis yields structural resolutions with control artifacts that can be directly mapped to a DEVS-based specification, enabling simulation across various timing configurations. The experimental framework enables the derivation of empirical insights with assurances of correctness under both deterministic and stochastic conditions. This work addresses limitations identified in previous research [
4] at a higher design level by adding an additional synthesis layer. It reinforces the generated designs and establishes experimental baselines based on the synthesis results, while accounting for both structural graph-theoretic features and execution semantics. Rather than requiring generative models to produce fully specified structures, we deliberately restrict their role to generating partial specifications. This abstraction mitigates issues related to hallucination, prompt sensitivity, and lack of guarantees, while preserving useful domain-level structure.
Table 2 summarizes the main attributes of previous studies and highlights their connection to the contribution of this paper.
3. Structural Resolution via SAT Encoding
In performing SAT encoding, responsibility for constructing an executable model is shifted to a formal synthesis layer that enforces structural consistency and execution semantics. This separation enables the integration of generative flexibility with formal guarantees. First, we start by encoding constraints to resolve the cases of structural ambiguity presented in
Figure 1. Once a case is identified, a control node is introduced to delegate the synchronization and merging logic. The added node represents a control construct common in flow, activity, state, process, and business process diagrams. These constructs are intended to enhance expressiveness in modeling languages and program state and flow graphs. With adequate support, such abstractions can provide a useful foundation for building simulations and accelerating the production process through advanced interpretation techniques. The problem is recognized as an ongoing challenge. Our approach in this part is to strengthen the generative process through formal synthesis and simulation techniques.
We use a generative model (e.g., an LLM) to produce a simplified structure in JSON format (or any structured file format, for that matter). Instructing the generative model to produce the final outcome may yield erroneous results or run into a context limit. It lacks the means to provide certificates, as in theorem provers, model checkers, and simulation tools. Thus, we modularize the process into an output consisting of action (atomic) nodes inferred from their pairwise precedence constraints. The produced object serves as input to the SAT program, which then introduces additional nodes. The diagram also includes initial timing estimates that we plan to use in subsequent sections for temporal verification and simulation. For example, if the generated diagram describes steps known to take a specific amount of time or to dictate an explicit time base, then the object will indicate the estimated time. During SAT-based synthesis, when a node has multiple incoming edges/flows, the program creates a new node and redirects the corresponding flow through it. In
Figure 1, the diagrams are shown before and after applying the specified rules. The resulting diagrams are guaranteed to be correct, unlike possibly malformed diagrams generated by the generative source, especially for complex control dynamics that may be susceptible to misalignment.
3.1. Problem Definition
Let
V denote a set of action nodes. The input specification is a precedence relation
where
indicates that action
u must precede action
v.
From
P, we derive predecessor and successor sets
Source and sink nodes are defined as
The objective is to synthesize an executable control-flow structure
that preserves the precedence constraints while assigning appropriate control semantics.
3.2. Structural Augmentation
Precedence relations alone may not encode the required control structure. To enable synthesis of forks, joins, and decision points, the solver may introduce auxiliary control nodes.
For each action
, two optional control nodes are defined,
and
These represent input and output control points, respectively. The expanded node set becomes
Edges in the synthesized structure may connect action nodes and control nodes.
3.3. Processing the Precedence Constraints
Given a precedence pair , where A and B are both essential components or action nodes, we define a set of candidate paths connecting A to B based on the possible presence of synchronization. For instance, if B receives multiple incoming flows (i.e., being a destination node in multiple precedence constraints), then the path from A to B has to go through a control node with two flows (a flow from A to and a flow from to B), replacing the precedence constraint in the original diagram. Each candidate path is expressed as a Boolean formula , involving the following edge variables representing flows and control activation flags:
: Direct edge from A to B;
, : Edges via the control-out (fan-out) node of A;
, : Edges via the control-in (fan-in) node of B;
: Connecting edge between control-out of A and control-in of B;
, : Boolean flags controlling the activation of control-out and control-in.
The candidate path formulae are:
Let
denote the set of valid path encodings for the precedence
. To ensure structural consistency, we enforce the following uniqueness constraint:
This is implemented in the solver [
29] via a pseudo-Boolean equality constraint using the following constraint:
Each formula
corresponds to one of the cases illustrated in
Figure 1:
applies to case (ii),
to case (i), and
to case (iii). Meanwhile,
corresponds to the original path (the precedence pair with no added control nodes).
3.4. Control Typing
Control nodes must choose a semantic control type. Two types are supported for both input and output control: for synchronous execution, and for exclusive choice (a relaxed control). For the input control nodes, these correspond to join and merge semantics, respectively. The output control nodes correspond to the fork, decision, and split semantics.
Let
denote the input control types and
denote the output control types.
When a control node is active, exactly one of the corresponding control types must be selected. We refer to control nodes assigned the
type as relaxed controls, as they relax strict synchronization requirements by allowing a single (or a subset) incoming or outgoing flow to activate the node. In contrast,
controls enforce full synchronization across all associated flows. This distinction is used in reporting the results (e.g., “Relaxed Ctrl” in
Table 3) and in describing the synthesized structures.
3.5. Execution Semantics
To ensure that the synthesized structure admits valid execution, token propagation semantics are encoded in the model.
Let
indicate that node
v contains a token at step
t. Transmission variables
represent token transfer between nodes.
The execution horizon is defined as
Source nodes initially hold tokens as follows:
Tokens may propagate along realized precedence relations subject to control semantics.
3.6. Control Semantics and Progression
Flow activation obeys the semantics of the control types. If an output control node is typed as synchronous, flows propagate to all active successors. If an output control node is typed as , at most one of its flows gets activated. If an input control node is synchronous, all incoming flows must be present before propagation. If an input control node is , any incoming flow may enable propagation. These rules enforce correct execution semantics for the synthesized structure.
To prevent the synthesis of dead structures, the solver enforces that at least one sink node becomes reachable within the execution horizon:
Source nodes initially hold tokens, and at least one sink node becomes reachable within the execution horizon. The framework supports a variety of execution specifications, including constraints on the number and distribution of tokens at sources or sinks. For the purposes of this study, we adopt the least restrictive configuration that guarantees execution progression while avoiding additional constraints that could bias the structural synthesis process.
3.7. Optimization Objective
Among the feasible solutions, the solver minimizes the number of
constructs. Let
Minimizing this objective favors synchronization constructs when possible, thereby preventing degeneracy and causal collapse.
A satisfiable assignment defines the active structural edges, the inserted control nodes, the assigned control types, and the flow progression traces. Together, these define an executable control-flow graph consistent with the original precedence specification, hence the final diagram. Algorithm 1 shows the overall SAT procedure.
Table 3 shows the completion results for a range of model examples. The examples include the four base cases in
Figure 1, referred to as M1, M2, M3, and M4. In addition, other examples of increasing size are created to demonstrate scalability and validate the results. M5 corresponds to a wafer fabrication flow with eight nodes and eight edges [
4]. Other models are generated synthetically, with the number of nodes and edges indicated in the table.
Figure 1 shows the cases M1, M2, M3, and M4 of models before and after synthesis.
An input model can be obtained by calling the LLM API (i.e., GPT-4o), which returns a JSON structure containing a list of nodes and precedence constraints. An example is shown in Listing 1.
| Listing 1. Sample model seed in JSON response. |
![Logics 04 00007 i001 Logics 04 00007 i001]() |
| Algorithm 1 SAT-Based Typed Structural Resolution from Precedence Constraints |
| Input: A set of action nodes V and precedence relations |
| Output: A synthesized executable control-flow structure with typed control nodes |
| 1: | Compute predecessor and successor sets for all |
| 2: | Derive source nodes, sink nodes, and horizon |
| 3: | for each action do |
| 4: | Create optional control flags and |
| 5: | Activate iff and iff |
| 6: | Create typing variables: |
|
| 7: | Enforce exclusive typing for each active control node |
| 8: | end for |
| 9: | Create Boolean edge variables for all candidate edges |
| 10: | for each precedence pair do |
| 11: | Let , |
| 12: | Define path options: |
|
| 13: | |
| 14: | Define to indicate that precedence is structurally realized |
| 15: | end for |
| 16: | Create token variables for all and |
| 17: | Create transmission variables for all and |
| 18: | Initialize tokens at source nodes |
| 19: | for to H do |
| 20: | Constrain token transmission along structurally realized precedence relations |
| 21: | Enforce input/output semantics: |
| |
| 22: | Update token persistence and propagation at each node |
| 23: | end for |
| 24: | Enforce reachability of at least one sink node by time H |
| 25: | Minimize the total number of select-type control assignments |
| 26: | Run the SAT/SMT optimization solver |
| 27: | if sat then |
| 28: | Extract active edges, activated control nodes, assigned control types, relaxed (select-type) control nodes, and token traces |
| 29: | end if |
In this example (Listing 1), node A has precedence over both B and C, and represents the structural characteristic shown in case (ii) of
Figure 1. Such sync-out (multiple outgoing flows) or sync-in (multiple incoming flows) configurations trigger the insertion of a
node to handle synchronization semantics. The associated numbers with each precedence represent transition durations that we will use in the temporal validation and simulation stages in
Section 4 and
Section 5.
The SAT formulation solves small and medium instances in milliseconds and scales to graphs with up to 50 nodes and 70–90 precedence constraints, achieving sub-second times. Cyclic graphs require additional control insertion, resulting in larger synthesized structures and greater solver effort. Dense cyclic graphs are the most challenging due to increased semantic propagation requirements. An ablation experiment (
Table 4) shows that reducing the execution horizon substantially decreases solve time, indicating that the temporal token propagation layer dominates the computational cost.
The graph families used in the evaluation are synthetically generated in order to provide controlled variations in size and structural characteristics. These benchmarks allow us to systematically assess the performance of the SAT-based synthesis procedure under different conditions. In practice, however, this approach is intended to operate on models produced by generative modeling workflows, where precedence structures arise as artifacts of automated or semi-automated model construction.
The following are descriptions of the columns in
Table 3:
Nodes: The number of nodes in the original model.
Prec. Edges: The number of defined precedence constraints between nodes.
Added Ctrl: The number of control nodes inserted by the solver to enforce unambiguous control flow.
Relaxed Ctrl: The number of control nodes for which the solver must assign the type (i.e., non-synchronizing control semantics) to ensure a feasible progression.
Final Edges: The total number of edges in the completed model after adding control nodes.
Time (ms): The time taken by the Z3 solver to solve the encoding, measured in milliseconds.
Memory (MB): The peak memory usage recorded during the solving process.
These metrics collectively characterize the solver’s performance and the structural complexity of the model as it grows in size. The performance demonstrates the potential applicability and feasibility of this approach in real-time inference. A snippet of the implementation code is shown in Listing 2.
| Listing 2. Code snippet for the SAT-based synthesis, written in Python 3.12.12 using Z3. |
![Logics 04 00007 i002 Logics 04 00007 i002]() |
An important advantage of the SAT-based formulation is that multiple synthesis objectives are handled within a unified framework. Specifically, the solver simultaneously performs structural synthesis of edges, semantic validation via propagation constraints, and optimization of control semantics by minimizing the number of select-type constructs. This integration allows the solver to search directly over executable control-flow structures while guaranteeing consistency with the precedence specification.
3.8. Complexity Discussion
Since SAT solving is NP-complete in general, the worst-case complexity of the synthesis procedure is exponential in the number of Boolean variables.
Let denote the number of nodes and the number of precedence relations. The formulation introduces Boolean variables for control activation, control typing, structural edges, precedence realizations, and token propagation. Control flags and typing variables contribute variables. Each precedence relation introduces a constant number of candidate structural edges, yielding edge variables. The execution semantics introduce token variables for all nodes and time steps , resulting in variables. Additionally, token transmission variables are created for each precedence relation and time step, resulting in variables. Consequently, the total number of Boolean variables in the encoding grows as .
Although the worst-case complexity is exponential, modern SAT/SMT solvers can efficiently handle instances of practical size for this study due to sophisticated optimizations. Also, the choice of the horizon is conservative. Reducing it to a more effective heuristic could further reduce complexity, as confirmed by the ablation case (
Table 4). In practice, the limited scalability due to the bounded execution encoding can be mitigated by modular construction within the DEVS framework. Structural completion can be applied to smaller subsystems, which are then composed hierarchically within a DEVS model. This approach enables exact synthesis at the component level while relying on DEVS-based simulation and validation to evaluate the behavior of larger systems and yet unforeseen emergent properties. Consequently, SAT-based completion and DEVS-based modeling form complementary layers. The former ensures structural correctness of the control patterns given the execution semantics of the latter, while the latter supports scalable composition and experimentation.
4. Temporal and State Formalization Using SMT and DEVS
At this stage, we draw on DEVS semantics to infer the state properties. In DEVS formalism, each atomic model evolves over a continuous time base and is formally defined by:
Input/output event sets X and Y;
A state set S including passive and active;
A time advance function ;
A transition function ();
An output function .
We formalize the resulting structures from the resolution stage in
Section 3 with a set of atomic models. The goal is to predefine formal modeling templates and then parametrize them using verified model results. For action and
nodes, we specify two atomic models, one for each type. The atomic model for actions begins in the
passive state with
, and upon receiving input, it transitions to
active for a fixed duration
before returning to
passive. The atomic model for
nodes consists of three phases:
passive,
waiting, and
enabled. A
node becomes enabled only after receiving inputs from all its incoming flows. Once each model is instantiated, the coupled model forms the entire structure of atomic models, with couplings corresponding to the edges connecting them.
A variety of state and temporal validations can take place using SMT. The validations are centered around durations that symbolically correspond to a node’s active processing of some input. The finish time can be characterized as the sum of the start time and duration, and so on.
Thus, each node n is associated with the following: start time , defined by the arrival of the input from the predecessor node; duration , defined by the initial time estimate; and finish time, . The system is initialized with for all nodes. In the case of single-input processing (only a single input can be present in the system) and an acyclic diagram, SMT constraints can be used to ensure the following:
Causal Start Constraint:
Guarantees that a node starts only after all its predecessors have completed.
Activation:
Ensures
nodes activate only when all required inputs are present.
Sequential Execution Consistency: We identify all edge pairs in the resulting diagram
such that
, and enforce
The constraint prohibits causally ordered nodes from being in active states simultaneously, ensuring that either node must finish before the other starts.
Deadline Bound: Let
represent the total completion time. This bound is inferred automatically by computing the longest edge path in a cycle-free diagram as follows:
Bottleneck Identification: The bottleneck edge is the edge with the longest duration among all edges on the critical path. We extract the length of such a path post-solution by comparing the durations of all edges.
We associate duration with the edges to allow nodes with multiple outgoing flows to have different transition times depending on the edge source and destination.
Table 5 shows the results of executing the SMT-based procedure in Z3 [
29]. We also present the SMT implementation in Listing 3 for the critical-path calculation. We use the results from this step to establish the deterministic baseline for the simulation experiment and adjust the input-generation pressure by calibrating the inter-arrival time to induce more or less parallelism across the model [
4]. We plan to examine further configurations of path topology and connectivity degrees (e.g., strongly connected components) in future work.
| Listing 3. Code snippet determining the critical path and verifying the temporal properties, written in Python using Z3. |
![Logics 04 00007 i003 Logics 04 00007 i003]() |
5. Executable and Stochastic Simulation
In this section, we present the results of the verified modeling artifacts via an executable simulation. To conduct our experiment, we use activity and action flow semantics to specify the behavior. The flow-based and I/O communications make such a representation well suited to serve as an expressive layer of DEVS-based operational semantics.
Thus, we begin by formalizing three key elements of the activity and action flow diagram metamodel: the action, the control (also known as fork/join and decision/merge), and the entire activity diagram. The first two elements are modeled as atomic units, and their instances are coupled to represent the entire activity. We describe fork/join in
to represent synchronization, and the decision/merge nodes in the
atomic model to represent conditional features in the simulation workflow. We plan to cover a wider set of control nodes in high-level engineering languages, such as SysML [
31] and UML [
32], as well as general orchestration flows in software and hardware deployments (e.g., Terraform [
33]), among others. Recent advances in AI coding assistance tools with limited context lengths underscore the need and potential to revisit the application of disciplined methods to approach modularity and code synthesis.
We formulate the set-theoretic specification of the
nodes in a DEVS-compliant manner, thereby making them amenable to executable simulation in subsequent steps.
We also formulate the specification of action nodes in a similar manner. For brevity, we present only the specification of the external transition, internal transition, and output function.
And the following includes the specifications of the external transition, internal transition, and output function of the
node.
Finally, the activity can be formulated with a corresponding coupled model. The set
D consists of the atomic models of types action,
, and
.
For clarity, we provide a brief, concrete example of how C (Boolean completion map) and T (set of inputs) evolve during a simple external transition for a sync-in node with two predecessors. Consider a sync-in node with two predecessor inputs,
. Initially, the node is in the passive state
Suppose an external event
arrives first. Then, the external transition updates the received input set and completion map to
so the node moves to
At this point, synchronization is not yet achieved because the second required input has not arrived. Next, suppose a second event
arrives. The state is then updated to
which satisfies the synchronization condition for all required inputs. The node therefore moves to the enabled state
allowing the output function
to emit the synchronized token bundle. After the internal transition, the node resets to
We note that in the implementation, each input port may maintain a queue of pending arrivals. Thus, if two consecutive events arrive on the same input port (e.g., ) before another required predecessor input is received, both events may be buffered at the implementation level. The abstract state components T and C only record which required inputs have been observed and whether synchronization has been achieved. Accordingly, the formalization captures the logical enabling condition of the node, while the simulator configuration allows for using per-port queues to preserve multiplicity or arrival order, in addition to other policies.
Now that we have formulated the DEVS specifications, we use Acceleo [
34] to write the code templates for each node. Then, the code-generation process parametrizes these templates, providing all executable code snippets necessary to run the experiment. We generated Java code for the DEVS-Suite and MS4 Me simulators. We also implemented a DEVS simulator in JavaScript
1 that can run simulations in a web environment via model interpretation. In this experiment, we will use an MS4 Me simulator to generate the simulation results and Matplotlib 3.10.1 [
35] for visualization.
Simulation Experiment
We will begin by demonstrating the approach with an illustrative example. We then present a more practical case of sensor fusion.
The first example diagram shown in
Figure 2 consists of two input parameters, three action nodes, two output parameters, and seven flow edges to illustrate various precedence patterns.
Figure 2a shows the example before the synthesis.
Figure 2b shows the diagram after synthesizing the
nodes. The resulting diagram can be readily transformed into a coupled DEVS Markov model with a predefined experimental frame. The transformation is performed using Acceleo code templates to generate Java code that is executable by the MS4 Me simulator. The initial timing assignments for the action states are set to one, following an exponential distribution. The input generator alternately dispatches outputs to the coupled model: first to
and then to
. The inter-arrival time is set to ten.
For illustrative purposes, we set the time for action
c to 10, assuming an exponential distribution.
Figure 2c,d show the obtained turnaround times after running the experiment for 10,000 time units. Both charts validate the initial timing assignments and the realization of the formal semantics during execution. The histogram shows heavily right-skewed data with two distinct regimes. The clustered times correspond to most jobs that traverse the path involving the actions
a and
b. The extended tail represents the turnaround times for jobs that go through
c. This result is noticeable due to the empirical cumulative distribution function (ECDF). The synthesized synchronization node before
c drives a skewed distribution with a median of 13.52, while 5% of cases exceed 561.
Such a combination of generative models, verifiable synthesis, and formally specified executable simulations may provide a foundation for describing and exploring behavioral dynamics within an automated modeling pipeline. For instance, the long-tail behavior observed in the turnaround-time distribution is consistent with the temporal constraints verified by the SMT layer. In particular, the action corresponding to node c has an associated processing time constraint (set to 10 units in the experiment) that participates in the SMT-based critical path validation. The stochastic simulation then samples execution paths according to the model’s structure and service-time distributions. Because the SMT validation guarantees that these precedence and timing constraints are satisfiable and causally consistent, the simulation results reflect valid executions of the formally validated model rather than artifacts introduced by the simulation environment. The resulting analytical plots, therefore, provide empirical confirmation that the observed turnaround-time behavior remains consistent with the SMT-validated temporal constraints.
After validating the simulation results in a simple example, we demonstrate the approach’s capacity to describe domain-specific cases by using a more detailed example of a sensor fusion architecture commonly used for situational awareness in autonomous perception (
Figure 3). We instructed GPT-4o to “generate a diagram for sensor fusion flow.” We implemented a tool that automatically renders the generated JSON file into an activity flow diagram. However, the devised approach aims to accommodate large structures with complex, evolving control dynamics.
Figure 3a shows the generated diagram.
Figure 3b shows the diagram after synthesis. As in the first example, the initial timing assignments for the action nodes are set to 1, assuming an exponential distribution. In the initial experiment, the input generator alternately dispatches outputs to the coupled model via each of the four input parameters. The inter-arrival time is set uniformly with bounds [0, 1].
Figure 3c shows the resulting turnaround times after running this experiment. Then, we adjust the inter-arrival time for the next two experiments to 1 and 10, with the turnaround time results shown in
Figure 3d and
Figure 3e, respectively.
Figure 4 shows another generated example for the sensor fusion pipeline with one relaxed (select-type) control node.
This example demonstrates the applicability of our proposed pipeline and its scalability in handling generated structures with behavioral and timing dynamics. The SAT-based synthesis is used to ensure that the generated structures admit a consistent executable interpretation, establishing a structurally valid progression of control flow. The resulting structures can then be transformed into parallel DEVS models while preserving their behavioral semantics. Within this setting, SAT-based reasoning provides a precise mechanism for ensuring structural consistency, whereas DEVS-based simulation enables broader exploration of system behavior through dynamic execution. This perspective aligns with earlier work emphasizing the importance of semantic-preserving transformations between formal analysis and simulation environments [
36]. When the initial models are generated from AI-assisted artifacts, the process can naturally support iterative cycles in which synthesis, simulation, and validation are repeatedly applied, enabling continuous refinement of both the generated structures and the behavioral scenarios explored.
6. Conclusions
Our goal in this work is to leverage the generative capacity of recent AI models (i.e., generative models such as LLMs) to produce results with sound structures that are enriched with domain knowledge. We propose an approach to obtain the partial specifications of a timed activity and action flow diagram from a generative model in a structured format. Then, we subject the resulting structure to SAT-based synthesis to identify and rectify potential design flaws, thereby further enriching the model. Such enrichment is further compounded by its transformation into a set-theoretic DEVS-compliant specification and by code-generation templates. We demonstrate the approach using executable simulations and experiments. The obtained results and visualizations demonstrate the validity and key aspects of the automation’s consistency in the proposed pipeline. The results suggest that generative control flow structures can be synthesized with formal guarantees of correctness and executability when SAT-based structural synthesis is integrated with DEVS modeling and execution semantics. This capability is particularly valuable for complex synthesis problems that require precise and reliable execution. By embedding synthesis, validation, and simulation within a unified automated pipeline, the proposed framework provides a practical, formally grounded pathway for generating executable models.
While the proposed pipeline is motivated by structural imperfections observed in generative model outputs, these imperfections are addressed through formalization under execution semantics. Rather than requiring generative models to produce fully specified and executable flow structures—which can be unreliable due to hallucinations, instruction sensitivity, and lack of guarantees—we constrain their role to generating partial specifications. The synthesis process then constructs a complete and executable model by enforcing structural and semantic consistency. Accordingly, the current evaluation focuses on representative precedence structures capturing execution-relevant structural ambiguities, rather than directly benchmarking raw LLM-generated outputs. We acknowledge that this abstraction introduces a gap between the motivating generative artifacts and the evaluated instances, as the current experiments do not directly measure performance on raw LLM-generated structural outputs. Extending the evaluation to fully integrate end-to-end pipelines operating on unfiltered generative artifacts remains an important direction for ongoing and future work.
Despite some promising results, several limitations remain. The current synthesis procedure guarantees a weak progression property, ensuring that execution can propagate from sources to at least one sink, but stronger behavioral guarantees may require additional constraints. The SAT encoding also introduces token-propagation variables whose size grows with the number of nodes and candidate paths, potentially limiting scalability for larger models. Furthermore, the approach assumes the presence of identifiable source and sink nodes to establish execution progression. Finally, while the pipeline is designed to operate on artifacts produced by generative models, the quality of the resulting structure depends on the fidelity of the generated precedence relations and their transformation into the subject modeling framework. Addressing these limitations—including improved scalability and more robust handling of cycles and incomplete generative outputs—remains a direction for future work.
More broadly, the proposed framework illustrates how SAT-based structural synthesis and DEVS modeling can be combined to provide a principled pathway from generative design to formally validated, executable system models. The contribution of this work can be viewed in two complementary aspects: (i) a principled abstraction of generative outputs into partial, reliably manageable specifications, and (ii) a unified SAT-based synthesis framework that constructs executable control flow structures while enforcing execution semantics and consistency constraints. In future work, we plan to extend the approach to include various control constructs and artifacts with different semantics. We also plan to investigate the generative model’s ability to derive new constructs and synthesize them in real time. Our code-generation templates are currently static. However, we are examining more dynamic approaches for both generation and interpretation (e.g., context-sensitive code generation that adapts to domain or simulator requirements without violating verified constraints), accounting for AI code assistance tools with additional execution semantics that yield more interpretable simulation results. We primarily used LLMs in this work. We plan to extend the approach to integrate other models in the future.
Author Contributions
Conceptualization, A.A.; methodology, A.A.; software, A.A.; validation, B.P.Z. and A.A.; formal analysis, A.A.; investigation, B.P.Z. and A.A.; resources, A.A.; data curation, A.A.; writing—original draft preparation, A.A.; writing—review and editing, B.P.Z. and A.A.; visualization, A.A.; supervision, B.P.Z.; project administration, B.P.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Conflicts of Interest
Authors Abdurrahman Alshareef and Bernard P. Zeigler were employed by RTSync Corp., which develops and maintains the MS4 Me software tool used in this study. This affiliation has been disclosed for transparency. The authors declare that the research was conducted and the results are presented without any commercial or financial influence that could have inappropriately affected the design, analysis, interpretation, or reporting of the work.
Abbreviations
The following abbreviations are used in this manuscript:
| AI | Artificial Intelligence |
| DAG | Directed Acyclic Graph |
| DEVS | Discrete Event System Specification |
| LLM | Large Language Model |
| M&S | Modeling and Simulation |
| SAT | Boolean Satisfiability |
| SMT | Satisfiability Modulo Theories |
Appendix A
We report detailed results for the structural metrics of the generated graphs and diagrams in
Table A1 and
Table A2.
Table A1.
Structural characteristics of database schemas, Bayesian networks, and decision trees.
Table A1.
Structural characteristics of database schemas, Bayesian networks, and decision trees.
| Database Schemas |
|---|
| Domain | Tables | Relations | Total Att. |
| Healthcare System | 6 | 6 | 40 |
| E-commerce Platform | 8 | 8 | 39 |
| University Management System | 6 | 7 | 28 |
| Social Networking App | 7 | 10 | 38 |
| Banking and Finance | 6 | 5 | 37 |
| Hotel Booking System | 5 | 4 | 29 |
| Supply Chain & Inventory Management | 7 | 7 | 34 |
| Real Estate Portal | 7 | 10 | 46 |
| Learning Management System (LMS) | 9 | 11 | 50 |
| Transportation and Logistics | 6 | 5 | 34 |
| Bayesian Networks |
| Domain | Nodes | Edges | Discrete States |
| Medical Diagnosis | 5 | 4 | 10 |
| Fraud Detection | 6 | 5 | 13 |
| Weather Forecasting | 4 | 4 | 8 |
| Autonomous Vehicles | 10 | 16 | 26 |
| Gene Expression & Bioinformatics | 7 | 7 | 14 |
| Customer Churn Prediction | 7 | 6 | 20 |
| Financial Market Modeling | 6 | 7 | 18 |
| Ecological Modeling | 5 | 5 | 14 |
| Manufacturing & Quality Control | 5 | 4 | 14 |
| Decision Trees |
| Domain | Nodes | Leaf Nodes | Max Depth |
| Healthcare & Medical Diagnosis | 13 | 6 | 4 |
| Finance & Credit Scoring | 13 | 7 | 4 |
| Marketing & Customer Segmentation | 11 | 6 | 4 |
| Fraud Detection | 11 | 6 | 4 |
| Retail & Inventory Management | 12 | 7 | 5 |
| Manufacturing & Quality Control | 9 | 5 | 4 |
| Education & Student Performance | 10 | 6 | 4 |
| Energy Consumption Forecasting | 13 | 7 | 4 |
| Human Resources & Hiring | 11 | 6 | 6 |
| Cybersecurity | 15 | 9 | 4 |
Table A2.
Structural characteristics of activity diagrams and state machines.
Table A2.
Structural characteristics of activity diagrams and state machines.
| Activity Diagrams |
|---|
| Domain | Nodes | Decisions | Forks & I/O |
| Healthcare Systems | 11 | 1 | 0 |
| Banking and Finance | 12 | 1 | 0 |
| E-commerce | 11 | 0 | 0 |
| Education and E-learning | 13 | 2 | 0 |
| Software Development | 8 | 0 | 0 |
| Telecommunications | 11 | 2 | 0 |
| Government and Public Services | 14 | 3 | 0 |
| Manufacturing and Supply Chain | 11 | 2 | 0 |
| Human Resources (HR) | 12 | 2 | 0 |
| Insurance | 11 | 1 | 0 |
| State Machines |
| Domain | States | Transitions | |
| Embedded Systems | 5 | 7 | |
| Networking Protocols | 11 | 20 | |
| Game Development | 6 | 10 | |
| Compiler Design | 6 | 8 | |
| User Interface (UI) Design | 9 | 16 | |
| Telecommunications | 5 | 12 | |
| Robotics and Automation | 6 | 13 | |
| Workflow & Business Process Management | 8 | 9 | |
| Cybersecurity/Access Control | 6 | 13 | |
| Control Systems & Mechatronics | 5 | 8 | |
References
- Ji, Z.; Lee, N.; Frieske, R.; Yu, T.; Su, D.; Xu, Y.; Ishii, E.; Bang, Y.J.; Madotto, A.; Fung, P. Survey of hallucination in natural language generation. ACM Comput. Surv. 2023, 55, 1–38. [Google Scholar] [CrossRef] [Scilit]
- OpenAI. GPT-4o. 2024. Available online: https://platform.openai.com/docs/models/gpt-4o (accessed on 8 January 2025).
- Google Inc. Gemini 2.5 Flash, 2025. Available online: https://gemini.google.com/ (accessed on 8 January 2025).
- Alshareef, A. Bootstrapping SysML with LLM-based inference and integrated discrete-event simulation. SIMULATION 2026, 102, 469–492. [Google Scholar] [CrossRef] [Scilit]
- Hooper, C.; Kim, S.; Mohammadzadeh, H.; Mahoney, M.W.; Shao, Y.S.; Keutzer, K.; Gholami, A. Kvquant: Towards 10 million context length llm inference with kv cache quantization. Adv. Neural Inf. Process. Syst. 2024, 37, 1270–1303. [Google Scholar] [CrossRef] [Scilit]
- Brown, T.; Mann, B.; Ryder, N.; Subbiah, M.; Kaplan, J.D.; Dhariwal, P.; Neelakantan, A.; Shyam, P.; Sastry, G.; Askell, A.; et al. Language models are few-shot learners. Adv. Neural Inf. Process. Syst. 2020, 33, 1877–1901. [Google Scholar]
- Maynez, J.; Narayan, S.; Bohnet, B.; McDonald, R. On faithfulness and factuality in abstractive summarization. arXiv 2020, arXiv:2005.00661. [Google Scholar]
- Alur, R.; Černỳ, P.; Madhusudan, P.; Nam, W. Synthesis of interface specifications for Java classes. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Long Beach, CA, USA, 12–14 January 2005; pp. 98–109. [Google Scholar]
- Chen, J.; He, F. Control flow-guided SMT solving for program verification. In Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, Montpellier, France, 3–7 September 2018; pp. 351–361. [Google Scholar]
- Gholami, S.; Sarjoughian, H.S. Modeling and verification of network-on-chip using constrained-DEVS. In Proceedings of the Symposium on Theory of Modeling & Simulation, SpringSim 17: Spring Simulation Multi-Conference, Virginia Beach, VA, USA, 23–26 April 2017; pp. 1–12. [Google Scholar]
- Bagherzadeh, M.; Kahani, N.; Jahed, K.; Dingel, J. Execution of partial state machine models. IEEE Trans. Softw. Eng. 2020, 48, 951–972. [Google Scholar] [CrossRef] [Scilit]
- Biere, A.; Heule, M.; van Maaren, H. Handbook of Satisfiability; IOS Press: Amsterdam, The Netherlands, 2009; Volume 185. [Google Scholar]
- Grover, A.; Ehlers, R.; D’Antoni, L. Synthesizing Transducers from Complex Specifications. In Proceedings of the FMCAD, Trento, Italy, 17–21 October 2022; pp. 294–303. [Google Scholar]
- Abdulla, P.A.; Iyer, S.P.; Nylén, A. SAT-solving the coverability problem for Petri nets. Form. Methods Syst. Des. 2004, 24, 25–43. [Google Scholar] [CrossRef] [Scilit]
- Desel, J.; Reisig, W. The synthesis problem of Petri nets. Acta Inform. 1996, 33, 297–315. [Google Scholar] [CrossRef] [Scilit]
- Kasalica, V.; Lamprecht, A.L. Workflow discovery with semantic constraints: The SAT-based implementation of APE. Electron. Commun. EASST 2020, 78. [Google Scholar] [CrossRef]
- McMillan, K.L. Symbolic model checking. In Symbolic Model Checking; Springer: Berlin/Heidelberg, Germany, 1993; pp. 25–60. [Google Scholar]
- Monakova, G.; Kopp, O.; Leymann, F.; Moser, S.; Schäfers, K. Verifying business rules using an SMT solver for BPEL processes. In Proceedings of the Business Process, Services–Computing and Intelligent Service Management; Gesellschaft für Informatik eV: Bonn, Germany, 2009; pp. 81–94. [Google Scholar]
- Marjanovic, O.; Orlowska, M.E. On modeling and verification of temporal constraints in production workflows. Knowl. Inf. Syst. 1999, 1, 157–192. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Wang, D.; Yuan, D.; Wang, F.; Yang, Y. Workflow temporal verification for monitoring parallel business processes. J. Softw. Evol. Process 2016, 28, 286–302. [Google Scholar] [CrossRef] [Scilit]
- Biere, A. Bounded model checking. In Handbook of Satisfiability; IOS Press: Amsterdam, The Netherlands, 2021; pp. 739–764. [Google Scholar]
- Hwang, M.H.; Zeigler, B.P. Reachability graph of finite and deterministic DEVS networks. IEEE Trans. Autom. Sci. Eng. 2009, 6, 468–478. [Google Scholar] [CrossRef] [Scilit]
- Zeigler, B.P.; Muzy, A.; Kofman, E. Theory of Modeling and Simulation: Discrete Event & Iterative System Computational Foundations; Academic Press: Cambridge, MA, USA, 2018. [Google Scholar]
- Alshareef, A.; Kim, D.; Seo, C.; Zeigler, B.P. Activity diagrams between DEVS-based modeling & simulation and fUML-based model execution. In Proceedings of the 2020 Summer Simulation Conference, Virtual, 20–22 July 2020; pp. 1–12. [Google Scholar]
- ACIMS. DEVS-Suite Simulator, Version 7.0.0. 2023. Available online: https://acims.asu.edu/software/devs-suite/ (accessed on 30 June 2026).
- MS4 Systems. MS4 Me, Version 3.0. 2025. Available online: https://www.ms4systems.com/ (accessed on 30 June 2026).
- Carreira-Munich, T.; Paz-Marcolla, V.; Castro, R. DEVS Copilot: Towards Generative AI-Assisted Formal Simulation Modelling based on Large Language Models. In Proceedings of the 2024 Winter Simulation Conference (WSC), Orlando, FL, USA, 15–18 December 2024; pp. 2785–2796. [Google Scholar]
- Hojaji, F.; Mayerhofer, T.; Zamani, B.; Hamou-Lhadj, A.; Bousse, E. Model execution tracing: A systematic mapping study. Softw. Syst. Model. 2019, 18, 3461–3485. [Google Scholar] [CrossRef] [Scilit]
- De Moura, L.; Bjørner, N. Z3: An efficient SMT solver. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems; Springer: Berlin/Heidelberg, Germany, 2008; pp. 337–340. [Google Scholar]
- Waez, M.T.B.; Dingel, J.; Rudie, K. A survey of timed automata for the development of real-time systems. Comput. Sci. Rev. 2013, 9, 1–26. [Google Scholar] [CrossRef] [Scilit]
- Object Management Group (OMG). SysML—OMG System Modeling Language. 2025. Available online: https://www.omg.org/spec/SysML (accessed on 8 January 2025).
- Object Management Group (OMG). UML—OMG Unified Modeling Language v 2.5.1. 2017. Available online: https://www.omg.org/spec/UML (accessed on 8 January 2025).
- HashiCorp. Terraform, 2025. Available online: https://developer.hashicorp.com/terraform (accessed on 30 June 2026).
- Eclipse Foundation. Acceleo: Model to Text Transformation Tool, 2023. Available online: https://www.eclipse.org/acceleo/ (accessed on 8 January 2025).
- Hunter, J.D. Matplotlib: A 2D graphics environment. Comput. Sci. Eng. 2007, 9, 90–95. [Google Scholar] [CrossRef] [Scilit]
- Zeigler, B.P.; Nutaro, J.J.; Seo, C. Combining DEVS and model-checking: Concepts and tools for integrating simulation and analysis. Int. J. Simul. Process Model. 2017, 12, 2–15. [Google Scholar] [CrossRef] [Scilit]
| Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |