negation-goal ( goal -- negation-goal )


Vocabulary
logic.private

Inputs
goalan object


Outputs
negation-goalan object


Definition


:: negation-goal ( goal -- negation-goal )
"failo_" <pred> :> f-pred f-pred { } clone logic-goal boa
:> f-goal V{ { f-goal [ drop f ] } } f-pred defs<<
goal pred>> name>> "\\+%s_" sprintf <pred> :> negation-pred
negation-pred goal args>> clone logic-goal boa
:> negation-goal V{
{ negation-goal { goal !! f-goal } }
{ negation-goal { } }
} negation-pred defs<< negation-goal ;