How to verify a parser in TLA+?

43 views
Skip to first unread message

Delta Striker

unread,
Jan 10, 2023, 2:06:45 AM1/10/23
to tlaplus
I'd like to verify a LL(1)-style parser using formal verification.
But I don't have any idea how to model the specification of the parser.
Are there any examples about this,or can you give me some hint?
Thank you.

Stephan Merz

unread,
Jan 11, 2023, 5:28:05 AM1/11/23
to tla...@googlegroups.com
I am not aware of work on parser verification performed in TLA+. The Menhir parser generator [1] for OCaml, based on LR(1) rules, includes a Coq backend for formal verification (section 12 of the reference manual), but I have never used this functionality. Perhaps you can get some inspiration there.

Regards,
Stephan

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/b2b5601d-19c4-4c0d-9f5b-17a6a0def3e2n%40googlegroups.com.

Andrew Helwer

unread,
Jan 11, 2023, 8:47:15 AM1/11/23
to tlaplus
It's hard to say what a formal spec for a parser would even look like, other than an EBNF grammar, but there are tons of very solid battle-tested parser generators that will happily take an EBNF grammar and create a full parser for you.

Andrew
Reply all
Reply to author
Forward
0 new messages