Text this: Hierarchical programming and applications to economic policy