Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve expression visitor #51

@vitaut

Description

@vitaut

Currently, ExprVisitor handles NumericExpr and LogicalExpr hierarchies separately. This was done because the result types of expression conversion for numeric and logical expressions are normally different (this is true for gecode and ilogcp). Need to add support for Expr, including string expressions. Among other things this will be useful for completing structural comparison of expressions.

Possible ways to implement:

  • Add another Visit(Expr) overload and dispatch on all expression kinds. Drawback: duplicates numeric and logical expression dispatch.
  • Replace Visit(NumericExpr) and Visit(LogicalExpr) with Visit(Expr). Since these methods use jump tables, it shouldn't affect performance, but need to handle different return types for logical and numeric expressions somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions