mlsanityData to 14 Oct 2026

AI Coders Are Among Us: Rethinking Programming Language Grammar Towards Efficient Code Generation

arXiv 2404.16333 ↗First posted 25 Apr 2024cs.SE cs.AI cs.PLcited by 10

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Artificial Intelligence (AI) models have emerged as another important audience for programming languages alongside humans and machines, as we enter the era of large language models (LLMs). LLMs can now perform well in coding competitions and even write programs like developers to solve various tasks, including mathematical problems. However, the grammar and layout of current programs are designed to cater the needs of human developers -- with many grammar tokens and formatting tokens being used to make the code easier for humans to read. While this is helpful, such a design adds unnecessary computational work for LLMs, as each token they either use or produce consumes computational resources. To improve inference efficiency and reduce computational costs, we propose the concept of AI-oriented grammar. This aims to represent code in a way that better suits the working mechanism of AI models. Code written with AI-oriented grammar discards formats and uses a minimum number of tokens to convey code semantics effectively. To demonstrate the feasibility of this concept, we explore and implement the first AI-oriented grammar for Python, named SimPy. SimPy is crafted by revising the original Python grammar through a series of heuristic rules. Programs written in SimPy maintain identical AST structures to those in standard Python. This allows for not only execution via a modified AST parser, but also seamless transformation between programs written in Python and SimPy, enabling human developers and LLMs to use Python and SimPy, respectively, when they need to collaborate. In the experiments, compared with Python, SimPy enables a reduction in token usage by 13.5% and 10.4% for CodeLlama and GPT-4, respectively, when completing the same set of code-related tasks. Additionally, these models can maintain or even improve their performance when using SimPy instead of Python for these tasks.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 19 of its 53 references that are in the map. First posted on arXiv 25 Apr 2024.

Builds on

19 of 53 references.

References · 19

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2020Scaling Laws for Neural Language Modelscited by 6,586
  5. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  8. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  9. 2023StarCoder: may the source be with you!cited by 799
  10. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  11. 2024TinyLlama: An Open-Source Small Language Modelcited by 618
  12. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
7 more
  1. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  2. 2023SantaCoder: don't reach for the stars!cited by 170
  3. 2024Robustness, Security, Privacy, Explainability, Efficiency, and Usability of Large Language Models for Codecited by 28
  4. 2022Probing Pretrained Models of Source Codecited by 26
  5. 2023Program Translation via Code Distillationcited by 10
  6. 2022Unveiling Code Pre-Trained Models: Investigating Syntax and Semantics Capacitiescited by 9
  7. 2023CodeBPE: Investigating Subtokenization Options for Large Language Model Pretraining on Source Codecited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agents
  2. 2024Language Models as Compilers: Simulating Pseudocode Execution Improves Algorithmic Reasoning in Language Models
  3. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence
  4. 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages
  5. 2024Low-Cost Language Models: Survey and Performance Evaluation on Python Code Generation
  6. 2024AICoderEval: Improving AI Domain Code Generation of Large Language Models
  7. 2026A Literate Programming Environment for Human and Machine Agents
  8. 2024Should AI Optimize Your Code? A Comparative Study of Classical Optimizing Compilers Versus Current Large Language Models