GS·Λ theories: A syntax for higher-order graphs