Skip to content

Conversation

@dwarfmaster
Copy link
Collaborator

Implement the new syntax for pragmas and assertions as discussed.

@dwarfmaster dwarfmaster requested a review from gabrielhdt June 14, 2022 09:02
@gabrielhdt
Copy link
Collaborator

All right, I'll just inline some example file here to have a taste of it

(; OK ;)

A : Type.
def B := A.
def C := A.
D : Type.

assert |- B == A.
assert |- B == C.
(;# assertnot A == D #;)

@dwarfmaster
Copy link
Collaborator Author

All previous pragmas of the form #PRAGMA... are still supported as (;# PRAGMA ... #;), making it easy to update tests.

@GuillaumeGen
Copy link
Contributor

This syntax change requires an update of the syntax.bnf file (generated by a command like make bnf) and of the README (at least the "Commands" section, probably some other occurrences too).

| HasType of term * term (** Typability test, given a term and a type. *)
| Convert of typed_context * term * term (** Convertibility between the two given terms. *)
| HasType of typed_context * term * term (** Typability test, given a term and a type. *)
| Typeable of typed_context * term (** Typability test, without the type *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it infer?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's because it is an assertion, so we are thinking of a predicate rather than a computation. In particular, the Dedukti command Typeable(c, t) should not print anything. It could be IsTypeable, if you want to stress out the predicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants