Saturday, May 10, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Can Language Models Replace Compilers? – O’Reilly

January 9, 2024
in AI Technology
Reading Time: 4 mins read
0 0
A A
0
Share on FacebookShare on Twitter



Kevlin Henney and I recently had a discussion regarding the possibility of automated code generation replacing higher-level languages in the future. We pondered whether ChatGPT N (for large N) could potentially generate executable machine code directly, similar to how compilers work today, instead of generating code in a high-level language like Python. This question is not purely academic. As coding assistants become more accurate, it is plausible to assume that they may eventually take over the task of writing code rather than just assisting programmers. This would be a significant change for professional programmers, although coding is just a small aspect of their work.

To some extent, this transition is already underway. ChatGPT 4’s “Advanced Data Analysis” feature can generate Python code, execute it in a sandbox, collect error messages, and even attempt to debug it. Google’s Bard offers similar capabilities. While Python is an interpreted language without machine code, there is no reason why this process couldn’t incorporate a C or C++ compiler.

Historically, similar changes have occurred in the field of programming. In the early days, programmers used to “write” programs by physically plugging in wires or toggling binary numbers. Then, they progressed to writing assembly language code before finally adopting higher-level languages like COBOL and FORTRAN in the late 1950s. For those who were accustomed to circuit diagrams and switches, these early languages seemed as radical as generative AI programming appears today. COBOL was an attempt to simplify programming by making it more akin to writing in English.

Kevlin highlighted the importance of higher-level languages as a “repository of determinism” that we currently rely on. While the term “repository of determinism” may sound ominous, it signifies the need for a reliable foundation. At each stage of programming history, there has always been a repository of determinism. In assembly language programming, developers had to examine the binary representation of instructions to understand the computer’s behavior. With higher-level languages like FORTRAN and C, the source code expressed the desired outcome, and it was the responsibility of the compiler to generate the correct machine instructions. However, the reliability of early compilers was questionable, especially when it came to optimization. Portability was also a challenge as different vendors had their own compilers with unique quirks and extensions. Assembly language remained a last resort for debugging. The repository of determinism was limited to a specific vendor, computer, and operating system.

To ensure consistency across computing platforms, language standards and specifications were developed. As a result, today, very few programmers need to work with assembly language. By using higher-level languages like C or Python, programmers can read code and understand its behavior. If the program behaves unexpectedly, it is more likely that the programmer misunderstood some aspect of the language’s specification rather than the compiler or interpreter making a mistake. This predictability is crucial for successful debugging. The source code provides a clear representation of what the computer is doing at a reasonable level of abstraction. If the program doesn’t perform as intended, it can be analyzed and corrected. While this may require revisiting programming literature, it is a well-understood and manageable problem. We no longer need to delve into machine language, which is significantly more complex today due to factors like instruction reordering, speculative execution, and long pipelines. The layer of abstraction provided by higher-level languages is essential. However, it must also be deterministic and consistently produce the same outcome every time the program is compiled and executed.

Determinism is necessary because all computing, including AI, relies on computers performing reliably and consistently, often millions or billions of times. Without a precise understanding of what the software does or the possibility of it changing on every compilation, it becomes impossible to build a business around it. Maintenance, extension, and debugging become extremely challenging. While automated code generation shows promise, it does not yet possess the reliability we expect from traditional programming. Simon Willison refers to this as “vibes-based development.” Humans still play a crucial role in testing and fixing errors. Additionally, generating code multiple times during the development process is common, and the results are likely to vary. Bard even offers several alternative code options to choose from. This lack of repeatability poses challenges for understanding program behavior and tracking progress towards a solution. It might be tempting to assume that this variation can be controlled by setting variables like GPT-4’s “temperature” to 0, which controls the level of variation or unpredictability in responses. However, this doesn’t solve the problem. Temperature has its limits, and one of those limits is that the prompt must remain constant. Modifying the prompt to guide the AI towards generating correct or well-designed code takes us beyond those limits. Furthermore, the model itself is subject to change, and such changes are beyond the programmer’s control. Models are regularly updated, and there is no guarantee that the code generated by an updated model will remain the same. Therefore, the source code produced by AI cannot serve as the repository of determinism.

This doesn’t mean that AI-generated code is not beneficial. It can provide a starting point for further work. However, when it comes to reproducing and understanding bugs, repeatability becomes crucial, and surprises cannot be tolerated. At that stage, programmers must refrain from regenerating high-level code from natural language prompts. The AI effectively acts as a first draft creator, which may save effort compared to starting from scratch. When transitioning from version 1.0 to 2.0 and adding new features, similar challenges arise. Even the largest context windows can’t encompass an entire software system, so working on one source file at a time remains necessary. This mirrors the current programming approach, where the source code serves as the repository of determinism. Moreover, it is difficult to instruct a language model on what it is allowed to change and what should remain unchanged. Asking it to modify only a specific loop within a file may or may not be successful.

These arguments do not apply to coding assistants like GitHub Copilot, which act as assistants to programmers rather than replacing them. With Copilot, programmers can specify precisely what they want to be done and where. In contrast, when using ChatGPT or Bard to write code, programmers assume the role of passengers rather than pilots or copilots. While you can instruct a pilot to fly you to New York,



Source link

Tags: CompilerslanguagemodelsOReillyReplace
Previous Post

How Generative AI is Reshaping Global Industries

Next Post

The future of patient care: How AI is changing medicine

Related Posts

How insurance companies can use synthetic data to fight bias
AI Technology

How insurance companies can use synthetic data to fight bias

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset
AI Technology

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
Decoding Decoder-Only Transformers: Insights from Google DeepMind’s Paper
AI Technology

Decoding Decoder-Only Transformers: Insights from Google DeepMind’s Paper

June 9, 2024
How Game Theory Can Make AI More Reliable
AI Technology

How Game Theory Can Make AI More Reliable

June 9, 2024
Buffer of Thoughts (BoT): A Novel Thought-Augmented Reasoning AI Approach for Enhancing Accuracy, Efficiency, and Robustness of LLMs
AI Technology

Buffer of Thoughts (BoT): A Novel Thought-Augmented Reasoning AI Approach for Enhancing Accuracy, Efficiency, and Robustness of LLMs

June 9, 2024
Deciphering Doubt: Navigating Uncertainty in LLM Responses
AI Technology

Deciphering Doubt: Navigating Uncertainty in LLM Responses

June 9, 2024
Next Post
The future of patient care: How AI is changing medicine

The future of patient care: How AI is changing medicine

Exploring the Boundaries of AI in Creative Domains: Can Machines Match Human Ingenuity?

Exploring the Boundaries of AI in Creative Domains: Can Machines Match Human Ingenuity?

Maximize Your Agency Profit 3x Faster

Maximize Your Agency Profit 3x Faster

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
Porfo: Revolutionizing the Crypto Wallet Landscape

Porfo: Revolutionizing the Crypto Wallet Landscape

October 9, 2023
A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

May 19, 2024
How To Build A Quiz App With JavaScript for Beginners

How To Build A Quiz App With JavaScript for Beginners

February 22, 2024
Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

December 6, 2023
Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

November 20, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In