Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sarah.grebing
ProofScriptParser
Commits
c6b1c6a5
Commit
c6b1c6a5
authored
Sep 05, 2017
by
Alexander Weigl
Browse files
fix
parent
85a8dd1a
Pipeline
#13423
failed with stage
in 2 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
matcher/src/main/java/edu/kit/iti/formal/psdbg/termmatcher/MatcherImpl.java
View file @
c6b1c6a5
...
...
@@ -517,7 +517,7 @@ class MatcherImpl extends MatchPatternDualVisitor<Matchings, MatchPath> {
@Override
protected
Matchings
visitEquality
(
MatchPatternParser
.
EqualityContext
ctx
,
MatchPath
peek
)
{
return
visitBinaryOperation
(
"eq"
,
ctx
.
termPattern
(
0
),
ctx
.
termPattern
(
1
),
peek
);
return
visitBinaryOperation
(
"eq
uals
"
,
ctx
.
termPattern
(
0
),
ctx
.
termPattern
(
1
),
peek
);
}
private
Stream
<
MatchPath
.
MPTerm
>
subTerms
(
MatchPath
.
MPTerm
peek
)
{
...
...
matcher/src/test/java/edu/kit/iti/formal/psdbg/termmatcher/MatcherFacadeTest.java
View file @
c6b1c6a5
...
...
@@ -36,6 +36,21 @@ public class MatcherFacadeTest {
abbrev
=
new
AbbrevMap
();
}
@Test
public
void
error
()
throws
ParserException
{
// shouldMatch("h2(2,3) = 0",
// "?X=0", "[{?X= h2(2,3)}]");
shouldMatchSeq
(
"h2(2,3) = 0 ==>"
,
"?X=0 ==>"
,
"[{?X= h2(2,3)}]"
);
shouldMatchSeq
(
"h2(2,3) = 0 ==> p, !p"
,
"?X=0 ==>"
,
"[{?X= h2(2,3)}]"
);
shouldMatchSeq
(
"2 >= 1, h2(1,2) = h2(2,3), h2(2,3) = 0 ==> p, !p"
,
"?X=0 ==>"
,
"[{?X= h2(2,3)}]"
);
}
@Test
public
void
matches
()
throws
Exception
{
shouldMatch
(
"f(a)"
,
"_"
);
...
...
@@ -61,7 +76,8 @@ public class MatcherFacadeTest {
}
@Test
public
void
testBindContext
()
throws
ParserException
{
@Test
public
void
testBindContext
()
throws
ParserException
{
//shouldMatch("f(a)", "f(a) : ?Y", "[{?Y=f(a)}]");
//shouldMatch("f(g(a))", "_ \\as ?Y", "[{?Y=f(g(a))}]");
//shouldMatch("i+i+j", "(?X + ?Y) : ?Z", "[{?X=add(i,i), ?Y=j, ?Z=add(add(i,i),j)}]");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment