4 ms·
William Byrd's work in program synthesis is an interesting take on this, where an IDE can, guided by test cases written for a function, actually auto-complete c
by geogriffin 9y ago
William Byrd's work in program synthesis is an interesting take on this, where an IDE can, guided by test cases written for a function, actually auto-complete code itself whilst writing the function, or tell the programmer when they have something wrong by violating a test case. Of course it is impractical right now, but a good step nonetheless.. It (Barliman) is demoed near the end of this video: https://youtu.be/OyfBQmvr2Hc https://youtu.be/OyfBQmvr2Hc
- zmonx 9y agoThis is indeed an extremely interesting approach. It was pioneered in the context of logic programming and Prolog by Ehud Shapiro in his 1982 PhD thesis "Algorithmic Program Debugging". The thesis was published as an ACM Distinguished Dissertation by MIT press and is available online from: http://cpsc.yale.edu/sites/default/files/files/tr237.pdf http://cpsc.yale.edu/sites/default/files/files/tr237.pdf Together with Leon Sterling, Ehud Shapiro later wrote a very important introductory Prolog book called "The Art of Prolog".
- mrkgnao 9y agoMagicHaskeller[0] (which seems to sadly be offline at present) is a similar project that infers Haskell functions from properties like reverse "abcde" = "edcba" Other, older projects include Exference[1] and Djinn[2], in decreasing order of power. Also, this is really similar to how Idris and Agda work, except they use expressive types to generate the code (using the Emacs modes) rather than test cases. [0]: http://nautilus.cs.miyazaki-u.ac.jp/cgi-bin/MagicHaskeller.cgi http://nautilus.cs.miyazaki-u.ac.jp/cgi-bin/MagicHaskeller.c... [1]: https://github.com/lspitzner/exference/ https://github.com/lspitzner/exference/ [2]: http://www.hedonisticlearning.com/djinn/ http://www.hedonisticlearning.com/djinn/