Software-defined Machines