The following is a template for the program I am developing.
:- dynamic special_predicate/some_arity. program:- do_little_work_that_involves_using_assert_retract_over_the_special_predicate, compile_predicates([special_predicate/some_arity]), do_a_lot_of_work_that_does_not_need_the_special_predicate_to_be_dynamic, % make special_predicate/some_arity dynamic again do_little_work_that_involves_using_assert_retract_over_the_special_predicate.
Is there anyway to make a predicate dynamic after it has been compiled? If not, is there a better approach to coding my program to maximize performance by sandwhich-compiling my “special_predicate” instead of interpreting it during the heavy-duty evaluation part?