Skip to content

Commit

Permalink
Made all non a ##n true |-> b patterns explicitly illegal
Browse files Browse the repository at this point in the history
  • Loading branch information
dobios committed Mar 1, 2024
1 parent 2d2e8e8 commit deb6471
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions lib/Conversion/LTLToCore/LTLToCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,30 @@ struct AssertOpConversionPattern : OpConversionPattern<verif::AssertOp> {
if (!isa<BlockArgument>(inputs.back())) {
if ((delayN =
dyn_cast<ltl::DelayOp>(inputs.back().getDefiningOp()))) {
// NOI case: generate the hardware needed to encode the
// non-overlapping implication
if (!makeNonOverlappingImplication(implop, delayN, ltlclock,
concat, rewriter, res))

// Make sure that you only allow for a ##n true |-> b
hw::ConstantOp hwconst;
if (!(hwconst = dyn_cast<hw::ConstantOp>(
delayN.getInput().getDefiningOp()))) {
delayN->emitError("Only a ##n true |-> b is supported. RHS of "
"the concatenation must be true");
return false;
} else {
if (hwconst.getValue().isZero()) {
delayN->emitError(
"Only a ##n true |-> b is supported. RHS of "
"the concatenation must be true");
return false;
}

// NOI case: generate the hardware needed to encode the
// non-overlapping implication
if (!makeNonOverlappingImplication(implop, delayN, ltlclock,
concat, rewriter, res))
return false;

rewriter.eraseOp(delayN);
rewriter.eraseOp(delayN);
}
}
} else {
concat->emitError("Antecedent must be of the form a ##n true");
Expand Down

0 comments on commit deb6471

Please sign in to comment.