Ticket #307 (closed fixme: done)

Opened 2 years ago

Last modified 16 months ago

order relation on lumiera::P incompletely defined

Reported by: ichthyo Owned by: ichthyo
Priority: lesser Milestone: 2beta
Component: lumiera Keywords: QA sanity cleanup
Cc: Blocked By:
Blocking:

Description

Just discovered by accident, that lumiera::P suffers from the same logical omission, which has biten me badly in the last days with respect of using ordered types within associative containers: The relation needs to be complete (either partial or total), and the null-check guard defeats that.

We need to find a consistent way how to interpret NIL pointers, and then we need to enforce this policy.

  • either NIL pointers are disallowed when it comes to comparisons (i.e. the opeators throw or assert)
  • or we interpret NIL pointers as bottom -- but then each and every container needs to be able to deal with bottom

Change History

comment:1 Changed 23 months ago by ichthyo

  • Owner set to ichthyo
  • Status changed from new to accepted

Intuitively I'd prefer the first solution. I'd rather introduce an empty representation object than start introducing special cases at the level of element / container handling. But the downside is that disallowing comparisons on NIL pointers (recall, P is a smart-ptr, so NIL is not NULL) may be quite hash for the occasional user.

Anyway, I'll take the experimental approach here and just add the relevant assertions ... and then wait for problems bubbling up

comment:2 Changed 16 months ago by ichthyo

  • Status changed from accepted to closed
  • Resolution set to done

no serious problems meanwhile with that approach, but indeed not much possibilities for problems arising here currently, as most of the operations on objects within the session are still unimplemented. Anyhow, closing that for now, the chosen solution (disallow NIL on comparisions) seems the most logical one....

Note: See TracTickets for help on using tickets.