I work with a bunch of sets in order to generate constrained random traffic, but I want to be able to call a Specman macro that computes the complement of a set with syntax like:
COMPLEMENT begin domain=[0..10,24..30], complmenting_set=[2..3,27..30] end
and have it generate:
[0..1,4..10,24..26]
Every time I need the complement of a set I'm using fully populated lists (e.g. {0;1;2;3....} ) and then removing elements, instead of using Specman's built-in int_range_list object. And I'm also doing a lot of these set calculations at run-time instead of compile-time.