KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > eval > SymbolicEvaluator


1 package spoon.reflect.eval;
2
3 import java.util.List JavaDoc;
4
5 import spoon.reflect.declaration.CtElement;
6 import spoon.reflect.declaration.CtExecutable;
7 import spoon.reflect.reference.CtTypeReference;
8
9 /**
10  * This interface defines a symbolic evaluator for the Spoon meta-model.
11  */

12 public interface SymbolicEvaluator {
13
14     /**
15      * Returns the list of external classes that should be handled as statefull
16      * beans.
17      */

18     List JavaDoc<CtTypeReference> getStatefullExternals();
19
20     /**
21      * Gets all the evaluation paths resulting from an evaluation.
22      */

23     List JavaDoc<SymbolicEvaluationPath> getPaths();
24
25     /**
26      * Dumps the evaluation paths.
27      */

28     void dumpPaths();
29
30     /**
31      * Resets the state of this symbolic evaluator.
32      */

33     void reset();
34
35     /**
36      * Starts a symbolic evaluation by invoking a given static executable.
37      *
38      * @param executable
39      * to be invoked symbolically
40      * @param args
41      * the arguments of the call (as symbolic instances)
42      */

43     void invoke(CtExecutable executable, SymbolicInstance... args);
44
45     /**
46      * Starts a symbolic evaluation by invoking a given executable.
47      *
48      * @param target
49      * the target instance
50      * @param executable
51      * to be invoked
52      * @param args
53      * the arguments of the call (as symbolic instances)
54      */

55     void invoke(SymbolicInstance target, CtExecutable executable,
56             List JavaDoc<SymbolicInstance> args);
57
58     /**
59      * Gets the heap of the current symbolic evaluation step.
60      */

61     SymbolicHeap getHeap();
62
63     /**
64      * Gets the stack of the symbolic abstract evaluation step.
65      */

66     SymbolicEvaluationStack getStack();
67
68     /**
69      * Evaluates the given meta-model element in the current context of the
70      * evaluator.
71      */

72     SymbolicInstance evaluate(CtElement element);
73 }
Popular Tags