lambdapi icon indicating copy to clipboard operation
lambdapi copied to clipboard

the LSP server returns no feedback in case of "assert false"

Open fblanqui opened this issue 8 months ago • 3 comments

fblanqui avatar Jun 30 '25 15:06 fblanqui

Would it be possible to add more information about the assert command when it fails? For example:

assert ⊢ true : ℕ; // case 1
assert ⊢ 1 + 1 ≡ 1; // case 2

The only output we have when an assertion fails is the message Assertion failed. Would it be possible to output in case 1 the type inferred by Lambdapi, and in case 2, what are the left and right evaluation? It can be done by hand for now, but I believe that it should be the correct behavior of the assert command.

NotBad4U avatar Jun 30 '25 16:06 NotBad4U

The assert's this issue is about are the OCaml assert's used to implement Lambdapi. For feature requests concerning the Lambdapi commands assert/assertnot, please open a distinct issue.

fblanqui avatar Jun 30 '25 17:06 fblanqui

Flèche should help with this, due to the way we encapsulate exceptions.

ejgallego avatar Jun 30 '25 21:06 ejgallego