Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New syntax for pragmas and assertions #276

Open
wants to merge 4 commits into
base: new_dedukti
Choose a base branch
from

Conversation

dwarfmaster
Copy link
Collaborator

Implement the new syntax for pragmas and assertions as discussed.

@gabrielhdt
Copy link
Member

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
Member

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