Skip to content

Create iterators for exprt and associated utility functions #1160

@jasigal

Description

@jasigal

@jasigal commented on Thu Jul 20 2017

Currently there is no good, unified way to do the following:

  • Determine is any subexpression satisfies a predicate
  • Find a subexpression that satisfies a predicate
  • Count the number of subexpressions that satisfy a predicate
  • Traverse an expression to create a new data structure
  • Feed all subexpressions into a function one at a time

By adding iterators to exprts, we can use them to do all of the above more simply (as opposed to doing a stack based traversal by hand each time) and additionally make use of the <algorithm> standard library. Some functions may need to be back-ported from C++17/20.

The changes for exprt can be had in its class definition, and functions using these iterators specific to exprts can be put in util/expr.cpp.


@peterschrammel commented on Thu Jul 20 2017

@jasigal, move this issue to diffblue/cbmc please

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