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
e0deb8e1
Commit
e0deb8e1
authored
Mar 23, 2018
by
Alexander Weigl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes ui for compilation
parent
9869029d
Pipeline
#20484
failed with stages
in 2 minutes and 22 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
...ormal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
+1
-1
ui/build.gradle
ui/build.gradle
+0
-1
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
...edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
+11
-9
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
...va/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
+4
-5
No files found.
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/matcher/KeyMatcherFacadeTest.java
View file @
e0deb8e1
...
...
@@ -106,7 +106,7 @@ public class KeyMatcherFacadeTest {
@Test
public
void
testQuantMatch
()
throws
Exception
{
//
shouldMatchT("fint2(1,i)", "fint2(1,i)");
shouldMatchT
(
"fint2(1,i)"
,
"fint2(1,i)"
);
shouldMatch
(
"\\exists int i, int j; fint2(j,i) ==> "
,
"(\\exists ?Y, ?X; ?Term) ==> "
,
"[{?Term=fint2(j,i), ?X=j:int, ?Y=i:int}]"
);
...
...
ui/build.gradle
View file @
e0deb8e1
...
...
@@ -29,7 +29,6 @@ dependencies {
antlr
group:
'org.antlr'
,
name:
'antlr4'
,
version:
'4.7'
compile
project
(
':rt-key'
)
// compile project(':matcher')
compile
project
(
':DockFX'
)
compile
project
(
':lint'
)
}
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
View file @
e0deb8e1
...
...
@@ -7,6 +7,7 @@ import de.uka.ilkd.key.pp.*;
import
edu.kit.iti.formal.psdbg.interpreter.data.GoalNode
;
import
edu.kit.iti.formal.psdbg.interpreter.data.KeyData
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.KeyMatcherFacade
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.Match
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.MatchPath
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.Matchings
;
import
javafx.beans.Observable
;
...
...
@@ -47,7 +48,7 @@ public class SequentMatcher extends BorderPane {
@FXML
private
TextArea
matchpattern
;
@FXML
private
ListView
<
Ma
p
<
String
,
MatchPath
>
>
matchingsView
;
private
ListView
<
Ma
tch
>
matchingsView
;
@FXML
private
Label
nomatchings
;
//only shown when no matchings found, else always hidden
private
Map
<
PosInOccurrence
,
Range
>
cursorPosition
=
new
HashMap
<>();
...
...
@@ -120,10 +121,10 @@ public class SequentMatcher extends BorderPane {
sequentView
.
clearHighlight
();
KeyMatcherFacade
kmf
=
KeyMatcherFacade
.
builder
().
environment
(
getSelectedGoalNodeToShow
().
getData
().
getEnv
()).
sequent
(
getSelectedGoalNodeToShow
().
getData
().
getNode
().
sequent
()).
build
();
Matchings
matchings
=
kmf
.
matches
(
matchpattern
.
getText
(),
null
);
//MatcherFacade.matches(matchpattern.getText(), getSelectedGoalNodeToShow().getData().getNode().sequent(), true,
//services);
//MatcherFacade.matches(matchpattern.getText(), getSelectedGoalNodeToShow().getData().getNode().sequent(), true,
//services);
ObservableList
<
Ma
p
<
String
,
MatchPath
>>
resultlist
=
FXCollections
.
observableArrayList
(
matchings
);
ObservableList
<
Ma
tch
>
resultlist
=
FXCollections
.
observableArrayList
(
matchings
.
getMatchings
()
);
//If no matchings found, addCell "No matchings found"
if
(
resultlist
.
isEmpty
())
{
...
...
@@ -132,17 +133,17 @@ public class SequentMatcher extends BorderPane {
}
else
{
nomatchings
.
setVisible
(
false
);
matchingsView
.
setItems
(
resultlist
);
matchingsView
.
setCellFactory
(
param
->
new
ListCell
<
Ma
p
<
String
,
MatchPath
>
>()
{
matchingsView
.
setCellFactory
(
param
->
new
ListCell
<
Ma
tch
>()
{
//needed to hide position information of match paths
@Override
protected
void
updateItem
(
Ma
p
<
String
,
MatchPath
>
item
,
boolean
empty
)
{
protected
void
updateItem
(
Ma
tch
item
,
boolean
empty
)
{
super
.
updateItem
(
item
,
empty
);
if
(
empty
||
item
==
null
)
{
setText
(
null
);
}
else
{
setText
(
"Match "
+
(
resultlist
.
indexOf
(
item
)
+
1
)
setText
(
"Match "
+
(
resultlist
.
indexOf
(
item
)
+
1
)
+
": "
+
matchingsToString
(
item
));
}
}
...
...
@@ -156,6 +157,7 @@ public class SequentMatcher extends BorderPane {
/**
* Removes position information of the MatchPath
*
* @param match
* @return string without position information
*/
...
...
@@ -209,11 +211,11 @@ public class SequentMatcher extends BorderPane {
return
selectedGoalNodeToShow
;
}
public
ListView
<
Ma
p
<
String
,
MatchPath
>
>
getMatchingsView
()
{
public
ListView
<
Ma
tch
>
getMatchingsView
()
{
return
matchingsView
;
}
public
void
setMatchingsView
(
ListView
<
Ma
p
<
String
,
MatchPath
>
>
matchingsView
)
{
public
void
setMatchingsView
(
ListView
<
Ma
tch
>
matchingsView
)
{
this
.
matchingsView
=
matchingsView
;
}
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
View file @
e0deb8e1
...
...
@@ -10,6 +10,7 @@ import de.uka.ilkd.key.proof.Node;
import
de.uka.ilkd.key.settings.ProofIndependentSettings
;
import
edu.kit.iti.formal.psdbg.interpreter.KeYProofFacade
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.KeyMatcherFacade
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.Match
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.MatchPath
;
import
edu.kit.iti.formal.psdbg.interpreter.matcher.Matchings
;
import
javafx.beans.Observable
;
...
...
@@ -26,7 +27,6 @@ import org.key_project.util.collection.ImmutableSLList;
import
java.io.StringWriter
;
import
java.util.Collections
;
import
java.util.Map
;
/**
* @author Alexander Weigl
...
...
@@ -136,7 +136,6 @@ public class SequentView extends CodeArea {
filter
.
setSequent
(
sequent
);
ProgramPrinter
prgPrinter
=
new
ProgramPrinter
(
new
StringWriter
());
this
.
backend
=
new
LogicPrinter
.
PosTableStringBackend
(
80
);
//unicode makes prettier syntax but is bad for matching
...
...
@@ -213,9 +212,9 @@ public class SequentView extends CodeArea {
Matchings
m
=
kmf
.
matches
(
pattern
,
null
);
// Matchings m =
//MatcherFacade.matches(pattern, node.get().sequent(), true, services);
if
(
m
.
size
()
==
0
)
return
false
;
Ma
p
<
String
,
MatchPath
>
va
=
m
.
firs
t
();
//MatcherFacade.matches(pattern, node.get().sequent(), true, services);
if
(
m
.
isEmpty
()
||
m
.
isNoMatch
()
)
return
false
;
Ma
tch
va
=
m
.
getMatchings
().
iterator
().
nex
t
();
//System.out.println(va);//TODO remove
for
(
MatchPath
mp
:
va
.
values
())
{
System
.
out
.
println
(
mp
.
pio
());
...
...
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