20 #include "SheafSystem/member_member_poset_bounds.h" 22 #include "SheafSystem/index_iterator.h" 23 #include "SheafSystem/poset_bounds_descriptor.h" 24 #include "SheafSystem/poset_state_handle.h" 25 #include "SheafSystem/assert_contract.h" 26 #include "SheafSystem/zn_to_bool.h" 41 _lb_id = BOTTOM_INDEX;
73 _lb = lother._lb != 0 ?
new zn_to_bool(*(lother._lb)) : 0;
74 _ub = lother._ub != 0 ?
new zn_to_bool(*(lother._ub)) : 0;
99 ensure(unexecutable(
"result->is_attached() == is_attached()"));
146 invariance((_lb == 0) == (_ub == 0));
199 result = (xindex ==
lb_id());
241 result = (xindex ==
ub_id());
309 _lb->put(_lb_id,
true);
312 _ub->
put(_ub_id,
true);
365 result(poset_bounds_descriptor::MEMBER_MEMBER,
lb_id(),
ub_id());
369 ensure(result.
mode() == poset_bounds_descriptor::MEMBER_MEMBER);
bool _bounded_below
True if the lower bound is not the bottom.
pod_index_type ub_id() const
The index of the upper bound member, if the upper bound contains a single member. ...
virtual ~member_member_poset_bounds()
Destructor.
member_member_poset_bounds()
Default constructor; private to prevent default construction.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
bool lb_is_singleton() const
True if the lower bound contains a single member.
virtual bool ub_contains_member(const scoped_index &xindex)
True if the upper bound contains the member with index xindex.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
bool _bounded_above
True if the upper bound is not the top.
virtual index_iterator lb_iterator()
An iterator for the members of the lower bound.
A client handle for a general, abstract partially order set.
void put(int i, bool value)
Sets i-th member to value.
virtual void detach_from_state()
Detaches the lower and upper bounds.
pod_index_type ub_id() const
The index of the upper bound member, if the upper bound contains a single member. ...
A (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bounded i/o operation...
virtual index_iterator ub_iterator()
An iterator for the members of the upper bound.
virtual poset_bounds_descriptor descriptor()
A descriptor for this.
virtual member_member_poset_bounds * clone() const
Virtual constructor; makes a new instance of the same type as this.
virtual void attach_to_state(poset_state_handle *xhost)
Attaches the lower and upper bounds.
A poset bounds pair with lower and upper bounds each specified by a single member.
Abstract base class with useful features for all objects.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
bool _ub_is_singleton
True if the upper bound contains a single member.
An index within the external ("client") scope of a given id space.
bool _lb_is_singleton
True if the lower bound contains a single member.
pod_index_type lb_id() const
The index of the lower bound.
virtual bool contains_member(pod_index_type xmbr_hub_id, bool xauto_access=true) const
True if some version of this poset contains poset member with hub id xmbr_hub_id. ...
bool ub_is_singleton() const
True if the upper bound contains a single member.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
Iterates over the subset of Zn defined by the characteristic function host().
virtual bool lb_contains_member(const scoped_index &xindex)
True if the lower bound contains the member with index xindex.
A description of a (lower, upper) bounds pair for a poset. Specifies a portion of a poset for a bound...
bool invariant_check() const
True if invariant checking is enabled.
virtual bool invariant() const
Class invariant.
pod_index_type lb_id() const
The index of the lower bound member, if the lower bound contains a single member. ...
bool is_same_type(const any *other) const
True if other is the same type as this.
void enable_invariant_check() const
Enable invariant checking.
specification_mode mode() const
Specification mode for this.
virtual bool invariant() const
Class invariant.
bool is_attached()
True if lb() and ub() are attached.