diff src/main/gov/nasa/jpf/util/event/Event.java @ 21:caa0924e093d

reshuffled Event hierarchy, introducing SystemEvent, with CheckEvent and ControlEvent being subclasses of SystemEvent added Loggable.setLogLevel changed old UserHeuristic to use a Verify.heuristicValue instead of a hardwired "Main" class with hardwired fields (which was just an outdated leftover). Call Verify.setHeuristicValue() to control state priorities from the SUT. This also fixes the bug that UserHeuristic was not properly checking for "Main" resolution.
author Peter Mehlitz <pcmehlitz@gmail.com>
date Fri, 10 Apr 2015 20:53:11 -0700
parents b1790909ebb1
children
line wrap: on
line diff
--- a/src/main/gov/nasa/jpf/util/event/Event.java	Mon Apr 06 12:08:03 2015 -0700
+++ b/src/main/gov/nasa/jpf/util/event/Event.java	Fri Apr 10 20:53:11 2015 -0700
@@ -247,6 +247,13 @@
   public Object[] getArguments(){
     return arguments;
   }
+
+  public Object getArgument(int idx){
+    if (idx < arguments.length){
+      return arguments[idx];
+    }
+    return null;
+  }
   
   public Event getNext(){
     return next;
@@ -627,10 +634,14 @@
   public boolean isNoEvent(){
     return false;
   }
-    
+
+  public boolean isSystemEvent(){
+    return false;
+  }
+
   //--- generic processing interface
   
-  public void process(){
+  public void process(Object source){
     // can be overridden by subclass if instance has sufficient context info
   }