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
1bfc2b02
Commit
1bfc2b02
authored
Feb 12, 2018
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into gradle
parents
5376686a
0f340c93
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
17 deletions
+56
-17
keydeps/lib/components/key.core.jar
keydeps/lib/components/key.core.jar
+0
-0
keydeps/lib/components/key.ui.jar
keydeps/lib/components/key.ui.jar
+0
-0
keydeps/lib/components/key.util.jar
keydeps/lib/components/key.util.jar
+0
-0
matcher/src/main/java/edu/kit/iti/formal/psdbg/termmatcher/Utils.java
...main/java/edu/kit/iti/formal/psdbg/termmatcher/Utils.java
+3
-3
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
...ava/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
+43
-9
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/InteractiveModeController.java
...ormal/psdbg/gui/controller/InteractiveModeController.java
+3
-2
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
...va/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
+1
-0
ui/src/main/resources/edu/kit/iti/formal/psdbg/examples/contraposition/script.kps
...u/kit/iti/formal/psdbg/examples/contraposition/script.kps
+6
-3
No files found.
keydeps/lib/components/key.core.jar
View file @
1bfc2b02
No preview for this file type
keydeps/lib/components/key.ui.jar
View file @
1bfc2b02
No preview for this file type
keydeps/lib/components/key.util.jar
View file @
1bfc2b02
No preview for this file type
matcher/src/main/java/edu/kit/iti/formal/psdbg/termmatcher/Utils.java
View file @
1bfc2b02
...
...
@@ -23,16 +23,16 @@ public class Utils {
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") -> ("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
}
else
{
if
(
op
.
equals
(
Junctor
.
AND
))
{
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") &
&
("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") & ("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
}
else
{
if
(
op
.
equals
(
Junctor
.
OR
))
{
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") |
|
("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") | ("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
}
else
{
if
(
op
.
equals
(
Equality
.
EQV
))
{
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") <-> ("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
}
else
{
if
(
op
.
equals
(
Equality
.
EQUALS
))
{
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") =
=
("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
sb
.
append
(
"("
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
") = ("
+
toPrettyTerm
(
formula
.
sub
(
1
))
+
")"
);
}
else
{
if
(
op
.
equals
(
Junctor
.
NOT
))
{
sb
.
append
(
"(!"
+
toPrettyTerm
(
formula
.
sub
(
0
))
+
")"
);
...
...
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/Interpreter.java
View file @
1bfc2b02
...
...
@@ -85,11 +85,29 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
throw
new
InterpreterRuntimeException
(
"no state on stack. call newState before interpret"
);
}
//initialize environment variables
for
(
VariableAssignmentHook
<
T
>
hook
:
variableHooks
)
{
VariableAssignment
va
=
hook
.
getStartAssignment
(
getSelectedNode
().
getData
());
getSelectedNode
().
setAssignments
(
getSelectedNode
().
getAssignments
().
push
(
va
));
if
(
getSelectedNode
()
!=
null
)
{
//initialize environment variables
for
(
VariableAssignmentHook
<
T
>
hook
:
variableHooks
)
{
VariableAssignment
va
=
hook
.
getStartAssignment
(
getSelectedNode
().
getData
());
getSelectedNode
().
setAssignments
(
getSelectedNode
().
getAssignments
().
push
(
va
));
}
}
else
{
List
<
GoalNode
<
T
>>
currentgoals
=
getCurrentGoals
();
logger
.
info
(
"Loaded Proof with multiple Open Goals"
);
if
(
currentgoals
.
size
()
==
0
)
{
logger
.
debug
(
"Current Goals empty"
);
return
;
}
for
(
GoalNode
<
T
>
goal
:
currentgoals
)
{
for
(
VariableAssignmentHook
<
T
>
hook
:
variableHooks
)
{
VariableAssignment
va
=
hook
.
getStartAssignment
(
goal
.
getData
());
goal
.
setAssignments
(
goal
.
getAssignments
().
push
(
va
));
}
}
}
script
.
accept
(
this
);
//exitScope(script);
...
...
@@ -641,10 +659,26 @@ public class Interpreter<T> extends DefaultASTVisitor<Object>
@Override
public
Object
visit
(
Signature
signature
)
{
// enterScope(signature);
GoalNode
<
T
>
node
=
getSelectedNode
();
node
.
enterScope
();
signature
.
forEach
(
node:
:
declareVariable
);
// exitScope(signature);
// TODO: quickfix
List
<
GoalNode
<
T
>>
currentGoals
=
getCurrentGoals
();
if
(
getCurrentGoals
().
size
()
>
1
)
{
if
(
getSelectedNode
()
==
null
)
{
for
(
GoalNode
<
T
>
goal:
currentGoals
)
{
goal
.
enterScope
();
signature
.
forEach
(
goal:
:
declareVariable
);
// exitScope(signature);
}
}
}
else
{
GoalNode
<
T
>
node
=
getSelectedNode
();
node
.
enterScope
();
signature
.
forEach
(
node:
:
declareVariable
);
// exitScope(signature);
}
return
null
;
}
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/InteractiveModeController.java
View file @
1bfc2b02
...
...
@@ -155,7 +155,7 @@ public class InteractiveModeController {
LOGGER
.
debug
(
"Handling {}"
,
tap
);
moreThanOneMatch
=
false
;
String
tapName
=
tap
.
getApp
().
taclet
().
displayName
();
String
tapName
=
tap
.
getApp
().
taclet
().
name
().
toString
();
Goal
g
=
tap
.
getCurrentGoal
();
SequentFormula
seqForm
=
tap
.
getPio
().
sequentFormula
();
...
...
@@ -283,6 +283,7 @@ public class InteractiveModeController {
if
(
ngoals
.
size
()
>
1
)
{
cases
.
get
(
findRoot
(
ngoals
.
get
(
0
).
node
())).
add
(
call
);
CasesStatement
inner
=
new
CasesStatement
();
cases
.
get
(
findRoot
(
ngoals
.
get
(
0
).
node
())).
add
(
inner
);
...
...
@@ -301,7 +302,7 @@ public class InteractiveModeController {
}
}
else
{
if
(
ngoals
.
size
()
==
0
)
{
cases
.
get
(
g
).
add
(
call
);
cases
.
get
(
findRoot
(
expandedNode
.
getData
().
getNode
())
).
add
(
call
);
}
else
{
KeyData
kdn
=
new
KeyData
(
kd
,
ngoals
.
get
(
0
).
node
());
goals
.
add
(
last
=
new
GoalNode
<>(
expandedNode
,
kdn
,
kdn
.
getNode
().
isClosed
()));
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentView.java
View file @
1bfc2b02
...
...
@@ -136,6 +136,7 @@ public class SequentView extends CodeArea {
filter
.
setSequent
(
sequent
);
ProgramPrinter
prgPrinter
=
new
ProgramPrinter
(
new
StringWriter
());
this
.
backend
=
new
LogicPrinter
.
PosTableStringBackend
(
80
);
...
...
ui/src/main/resources/edu/kit/iti/formal/psdbg/examples/contraposition/script.kps
View file @
1bfc2b02
...
...
@@ -21,12 +21,15 @@ script interactive(){
script interactive_with_match(){
impRight;
impRight;
impLeft;
cases{
case match `?X -> ?Y ==> not(?Z)`:
notLeft;
default:
case match `==> not(?Z), ?Z`:
notRight;
default:
notLeft;
}
}
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