arbor icon indicating copy to clipboard operation
arbor copied to clipboard

Create assertion expressions for regions, locsets.

Open halfflat opened this issue 5 years ago • 0 comments

Sometimes, we just want to be sure that there's a single point in a locset.

The idea is to add region and locset expressions that will throw an exception when thingified if the corresponding predicate fails. While the motivating use case is currently our unit testing, I can see this having utility in user-provided cell descriptiosn.

Proposed initial set of predicates:

  • is_intervalinterval? — region is non-empty and exactly comprises locations x s.t. axb for some locations a and b.
  • is_singleton/singleton? — locset comprises a single location (with multiplicity one).

In the short term, I would like to use is_interval in the definition of a locset expression that selects a single location along an interval (c.f. on_components in PR #1101 which performs a more general operation that may return a locset with many elements),

halfflat avatar Aug 06 '20 01:08 halfflat