Skip to content

Commit

Permalink
support pyk form of axioms in splitTop (#980)
Browse files Browse the repository at this point in the history
When pyk generates new KORE modules for use internal to its prover, it
creates rules whose structure is different from any rule which is
generated by the K frontend. As a result, splitTop does not know how to
handle such axioms. We thus need to extend splitTop to support this type
of rule in order to support parsing these modules as needed by the Maude
backend.
  • Loading branch information
Dwight Guth authored Feb 15, 2024
1 parent 4e6d6ba commit bafc739
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,16 @@ object Parser {
Some((None, B.Rewrites(s, l, r), splitPredicate(req), splitPredicate(ens)))
case Rewrites(s, And(_, l +: req +: Seq()), And(_, r +: ens +: Seq())) =>
Some((None, B.Rewrites(s, l, r), splitPredicate(req), splitPredicate(ens)))
case Rewrites(s, And(_, l +: req +: Seq()), r @ Application(_, _)) =>
Some((None, B.Rewrites(s, l, r), splitPredicate(req), None))
case _ => None
}

private def splitPredicate(pat: Pattern): Option[Pattern] =
pat match {
case Top(_) => None
case Equals(_, _, pat, _) => Some(pat)
case Top(_) => None
case Equals(_, _, pat, DomainValue(CompoundSort("SortBool", _), "true")) => Some(pat)
case _ => Some(pat)
}

private def getPatterns(pat: Pattern): List[Pattern] =
Expand Down

0 comments on commit bafc739

Please sign in to comment.