Unisys / PS 04
GrammaForge
Grammar-guided synthetic data for proprietary languages.
Turn a grammar, semantic rules and 5–20 seed programs into diverse instruction–response training pairs with full grammar coverage and reference-parser verification.
GrammaForge: Grammar guided synthetic data Engine for proprietary Languages
The objective
The challenge.
Proprietary-language Domain-Specific Language Models face a shortage of training code: public repositories are scarce, while production code can be restricted by privacy, confidentiality or sensitive business logic. Formal grammars exist, but ordinary rule-based generators can produce repetitive, semantically hollow code, and general-purpose LLMs can hallucinate low-resource syntax. Build an intelligent synthetic-data pipeline that uses a formal language grammar, a semantic specification and 5–20 seed programs to produce realistic instruction–response pairs for fine-tuning a proprietary-language DSLM.
Teams developing proprietary-language DSLMs for developers, maintainers and modernization teams that need code completion, explanation, migration or test-generation assistance.
Produce a diverse, validator-checked fine-tuning dataset with complete grammar coverage, meaningful code and instructions that accurately describe their paired responses, without exposing proprietary production source.
Product capabilities
What to build.
Required features
- Grammar, semantics and seeds as inputs
Accept a formal syntax definition such as BNF, EBNF or an ANTLR grammar, a semantic specification and a small seed set of 5–20 programs.
- Instruction–response training pairs
Generate a dataset of instruction–response pairs suitable for fine-tuning a proprietary-language DSLM. Each instruction must accurately describe its corresponding response.
- Complete grammar-scope coverage
Cover the complete grammar scope with a sufficient number of distinct examples for every construct. Include each production rule, alternative and semantic feature enough times for the model to learn it.
- Reference-parser verification
Ensure responses are syntactically guaranteed by verifying them with the provided reference parser.
- Realistic and diverse code
Responses must be semantically realistic, avoid near-duplicates and resemble the seed programs in structure and idiom instead of being repetitive or semantically hollow.
Optional ideas
- Recommended generation approaches
The brief recommends grammar-constrained LLM decoding, LLM-assisted generation, fine-tuning and probabilistic or learned grammars as possible technologies for the solution.
Typical workflow
Provide a grammar, semantic specification and 5–20 seed programs → generate instruction–response pairs → check syntax with the reference parser → assess semantics, coverage and diversity → remove near-duplicates and check alignment with seed idioms → demonstrate the resulting fine-tuning dataset.
Demo & deliverables
Show it working.
- Working generation pipeline
Provide a working prototype or pipeline that turns the language specification and seed programs into synthetic training data.
- Coverage demonstration
Demonstrate coverage in the generated data through a sample demo.
- Architecture and presentation
Present the system architecture and explain the generation approach.
Success criteria
What success looks like.
Demonstrate the validity of generated code. Teams may use a language such as COBOL to show this.
The generated dataset should provide varied examples rather than near-duplicates.
The instruction–response data should be suitable for proprietary-language model fine-tuning.
Show how the approach can scale and adapt to different proprietary languages or language versions.
Scope & constraints
Build within the brief.
A reusable grammar-to-dataset approach should be adaptable to new proprietary languages by changing the grammar and semantic rules, avoiding the cost of hand-writing training programs at scale.
Quality checks should reduce hallucinated syntax. The same generation approach can also be useful as test-data or fuzzing input for compilers and migration tools; this is supporting context rather than an additional mandatory deliverable.
Technical & safety requirements
The source problem treats customer production code as unavailable for training because of privacy policies, confidentiality agreements or sensitive business logic. Generate synthetic data from the language specification rather than exposing proprietary source.

































