ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
goto_functionst::id_string_order Struct Reference

Order function_map by the id's string content, not by irep_idt's default operator< (which compares the string-pool interning index). More...

#include <goto_functions.h>

Public Member Functions

bool operator() (const irep_idt &a, const irep_idt &b) const

Detailed Description

Order function_map by the id's string content, not by irep_idt's default operator< (which compares the string-pool interning index).

That index is assigned in first-interned order, so it varies between builds/link orders and made GOTO output (e.g. goto2c's emitted C, –goto-functions-only dumps) reorder nondeterministically. Comparing the string makes iteration reproducible. function_map is small and string compares are cheap, so the O(log n) cost is negligible; nothing relies on the previous ordering.

Member Function Documentation

◆ operator()()

bool goto_functionst::id_string_order::operator() ( const irep_idt & a,
const irep_idt & b ) const
inline

The documentation for this struct was generated from the following file: