Automatic programming research: which approach aims to derive programs from user-provided behaviors or examples, reducing the need for manual coding?

Difficulty: Easy

Correct Answer: specification by example

Explanation:


Introduction / Context:
Automatic programming seeks to raise the level of abstraction so that users specify intent and the system synthesizes code. One practical strand is specification (or programming) by example, where users demonstrate input–output pairs or manipulations, and the system infers a program consistent with the examples and a bias or grammar.


Given Data / Assumptions:

  • The focus is on converting user-provided examples into executable procedures.
  • Other options reference unrelated domains (instructional systems, planning paradigms).
  • We emphasize approaches that directly reduce manual coding.


Concept / Approach:
Specification by example (also called programming by demonstration) lets non-programmers teach systems through concrete tasks, which the synthesizer generalizes. Systems may use hypothesis search over domain-specific languages, constraint solving, or inductive logic programming to synthesize code consistent with examples and minimality criteria.


Step-by-Step Solution:

Identify the option that directly translates examples into programs. Exclude generative CAI (focused on instructional content generation) and non-hierarchical planning (AI planning, not code synthesis from examples). Select specification by example. Confirm that this reduces manual coding effort.


Verification / Alternative check:
Productivity tools (e.g., spreadsheet flash-fill–style systems, PBD editors) demonstrate real-world viability of example-driven synthesis, supporting the chosen option.


Why Other Options Are Wrong:

  • Generative CAI: about generating instructional materials, not synthesizing arbitrary programs from examples.
  • Non-hierarchical planning: an AI planning approach; not automatic programming via examples.
  • All/None: do not match the precise intent of the question.


Common Pitfalls:
Equating any AI generation with code synthesis; overlooking the requirement that examples drive the derivation of executable procedures.


Final Answer:
specification by example

More Questions from Artificial Intelligence

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion