With a Racket section to boot. Thanks so much for sharing this! I had no idea about this kind of application.
-------- Original Message -------- On Sep 5, 2019, 5:26 PM, Josh Rubin wrote: > On 9/5/2019 9:05 AM, Adam Golding wrote: >> What is the shortest/smallest racket program (ithat enumerates all and >> only valid racket programs? >> > > You might be interested in the logic-programming/constraint-solving > language named miniKanren. > > http://minikanren.org/ > > miniKanren can solve puzzles like these: > generate ( all ! ) programs that print "I love you" > generate ( all ! ) programs that reproduce themselves > generate ( all ! ) pairs of programs (A,B) where A prints B and B prints A > generate programs from examples of what they are supposed to do. > > One trick solves all these puzzles. > Given the source code of an interpreter named eval, miniKanren can solve > equations like this: > > (and > (equal? (eval '(<program-with-missing-part> example1)) 'desired-result1) > (equal? (eval '(<program-with-missing-part> example2)) 'desired-result2) > ... ) > > The search strategy is complete. It will eventually check everything in > the search tree. It will not get stuck. > > -- > Josh Rubin > jlru...@gmail.com > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/b7389311-cc35-a725-dbaa-6ffc7153781b%40gmail.com. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/hGOkV_lLRfIvpOcB6BfbiPsHl7cTQCC7P4tGxCROxYjM1Gyr588-aG4Y6EefSwESXaKjo8Myvyg1v-0uD3vG4SW85eGiTGL8aOZ4aASiaBg%3D%40sagegerard.com.