<p>In fact, there is already a thriving research area of program synthesis where programs are generated automatically from a specification of some sort, which could be automated tests, logical formulas, types, or input-output examples. Here is a survey from 2017 that is surely fairly out of date by now but should be a good starting point: <a href="https://www.microsoft.com/en-us/research/publication/program-synthesis" rel="noreferrer">https://www.microsoft.com/en-us/research/publication/program-synthesis</a></p>

CC BY-SA 4.0
2023-07-03T14:10:37.313Z
2023-07-03T14:10:37.313Z
Max New
<p>I have no idea where to ask this question, so I am asking it here. Is it possible, that in the near future, there would be a shift in the way we write code, where programmers instead of writing the code, would write down the requirements (tests), and the automated AI would try to fulfill them?</p>

CC BY-SA 4.0
2023-07-04T11:51:05.687Z
Possibly, but there seems to be an underlying assumption here that writing down the requirements is easier than writing the code that fulfills them. Fully specifying behaviour is equivalent to programming, you can think of the C source code of a program as a specification for the behaviour the program should exhibit.
Cubic
CC BY-SA 4.0
2023-07-05T08:46:46.083Z
@Cubic I understand your point of view, but every good programmer should write tests for the code they create, in order to make further development easier. I just wonder whether the process of writing both code and tests, could be replaced with just writing tests but more verbose.
Maciej Bledkowski
<philosophy>
In the age of powerful AI, can all software be written using only tests?
Maciej Bledkowski
# In the age of powerful AI, can all software be written using only tests?

(Asked by: username_0 on 2023-07-03)

I have no idea where to ask this question, so I am asking it here. Is it possible, that in the near future, there would be a shift in the way we write code, where programmers instead of writing the code, would write down the requirements (tests), and the automated AI would try to fulfill them?

**Tags:** philosophy

> **Comments:**
> **username_1**: Possibly, but there seems to be an underlying assumption here that writing down the requirements is easier than writing the code that fulfills them. Fully specifying behaviour is equivalent to programming, you can think of the C source code of a program as a specification for the behaviour the program should exhibit.  
> **username_0**: @username_1 I understand your point of view, but every good programmer should write tests for the code they create, in order to make further development easier. I just wonder whether the process of writing both code and tests, could be replaced with just writing tests but more verbose.  

---

## 1 answers

### Answer by username_2 on 2023-07-03. Score: 6 | Accepted answer

In fact, there is already a thriving research area of program synthesis where programs are generated automatically from a specification of some sort, which could be automated tests, logical formulas, types, or input-output examples. Here is a survey from 2017 that is surely fairly out of date by now but should be a good starting point: <https://www.microsoft.com/en-us/research/publication/program-synthesis>


---

