Rewrite as immutable specification