What are the practical limitations of a non-turing complete language like Coq?

后端 未结 4 767
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 18:57

As there are non-Turing complete languages out there, and given I didn\'t study Comp Sci at university, could someone explain something that a Turing-incomplete language (like C

4条回答
  •  故里飘歌
    2021-01-29 19:29

    An important class of problems that are a bad fit for languages such as Coq is those whose termination is conjectured or hard to prove. You can find plenty of examples in number theory, maybe the most famous is the Collatz conjecture

    function collatz(n)
      while n > 1
        if n is odd then
          set n = 3n + 1
        else
          set n = n / 2
        endif
     endwhile
    

    This limitation leads to have to express such problems in a less natural way in Coq.

提交回复
热议问题