4
$\begingroup$

I hear that Prolog is based in first-order logic. This makes me wonder, C/C++ are based on which higher order logics?

If this question is incorrect, please point out that.

and how are these logics related with grammers (like context sensitive and context free) and how with lambda calculus. Are these things inter-convertible or are totally separate concepts with disjoint application areas?.

  • 2
    Your questions will better suited at *cstheory.stackexchange.com*2011-06-06
  • 2
    but that forum doesn't allow basic undergrad level questions as per its faq.So thought, this is my best bet.2011-06-06
  • 0
    No as far as i know u can ask.2011-06-06
  • 1
    cstheory only allows research-level questions.2011-06-06
  • 0
    Imperative languages like C/C++ are not based on any logic. They are "state changing over time" and are best described using [Abstract State Machines](https://en.wikipedia.org/wiki/Abstract_state_machines). The "pure logic" based part of Prolog (the part that allows for no I/O and no mutating database, also called "Pure Prolog") is based on a fragment of FOL, namely Horn Clauses, which are operationally executed using "SLD Resolution" proof strategy. Other logic programming languages like Lambda Prolog may be completely different (viz. 2nd Order Logic + Intuitionistic Sequent Calculus).2017-03-12

4 Answers 4