implement dynamic, multifile, and discontiguous properties and callable type checking for predicate_property/2

This commit is contained in:
Mark Thom
2021-02-05 02:16:14 -07:00
parent 804858d736
commit 2d7f31a60d
6 changed files with 154 additions and 9 deletions

View File

@@ -400,6 +400,12 @@ impl SystemClauseType {
clause_name!("$cpp_meta_predicate_property"),
&SystemClauseType::REPL(REPLCodePtr::BuiltInProperty) =>
clause_name!("$cpp_built_in_property"),
&SystemClauseType::REPL(REPLCodePtr::DynamicProperty) =>
clause_name!("$cpp_dynamic_property"),
&SystemClauseType::REPL(REPLCodePtr::MultifileProperty) =>
clause_name!("$cpp_multifile_property"),
&SystemClauseType::REPL(REPLCodePtr::DiscontiguousProperty) =>
clause_name!("$cpp_discontiguous_property"),
&SystemClauseType::REPL(REPLCodePtr::CompilePendingPredicates) =>
clause_name!("$compile_pending_predicates"),
&SystemClauseType::Close => clause_name!("$close"),
@@ -773,6 +779,9 @@ impl SystemClauseType {
("$prolog_lc_stream", 1) => Some(SystemClauseType::REPL(REPLCodePtr::LoadContextStream)),
("$cpp_meta_predicate_property", 4) => Some(SystemClauseType::REPL(REPLCodePtr::MetaPredicateProperty)),
("$cpp_built_in_property", 2) => Some(SystemClauseType::REPL(REPLCodePtr::BuiltInProperty)),
("$cpp_dynamic_property", 3) => Some(SystemClauseType::REPL(REPLCodePtr::DynamicProperty)),
("$cpp_multifile_property", 3) => Some(SystemClauseType::REPL(REPLCodePtr::MultifileProperty)),
("$cpp_discontiguous_property", 3) => Some(SystemClauseType::REPL(REPLCodePtr::DiscontiguousProperty)),
("$compile_pending_predicates", 1) => Some(SystemClauseType::REPL(REPLCodePtr::CompilePendingPredicates)),
_ => None,
}