Commit 6ede00a5 authored by Lulu Luong's avatar Lulu Luong

Merge remote-tracking branch 'origin/master'

parents 2d326cb3 5c4735b3
......@@ -47,7 +47,9 @@ public class Statements extends ASTNode<ScriptLanguageParser.StmtListContext>
@Override
public ASTNode[] getChildren() {
return (ASTNode[]) toArray();
Object[] arr = toArray();
return toArray(new ASTNode[arr.length]);
//return (ASTNode[]) toArray();
}
public Statements(Statements body) {
......
......@@ -8,6 +8,7 @@ import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Proof;
import de.uka.ilkd.key.proof.init.ProofInputException;
import de.uka.ilkd.key.proof.init.ProofOblInput;
import de.uka.ilkd.key.proof.io.ProblemLoaderException;
import de.uka.ilkd.key.speclang.Contract;
import edu.kit.iti.formal.psdbg.interpreter.data.GoalNode;
......@@ -91,8 +92,23 @@ public class KeYProofFacade {
*/
public void reload(File problemFile) throws ProofInputException, ProblemLoaderException {
if (contract.get() != null) {// reinstante the contract
setProof(getEnvironment().createProof(
contract.get().getProofObl(getEnvironment().getServices())));
pma = KeYApi.loadFromKeyFile(problemFile);
List<Contract> contracts = pma.getProofContracts();
contracts.forEach(contract1 -> {
if(contract.get().getName().equals(contract1.getName())){
contractProperty().set(contract1);
}
});
if(contract.get() != null){
try{
activateContract(contract.get());
}catch (ProofInputException pie){
throw new ProofInputException("Contract not reloadable.", pie.getCause());
}
}
/*setProof(getEnvironment().createProof(
contract.get().getProofObl(getEnvironment().getServices())));*/
} else {
setProof(KeYApi.loadFromKeyFile(problemFile).getLoadedProof().getProof());
}
......
package edu.kit.iti.formal.psdbg.interpreter.exceptions;
import de.uka.ilkd.key.macros.scripts.AbstractCommand;
import de.uka.ilkd.key.macros.scripts.RuleCommand;
import java.util.Map;
......@@ -13,6 +14,9 @@ public class ScriptCommandNotApplicableException extends InterpreterRuntimeExcep
public ScriptCommandNotApplicableException(Exception e, RuleCommand c) {
System.out.println("Call " + c.getName() + " was not applicable");
}
public ScriptCommandNotApplicableException(Exception e, AbstractCommand c) {
System.out.println("Call " + c.getName() + " was not applicable");
}
public ScriptCommandNotApplicableException(Exception e, RuleCommand c, Map<String, Object> params) {
super(createMessage(c, params), e);
......
......@@ -87,10 +87,7 @@ public class SaveCommand implements CommandHandler<KeyData> {
}
@Override
public boolean isUninterpretedParams(CallStatement call) {
return true;
}
}
......
......@@ -74,6 +74,7 @@ import org.reactfx.util.Timer;
import javax.annotation.Nullable;
import javax.swing.*;
import javax.xml.bind.JAXBException;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
......@@ -188,7 +189,7 @@ public class DebuggerMain implements Initializable {
.filter(it -> Objects.equals(fna.childOrMe(it.getStatement()), it.getStatement()))
.collect(Collectors.toList());
System.out.println(result);
LOGGER.info(result);
for (PTreeNode<KeyData> statePointerToPostMortem : result) {
......@@ -212,13 +213,18 @@ public class DebuggerMain implements Initializable {
if (stateAfterStmt.getSelectedGoalNode() != null) {
im.setSelectedGoalNodeToShow(stateAfterStmt.getSelectedGoalNode());
} else {
im.setSelectedGoalNodeToShow(goals.get(0));
if(goals.size() > 0) {
im.setSelectedGoalNodeToShow(goals.get(0));
} else {
im.setSelectedGoalNodeToShow(stateBeforeStmt.getSelectedGoalNode());
statusBar.publishMessage("This goal node was closed by the selected mutator.");
}
}
inspectionViewsController.newPostMortemInspector(im)
.dock(dockStation, DockPos.CENTER, getActiveInspectorDock());
} else {
statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed.");
statusBar.publishErrorMessage("There is no post mortem state to show to this node, because this node was not executed or is a selector statement.");
}
}
}
......@@ -544,10 +550,11 @@ public class DebuggerMain implements Initializable {
//save old information and refresh models
statusBar.publishMessage("Reloading...");
File lastLoaded;
Contract chosen = null;
if (model.getKeyFile() != null) {
lastLoaded = model.getKeyFile();
} else {
Contract chosen = model.getChosenContract();
chosen = model.getChosenContract();
lastLoaded = model.getJavaFile();
}
//model.reload();
......@@ -561,8 +568,11 @@ public class DebuggerMain implements Initializable {
iModel.clearHighlightLines();
iModel.getGoals().clear();
iModel.setSelectedGoalNodeToShow(null);
if(chosen != null) {
FACADE.contractProperty().set(chosen);
}
try {
FACADE.reload(lastLoaded);
if (iModel.getGoals().size() > 0) {
iModel.setSelectedGoalNodeToShow(iModel.getGoals().get(0));
......@@ -1266,10 +1276,16 @@ public class DebuggerMain implements Initializable {
//Update Gui
MainScriptIdentifier msi = scriptController.getMainScript();
msi.getScriptArea().setSavepointMarker(selected.getLineNumber());
msi.getScriptArea().getCodeArea().setStyleClass(selected.getStartOffset(), selected.getEndOffset() + 1, "underlinesave"); scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected);
scriptController.getMainScript().getScriptArea().underlineSavepoint(selected);
try {
KeyPersistentFacade.read(FACADE.getEnvironment(), FACADE.getProof(), new StringReader(selected.getPersistedStateFile(FACADE.getFilepath()).toString()));
} catch (JAXBException e) {
e.printStackTrace();
}
scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected);
//TODO: KeyPersistentFacade.read(FACADE.getEnvironment(), FACADE.getProof(), new StringReader(selected.getPersistedStateFile(FACADE.getFilepath()).toString()));
//TODO (NullpointerEx: interpreterbuilder == null): scriptExecutionController.executeScriptFromSavePoint(interpreterBuilder, selected);
}
......@@ -1443,13 +1459,20 @@ public class DebuggerMain implements Initializable {
ptree.setProof(proof);
ptree.setRoot(pnode);
ptree.setNodeColor(pnode, "blueviolet");
ptree.setDeactivateRefresh(true);
ptree.setDeactivateRefresh(false);
if (stateAfterStmt.size() > 0) {
Set<Node> sentinels = proof.getSubtreeGoals(pnode)
proof.getSubtreeGoals(pnode).forEach(goal -> System.out.println("goal.node().serialNr() = " + goal.node().serialNr()));
Set<Node> sentinels;
sentinels = proof.getSubtreeGoals(pnode)
.stream()
.map(Goal::node)
.collect(Collectors.toSet());
if(sentinels.size() == 0){
sentinels = new LinkedHashSet();
sentinels.add(pnode);
//sentinels.add(stateAfterStmt.get(0).getData().getNode());
}
ptree.getSentinels().addAll(sentinels);
sentinels.forEach(node -> ptree.setNodeColor(node, "blueviolet"));
} else {
......@@ -1465,8 +1488,8 @@ public class DebuggerMain implements Initializable {
//traverseProofTreeAndAddSentinelsToLeaves();
}
ptree.expandRootToSentinels();
System.out.println("ptree = " + ptree.getRoot());
DockNode node = new DockNode(ptree, "Proof Tree for Step Into: " +
original.getStatement().accept(new ShortCommandPrinter())
);
......
......@@ -2,6 +2,9 @@ package edu.kit.iti.formal.psdbg.gui.controller;
import com.google.common.eventbus.EventBus;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.ProofScriptCommand;
import de.uka.ilkd.key.macros.scripts.ScriptCommand;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.rule.TacletApp;
......@@ -59,7 +62,7 @@ public class Events {
@Data
@RequiredArgsConstructor
public static class CommandApplicationEvent {
private final String commandName;
private final ProofScriptCommand commandName;
private final PosInOccurrence pio;
private final Goal currentGoal;
......@@ -153,4 +156,12 @@ public class Events {
private final int position;
}
@Data
@RequiredArgsConstructor
public static class MacroApplicationEvent {
private final ProofMacro macroName;
private final PosInOccurrence posInOccurrence;
private final Goal goal;
}
}
......@@ -6,9 +6,8 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl;
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.Sequent;
import de.uka.ilkd.key.logic.SequentFormula;
import de.uka.ilkd.key.macros.scripts.EngineState;
import de.uka.ilkd.key.macros.scripts.RuleCommand;
import de.uka.ilkd.key.macros.scripts.ScriptException;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.*;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof;
......@@ -27,6 +26,7 @@ import edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment;
import edu.kit.iti.formal.psdbg.interpreter.dbg.DebuggerFramework;
import edu.kit.iti.formal.psdbg.interpreter.dbg.PTreeNode;
import edu.kit.iti.formal.psdbg.interpreter.exceptions.ScriptCommandNotApplicableException;
import edu.kit.iti.formal.psdbg.interpreter.funchdl.MacroCommandHandler;
import edu.kit.iti.formal.psdbg.parser.PrettyPrinter;
import edu.kit.iti.formal.psdbg.parser.ast.*;
import edu.kit.iti.formal.psdbg.parser.data.Value;
......@@ -47,6 +47,7 @@ import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
@Getter
@Setter
@RequiredArgsConstructor
......@@ -202,7 +203,7 @@ public class InteractiveModeController {
try {
applyRule(call, g);
applyRuleHelper(call, g, Type.RULE);
// Insert into the right cases
// Node currentNode = g.node();
// cases.get(findRoot(currentNode)).add(call);
......@@ -231,6 +232,149 @@ public class InteractiveModeController {
}
@Subscribe
public void handle(Events.MacroApplicationEvent map) {
LOGGER.debug("Handling {}", map);
Goal g = map.getGoal();
MacroCommand.Parameters params = new MacroCommand.Parameters();
Parameters callp = new Parameters();
CallStatement call = new CallStatement(map.getMacroName().getScriptCommandName(), callp);
try {
applyRuleHelper(call, g, Type.MACRO);
String c = getCasesAsString();
scriptArea.setText("" +
"//Preview \n" + c);
} catch (ScriptCommandNotApplicableException e) {
StringBuilder sb = new StringBuilder("The macro command ");
sb.append(call.getCommand()).append(" was not applicable.");
System.out.println("e = " + e);
//sb.append("\nSequent Formula: formula=").append(sfTerm);
//sb.append("\nOn Sub Term: on=").append(onTerm);
Utils.showWarningDialog("Proof Command was not applicable",
"Proof Command was not applicable.",
sb.toString(), e);
}
}
private void applyRuleHelper(CallStatement call, Goal g, Type t) throws ScriptCommandNotApplicableException {
savepointslist.add(g.node());
savepointsstatement.add(call);
ObservableList<GoalNode<KeyData>> goals = model.getGoals();
GoalNode<KeyData> expandedNode;
List<GoalNode<KeyData>> collect = goals.stream().filter(keyDataGoalNode -> keyDataGoalNode.getData().getGoal().equals(g)).collect(Collectors.toList());
if (collect.isEmpty() || collect.size() > 1) {
throw new RuntimeException("Interactive Rule can not be applied, can not find goal in goal list");
} else {
expandedNode = collect.get(0);
}
// KeyData kd = g.getData();
Evaluator eval = new Evaluator(expandedNode.getAssignments(), expandedNode);
Map<String, Object> map = new HashMap<>();
call.getParameters().forEach((variable, expression) -> {
Value exp = eval.eval(expression);
map.put(variable.getIdentifier(), exp.getData());
});
LOGGER.info("Execute {} with {}", call, map);
try {
KeyData kd = expandedNode.getData();
map.put("#2", call.getCommand());
EngineState estate = new EngineState(g.proof());
estate.setGoal(g);
ValueInjector valueInjector = ValueInjector.createDefault(kd.getNode());
AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl();
switch (t){
case MACRO:
MacroCommand.Parameters cc = new MacroCommand.Parameters();
MacroCommand c = new MacroCommand();
cc = valueInjector.inject(c, cc, map);
c.execute(uiControl, cc, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
case RULE:
RuleCommand.Parameters ccR = new RuleCommand.Parameters();
RuleCommand cR = new RuleCommand();
ccR = valueInjector.inject(cR, ccR, map);
cR.execute(uiControl, ccR, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
case SCRIPT_COMMAND:
ScriptCommand.Parameters ccS = new ScriptCommand.Parameters();
ScriptCommand cS = new ScriptCommand();
ccS = valueInjector.inject(cS, ccS, map);
cS.execute(uiControl, ccS, estate);
postStateHandler(call, g, goals, expandedNode, kd);
break;
default:
throw new Exception("Command not found");
}
} catch (Exception e) {
if (e.getClass().equals(ScriptException.class)) {
System.out.println("e.getMessage() = " + e.getMessage());
throw new ScriptCommandNotApplicableException(e, null, map);
} else {
throw new RuntimeException(e);
}
}
}
private void postStateHandler(CallStatement call, Goal g, ObservableList<GoalNode<KeyData>> goals, GoalNode<KeyData> expandedNode, KeyData kd) {
ImmutableList<Goal> ngoals = g.proof().getSubtreeGoals(expandedNode.getData().getNode());
goals.remove(expandedNode);
GoalNode<KeyData> last = null;
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);
for (Goal newGoalNode : ngoals) {
KeyData kdn = new KeyData(kd, newGoalNode.node());
goals.add(last = new GoalNode<>(expandedNode, kdn, kdn.getNode().isClosed()));
val caseForSubNode = new GuardedCaseStatement();
val m = new MatchExpression();
m.setPattern(new StringLiteral(
format(LabelFactory.getBranchingLabel(newGoalNode.node()))
));
caseForSubNode.setGuard(m);
inner.getCases().add(caseForSubNode);
cases.put(last.getData().getNode(), caseForSubNode.getBody());
}
} else {
if (ngoals.size() == 0) {
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()));
Node currentNode = last.getData().getNode();
cases.get(findRoot(currentNode)).add(call);
}
}
if (last != null)
model.setSelectedGoalNodeToShow(last);
}
private Node findRoot(Node cur) {
while (cur != null) {
if (cases.keySet().contains(cur))
......@@ -245,7 +389,7 @@ public class InteractiveModeController {
casesStatement.accept(pp);
return pp.toString();
}
/*
private void applyRule(CallStatement call, Goal g) throws ScriptCommandNotApplicableException {
savepointslist.add(g.node());
savepointsstatement.add(call);
......@@ -282,6 +426,7 @@ public class InteractiveModeController {
//System.out.println("formula = " + map.get("formula"));
//System.out.println("occ = " + map.get("occ"));
ValueInjector valueInjector = ValueInjector.createDefault(kd.getNode());
RuleCommand.Parameters cc = new RuleCommand.Parameters();
cc = valueInjector.inject(c, cc, map);
AbstractUserInterfaceControl uiControl = new DefaultUserInterfaceControl();
......@@ -333,7 +478,7 @@ public class InteractiveModeController {
}
}
}
}*/
private String format(String branchingLabel) {
// System.out.println("branchingLabel = " + branchingLabel);
......@@ -363,4 +508,8 @@ public class InteractiveModeController {
}
static enum Type {
MACRO, RULE, SCRIPT_COMMAND;
}
}
......@@ -9,7 +9,10 @@ import edu.kit.iti.formal.psdbg.gui.actions.acomplete.Suggestion;
import edu.kit.iti.formal.psdbg.gui.actions.inline.InlineActionSupplier;
import edu.kit.iti.formal.psdbg.gui.controller.Events;
import edu.kit.iti.formal.psdbg.gui.model.MainScriptIdentifier;
import edu.kit.iti.formal.psdbg.interpreter.data.KeyData;
import edu.kit.iti.formal.psdbg.interpreter.data.SavePoint;
import edu.kit.iti.formal.psdbg.interpreter.dbg.Breakpoint;
import edu.kit.iti.formal.psdbg.interpreter.dbg.PTreeNode;
import edu.kit.iti.formal.psdbg.lint.LintProblem;
import edu.kit.iti.formal.psdbg.lint.LinterStrategy;
import edu.kit.iti.formal.psdbg.parser.Facade;
......@@ -388,8 +391,8 @@ public class ScriptArea extends BorderPane {
}
}
public void underlineSavepoint(){
public void underlineSavepoint(SavePoint sp){
codeArea.setStyle(sp.getLineNumber() -1, Collections.singleton("underlinesave"));
}
private void highlightNonExecutionArea() {
......
package edu.kit.iti.formal.psdbg.gui.controls;
import de.uka.ilkd.key.api.KeYApi;
import de.uka.ilkd.key.control.ProofControl;
import de.uka.ilkd.key.gui.nodeviews.TacletMenu.TacletAppComparator;
import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.Name;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.macros.ProofMacro;
import de.uka.ilkd.key.macros.scripts.ProofScriptCommand;
import de.uka.ilkd.key.pp.*;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.rule.*;
......@@ -25,7 +27,6 @@ import javafx.scene.text.Text;
import org.key_project.util.collection.ImmutableList;
import org.key_project.util.collection.ImmutableSLList;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
......@@ -43,7 +44,7 @@ public class TacletContextMenu extends ContextMenu {
private static final Set<Name> CLUTTER_RULESETS = new LinkedHashSet<Name>();
private static final Set<Name> CLUTTER_RULES = new LinkedHashSet<Name>();
private static final Set<String> FILTER_SCRIPT_COMMANDS = new LinkedHashSet<>();
static {
CLUTTER_RULESETS.add(new Name("notHumanReadable"));
CLUTTER_RULESETS.add(new Name("obsolete"));
......@@ -51,6 +52,18 @@ public class TacletContextMenu extends ContextMenu {
CLUTTER_RULESETS.add(new Name("pullOutQuantifierEx"));
}
static {
FILTER_SCRIPT_COMMANDS.add("exit");
FILTER_SCRIPT_COMMANDS.add("leave");
FILTER_SCRIPT_COMMANDS.add("javascript");
FILTER_SCRIPT_COMMANDS.add("skip");
FILTER_SCRIPT_COMMANDS.add("macro");
FILTER_SCRIPT_COMMANDS.add("rule");
FILTER_SCRIPT_COMMANDS.add("script");
}
static {
CLUTTER_RULES.add(new Name("cut_direct_r"));
CLUTTER_RULES.add(new Name("cut_direct_l"));
......@@ -83,6 +96,8 @@ public class TacletContextMenu extends ContextMenu {
@FXML
private Menu insertHidden;
@FXML
private Menu scriptCommands;
@FXML
private MenuItem copyToClipboard;
@FXML
private MenuItem createAbbr;
......@@ -115,9 +130,12 @@ public class TacletContextMenu extends ContextMenu {
occ = pos.getPosInOccurrence();
//MediatorProofControl c = new MediatorProofControl(new DefaultAbstractMediatorUserInterfaceControlAdapter());
ProofControl c = DebuggerMain.FACADE.getEnvironment().getUi().getProofControl();
c.setMinimizeInteraction(true);
final ImmutableList<BuiltInRule> builtInRules = c.getBuiltInRule(goal, occ);
try {
createMacroMenu(KeYApi.getScriptCommandApi().getScriptCommands(), KeYApi.getMacroApi().getMacros());
ImmutableList<TacletApp> findTaclet = c.getFindTaclet(goal, occ);
createTacletMenu(
removeRewrites(findTaclet)
......@@ -136,6 +154,28 @@ public class TacletContextMenu extends ContextMenu {
//proofMacroMenuController.init(occ);
}
private void createMacroMenu(Collection<ProofScriptCommand> scriptCommandList, Collection<ProofMacro> macros) {
for(ProofMacro macro : macros){
final MenuItem item = new MenuItem(macro.getScriptCommandName());
item.setOnAction(event -> {
handleMacroCommandApplication(macro);
});
this.scriptCommands.getItems().add(item);
}
for(ProofScriptCommand com : scriptCommandList){
if(!FILTER_SCRIPT_COMMANDS.contains(com.getName())) {
final MenuItem item = new MenuItem(com.getName());
item.setOnAction(event -> {
handleCommandApplication(com);
});
this.scriptCommands.getItems().add(item);
}
}
// rootMenu.getItems().add(scriptCommands);
}
/**
* Removes RewriteTaclet from the list.
*
......@@ -199,16 +239,17 @@ public class TacletContextMenu extends ContextMenu {
//compare by name
Comparator.comparing(o -> o.taclet().name())
);
//findTaclets = replaceCutOccurrence(findTaclets);
List<TacletApp> toAdd = new ArrayList<>(findTaclets.size() + noFindTaclets.size());
toAdd.addAll(findTaclets);
boolean rulesAvailable = find.size() > 0;
//remove all cut rules from menu and add cut command for that
if (pos.isSequent()) {
rulesAvailable |= noFind.size() > 0;
toAdd.addAll(noFindTaclets);
toAdd.addAll(replaceCutOccurrence(noFindTaclets));
}
......@@ -223,40 +264,38 @@ public class TacletContextMenu extends ContextMenu {
if (rulesAvailable) {
createMenuItems(toAdd);
// createCommandMenuItems();
} else {
noRules.setVisible(true);
}
if (occ != null)
createAbbrevSection(pos.getPosInOccurrence().subTerm());
}
private void createCommandMenuItems() {
/* private void createCommandMenuItems() {
Text t = new Text("Cut Command");
MenuItem item = new MenuItem();
item.setGraphic(t);
item.setOnAction(event -> {
handleCommandApplication("cut");
handleCommandApplication(KeYApi.getScriptCommandApi().getScriptCommands("cut"));
});
rootMenu.getItems().add(0, item);
}
}*/
private List<TacletApp> replaceCutOccurrence(List<TacletApp> findTaclets) {
boolean foundCut = false;
//boolean foundCut = false;
List<TacletApp> toReturn = new ArrayList<>();
for (int i = 0; i < findTaclets.size(); i++) {
TacletApp tacletApp = findTaclets.get(i);
if(tacletApp.rule().displayName().startsWith("cut")){
findTaclets.remove(tacletApp);
foundCut = true;
if(!tacletApp.rule().displayName().startsWith("cut")){
//findTaclets.remove(tacletApp);
// foundCut = true;
toReturn.add(tacletApp);
}
}
return findTaclets;
return toReturn;
// return findTaclets;
}
private void createDummyMenuItem() {
......@@ -341,7 +380,6 @@ public class TacletContextMenu extends ContextMenu {
/*if (!insertHiddenController.isEmpty())
insertHiddenController.setVisible(true);
*/
}
/**
......@@ -381,11 +419,15 @@ public class TacletContextMenu extends ContextMenu {
//System.out.println("event = [" + event + "]");
Events.fire(new Events.TacletApplicationEvent(event, pos.getPosInOccurrence(), goal));
}
private void handleCommandApplication(String event) {
private void handleCommandApplication(ProofScriptCommand event) {
Events.fire(new Events.CommandApplicationEvent(event, pos.getPosInOccurrence(), goal));
}
private void handleMacroCommandApplication(ProofMacro event) {
Events.fire(new Events.MacroApplicationEvent(event, pos.getPosInOccurrence(), goal));
}
/**
* Handles rule application for automode.
*
......
script full(){
impRight;
impRight;
impLeft;
cases {
case match `!q ==> p`:
notLeft;
notRight;
closeAntec;
case match `q==>!p`:
auto;