protocol
options_protocol¶
Options protocol.
Author: Paulo Moura
Version: 1:0:0
Date: 2021-02-01
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicates¶
check_option/1¶
Succeeds if the option is valid. Throws an error otherwise.
Compilation flags:
staticTemplate:
check_option(Option)Mode and number of proofs:
check_option(@term) - one_or_errorExceptions:
Option is a variable:instantiation_errorOption is neither a variable nor a compound term:type_error(compound,Option)Option is a compound term but not a valid option:domain_error(option,Option)check_options/1¶
Succeeds if all the options in a list are valid. Throws an error otherwise.
Compilation flags:
staticTemplate:
check_options(Options)Mode and number of proofs:
check_options(@term) - one_or_errorExceptions:
Options is a variable:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)An element
Option of the list Options is a variable:instantiation_errorAn element
Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)An element
Option of the list Options is a compound term but not a valid option:domain_error(option,Option)valid_option/1¶
Succeeds if the option is valid.
Compilation flags:
staticTemplate:
valid_option(Option)Mode and number of proofs:
valid_option(@term) - zero_or_onevalid_options/1¶
Succeeds if all the options in a list are valid.
Compilation flags:
staticTemplate:
valid_options(Options)Mode and number of proofs:
valid_options(@term) - onedefault_option/1¶
Enumerates, by backtracking, the default options.
Compilation flags:
staticTemplate:
default_option(Option)Mode and number of proofs:
default_option(?compound) - zero_or_moredefault_options/1¶
Returns a list of the default options.
Compilation flags:
staticTemplate:
default_options(Options)Mode and number of proofs:
default_options(-list(compound)) - oneProtected predicates¶
merge_options/2¶
Merges the user options with the default options, returning the final list of options. Calls the fix_options/2 predicate to preprocess the options after merging. Callers must ensure, if required, that the user options are valid.
Compilation flags:
staticTemplate:
merge_options(UserOptions,Options)Mode and number of proofs:
merge_options(+list(compound),-list(compound)) - onefix_options/2¶
Fixes a list of options, returning the list of options.
Compilation flags:
staticTemplate:
fix_options(Options,FixedOptions)Mode and number of proofs:
fix_options(+list(compound),-list(compound)) - onefix_option/2¶
Fixes an option.
Compilation flags:
staticTemplate:
fix_option(Option,FixedOption)Mode and number of proofs:
fix_option(+compound,-compound) - zero_or_onePrivate predicates¶
(none)