From: Mark Thom Date: Thu, 27 Feb 2020 23:19:48 +0000 (-0700) Subject: remove cyclic_term/1 X-Git-Tag: v0.8.119~68 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=934f73f696e753f3418c71ee41c95d1b089a9fa2;p=scryer-prolog.git remove cyclic_term/1 --- diff --git a/src/prolog/clause_types.rs b/src/prolog/clause_types.rs index bbb9accc..7851ad03 100644 --- a/src/prolog/clause_types.rs +++ b/src/prolog/clause_types.rs @@ -117,7 +117,6 @@ ref_thread_local! { m.insert(("@>=", 2), ClauseType::BuiltIn(BuiltInClauseType::CompareTerm(CompareTermQT::GreaterThanOrEqual))); m.insert(("@=<", 2), ClauseType::BuiltIn(BuiltInClauseType::CompareTerm(CompareTermQT::LessThanOrEqual))); m.insert(("copy_term", 2), ClauseType::BuiltIn(BuiltInClauseType::CopyTerm)); - m.insert(("cyclic_term", 1), ClauseType::BuiltIn(BuiltInClauseType::CyclicTerm)); m.insert(("==", 2), ClauseType::BuiltIn(BuiltInClauseType::Eq)); m.insert(("functor", 3), ClauseType::BuiltIn(BuiltInClauseType::Functor)); m.insert(("ground", 1), ClauseType::BuiltIn(BuiltInClauseType::Ground)); @@ -538,7 +537,6 @@ pub enum BuiltInClauseType { Arg, Compare, CompareTerm(CompareTermQT), - CyclicTerm, CopyTerm, Eq, Functor, @@ -569,7 +567,6 @@ impl BuiltInClauseType { &BuiltInClauseType::Arg => clause_name!("arg"), &BuiltInClauseType::Compare => clause_name!("compare"), &BuiltInClauseType::CompareTerm(qt) => clause_name!(qt.name()), - &BuiltInClauseType::CyclicTerm => clause_name!("cyclic_term"), &BuiltInClauseType::CopyTerm => clause_name!("copy_term"), &BuiltInClauseType::Eq => clause_name!("=="), &BuiltInClauseType::Functor => clause_name!("functor"), @@ -589,7 +586,6 @@ impl BuiltInClauseType { &BuiltInClauseType::Arg => 3, &BuiltInClauseType::Compare => 2, &BuiltInClauseType::CompareTerm(_) => 2, - &BuiltInClauseType::CyclicTerm => 1, &BuiltInClauseType::CopyTerm => 2, &BuiltInClauseType::Eq => 2, &BuiltInClauseType::Functor => 3, diff --git a/src/prolog/machine/machine_state.rs b/src/prolog/machine/machine_state.rs index bf4c5c5f..143379e2 100644 --- a/src/prolog/machine/machine_state.rs +++ b/src/prolog/machine/machine_state.rs @@ -711,11 +711,6 @@ pub(crate) trait CallPolicy: Any { machine_st.compare_term(qt); return_from_clause!(machine_st.last_call, machine_st) } - &BuiltInClauseType::CyclicTerm => { - let addr = machine_st[temp_v!(1)].clone(); - machine_st.fail = !machine_st.is_cyclic_term(addr); - return_from_clause!(machine_st.last_call, machine_st) - } &BuiltInClauseType::Nl => { let mut stdout = stdout();