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: //
10:
11: package de.uka.ilkd.key.rule.soundness;
12:
13: import de.uka.ilkd.key.java.Services;
14: import de.uka.ilkd.key.logic.Term;
15: import de.uka.ilkd.key.logic.op.Modality;
16:
17: public class StaticChecker extends TacletVisitor {
18:
19: Services services;
20:
21: public StaticChecker(Services p_services) {
22: services = p_services;
23: }
24:
25: public Services getServices() {
26: return services;
27: }
28:
29: // VISITOR RELATED METHODS
30:
31: public void subtreeEntered(Term t) {
32: }
33:
34: /** is called by the execPostOrder-method of a term
35: * @param Term to checked if it is a Variable and if true the
36: * Variable is added to the list of found Variables
37: */
38: public void visit(Term t) {
39: if (t.op() instanceof Modality)
40: callProgramChecker(t);
41: }
42:
43: protected void callProgramChecker(Term p_term) {
44: StaticProgramChecker c = new StaticProgramChecker(p_term
45: .javaBlock().program(), getServices());
46: c.start();
47: }
48:
49: }
|