@@ -152,7 +152,7 @@ object FastParserCompanion {
152152 // maps
153153 PKw .Map , PKwOp .Range , PKwOp .Domain ,
154154 // prover hint expressions
155- PKwOp .Unfolding , PKwOp .In , PKwOp .Applying ,
155+ PKwOp .Unfolding , PKwOp .In , PKwOp .Applying , PKwOp . Asserting ,
156156 // old expression
157157 PKwOp .Old , PKw .Lhs ,
158158 // other expressions
@@ -365,7 +365,7 @@ class FastParser {
365365 def atomReservedKw [$ : P ]: P [PExp ] = {
366366 reservedKwMany(
367367 StringIn (" true" , " false" , " null" , " old" , " result" , " acc" , " none" , " wildcard" , " write" , " epsilon" , " perm" , " let" , " forall" , " exists" , " forperm" ,
368- " unfolding" , " applying" , " Set" , " Seq" , " Multiset" , " Map" , " range" , " domain" , " new" ),
368+ " unfolding" , " applying" , " asserting " , " Set" , " Seq" , " Multiset" , " Map" , " range" , " domain" , " new" ),
369369 str => pos => str match {
370370 case " true" => Pass .map(_ => PBoolLit (PReserved (PKw .True )(pos))(_))
371371 case " false" => Pass .map(_ => PBoolLit (PReserved (PKw .False )(pos))(_))
@@ -384,6 +384,7 @@ class FastParser {
384384 case " forperm" => forperm.map(_(PReserved (PKw .Forperm )(pos)))
385385 case " unfolding" => unfolding.map(_(PReserved (PKwOp .Unfolding )(pos)))
386386 case " applying" => applying.map(_(PReserved (PKwOp .Applying )(pos)))
387+ case " asserting" => asserting.map(_(PReserved (PKwOp .Asserting )(pos)))
387388 case " Set" => setConstructor.map(_(PReserved (PKwOp .Set )(pos)))
388389 case " Seq" => seqConstructor.map(_(PReserved (PKwOp .Seq )(pos)))
389390 case " Multiset" => multisetConstructor.map(_(PReserved (PKwOp .Multiset )(pos)))
@@ -652,6 +653,10 @@ class FastParser {
652653 PApplying (_, wand.inner, op, b)
653654 }
654655
656+ def asserting [$ : P ]: P [PKwOp .Asserting => Pos => PExp ] = P (exp.parens ~ PKwOp .In ~ exp).map {
657+ case (a, in, b) => PAsserting (_, a.inner, in, b)
658+ }
659+
655660 def predicateAccessAssertion [$ : P ]: P [PAccAssertion ] = P (accessPred | predAcc)
656661
657662 def setConstructor [$ : P ]: P [PKwOp .Set => Pos => PExp ] =
0 commit comments