Remove discardable operations in arguments that are ignored after a reduction
After a reduction like (pair? (list <x> <y>)) => (begin (list <x> <y>) #t) make a semi-shallow
reduction of the argument, so it is further reduced to (begin <x> <y> #t) and even remove <x> or <y> if they have no side effects.
Add handlers for atan and char-name
They had a very strange signature, than needs a special case. So I did't include them in the last big update. Anyway, char-name needs some special types like maybe-symbol that are not currently understand by cptypes, so they are replaced by ptr or some more general type. It must be refined later.
Add fuel for simple? and single-valued?
Add some recursion with fuel, so simple? can detect the expansion of not, i.e. (not x) => (if x #f #t) and other easy cases. It detects only the low hanging cases, and it is not as complete as the versions in cp0.
After a reduction like
(pair? (list <x> <y>))
=>(begin (list <x> <y>) #t)
make a semi-shallow reduction of the argument, so it is further reduced to(begin <x> <y> #t)
and even remove<x>
or<y>
if they have no side effects.atan
andchar-name
They had a very strange signature, than needs a special case. So I did't include them in the last big update. Anyway,
char-name
needs some special types likemaybe-symbol
that are not currently understand by cptypes, so they are replaced byptr
or some more general type. It must be refined later.simple?
andsingle-valued?
Add some recursion with fuel, so
simple?
can detect the expansion ofnot
, i.e.(not x)
=>(if x #f #t)
and other easy cases. It detects only the low hanging cases, and it is not as complete as the versions in cp0.