I learned that Coq is written in OCaml, but it has the specification language as Gallina. How are these two languages related besides they are all functional programming languages?
That's a bit of a loaded question.
Gallina could exist independently from OCaml, though, being a lambda calculus, it shares some construct and semantics with it, and, having been developed in the OCaml world, it also shares some concrete syntax. But OCaml could not have been suitable to take the place of Gallina.
Some similarities:
Some (major) differences:
In fact, historically, ML (which OCaml is some variant of) was to LCF sort of what Ltac is to Gallina! :-D (oh boy, I might get some angry comments because of this note...)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.