Skip to content

Commit

Permalink
RuleCommand can now deal with rules that have schema variables for lo…
Browse files Browse the repository at this point in the history
…gical variables (#3482)
  • Loading branch information
mattulbrich authored Jun 19, 2024
2 parents 19f83d3 + 1b48b9e commit c8b5d84
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,20 @@ public void execute(AbstractUserInterfaceControl uiControl, Parameters args, Eng
RuleApp theApp = makeRuleApp(args, state);
Goal g = state.getFirstOpenAutomaticGoal();

if (theApp instanceof TacletApp) {
RuleApp completeApp = ((TacletApp) theApp).tryToInstantiate(g.proof().getServices());
if (theApp instanceof TacletApp tacletApp) {

if (!tacletApp.ifInstsComplete()) {
ImmutableList<TacletApp> ifSeqCandidates =
tacletApp.findIfFormulaInstantiations(g.sequent(), g.proof().getServices());

if (ifSeqCandidates.size() == 1) {
theApp = ifSeqCandidates.head();
assert theApp != null;
tacletApp = (TacletApp) theApp;
}
}

RuleApp completeApp = tacletApp.tryToInstantiate(g.proof().getServices());
theApp = completeApp == null ? theApp : completeApp;
}
assert theApp != null;
Expand Down

0 comments on commit c8b5d84

Please sign in to comment.