agda / agda

Agda is a dependently typed programming language / interactive theorem prover.

Home Page:https://wiki.portal.chalmers.se/agda/pmwiki.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`--no-syntax-based-termination` turns on `--type-based-termination`, but should not

andreasabel opened this issue · comments

--no-syntax-based-termination turns on --type-based-termination, but should not:

{-# OPTIONS --no-type-based-termination #-}
{-# OPTIONS --no-syntax-based-termination #-}  -- Turns on TBT

-- {-# OPTIONS -v term.tbt:50 #-} -- look TBT over the shoulder

record U : Set where
  coinductive
  field force : U
open U

-- This should not pass since no termination checker is on.
u : U
u .force = u

ATTN: @knisht

I think I got this one wrong. The combination of those flags just turns off termination checking completely, which Agda allows unless --safe.

No, you got it right. There is a difference between two behaviors:

  • --no-termination-check which disables termination checking as a concept. This option renders all recursive functions accepted, as they do not need to be checked for termination at all;
  • --no-syntax-based-termination --no-type-based-termination, which disables all known termination checkers in the presence of termination checking as a concept. This combination of options should make all recursive functions rejected, as there is no termination checker that can certify their termination.