[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-504953-105":59,"doc-detail-504953-en":131},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":124,"head_meta":126,"extra_data":128,"updated_unix":130},105,"en","case-study-solving-p-99-with-lptp-and-an-llm","Case study: solving P-99 with LPTP and an LLM","","Case study on solving Ninety-Nine Prolog Problems (P-99) by combining an LLM with the Logic Program Theorem Prover (LPTP). The study prompts Claude to generate pure Prolog code and corresponding test files, then validates by running tests and checking formal properties. Reliability guarantees are established through LPTP proofs for types, groundness, termination, uniqueness, existence, and sometimes functional correctness. The authors report issuing 58 logic procedures, 508 tests, and 257 lemmas totaling about 11,800 proof lines, with manual verification of all generated artifacts.",{"@graph":69,"@context":123},[70,84,106],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/case-study-solving-p-99-with-lptp-and-an-llm/504953/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/case-study-solving-p-99-with-lptp-and-an-llm/504953.png","ImageObject",300,407,{"name":92,"@type":93},"Blue Pony","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-19","2026-10-04",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109,115,119],{"name":110,"@type":111,"acceptedAnswer":112},"What does “solve” mean in this case study for P-99 exercises?","Question",{"text":113,"@type":114},"The authors generate Prolog code and a test file, run the tests, and then formally prove properties such as types, groundness, termination, uniqueness, and existence with LPTP; functional correctness is also handled in some cases.","Answer",{"name":116,"@type":111,"acceptedAnswer":117},"Why is the approach described as vibe-coding and vericoding?",{"text":118,"@type":114},"It is vibe-coding because the work starts from informal English specifications and lets Claude generate the Prolog code. It is vericoding because the generated code’s reliability guarantees are proved by LLM outputs using LPTP.",{"name":120,"@type":111,"acceptedAnswer":121},"Which properties were formally verified for the generated Prolog programs?",{"text":122,"@type":114},"LPTP is used to prove types, groundness, termination, uniqueness, and existence, and the paper also targets functional correctness properties when the authors supply logical-statement hints to the LLM.","https://schema.org",{"og:url":83,"og:type":125,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":127,"canonical":83},"index,follow",{"doc_id":129,"site_id":62},504953,1791162729,{"code":4,"msg":5,"data":132},{"doc_id":129,"user_id":133,"nickname":92,"user_avatar":134,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":140,"language":141,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":67,"update_tm":145,"read_time":146},962090760266,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Case study: solving P-99 with LPTP and an LLM  \nFred Mesnard Thierry Marianne Étienne Payet  \nLIM, université de La Réunion, France  \n{frederic.mesnard,thierry.marianne,[etienne.payet}@univ-reunion.fr](etienne.payet}@univ-reunion.fr)  \nWim Vanhoof Université de Namur, Belgium  \n[wim.vanhoof@unamur.be](wim.vanhoof@unamur.be)  \nNinety-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.  \n1 Introduction  \nNinety-Nine Prolog Problems (P-99) is a famous set of Prolog exercises that have been translated to many other programming languages, including Erlang, Haskell, Lisp, Picat and Rust. There is also an Active Logic Document [15] for P-99 running Ciao-Prolog in any modern web browser 1. The oldest copy of P-99 we have dates back to more than 25 years. These exercises were written by Werner Hett from the Bern University of Applied Sciences, Switzerland. The original site has been offline for many years. There are a few copies floating on the Internet (e.g., here2 ) . Some exercises are missing (P29, P30, P42-P45, P51-P53, P74-P79) and a few of them have extensions (P61A, P62B, P70B, P70C) . All in all, there are 88 exercises.  \nIn this work, we present a case study using the combination of an LLM and LPTP (Logic Program Theorem Prover) [21] to solve some of the exercises of P-99 . We choose Claude from Anthropic and do the experiment in Code mode with the Opus 4.6 model released in February 2026 . We solve the first thirty three exercises (P01-P28 + P31-P35 = 33/88 = 37.5%) just by prompting Claude. By “solve” 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. In other words, our case study relates an experiment in vibe-coding/vericoding of P-99 . It is a vibe-coding [18] experiment because we start from informal specifications written in English for students and let Claude generate the Prolog code. It also fits within a vericoding approach [4] because the LLM proved reliability guarantees on the generated Prolog code in a formal language that can be proof-checked.  \n1[https://cliplab.org/logalg/doc/99problemsALD.html](https://cliplab.org/logalg/doc/99problemsALD.html)  \n2[https://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/](https://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/)  \nW. Faber, L. Giordano, R. Rocha, V. Santos Costa (Eds.):  \n42nd International Conference on Logic Programming (ICLP 2026) EPTCS 450, 2026, pp. 209–222, doi:10.4204/EPTCS.450.17  \n© F. Mesnard, T. Marianne, É . Payet, W. Vanhoof This work is licensed under the  \nCreative Commons Attribution License.  \n210 Case study: solving P-99 with LPTP and an LLM  \nWe did check manually each of Claude’s outputs. We checked the Prolog code,(re-)ran the tests, examined t","cbCaicmh6dnosNfm","https://ap.wps.com/l/cbCaicmh6dnosNfm","pdf",290219,14,"English","# Introduction\n# Goal\n# Experimental framework\n# Instructing the LLM\n# Overview of the experiment\n# Functional correctness examples\n# Ongoing work with a Model Context Protocol\n# Related work\n# Conclusion","[{\"question\":\"What does “solve” mean in this case study for P-99 exercises?\",\"answer\":\"The authors generate Prolog code and a test file, run the tests, and then formally prove properties such as types, groundness, termination, uniqueness, and existence with LPTP; functional correctness is also handled in some cases.\"},{\"question\":\"Why is the approach described as vibe-coding and vericoding?\",\"answer\":\"It is vibe-coding because the work starts from informal English specifications and lets Claude generate the Prolog code. It is vericoding because the generated code’s reliability guarantees are proved by LLM outputs using LPTP.\"},{\"question\":\"Which properties were formally verified for the generated Prolog programs?\",\"answer\":\"LPTP is used to prove types, groundness, termination, uniqueness, and existence, and the paper also targets functional correctness properties when the authors supply logical-statement hints to the LLM.\"}]","Case study: solving P-99 with LPTP and an LLM | PDF",1791080802,35]