Class ExpressionTreeHelper

ExpressionTreeHelper

Class Summary
Constructor Attributes Constructor Name and Description
 
A Helper class to generate the Expression tree in the context of parsing and evaluation of the Expressions.

Method Summary

Class Detail

ExpressionTreeHelper()
A Helper class to generate the Expression tree in the context of parsing and evaluation of the Expressions.
require('ExpressionTreeHelper')

Method Detail

  • <static> {HashSet} ExpressionTreeHelper.getConstrEqRHSVariables(the, constrEqVariables)
    It evaluates the ConstrOp and Adds the Variable in the ConstrOp to the Set - constrOpVariables and returns the Set.
    Parameters:
    {ConstrEq} the
    ConstrOp Object
    {HashSet} constrEqVariables
    Set of Objects, It will keep add to the existing set.
    Returns:
    {HashSet} A Set contains all the ConstrEq varibles.
  • <static> {HashSet} ExpressionTreeHelper.getConstrOpVariables(the, constrOpVariables)
    It evaluates the ConstrOp and adds the variables to the set provided.
    Parameters:
    {ConstrOp} the
    ConstrOp Object
    {HashSet} constrOpVariables
    Set of Objects, It will keep add to the existing set.
    Returns:
    {HashSet} A Set contains all the ConstrOp varibles.
  • <static> {HashMap} ExpressionTreeHelper.getProgramBodyParts(the)
    It iterates through the program and partition the object type into different Lists.and Method returns a HashMap of factList, constrEqList, constrRelList
    Parameters:
    {programs} the
    program object parsed by the Jison parser
    Returns:
    {HashMap} A Map of list of the different items like Operation Equal, Binary Relation and Facts