Skip to content

Utility methods on FunctionDeclarationKind #482

Open
@PhilippWendler

Description

@PhilippWendler

FunctionDeclarationKind is an enum with quite a lot of cases that belong to different categories. When using this enum, e.g., in a visitor, it is likely common that one wants to handle related cases together in the same or a similar way. But there is no way to do this instead of hard-coding lists of related cases. I think it would be quite useful if the enum would have methods that one can use to distinguish categories such as the following:

  • arity, i.e., is the function unary, binary, ternary, n-ary
  • related theory, i.e., is the function valid (only) for bitvectors, floats, numeric, boolean, array, string, etc. parameters,
  • semantics, e.g., is it a comparison operation or even an (in-)equality.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions