Case study: solving P-99 with LPTP and an LLM
Abstract
Ninety-Nine Prolog Problems (P-99) is a famous set of Prolog exercises.
We solved the first thirty three just by prompting an LLM (Large Language Model).
We used Claude from Anthropic.
By solved we mean: generate the Prolog code and a test file, run the tests and check whether they pass, then formally prove types, groundness, termination, uniqueness, existence and also sometimes functional correctness with LPTP (Logic Program Theorem Prover).
Hence our approach is an experiment in vibe-coding/vericoding of P-99.
It is a vibe-coding experiment because we started from informal specifications written in English and let Claude generate the Prolog code.
It also fits within vericoding because the LLM proved reliability guarantees on the generated Prolog code.
Claude wrote 58 logic procedures, 508 tests, 257 lemmas for a total of 11800 proof lines.
We manually checked each file generated by the LLM.
We checked the Prolog code, ran the tests, examined the logical statements generated by Claude and proof-checked Claude's proofs with LPTP.
This paper describes this experiment and provides the main details so that it can be reproduced by the interested reader.
이 뉴스, 어떠셨어요?
탭 한 번으로 반응 · 로그인 불필요