Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sarah.grebing
ProofScriptParser
Commits
3ff04f0c
Commit
3ff04f0c
authored
Nov 22, 2018
by
Lulu Luong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'master' of C:\Users\Lulu\Desktop\Bachelor\ProofScriptParser with conflicts.
parent
a0f432d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
6 deletions
+36
-6
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/RuleCommandHandler.java
.../formal/psdbg/interpreter/funchdl/RuleCommandHandler.java
+36
-6
No files found.
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/funchdl/RuleCommandHandler.java
View file @
3ff04f0c
...
...
@@ -33,10 +33,7 @@ import org.apache.logging.log4j.LogManager;
import
org.apache.logging.log4j.Logger
;
import
org.key_project.util.collection.ImmutableList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
/**
* @author Alexander Weigl
...
...
@@ -77,7 +74,7 @@ public class RuleCommandHandler implements CommandHandler<KeyData> {
try
{
for
(
SequentFormula
sf
:
g
.
node
().
sequent
().
succedent
())
{
ImmutableList
<
TacletApp
>
apps
=
index
.
getTacletAppAtAndBelow
(
filter
,
new
PosInOccurrence
(
sf
,
PosInTerm
.
getTopLevel
(),
fals
e
),
new
PosInOccurrence
(
sf
,
PosInTerm
.
getTopLevel
(),
tru
e
),
services
);
apps
.
forEach
(
t
->
set
.
add
(
t
.
taclet
().
name
().
toString
()));
}
...
...
@@ -120,11 +117,13 @@ public class RuleCommandHandler implements CommandHandler<KeyData> {
params
.
asMap
().
forEach
((
k
,
v
)
->
map
.
put
(
k
.
getIdentifier
(),
v
.
getData
()));
LOGGER
.
info
(
"Execute {} with {}"
,
call
,
map
);
RuleCommand
.
Parameters
cc
;
try
{
map
.
put
(
"#2"
,
call
.
getCommand
());
EngineState
estate
=
new
EngineState
(
kd
.
getProof
());
estate
.
setGoal
(
kd
.
getNode
());
RuleCommand
.
Parameters
cc
=
new
RuleCommand
.
Parameters
();
cc
=
new
RuleCommand
.
Parameters
();
ValueInjector
valueInjector
=
ValueInjector
.
createDefault
(
kd
.
getNode
());
cc
=
valueInjector
.
inject
(
c
,
cc
,
map
);
AbstractUserInterfaceControl
uiControl
=
new
DefaultUserInterfaceControl
();
...
...
@@ -140,6 +139,37 @@ public class RuleCommandHandler implements CommandHandler<KeyData> {
state
.
getGoals
().
add
(
new
GoalNode
<>(
expandedNode
,
kdn
,
kdn
.
getNode
().
isClosed
()));
}
}
catch
(
ScriptException
e
)
{
//TODO: adding UserinteractionWindow
/*TODO: possible cases not applicable, because
command not recognized (can be ignored)
command multiple matches -> need more specification with on + formula
if(e.getMessage().equals("More than one applicable occurrence")) {
//TODO: open UserinteractionWindow with selectionbox , need (RuleCommand: 121)
ImmutableList<TacletApp> allApps = c.findAllTacletApps(cc, state);
List<TacletApp> matchingApps = c.filterList(cc, allApps);
//TODO: (re)apply completed TacletApp
//TODO: insert into script
}
command not complete -> missig parameters
solution:
if(e.getMessage().equals("Not a unique \\assumes instantiation")) {
//TODO: open UserinteractionWindow with selectionbox , need (RuleCommand: 56)
ImmutableList<TacletApp> assumesCandidates = theApp.findIfFormulaInstantiations(state.getFirstOpenGoal().sequent(), proof.getServices());
//TODO: (re)apply completed TacletApp
//TODO: insert into script
}
*/
if
(
interpreter
.
isStrictMode
())
{
throw
new
ScriptCommandNotApplicableException
(
e
,
c
,
map
);
}
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