7

There are programming languages and theorem prover based on higher order logic (HOL). Examples include Twelf, lambda prolog, Isabelle. For example Twelf is is both a programming language and a theorem prover, while Isabelle is mainly a theorem prover, but for Isabelle code extraction is available.

I am looking for a HOL programming language based on haskell. The reason is that I like, for instance, lambda prolog very much, but it is not meant as a practical programming language. Lambda prolog lacks a standard library and interfacing with external libraries doesn't seem trivial. The problem is if you need some functionality, like writing a parser for a text file, you can't interface, say, with the many available existing libraries for haskell, and further, there is no standard library so you start from scratch.

Today I came across the Caledon programming language that was implemented as a master thesis, it seems. From the github page:

Caledon is a dependently typed, polymorphic, higher order logic programming language.

This is interesting, since it is written in haskell so it should be easy to extend and interface with existing haskell libraries. But it seems that the project is in a bit early stage, I am not sure if input-output (IO) is implemented. Since I learned only today about Caledon, I think I might have missed some further projects. (BTW, I am not interested in standard logic programming languages like prolog).

Are there programming languages based on higher order logic besides Caledon that are implemented in haskell?

(I am asking for "implemented in haskell", as it is rather easy to connect programming languages that can be extracted to or are implemented in haskell. For example the Agda programming language can compile to haskell code and haskell libraries can be used conveniently and is extremly easy to use haskell libraries if you know how. Many other programming languages (e.g., ATS) I belive only provide the smallest common denominator which is a C based foreign function interface (FFI). In my eyes it is quite cumbersome to connect two higher programming languages via their respective C-based FFI interface. Thus the seemly abitrary part that "it should be implemented in haskell". Further, as a side note some users have downvoted in the past for my description of Agda as a programming language, but of course this is not true, i.e., consider Curry-Howard )

mrsteve
  • 4,082
  • 1
  • 26
  • 63
  • 3
    "...arrogance in computer science is measured in nano-Dijkstras" -- Alan Kay – mrsteve Jan 09 '15 at 03:17
  • 1
    As a side not, the master thesis project implementing Caledon was supervised by Frank Pfenning (http://en.wikipedia.org/wiki/Frank_Pfenning) who was a student of Peter Andrews. – mrsteve Jan 09 '15 at 03:38
  • 3
    This is about programming languages. This question is not about software library, tool or book. Not every qustion can be about some trival Javascript problem. Knowledge and questions about programming languages are extremly important, as many concepts like functional programming are introduced as people try out new languages. This question is clearly also not about opinions. So I either vote to reopen this, close it for a different reason or to give suggenstion on improving this question. – mrsteve Jan 09 '15 at 04:43
  • 2
    I guess [Agda](https://hackage.haskell.org/package/Agda) and [Idris](http://www.idris-lang.org/) do not really fit your criteria "based on higher-order logic" *and* "implemented in Haskell". But it might be worth to at least know about them. – chris Jan 09 '15 at 08:45

3 Answers3

3

"Haskabelle is a converter from Haskell source files to Isabelle/HOL theories implemented in Haskell itself."

Haskabelle

Gergely
  • 6,879
  • 6
  • 25
  • 35
  • [This link](http://isabelle.in.tum.de/haskabelle.html) seems to be broken now. The project has moved [here](http://isabelle.in.tum.de/website-Isabelle2009/haskabelle.html). – Anderson Green Apr 16 '19 at 18:35
2

Strange Statement: Haskell' is a higher order logic programming language based on Haskell. Type inference in Haskell with multiparameter type classes, type families, undecidable inference and whatnot actually forms a higher order logic programming language. This probably doesn't help you very much because:

  1. The spec is literally constantly changing (I've had a few packages loose compatibility as they were based on hacks that got "fixed")
  2. The type system itself doesn't have IO (yet?)
  3. It can't really call other Haskell libraries from type inference
  4. Its not very fast.
  5. The logic programming semantics aren't exactly clear or stable.
  6. It doesn't permit you to unify with lambdas or other type classes, although it does permit unification with functions.

Sadly, I know of extraordinarily few full HOL languages let alone ones implemented in Haskell - it turns out higher order unification is a huge pain to implement.

B001ᛦ
  • 2,036
  • 6
  • 23
  • 31
1

short answer: i don't know. long answer: you have small chances you will find purely academic language with thousands of libraries and tools for it. if you for some reason need that specific language for some specific problem then use it ONLY for that problem. not for parsing files, calculating taxes or launching rockets. create library and link it with other programs. or even better: create a microservice or connect the programs in other way (e.g. standard input/output) that doesn't require much effort. always use best tool for the job

piotrek
  • 13,982
  • 13
  • 79
  • 165