Serializes the program.
@override Map<String, dynamic> serialize() { return { "scopes": scopes.map((e) => e.value).toList(), "length": scopes.length }; }