what’s your favourite programming language? Scheme, Prolog, first-order logic, take your pick.

Dr Vaishak Belle
3 min readMar 17, 2023

I often get asked this question, usually by other faculty but also by students who are starting off in research. I wish I could answer this with conviction, but I’ve been interested in too many things, and I continue to be interested in many more. the fact is, language based religious wars notwithstanding, there are multiple languages that change your way of thinking and are appropriate for different purposes. Sure, you could stick to one and have interfaces to external functions, which I presume is why Python is so popular, but then it’s like calling an API and not really enjoying the language for what’s it’s worth.

During my MSc years, I programmed the vision systems of robots in C and C++, and this I positively hated. I found the experience so exasperating, it got me to identify a Phd topic that was almost entirely theory. To be honest, it may not have been the language in itself but just the nature of the low level grime that I had to deal with on a day to day basis that convinced me that this is a rubbish experience.

During my Toronto years, I started toying with the idea that first order logic and modal logic, if defined rigorously enough, could serve as a programming language in itself. I never implemented this, but still is how I think for my research questions. Can we structure the computational properties of systems as logical languages such that the appropriate behaviour comes out as entailments? This is undoubtedly too expressive for an implementation but I harbour the dream that some courageous young mind will come along in the near future to make this a reality and provide the tools to control computational effort as required.

Be that as it may, I needed something concrete in the interim because we were building systems with logic, probability and actions, and Hector Levesque suggested the use of scheme as he had been toying with it for years. So racket scheme became the language for our belief based programming language called Prego and Allegro (IJCAI 2015). I found that the structuring of ideas with functional programming beautiful and wish I had stuck to it.

During my Leuven years, I need to link SMT-LIB, volume integration software and some Bayesian machine learning modules so Python became my language of convenience. This language never resonated with me, was just something to get the job done. I felt the same when I programmed in Java many years earlier. It just feels like “work”, and not fun, not like scheme or prolog. I was tempted to do more things with prolog, especially in Leuven, because they had a new implementation that ran a probabilistic extension to prolog (wrapped in Python however — but you could’ve ignored that unless you wanted to extend the functionality).

Recently folks have been telling me about Julia. I looked into it briefly and I think it’s interesting but it seems to be for slightly different things from my core interests, and don’t think it’ll resonate with me too much but could be proven wrong.

I’ve been watching a few presentations on higher order logic programming recently and I think this is something I could get behind. Yesterday for example I was skimming through my copy of lambda-prolog by miller and nadathur. I had reviewed this book for ACM years ago, but likely seeing things in a new light now.

What I really desire, as I mentioned above, is a language that makes it possible to express things in first order and modal logics and control the reasoning power of these things. Theorem provers don’t quite fit the bill because they are too powerful and only for logic — might as well use prolog if possible. I’d like probabilistic programming type samplers to be included in the inference engine, too. I know this is a tall order and overly aligned with my research interests, but hey, if we want to systematically integrate reasoning and learning for the future of AI, why shouldn’t we expect a platform where such things are possible? One can dream, no?

--

--

Dr Vaishak Belle

Faculty in Artificial Intelligence, & Alan Turing Fellow at the University of Edinburgh: www.vaishakbelle.org