# ShIOEnv: A Command Evaluation Environment for Grammar-Constrained Synthesis and Execution Behavior Modeling

DevFeed: [ShIOEnv: A Command Evaluation Environment for Grammar-Constrained Synthesis and Execution Behavior Modeling](<https://devfeed.tech/articles/shioenv-a-command-evaluation-environment-for-grammar-constrained-synthesis-and-execution-behavior-modeling-96789.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2505.18374>)

Author: Jarrod Ragsdale, Rajendra Boppana

Published: 2026-10-23T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Bash](<https://devfeed.tech/topics/bash.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Simulation](<https://devfeed.tech/topics/simulation.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [command](<https://devfeed.tech/tags/command.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [environment](<https://devfeed.tech/tags/environment.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [execution](<https://devfeed.tech/tags/execution.md>), [grammar](<https://devfeed.tech/tags/grammar.md>), [modeling](<https://devfeed.tech/tags/modeling.md>), [synthesis](<https://devfeed.tech/tags/synthesis.md>)

## AI overview

ShIOEnv is a Gymnasium-compatible Bash environment that executes synthesized commands in a controlled system context and records stdout, stderr, exit status, and structured filesystem and environment changes. Its grammar-constrained synthesis aims to produce valid, less redundant arguments; the authors estimate input irreducibility by comparing execution artifacts under self-ablations. They report 1.6 million samples across 86 Linux/Bash utilities and 500,000 grounded, executable NL2CMD samples. CodeT5 models trained on the data predict attacker-sourced command behavior with up to 14.2 percentage points higher output edit similarity than Cowrie and prompted large language models; models trained on grammar-constrained samples score 22.5 points higher than those trained on NL2CMD samples. These are abstract-reported results; the excerpt does not give evaluation details.

## Source excerpt

arXiv:2505.18374v3 Announce Type: replace-cross Abstract: We introduce ShIOEnv, a Gymnasium-compatible Bash environment for synthesizing execution-annotated shell input traces. Datasets containing such traces are useful for training models to perform execution-free shell simulation, which in turn is useful for deploying honeypots for cyber deception. Existing datasets, such as NL2CMD and other Bash command corpora, do not include complete execution artifacts (stdout, stderr, exit status, and changes to the system's state) associated with a command's execution. ShIOEnv synthesizes shell inputs, executes them in a controlled system context, and records stdout, stderr, exit status, and structured filesystem and environment patches. Unconstrained (random) generation of shell inputs (command and arguments) results in multiple instances of arguments that are mostly redundant or result in execution errors. We introduce grammar-constrained synthesis to generate syntactically valid arguments with high input irreducibility, which we estimate through self-ablative contrasts of execution artifacts. We prepare 1.6M samples using grammar-constrained and unconstrained synthesis and collect their execution artifacts for 86 Linux/Bash utilities. Using this dataset, we train small language models (CodeT5) and evaluate their accuracy in predicting the actual execution behavior of attacker-sourced Bash commands. These models outperform commonly used rule-based simulation (Cowrie) and prompted large language models by up to 14.2 pp in output edit similarity (O-ES). We enhance the NL2CMD dataset by constructing 500K samples executable in a grounded system context along with their complete execution artifacts. We empirically demonstrate that models trained on grammar-constrained samples outperform those trained on NL2CMD samples by 22.5 pp in O-ES. ShIOEnv, command grammars, and 2.1M samples used in our primary evaluations are released for use by other researchers.