Ambient Abstract State Machines with applications