edu.ksu.cis.projects.bogor
Class DefaultBogorConfiguration

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.DefaultBogorConfiguration
All Implemented Interfaces:
IBogorConfiguration, Disposable

public class DefaultBogorConfiguration
extends Object
implements IBogorConfiguration

Version:
CVS $Revision: 1.24 $ $Date: 2005/05/31 14:35:16 $
Author:
Robby , Matt Hoosier

Field Summary
protected  IActionTaker at
           
protected  IBacktrackingInfoFactory bif
           
protected  ICounterExampleWriter cew
           
protected  HashMap<String,Object> checkedInstanceCache
          Cache of singleton instances created by createCheckedInstance(Class, String, Collection).
protected  Properties configuration
           
protected  Set<String> copyrightTextSet
           
protected  IExpEvaluator ee
           
protected  HashMap<ExtSymbolTable,IModule> extTable
           
protected  String filename
           
protected  Map<String,IModule> instanceTable
           
protected  ArrayList<IListener> listeners
           
protected  IProgressManager pm
           
protected  PrintWriter pw
           
protected  IStateFactory sf
           
protected  IStateManager sm
           
protected  ISearcher sr
           
protected  ISchedulingStrategist ss
           
protected  SymbolTable symbolTable
           
protected  ITransformer tr
           
protected  IValueFactory vf
           
 
Fields inherited from interface edu.ksu.cis.projects.bogor.IBogorConfiguration
ACTION_DEF_EXT_OP_RETURN_TYPE, EXP_DEF_EXT_OP_RETURN_TYPE, EXT_OP_ARG_NAMES, EXT_OP_ARG_TYPES
 
Constructor Summary
DefaultBogorConfiguration()
           
 
Method Summary
 IMessageStore connect()
           
protected  Object createCheckedInstance(Class interfaceClass, String className, Collection<FileMessage> errors)
           
protected  Object createInstance(Class interfaceClass, ArrayList<FileMessage> errors)
           
 void dispose()
          Remove references.
 IActionTaker getActionTaker()
           
 IBacktrackingInfoFactory getBacktrackingInfoFactory()
           
 Properties getConfiguration()
           
 ICounterExampleWriter getCounterExampleWriter()
           
 IExpEvaluator getExpEvaluator()
           
 IModule getExtensionModule(String extId)
           
 Map<ExtSymbolTable,IModule> getExtTable()
           
 String getFilename()
           
 List<Class> getKnownImplementingClasses(Class<?> interfaceType)
          Trivial implementation; always returns a zero-length list.
 List<IListener> getListeners()
           
 Object getModuleInstance(String className, Class interfaceClass, Collection<FileMessage> errors)
          Instantiate a Bogor module (an implementation of IModule).
 Object getPluginClassInstance(Properties config, String className, Class interfaceType, Collection<FileMessage> errors)
           
 Object getPluginClassInstance(String className, Class interfaceType, Collection<FileMessage> errors)
           
 PrintWriter getPrintWriter()
           
 IProgressManager getProgressManager()
           
 ISchedulingStrategist getSchedulingStrategist()
           
 ISearcher getSearcher()
           
 IStateFactory getStateFactory()
           
 IStateManager getStateManager()
           
 SymbolTable getSymbolTable()
           
 ISystemTransformer[] getSystemTransformers(Properties configuration, Collection<FileMessage> errors)
          Retrieve a (possibly empty) set of syntax-tree transformers which should run prior to the model-checking phase.
 ITransformer getTransformer()
           
 IValueFactory getValueFactory()
           
protected  IMessageStore initialize()
           
 IMessageStore initialize(SymbolTable symbolTable, IProgressManager pm, PrintWriter pw, Properties configuration)
           
protected  void printCopyrightAndSetOptions(String text, IModule m, String key, Properties configuration, IMessageStore moduleOptsMessages)
           
 void setActionTaker(IActionTaker at)
           
 void setBacktrackingInfoFactory(IBacktrackingInfoFactory bif)
           
 void setCounterExampleWriter(ICounterExampleWriter cew)
           
 void setExpEvaluator(IExpEvaluator ee)
           
 void setProgressManager(IProgressManager pm)
           
 void setSchedulingStrategist(ISchedulingStrategist ss)
           
 void setSearcher(ISearcher sr)
           
 void setStateFactory(IStateFactory sf)
           
 void setStateManager(IStateManager sm)
           
 void setTransformer(ITransformer tr)
           
 void setValueFactory(IValueFactory vf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

protected String filename

symbolTable

protected SymbolTable symbolTable

pw

protected PrintWriter pw

at

protected IActionTaker at

bif

protected IBacktrackingInfoFactory bif

cew

protected ICounterExampleWriter cew

ee

protected IExpEvaluator ee

pm

protected IProgressManager pm

ss

protected ISchedulingStrategist ss

sr

protected ISearcher sr

sf

protected IStateFactory sf

sm

protected IStateManager sm

tr

protected ITransformer tr

vf

protected IValueFactory vf

listeners

protected ArrayList<IListener> listeners

extTable

protected HashMap<ExtSymbolTable,IModule> extTable

configuration

protected Properties configuration

copyrightTextSet

protected Set<String> copyrightTextSet

instanceTable

protected Map<String,IModule> instanceTable

checkedInstanceCache

protected HashMap<String,Object> checkedInstanceCache
Cache of singleton instances created by createCheckedInstance(Class, String, Collection).

Constructor Detail

DefaultBogorConfiguration

public DefaultBogorConfiguration()
Method Detail

setActionTaker

public void setActionTaker(IActionTaker at)
Specified by:
setActionTaker in interface IBogorConfiguration

getActionTaker

public IActionTaker getActionTaker()
Specified by:
getActionTaker in interface IBogorConfiguration

setBacktrackingInfoFactory

public void setBacktrackingInfoFactory(IBacktrackingInfoFactory bif)
Specified by:
setBacktrackingInfoFactory in interface IBogorConfiguration

getBacktrackingInfoFactory

public IBacktrackingInfoFactory getBacktrackingInfoFactory()
Specified by:
getBacktrackingInfoFactory in interface IBogorConfiguration

getConfiguration

public Properties getConfiguration()
Specified by:
getConfiguration in interface IBogorConfiguration

setCounterExampleWriter

public void setCounterExampleWriter(ICounterExampleWriter cew)
Specified by:
setCounterExampleWriter in interface IBogorConfiguration

getCounterExampleWriter

public ICounterExampleWriter getCounterExampleWriter()
Specified by:
getCounterExampleWriter in interface IBogorConfiguration

setExpEvaluator

public void setExpEvaluator(IExpEvaluator ee)
Specified by:
setExpEvaluator in interface IBogorConfiguration

getExpEvaluator

public IExpEvaluator getExpEvaluator()
Specified by:
getExpEvaluator in interface IBogorConfiguration

getExtTable

public Map<ExtSymbolTable,IModule> getExtTable()
Specified by:
getExtTable in interface IBogorConfiguration

getExtensionModule

public IModule getExtensionModule(String extId)
Specified by:
getExtensionModule in interface IBogorConfiguration

getFilename

public String getFilename()
Specified by:
getFilename in interface IBogorConfiguration

getModuleInstance

public Object getModuleInstance(String className,
                                Class interfaceClass,
                                Collection<FileMessage> errors)
Description copied from interface: IBogorConfiguration
Instantiate a Bogor module (an implementation of IModule).

Specified by:
getModuleInstance in interface IBogorConfiguration
Parameters:
className - fully qualified typename of object to instantiate
interfaceClass - static type to which the new object must conform
errors - destination for any FileMessage error messages generated while trying to instantiate the module
Returns:
an instance of className if no errors occur, or null otherwise.

getPluginClassInstance

public Object getPluginClassInstance(String className,
                                     Class interfaceType,
                                     Collection<FileMessage> errors)
Specified by:
getPluginClassInstance in interface IBogorConfiguration
errors - container for any FileMessage error messages generated while trying to get object instance

getPluginClassInstance

public Object getPluginClassInstance(Properties config,
                                     String className,
                                     Class interfaceType,
                                     Collection<FileMessage> errors)
Specified by:
getPluginClassInstance in interface IBogorConfiguration
errors - container for any FileMessage error messages generated while trying to get object instance

getPrintWriter

public PrintWriter getPrintWriter()
Specified by:
getPrintWriter in interface IBogorConfiguration

setProgressManager

public void setProgressManager(IProgressManager pm)
Specified by:
setProgressManager in interface IBogorConfiguration

getProgressManager

public IProgressManager getProgressManager()
Specified by:
getProgressManager in interface IBogorConfiguration

setSchedulingStrategist

public void setSchedulingStrategist(ISchedulingStrategist ss)
Specified by:
setSchedulingStrategist in interface IBogorConfiguration

getSchedulingStrategist

public ISchedulingStrategist getSchedulingStrategist()
Specified by:
getSchedulingStrategist in interface IBogorConfiguration

setSearcher

public void setSearcher(ISearcher sr)
Specified by:
setSearcher in interface IBogorConfiguration

getSearcher

public ISearcher getSearcher()
Specified by:
getSearcher in interface IBogorConfiguration

setStateFactory

public void setStateFactory(IStateFactory sf)
Specified by:
setStateFactory in interface IBogorConfiguration

getStateFactory

public IStateFactory getStateFactory()
Specified by:
getStateFactory in interface IBogorConfiguration

setStateManager

public void setStateManager(IStateManager sm)
Specified by:
setStateManager in interface IBogorConfiguration

getStateManager

public IStateManager getStateManager()
Specified by:
getStateManager in interface IBogorConfiguration

getSymbolTable

public SymbolTable getSymbolTable()
Specified by:
getSymbolTable in interface IBogorConfiguration

getSystemTransformers

public ISystemTransformer[] getSystemTransformers(Properties configuration,
                                                  Collection<FileMessage> errors)
Description copied from interface: IBogorConfiguration
Retrieve a (possibly empty) set of syntax-tree transformers which should run prior to the model-checking phase.

Specified by:
getSystemTransformers in interface IBogorConfiguration
Parameters:
configuration - unmarshalled form of .bogor-conf file. A comma-separated list of class names given as the value of the edu.ksu.cis.projects.bogor.ast.transform.ISystemTransformer key will be instantiated and send back as the return value.
errors - destination for any FileMessage error messages generated while trying to instantiate AST transformers.

setTransformer

public void setTransformer(ITransformer tr)
Specified by:
setTransformer in interface IBogorConfiguration

getTransformer

public ITransformer getTransformer()
Specified by:
getTransformer in interface IBogorConfiguration

setValueFactory

public void setValueFactory(IValueFactory vf)
Specified by:
setValueFactory in interface IBogorConfiguration

getValueFactory

public IValueFactory getValueFactory()
Specified by:
getValueFactory in interface IBogorConfiguration

getListeners

public List<IListener> getListeners()
Specified by:
getListeners in interface IBogorConfiguration

connect

public IMessageStore connect()
Specified by:
connect in interface IBogorConfiguration

dispose

public void dispose()
Description copied from interface: Disposable
Remove references. Once called, avoid using this object.

Specified by:
dispose in interface Disposable

initialize

public IMessageStore initialize(SymbolTable symbolTable,
                                IProgressManager pm,
                                PrintWriter pw,
                                Properties configuration)
Specified by:
initialize in interface IBogorConfiguration

createCheckedInstance

protected Object createCheckedInstance(Class interfaceClass,
                                       String className,
                                       Collection<FileMessage> errors)

createInstance

protected Object createInstance(Class interfaceClass,
                                ArrayList<FileMessage> errors)

initialize

protected IMessageStore initialize()

printCopyrightAndSetOptions

protected void printCopyrightAndSetOptions(String text,
                                           IModule m,
                                           String key,
                                           Properties configuration,
                                           IMessageStore moduleOptsMessages)

getKnownImplementingClasses

public List<Class> getKnownImplementingClasses(Class<?> interfaceType)
Trivial implementation; always returns a zero-length list.

Specified by:
getKnownImplementingClasses in interface IBogorConfiguration
Parameters:
interfaceType -
Returns: