Ecological rehabilitation: a theoretical analysis