ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
collections Namespace Reference

Classes

class  Counter

Functions

dict defaultdict (Optional[Any] default_factory=None, *args, **kwargs)
list[int] deque (list[int] iterable=None, int maxlen=-1)
dict OrderedDict (*args, **kwargs)

Function Documentation

◆ defaultdict()

dict collections.defaultdict ( Optional[Any] default_factory = None,
* args,
** kwargs )
Create a defaultdict - modeled as a plain dict for verification purposes.

Approximations:
- The default_factory is tracked by the preprocessor and used to insert
  missing-key defaults; it is not stored on the dict object itself.
- Initial data passed as a positional mapping or iterable (*args) and any
  keyword arguments (**kwargs) are accepted but silently ignored. Pre-populated
  defaultdicts are not modeled; only keys written explicitly in the program
  will be present in the verification model.

◆ deque()

list[int] collections.deque ( list[int] iterable = None,
int maxlen = -1 )
collections.deque(iterable=()) — modelled as a plain list.

Approximation: deque is treated as a list backing store, exposing the
same `append` / `pop` / `__len__` / subscript surface that the
frontend already supports for lists. The FIFO front operations
`popleft()` and `appendleft(x)` are modelled as `pop(0)` / `insert(0, x)`
in the list-method handler. `extendleft` and the `maxlen` rollover are
still NOT modelled.

◆ OrderedDict()

dict collections.OrderedDict ( * args,
** kwargs )
collections.OrderedDict — modelled as a plain dict.

Insertion order is already preserved by the dict model, so the
OrderedDict-specific methods (`move_to_end`) are the only divergence;
`popitem` is already available via the dict interface.