cdx.scorebot.scoring.logic
Interface LogicCodeExecutable

All Superinterfaces:
LogicCode
All Known Subinterfaces:
BlockStatementType, StatementType
All Known Implementing Classes:
Assignment, Block, IfStatement, LogicUnit, Statement, VariableInitialization, VoidMethod

public interface LogicCodeExecutable
extends LogicCode

defines the framework for executing code

Author:
David Underhill

Method Summary
 void executeLogic(Context context)
          execute this logic code in the specified context
 void validateTypes(java.util.HashMap<java.lang.String,LiteralType> varTypes, java.util.HashMap<java.lang.String,TestData> testsInfo)
          Attempts to validate the type-correctness of all constituent LogicCodeEvaluatable logic code.
 

Method Detail

executeLogic

void executeLogic(Context context)
                  throws LogicException
execute this logic code in the specified context

Parameters:
context - contains the current context of the logic processor
Throws:
LogicException - thrown if an exception occurs while processing the logic

validateTypes

void validateTypes(java.util.HashMap<java.lang.String,LiteralType> varTypes,
                   java.util.HashMap<java.lang.String,TestData> testsInfo)
                   throws LogicException
Attempts to validate the type-correctness of all constituent LogicCodeEvaluatable logic code. An exception is thrown if there is some type-check failure.

Parameters:
varTypes - contains the type of value stored by each variable (variables names are keys)
testsInfo - information about each test item keyed on test item names this logic may hold
Throws:
LogicException - thrown if an exception if an invalid test, test result, or test option is found