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
9880e692
Commit
9880e692
authored
Sep 20, 2017
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
47018a59
Pipeline
#13827
failed with stage
in 2 minutes and 36 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
18 deletions
+25
-18
DockFX/DockFX.iml
DockFX/DockFX.iml
+2
-0
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/ExecuteTest.java
...ava/edu/kit/iti/formal/psdbg/interpreter/ExecuteTest.java
+1
-1
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/BuiltinCommands.java
...iti/formal/psdbg/interpreter/funchdl/BuiltinCommands.java
+2
-2
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/DefaultLookup.java
...t/iti/formal/psdbg/interpreter/funchdl/DefaultLookup.java
+15
-10
rt/src/test/java/edu/kit/iti/formal/psdbg/interpreter/InterpreterTest.java
...edu/kit/iti/formal/psdbg/interpreter/InterpreterTest.java
+5
-5
No files found.
DockFX/DockFX.iml
View file @
9880e692
...
...
@@ -10,6 +10,8 @@
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-api:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-core:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: junit:junit:4.12"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.hamcrest:hamcrest-core:1.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"PROVIDED"
name=
"Maven: org.projectlombok:lombok:1.16.16"
level=
"project"
/>
...
...
rt-key/src/test/java/edu/kit/iti/formal/psdbg/interpreter/ExecuteTest.java
View file @
9880e692
...
...
@@ -36,7 +36,7 @@ public class ExecuteTest {
System
.
out
.
println
(
i
.
getCurrentState
());
}
//
@Test
@Test
public
void
testContrapositionManualWoBranching
()
throws
IOException
,
ParseException
{
Execute
execute
=
create
(
getFile
(
getClass
(),
"contraposition/contraposition.key"
),
...
...
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/BuiltinCommands.java
View file @
9880e692
...
...
@@ -3,10 +3,10 @@ package edu.kit.iti.formal.psdbg.interpreter.funchdl;
import
edu.kit.iti.formal.psdbg.interpreter.Interpreter
;
import
edu.kit.iti.formal.psdbg.interpreter.data.GoalNode
;
import
edu.kit.iti.formal.psdbg.interpreter.data.State
;
import
edu.kit.iti.formal.psdbg.parser.data.Value
;
import
edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment
;
import
edu.kit.iti.formal.psdbg.parser.ast.CallStatement
;
import
edu.kit.iti.formal.psdbg.parser.ast.Variable
;
import
edu.kit.iti.formal.psdbg.parser.data.Value
;
import
lombok.Getter
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -53,7 +53,7 @@ public abstract class BuiltinCommands {
@Override
public
void
evaluate
(
Interpreter
<
String
>
interpreter
,
CallStatement
call
,
VariableAssignment
params
)
{
Value
<
BigInteger
>
val
=
(
Value
<
BigInteger
>)
params
.
getValues
().
getOrDefault
(
new
Variable
(
"#
1
"
),
new
Variable
(
"#
2
"
),
Value
.
from
(
2
));
int
num
=
val
.
getData
().
intValue
();
GoalNode
<
String
>
g
=
interpreter
.
getSelectedNode
();
...
...
rt/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/DefaultLookup.java
View file @
9880e692
...
...
@@ -53,16 +53,21 @@ public class DefaultLookup implements CommandLookup {
if
(
b
.
handles
(
callStatement
))
{
foundHandlers
.
add
(
b
);
found
=
b
;
}
else
{
//if a proof macro contains a "-" character, the proof script language does not support this.
// Therefore we have to check for both versions
if
(
mayBeEscapedMacro
)
{
String
command
=
callStatement
.
getCommand
();
callStatement
.
setCommand
(
command
.
replace
(
"_"
,
"-"
));
if
(
b
.
handles
(
callStatement
))
{
foundHandlers
.
add
(
b
);
found
=
b
;
}
}
}
if
(
found
==
null
&&
mayBeEscapedMacro
)
{
//if a proof macro contains a "-" character, the proof script language does not support this.
// Therefore we have to check for both versions
// if (mayBeEscapedMacro) {
String
command
=
callStatement
.
getCommand
();
callStatement
.
setCommand
(
command
.
replace
(
"_"
,
"-"
));
for
(
CommandHandler
b
:
builders
)
{
if
(
b
.
handles
(
callStatement
))
{
foundHandlers
.
add
(
b
);
found
=
b
;
}
}
}
...
...
rt/src/test/java/edu/kit/iti/formal/psdbg/interpreter/InterpreterTest.java
View file @
9880e692
...
...
@@ -59,7 +59,7 @@ public class InterpreterTest {
return
defaultLookup
;
}
//
@Test
@Test
public
void
testSimple
()
throws
IOException
{
Interpreter
<
String
>
i
=
execute
(
getClass
().
getResourceAsStream
(
"simple1.txt"
));
Assert
.
assertEquals
(
10
,
i
.
getCurrentState
().
getGoals
().
size
());
...
...
@@ -85,8 +85,8 @@ public class InterpreterTest {
@Override
public
void
evaluate
(
Interpreter
interpreter
,
CallStatement
call
,
VariableAssignment
params
)
{
Map
<
Variable
,
Value
>
m
=
params
.
asMap
();
Value
exp
=
get
(
m
,
"exp"
,
"expected"
,
"#
1
"
);
Value
act
=
get
(
m
,
"act"
,
"actual"
,
"#
2
"
);
Value
exp
=
get
(
m
,
"exp"
,
"expected"
,
"#
2
"
);
Value
act
=
get
(
m
,
"act"
,
"actual"
,
"#
3
"
);
Value
msg
=
get
(
m
,
"msg"
,
"#4"
);
if
(
msg
==
null
)
Assert
.
assertEquals
(
exp
,
act
);
...
...
@@ -104,8 +104,8 @@ public class InterpreterTest {
@Override
public
void
evaluate
(
Interpreter
interpreter
,
CallStatement
call
,
VariableAssignment
params
)
{
Map
<
Variable
,
Value
>
m
=
params
.
asMap
();
Value
<
Boolean
>
exp
=
get
(
m
,
"val"
,
"#
1
"
);
Value
<
String
>
msg
=
get
(
m
,
"msg"
,
"#
2
"
);
Value
<
Boolean
>
exp
=
get
(
m
,
"val"
,
"#
2
"
);
Value
<
String
>
msg
=
get
(
m
,
"msg"
,
"#
3
"
);
if
(
msg
==
null
)
Assert
.
assertTrue
(
exp
.
getData
());
else
...
...
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