A survey of tractable constraint satisfaction problems