de.tuberlin.cs.cis.ocl.eval
Class Evaluator

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.eval.Evaluator

public class Evaluator
extends java.lang.Object

Interprets and evaluates OCL constraints on the instance level of a model. Specified instances and properties of model types are accessed to evaluate expressed constraints. Evaluation results can be used to validate the correctness of a model.

Author:
fchabar
See Also:
Fadi Chabarek's diploma thesis, ModelFacade

Constructor Summary
Evaluator(ModelFacade model)
          Constructs an Evaluator to validate constraints against a model.
 
Method Summary
 Report evaluate(de.tuberlin.cs.cis.ocl.parser.node.Start ast)
          Interprets OCL constraints represented by an AST.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evaluator

public Evaluator(ModelFacade model)
Constructs an Evaluator to validate constraints against a model. The model is specified by a ModelFacade describing the type and instance-level of a model. The facade is accessed to check type conformance of OCL constraints. The facade's instance level provides the means to evaluate constraints.

Parameters:
model - describes the type and instance level of a model.
Method Detail

evaluate

public Report evaluate(de.tuberlin.cs.cis.ocl.parser.node.Start ast)
Interprets OCL constraints represented by an AST. The constraints are type and context checked with respect to this evaluator's model. By using the instance level of the model the constraints are evaluated. The results are expressed in the returned report.

Parameters:
ast - an ast representing OCL constraints.
Returns:
the results of the interpretation process.