agda / agda

Agda is a dependently typed programming language / interactive theorem prover.
https://wiki.portal.chalmers.se/agda/pmwiki.php
Other
2.39k stars 337 forks source link

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

Open andreasabel opened 2 weeks ago

andreasabel commented 2 weeks ago

--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

andreasabel commented 2 weeks ago

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

knisht commented 2 weeks ago

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