0
$\begingroup$

The more I think about programming and optimization, the more I think "why not just specify a goal and have the program figure out the optimal solution to it".

I am familiar with basic "optimization problems" such as finding the best fit line to a curve, or gradient descent sorts of things. What I'm talking about is way more complicated than that.

What I'm imagining is to say something like "An HTTPS server exists", and for the system to figure out how to build one. Obviously given just that info, it's not enough. It would require human-level training in programming and understanding concepts and everything.

But my question is, what could you do to build a system to support such a "goal statement"? What would the key parts be?

It seems at first, the simplest goal is "Action x is performed". This is required to change the current world into the desired (goal) world. For example, "Add" is performed on 1 and 2 is a goal stating that the "add" function is applied to the two arguments. It seems that from this foundation, you can build up higher and higher levels of abstraction to the point where you could then say "An HTTPS server exists". But this HTTPS server is a structure, not an action. So you need some way to have some intermediate goals that transcribe goals into (not actions, but) structures. Perhaps, The result of x operation exists is a simple transformation between the two.

But then I'm stuck haha. What do the goals look like in the intermediate realm? Has anyone done any research into this area? Searching doesn't yield much, though it brings up a book Goal programming and extensions which I might have to purchase.

$\endgroup$
  • $\begingroup$ Does make fit your criteria for being goal-based? Generally, a lot of software specifications specify both state and actions to get from one state to another. But I've mainly seen this used for specification and testing, not for generating implementations - make is exceptional in this regard. $\endgroup$ – reinierpost Apr 3 at 10:33
2
$\begingroup$

Yes. The research area is known as program synthesis. You can find hundreds or thousands of papers on the subject. (You might also be interested in declarative programming.)

What you're describing is way beyond the state of the art. It'd be really cool if we could do something like that -- but we're a long long way away from knowing how to build that.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.