Skip to content
Snippets Groups Projects
Commit 48129a0f authored by dgelessus's avatar dgelessus
Browse files

Merge branch 'develop'

parents 68c52b89 a7ffcebc
Branches master
No related tags found
No related merge requests found
Pipeline #138810 passed
Showing
with 21 additions and 146 deletions
/**
*
*/
package de.prob.cli.clipatterns;
import java.util.regex.Matcher;
import de.prob.cli.CliException;
import de.prob.logging.Logger;
/**
* This {@link CliPattern} looks for a network port number where the executable
* listens for commands.
*
* If no port number is found, {@link #notFound()} throws a {@link CliException}
*
* @author plagge
*/
public class PortPattern extends CliPattern<Integer> {
int port;
public PortPattern() {
super("Port: (\\d+)$");
}
@Override
protected void setValue(Matcher matcher) throws IllegalArgumentException {
port = Integer.parseInt(matcher.group(1));
Logger.info("Server has startet and listens on port " + port);
}
/**
* Returns the port number.
*/
@Override
public Integer getValue() {
return port;
}
@Override
public void notFound() throws CliException {
throw new CliException("Could not determine port of ProB server");
}
}
package de.prob.core.command;
import de.prob.parser.ISimplifiedROMap;
import de.prob.prolog.output.IPrologTermOutput;
import de.prob.prolog.term.ListPrologTerm;
import de.prob.prolog.term.PrologTerm;
public class AnalyseInvariantCommand implements ISimpleTextCommand {
private static final String UNKNOWN = "Unknown";
private static final String FALSE = "False";
private static final String TOTAL = "Total";
private static final String RESULT = "Result";
private static final String DESCRIPTION = "Desc";
private StringBuffer text;
@Override
public void writeCommand(IPrologTermOutput pto) {
// analyse_predicate(Type,Desc,Result,Total,False,Unknown)
pto.openTerm("analyse_predicate").printAtom("invariant")
.printVariable(DESCRIPTION).printVariable(RESULT)
.printVariable(TOTAL).printVariable(FALSE)
.printVariable(UNKNOWN).closeTerm();
}
@Override
public void processResult(ISimplifiedROMap<String, PrologTerm> bindings)
throws CommandException {
text = new StringBuffer();
text.append("Analysed: " + bindings.get(DESCRIPTION) + "\n");
text.append("-------------------------------------\n");
ListPrologTerm r = (ListPrologTerm) bindings.get(RESULT);
for (PrologTerm term : r) {
text.append(term);
text.append('\n');
}
text.append("-------------------------------------\n");
text.append("Total: " + bindings.get(TOTAL)+ "\n");
text.append("False: " + bindings.get(FALSE)+ "\n");
text.append("Unknown: " + bindings.get(UNKNOWN));
}
@Override
public String getResultingText() {
return text.toString();
}
}
package de.prob.core.command;
public interface ISimpleTextCommand extends IComposableCommand{
String getResultingText();
}
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1
line.separator=\n
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ProB Disprover Core for EventB
Bundle-Name: ProB Disprover Core for Event-B
Bundle-SymbolicName: de.prob.eventb.disprover.core;singleton:=true
Bundle-Version: 2.1.1.qualifier
Bundle-Vendor: Heinrich-Heine University Dusseldorf
Require-Bundle: de.prob.core;bundle-version="[9.5.1,9.6.0)",
Bundle-Version: 2.2.0.qualifier
Bundle-Vendor: HHU Düsseldorf STUPS Group
Require-Bundle: de.prob.core;bundle-version="[9.6.0,9.7.0)",
org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
org.eventb.core;bundle-version="[3.5.0,4.0.0)",
org.eventb.core.ast;bundle-version="[3.5.0,4.0.0)",
......
eclipse.preferences.version=1
encoding/<project>=UTF-8
eclipse.preferences.version=1
line.separator=\n
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ProB Disprover UI for EventB
Bundle-Name: ProB Disprover UI for Event-B
Bundle-SymbolicName: de.prob.eventb.disprover.ui;singleton:=true
Bundle-Version: 2.1.1.qualifier
Bundle-Vendor: Heinrich-Heine University Dusseldorf
Require-Bundle: de.prob.core;bundle-version="[9.5.1,9.6.0)",
de.prob.eventb.disprover.core;bundle-version="[2.1.1,2.2.0)",
de.prob.ui;bundle-version="[7.5.1,7.6.0)",
Bundle-Version: 2.2.0.qualifier
Bundle-Vendor: HHU Düsseldorf STUPS Group
Require-Bundle: de.prob.core;bundle-version="[9.6.0,9.7.0)",
de.prob.eventb.disprover.core;bundle-version="[2.2.0,2.3.0)",
de.prob.ui;bundle-version="[7.6.0,7.7.0)",
org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
org.eclipse.osgi;bundle-version="[3.16.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.118.0,4.0.0)",
......
aboutText=ProB Disprover (c) 2009 http://www.stups.uni-duesseldorf.de/ProB
featureImage=icons/feature.png
aboutText=ProB Disprover (c) 2009-2024 https://prob.hhu.de/w/
featureImage=icons/prob32.png
de.prob.eventb.disprover.ui/icons/feature.png

1.92 KiB

de.prob.eventb.disprover.ui/icons/prob32.png

1.79 KiB

de.prob.eventb.disprover.ui/icons/prob_mini_logo.gif

1.08 KiB

......@@ -93,7 +93,7 @@
locationURI="popup:more_commands">
<command
commandId="de.prob.eventb.disprover.ui.exportpos"
icon="icons/prob_mini_logo.gif"
icon="icons/prob.png"
label="Export POs for ProB (probcli)"
style="push">
</command>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ProB Rodin2 UI Bindings
Bundle-SymbolicName: de.prob.plugin;singleton:=true
Bundle-Version: 2.4.1.qualifier
Fragment-Host: de.prob.ui;bundle-version="[7.5.1,7.6.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: HHU Düsseldorf STUPS Group
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
fragment.xml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment