Algorithm 11 (A11) - Structural Logic Framework
By @Алексей Гормен