Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
0026ee77
Commit
0026ee77
authored
Apr 18, 2018
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modfied handling of quantifiablevariables
parent
8f73f020
Pipeline
#21147
failed with stages
in 2 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/matcher/MutableMatchings.java
...ti/formal/psdbg/interpreter/matcher/MutableMatchings.java
+32
-3
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
...ormal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
+3
-1
No files found.
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/matcher/MutableMatchings.java
View file @
0026ee77
...
...
@@ -106,7 +106,35 @@ public class MutableMatchings implements Matchings {
for
(
String
s1
:
newMatch
.
keySet
())
{
if
(
h2
.
containsKey
(
s1
))
{
if
(
h2
.
get
(
s1
)
instanceof
MatchPath
.
MPQuantifiableVariable
&&
if
(
h2
.
get
(
s1
)
instanceof
MatchPath
.
MPQuantifiableVariable
){
QuantifiableVariable
qvH2
=
(
QuantifiableVariable
)
h2
.
get
(
s1
).
getUnit
();
QuantifiableVariable
qvH1
=
(
QuantifiableVariable
)
((
Term
)
h1
.
get
(
s1
).
getUnit
()).
op
();
System
.
out
.
println
(
"qvH1 = "
+
qvH1
);
System
.
out
.
println
(
"qvH2 = "
+
qvH2
);
if
(!
qvH2
.
equals
(
qvH1
)){
return
null
;
}
else
{
h2
.
put
(
s1
,
h1
.
get
(
s1
));
}
}
if
(
h1
.
get
(
s1
)
instanceof
MatchPath
.
MPQuantifiableVariable
){
QuantifiableVariable
qvH1
=
(
QuantifiableVariable
)
h1
.
get
(
s1
).
getUnit
();
QuantifiableVariable
qvH2
=
(
QuantifiableVariable
)
((
Term
)
h2
.
get
(
s1
).
getUnit
()).
op
();
System
.
out
.
println
(
"qvH1 = "
+
qvH1
);
System
.
out
.
println
(
"qvH2 = "
+
qvH2
);
if
(!
qvH1
.
equals
(
qvH2
)){
return
null
;
}
else
{
h1
.
put
(
s1
,
h2
.
get
(
s1
));
}
}
/* if (h2.get(s1) instanceof MatchPath.MPQuantifiableVariable &&
!((QuantifiableVariable) h2.get(s1).getUnit()).name().toString().equals(h1.get(s1).toString())) {
return null;
}
...
...
@@ -115,9 +143,10 @@ public class MutableMatchings implements Matchings {
return null;
}
if
(!
h2
.
get
(
s1
).
equals
(
h1
.
get
(
s1
)))
{
if (!h2.get(s1).equals(h1.get(s1))) {
//h2.get(s1).unit.equals(((Term) h1.get(s1).unit).op())
return null;
}
}
*/
}
}
newMatch
.
putAll
(
h2
);
...
...
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
View file @
0026ee77
...
...
@@ -107,6 +107,8 @@ public class KeyMatcherFacadeTest {
@Test
public
void
testQuantMatch
()
throws
Exception
{
// shouldMatch("\\forall int x; fint2(1,x) ==>", "\\forall ?X; fint2(1,?X)", "[{?X=x}]");
shouldMatch
(
"\\forall int x; fint2(1,x) ==>"
,
"\\forall ?X; ?"
,
"[{?X=x}]"
);
shouldMatchT
(
"fint2(1,i)"
,
"fint2(1,i)"
,
"[{}]"
);
...
...
@@ -117,7 +119,7 @@ public class KeyMatcherFacadeTest {
shouldMatch
(
"\\exists int j; fint2(j,i) ==>"
,
"(\\exists int j; ?X)==>"
,
"[{?X=fint2(j,i)}]"
);
shouldMatch
(
"\\forall int i; \\exists int j; fint2(j,i) ==>"
,
"(\\forall int i; (\\exists int j; fint2(i,j)))==>"
,
"
[{}]
"
);
shouldMatch
(
"\\forall int i; \\exists int j; fint2(j,i) ==>"
,
"(\\forall int i; (\\exists int j; fint2(i,j)))==>"
,
"
{NOMATCH}
"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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