TYPEP source transforms can result in code opaque to constraint propagation

Bug #485231 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

TYPEP source transforms can potentially result in expansions opaque to constraint propagation, which understands (at the moment) only %TYPEP, %INSTANCE-TYPEP, EQ, EQL, <, >, and predicates in *BACKEND-PREDICATE-TYPES*.

Some arrays types used to do this, but known-bad cases were fixed in 1.0.30.51, which added new backend predicates. The general problem and brittleness remains, however: apparently benevolent changes to TYPEP source transforms can inhibit constraint propagation.

Attached patch is a sketch of source-level annotation for TYPEP forms, so that constraint propagation always has the original type to reason with. I'm not certain if this is the right way to go about this, however, or if we should just add BIG COMMENTS to srctran.lisp about needing to be careful with the type transforms and cook up tests to poke specifically at the constraint propagation of type information from transformed TYPEP calls.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :
Revision history for this message
Stas Boukarev (stassats) wrote :

%typep-wrapper seems to have dealt with that.

Changed in sbcl:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.