01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: // This file is part of KeY - Integrated Deductive Software Design
10: // Copyright (C) 2001-2004 Universitaet Karlsruhe, Germany
11: // Universitaet Koblenz-Landau, Germany
12: // Chalmers University of Technology, Sweden
13: //
14: // The KeY system is protected by the GNU General Public License.
15: // See LICENSE.TXT for details.
16: package de.uka.ilkd.key.proof.mgt;
17:
18: import de.uka.ilkd.key.gui.Main;
19: import de.uka.ilkd.key.proof.Proof;
20: import de.uka.ilkd.key.proof.init.NonInterferencePO;
21: import de.uka.ilkd.key.proof.init.ProblemInitializer;
22: import de.uka.ilkd.key.proof.init.ProofInputException;
23:
24: public class NonInterferenceCheck {
25:
26: private Proof proof1, proof2;
27:
28: public NonInterferenceCheck(BasicTask[] tasks) {
29: if (tasks.length != 2)
30: throw new IllegalStateException(
31: "Non-Interference checker needs 2 proofs, got "
32: + tasks.length);
33: proof1 = tasks[0].proof();
34: proof2 = tasks[1].proof();
35: // XXX: test if proofs in same env.
36: }
37:
38: public void run() {
39: ProofEnvironment env = proof1.env();
40: NonInterferencePO nipo = new NonInterferencePO(env, proof1,
41: proof2);
42: ProblemInitializer pi = new ProblemInitializer(Main
43: .getInstance());
44: try {
45: pi.startProver(env, nipo);
46: } catch (ProofInputException e) {
47: System.err.println(e.toString());
48: }
49: nipo.createSubgoals();
50: }
51:
52: }
|