Pseudoelasticity and shape memory effects in alloys