Commit eef68b1a authored by Alexander Weigl's avatar Alexander Weigl

make MatchPath return PosInOccurrence

* but PositionTable is incompatible
parent 2bb44850
Pipeline #13112 failed with stage
in 2 minutes and 55 seconds
...@@ -2,13 +2,14 @@ package edu.kit.formal.psdb.gui.controls; ...@@ -2,13 +2,14 @@ package edu.kit.formal.psdb.gui.controls;
import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.NamespaceSet; import de.uka.ilkd.key.logic.NamespaceSet;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.pp.*; import de.uka.ilkd.key.pp.*;
import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.settings.ProofIndependentSettings; import de.uka.ilkd.key.settings.ProofIndependentSettings;
import edu.kit.formal.psdb.interpreter.KeYProofFacade; import edu.kit.formal.psdb.interpreter.KeYProofFacade;
import edu.kit.formal.psdb.termmatcher.MatchPath; import edu.kit.formal.psdb.termmatcher.mp.MatchPath;
import edu.kit.formal.psdb.termmatcher.MatcherFacade; import edu.kit.formal.psdb.termmatcher.MatcherFacade;
import edu.kit.formal.psdb.termmatcher.Matchings; import edu.kit.formal.psdb.termmatcher.Matchings;
import javafx.beans.Observable; import javafx.beans.Observable;
...@@ -21,6 +22,7 @@ import javafx.scene.paint.Color; ...@@ -21,6 +22,7 @@ import javafx.scene.paint.Color;
import org.fxmisc.richtext.CharacterHit; import org.fxmisc.richtext.CharacterHit;
import org.fxmisc.richtext.CodeArea; import org.fxmisc.richtext.CodeArea;
import org.key_project.util.collection.ImmutableList; import org.key_project.util.collection.ImmutableList;
import org.key_project.util.collection.ImmutableSLList;
import java.io.StringWriter; import java.io.StringWriter;
import java.util.Collections; import java.util.Collections;
...@@ -193,19 +195,22 @@ public class SequentView extends CodeArea { ...@@ -193,19 +195,22 @@ public class SequentView extends CodeArea {
if (node.get().sequent() != null) { if (node.get().sequent() != null) {
Matchings m = MatcherFacade.matches(pattern, node.get().sequent(), true); Matchings m = MatcherFacade.matches(pattern, node.get().sequent(), true);
if (m.size() == 0) return false; if (m.size() == 0) return false;
for (Map<String, MatchPath> va : m) { Map<String, MatchPath> va = m.first();
MatchPath<?> complete = va.get("?COMPLETE"); System.out.println(va);//TODO remove
highlightTerm(complete.getPos()); for (MatchPath mp : va.values()) {
System.out.println(mp.pio());
highlightTerm(mp.pio());
} }
} }
return true; return true;
} }
private void highlightTerm(ImmutableList<Integer> complete) { private void highlightTerm(PosInOccurrence complete) {
if (backend == null) { if (backend == null) {
return; return;
} }
Range r = backend.getInitialPositionTable().rangeForPath(complete); ImmutableList<Integer> path = ImmutableSLList.singleton(1);
Range r = backend.getInitialPositionTable().rangeForPath(path);
setStyle(r.start(), r.end(), Collections.singleton("search-highlight")); setStyle(r.start(), r.end(), Collections.singleton("search-highlight"));
} }
} }
...@@ -122,10 +122,13 @@ public class Utils { ...@@ -122,10 +122,13 @@ public class Utils {
private Utils() { private Utils() {
} }
public static String getRandomName(String suffx) {
return getRandomName() + suffx;
}
public static String getRandomName() { public static String getRandomName() {
Random r = new Random(); Random r = new Random();
return (ADJECTIVES[r.nextInt(ADJECTIVES.length)] + "_" + ANIMALS[r.nextInt(ANIMALS.length)] + ".kps").toLowerCase(); return (ADJECTIVES[r.nextInt(ADJECTIVES.length)] + "_" + ANIMALS[r.nextInt(ANIMALS.length)]).toLowerCase();
} }
public static void createWithFXML(Object node) { public static void createWithFXML(Object node) {
......
package edu.kit.formal.psdb.termmatcher;
import de.uka.ilkd.key.logic.Semisequent;
import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.logic.Term;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.key_project.util.collection.ImmutableList;
import org.key_project.util.collection.ImmutableSLList;
/**
* @author Alexander Weigl
* @version 1 (24.08.17)
*/
@Data
@EqualsAndHashCode(of = {"term"})
public abstract class MatchPath<T> {
public static final int ROOT = -1;
public static final int POSITION_ANTECEDENT = -2;
public static final int POSITION_SUCCEDENT = -3;
private final MatchPath<?> parent;
private final T term;
private final int posInParent;
public MatchPath(MatchPath<?> parent, T unit, int pos) {
posInParent = pos;
term = unit;
this.parent = parent;
}
public static MatchPath<Term> createTermPath(MatchPath<Term> path, int i) {
return new MatchPathTerm(path, path.getTerm().sub(i), i);
}
public ImmutableList<Integer> getPos() {
if (parent == null) {
return ImmutableSLList.singleton(posInParent);
} else {
return parent.getPos().append(posInParent);
}
}
public static MatchPath<Term> createRoot(Term keyTerm) {
return new MatchPathTerm(null, keyTerm, -1);
}
public String toString() {
return term.toString();
}
public static MatchPathSemiSequent createSemiSequent(Sequent s, boolean antec) {
MatchPathSemiSequent mp = new MatchPathSemiSequent(
createSequent(s), antec ? s.antecedent() : s.succedent(), antec);
return mp;
}
private static MatchPathSequent createSequent(Sequent s) {
return new MatchPathSequent(s);
}
public static MatchPathSemiSequent createSuccedent(Sequent sequent) {
return createSemiSequent(sequent, false);
}
public static MatchPathSemiSequent createAntecedent(Sequent sequent) {
return createSemiSequent(sequent, true);
}
public abstract int depth();
public static class MatchPathTerm extends MatchPath<Term> {
public MatchPathTerm(MatchPath<?> parent, Term unit, int pos) {
super(parent, unit, pos);
}
@Override
public int depth() {
return getTerm().depth();
}
}
public static class MatchPathSequent extends MatchPath<Sequent> {
public MatchPathSequent(Sequent unit) {
super(null, unit, ROOT);
}
@Override
public int depth() {
return 0;
}
}
public static class MatchPathSemiSequent extends MatchPath<Semisequent> {
public MatchPathSemiSequent(MatchPathSequent parent, Semisequent unit, boolean antec) {
super(parent, unit, antec ? POSITION_ANTECEDENT : POSITION_SUCCEDENT);
}
@Override
public int depth() {
return 1;
}
}
}
...@@ -4,9 +4,12 @@ import de.uka.ilkd.key.logic.Semisequent; ...@@ -4,9 +4,12 @@ import de.uka.ilkd.key.logic.Semisequent;
import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.Term;
import edu.kit.formal.psdb.termmatcher.MatchPatternParser.SemiSeqPatternContext; import edu.kit.formal.psdb.termmatcher.MatchPatternParser.SemiSeqPatternContext;
import edu.kit.formal.psdb.termmatcher.mp.MatchPathFacade;
import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime.CommonTokenStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.SequentPatternContext; import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.SequentPatternContext;
import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.TermPatternContext; import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.TermPatternContext;
...@@ -18,12 +21,14 @@ import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.TermPatternCont ...@@ -18,12 +21,14 @@ import static edu.kit.formal.psdb.termmatcher.MatchPatternParser.TermPatternCont
* @author S.Grebing * @author S.Grebing
*/ */
public class MatcherFacade { public class MatcherFacade {
private static Logger logger = LogManager.getLogger(MatcherFacade.class);
public static Matchings matches(String pattern, Term keyTerm) { public static Matchings matches(String pattern, Term keyTerm) {
MatcherImpl matcher = new MatcherImpl(); MatcherImpl matcher = new MatcherImpl();
matcher.setCatchAll(false); matcher.setCatchAll(false);
MatchPatternParser mpp = getParser(pattern); MatchPatternParser mpp = getParser(pattern);
TermPatternContext ctx = mpp.termPattern(); TermPatternContext ctx = mpp.termPattern();
return matcher.accept(ctx, MatchPath.createRoot(keyTerm)); return matcher.accept(ctx, MatchPathFacade.createRoot(keyTerm));
} }
...@@ -44,8 +49,8 @@ public class MatcherFacade { ...@@ -44,8 +49,8 @@ public class MatcherFacade {
/** /**
* Match a semisequent against a sequent * Match a semisequent against a sequent
* *
* @param pattern Semisequent pattern e.g. f(x), f(x) * @param pattern Semisequent pattern e.g. f(x), f(x)
* @param semiSeq Concrete KeY Semisequent * @param semiSeq Concrete KeY Semisequent
* @param catchAll * @param catchAll
* @return Matchings * @return Matchings
*/ */
...@@ -54,7 +59,7 @@ public class MatcherFacade { ...@@ -54,7 +59,7 @@ public class MatcherFacade {
SemiSeqPatternContext ctx = mpp.semiSeqPattern(); SemiSeqPatternContext ctx = mpp.semiSeqPattern();
MatcherImpl matcher = new MatcherImpl(); MatcherImpl matcher = new MatcherImpl();
matcher.setCatchAll(catchAll); matcher.setCatchAll(catchAll);
Matchings m = matcher.accept(ctx, new MatchPath.MatchPathSemiSequent(null, semiSeq, true)); Matchings m = matcher.accept(ctx, MatchPathFacade.createRoot(semiSeq));
return m; return m;
} }
...@@ -69,9 +74,14 @@ public class MatcherFacade { ...@@ -69,9 +74,14 @@ public class MatcherFacade {
public static Matchings matches(String pattern, Sequent sequent, boolean catchAll) { public static Matchings matches(String pattern, Sequent sequent, boolean catchAll) {
MatchPatternParser mpp = getParser(pattern); MatchPatternParser mpp = getParser(pattern);
SequentPatternContext ctx = mpp.sequentPattern(); SequentPatternContext ctx = mpp.sequentPattern();
if (mpp.getNumberOfSyntaxErrors() != 0) {
logger.info("Invalid pattern syntax '{}' no matches returned.", pattern);
return new Matchings();
}
MatcherImpl matcher = new MatcherImpl(); MatcherImpl matcher = new MatcherImpl();
matcher.setCatchAll(catchAll); matcher.setCatchAll(catchAll);
Matchings m = matcher.accept(ctx, new MatchPath.MatchPathSequent(sequent)); Matchings m = matcher.accept(ctx, MatchPathFacade.create(sequent));
return m; return m;
} }
...@@ -84,6 +94,6 @@ public class MatcherFacade { ...@@ -84,6 +94,6 @@ public class MatcherFacade {
* @return * @return
*/ */
public static Matchings matches(String pattern, Sequent sequent) { public static Matchings matches(String pattern, Sequent sequent) {
return matches(pattern, sequent,false); return matches(pattern, sequent, false);
} }
} }
...@@ -2,20 +2,22 @@ package edu.kit.formal.psdb.termmatcher; ...@@ -2,20 +2,22 @@ package edu.kit.formal.psdb.termmatcher;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.uka.ilkd.key.logic.Semisequent; import de.uka.ilkd.key.logic.Semisequent;
import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.SequentFormula;
import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.Term;
import edu.kit.formal.psdb.gui.controls.Utils; import edu.kit.formal.psdb.gui.controls.Utils;
import edu.kit.formal.psdb.termmatcher.mp.MatchPath;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.antlr.v4.runtime.CommonToken; import org.antlr.v4.runtime.CommonToken;
import org.key_project.util.collection.ImmutableArray; import org.key_project.util.collection.ImmutableArray;
import org.key_project.util.collection.ImmutableList;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import static edu.kit.formal.psdb.termmatcher.mp.MatchPathFacade.*;
/** /**
* Matchpattern visitor visits the matchpatterns of case-statements * Matchpattern visitor visits the matchpatterns of case-statements
* *
...@@ -27,18 +29,6 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -27,18 +29,6 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
static final Matchings EMPTY_MATCH = Matchings.singleton("EMPTY_MATCH", null); static final Matchings EMPTY_MATCH = Matchings.singleton("EMPTY_MATCH", null);
static final Map<String, MatchPath> EMPTY_VARIABLE_ASSIGNMENT = EMPTY_MATCH.first(); static final Map<String, MatchPath> EMPTY_VARIABLE_ASSIGNMENT = EMPTY_MATCH.first();
private List<Integer> currentPosition = new ArrayList<>();
/**
* If true, we assume every term in the pattern has a binder.
* The binding names are generated.
*
* @see #handleBindClause(MatchPatternParser.BindClauseContext, MatchPath, Matchings)
*/
@Getter
@Setter
private boolean catchAll = false;
/* /*
* Reduce two matchinfos * Reduce two matchinfos
...@@ -71,6 +61,16 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -71,6 +61,16 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
return oneMatch ? res : null; return oneMatch ? res : null;
} }
*/ */
private List<Integer> currentPosition = new ArrayList<>();
/**
* If true, we assume every term in the pattern has a binder.
* The binding names are generated.
*
* @see #handleBindClause(MatchPatternParser.BindClauseContext, MatchPath, Matchings)
*/
@Getter
@Setter
private boolean catchAll = false;
private static HashMap<String, MatchPath> reduceConform(Map<String, MatchPath> h1, Map<String, MatchPath> h2) { private static HashMap<String, MatchPath> reduceConform(Map<String, MatchPath> h1, Map<String, MatchPath> h2) {
...@@ -86,7 +86,6 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -86,7 +86,6 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
return h3; return h3;
} }
/** /**
* Reduce the matchings by eliminating non-compatible matchings. * Reduce the matchings by eliminating non-compatible matchings.
* For example: * For example:
...@@ -117,6 +116,35 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -117,6 +116,35 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
return oneMatch ? m3 : NO_MATCH; return oneMatch ? m3 : NO_MATCH;
} }
/**
* Transform a number term into an int value.
* <p>
* i.e. Z(1(2(3(#)))) ==> 123
*
* @param zTerm
* @return
*/
public static int transformToNumber(Term zTerm) {
List<Integer> integ = MatcherImpl.transformHelper(new ArrayList<>(), zTerm);
int dec = 10;
int output = integ.get(0);
for (int i = 1; i < integ.size(); i++) {
Integer integer = integ.get(i);
output += integer * dec;
dec = dec * 10;
}
return output;
}
private static List<Integer> transformHelper(List<Integer> l, Term sub) {
if (sub.op().name().toString().equals("#")) {
return l;
} else {
l.add(Integer.parseUnsignedInt(sub.op().name().toString()));
return transformHelper(l, sub.sub(0));
}
}
/** /**
* Visit '_' * Visit '_'
* *
...@@ -159,14 +187,13 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -159,14 +187,13 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
@Override @Override
protected Matchings visitAnywhere(MatchPatternParser.AnywhereContext ctx, MatchPath peek) { protected Matchings visitAnywhere(MatchPatternParser.AnywhereContext ctx, MatchPath peek) {
Matchings m = new Matchings(); Matchings m = new Matchings();
subTerms(peek).forEach(sub -> { subTerms((MatchPath.MPTerm) peek).forEach(sub -> {
Matchings s = accept(ctx.termPattern(), sub); Matchings s = accept(ctx.termPattern(), sub);
m.addAll(s); m.addAll(s);
}); });
return m; return m;
} }
/** /**
* Visit a function and predicate symbol without a sequent arrow * Visit a function and predicate symbol without a sequent arrow
* *
...@@ -178,14 +205,13 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -178,14 +205,13 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
protected Matchings visitFunction(MatchPatternParser.FunctionContext ctx, MatchPath path) { protected Matchings visitFunction(MatchPatternParser.FunctionContext ctx, MatchPath path) {
//System.out.format("Match: %25s with %s %n", peek, ctx.toInfoString(new MatchPatternParser(null))); //System.out.format("Match: %25s with %s %n", peek, ctx.toInfoString(new MatchPatternParser(null)));
String expectedFunction = ctx.func.getText(); String expectedFunction = ctx.func.getText();
Term peek = ((MatchPath<Term>) path).getTerm(); Term peek = ((MatchPath.MPTerm) path).getUnit();
if (peek.op().name().toString().equals(expectedFunction) // same name if (peek.op().name().toString().equals(expectedFunction) // same name
&& ctx.termPattern().size() == peek.arity() // same arity && ctx.termPattern().size() == peek.arity() // same arity
) { ) {
Matchings m = IntStream.range(0, peek.arity()) Matchings m = IntStream.range(0, peek.arity())
.mapToObj(i -> (Matchings) .mapToObj(i -> (Matchings)
accept(ctx.termPattern(i), accept(ctx.termPattern(i), create(path, i)))
MatchPath.createTermPath(path, i)))
.reduce(MatcherImpl::reduceConform) .reduce(MatcherImpl::reduceConform)
.orElse(EMPTY_MATCH); .orElse(EMPTY_MATCH);
return handleBindClause(ctx.bindClause(), path, m); return handleBindClause(ctx.bindClause(), path, m);
...@@ -217,39 +243,10 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -217,39 +243,10 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
return this.reduceConform(m, mNew); return this.reduceConform(m, mNew);
} }
/**
* Transform a number term into an int value.
* <p>
* i.e. Z(1(2(3(#)))) ==> 123
*
* @param zTerm
* @return
*/
public static int transformToNumber(Term zTerm) {
List<Integer> integ = MatcherImpl.transformHelper(new ArrayList<>(), zTerm);
int dec = 10;
int output = integ.get(0);
for (int i = 1; i < integ.size(); i++) {
Integer integer = integ.get(i);
output += integer * dec;
dec = dec * 10;
}
return output;
}
private static List<Integer> transformHelper(List<Integer> l, Term sub) {
if (sub.op().name().toString().equals("#")) {
return l;
} else {
l.add(Integer.parseUnsignedInt(sub.op().name().toString()));
return transformHelper(l, sub.sub(0));
}
}
@Override @Override
protected Matchings visitNumber(MatchPatternParser.NumberContext ctx, MatchPath path) { protected Matchings visitNumber(MatchPatternParser.NumberContext ctx, MatchPath path) {
//we are at a number //we are at a number
Term peek = ((MatchPath<Term>) path).getTerm(); Term peek = ((MatchPath.MPTerm) path).getUnit();
if (peek.op().name().toString().equals("Z")) { if (peek.op().name().toString().equals("Z")) {
ImmutableArray<Term> subs = peek.subs(); ImmutableArray<Term> subs = peek.subs();
int transformedString = transformToNumber(peek.sub(0)); int transformedString = transformToNumber(peek.sub(0));
...@@ -274,13 +271,12 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -274,13 +271,12 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
*/ */
@Override @Override
public Matchings visitSequentAnywhere(MatchPatternParser.SequentAnywhereContext ctx, MatchPath peek) { public Matchings visitSequentAnywhere(MatchPatternParser.SequentAnywhereContext ctx, MatchPath peek) {
MatchPath<Sequent> seq = peek; MatchPath.MPSequent seq = (MatchPath.MPSequent) peek;
Sequent sequent = seq.getTerm();
MatchPatternParser.SemiSeqPatternContext patternCtx = ctx.anywhere; MatchPatternParser.SemiSeqPatternContext patternCtx = ctx.anywhere;
Matchings ret = new Matchings(); Matchings ret = new Matchings();
Matchings antecMatches = accept(patternCtx, MatchPath.createAntecedent(sequent)); Matchings antecMatches = accept(patternCtx, createAntecedent(seq));
Matchings succMatches = accept(patternCtx, MatchPath.createSuccedent(sequent)); Matchings succMatches = accept(patternCtx, createSuccedent(seq));
//if(!antecMatches.equals(EMPTY_MATCH)) //if(!antecMatches.equals(EMPTY_MATCH))
ret.addAll(antecMatches); ret.addAll(antecMatches);
...@@ -295,16 +291,15 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -295,16 +291,15 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
@Override @Override
public Matchings visitSequentArrow(MatchPatternParser.SequentArrowContext ctx, MatchPath peek) { public Matchings visitSequentArrow(MatchPatternParser.SequentArrowContext ctx, MatchPath peek) {
MatchPath<Sequent> seq = peek; MatchPath.MPSequent seq = (MatchPath.MPSequent) peek;
Sequent sequent = seq.getTerm();
//NPE //NPE
Matchings mAntec = ctx.antec != null Matchings mAntec = ctx.antec != null
? accept(ctx.antec, MatchPath.createSemiSequent(sequent, true)) ? accept(ctx.antec, createAntecedent(seq))
: EMPTY_MATCH; : EMPTY_MATCH;
Matchings mSucc = ctx.succ != null Matchings mSucc = ctx.succ != null
? accept(ctx.succ, MatchPath.createSemiSequent(sequent, false)) ? accept(ctx.succ, createSuccedent(seq))
: EMPTY_MATCH; : EMPTY_MATCH;
return MatcherImpl.reduceConform(mAntec, mSucc); return MatcherImpl.reduceConform(mAntec, mSucc);
...@@ -319,14 +314,19 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> { ...@@ -319,14 +314,19 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
*/ */
@Override @Override
protected Matchings visitSemiSeqPattern(MatchPatternParser.SemiSeqPatternContext ctx, MatchPath peek) { protected Matchings visitSemiSeqPattern(MatchPatternParser.SemiSeqPatternContext ctx, MatchPath peek) {
Semisequent ss = (Semisequent) peek.getTerm(); MatchPath.MPSemiSequent sseq = (MatchPath.