From 2c1b7e3b14bb4f9473f517856d4e14fece21124c Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Thu, 18 Feb 2021 20:33:27 +0100 Subject: [PATCH 1/3] remove unused attribute_goal/2 --- src/lib/clpz.pl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index ead80546..797aace8 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -7590,10 +7590,6 @@ clpz_gcc_occurred:attribute_goals(_) --> []. clpz_relation:attribute_goals(_) --> []. -attribute_goal(Var, Goal) :- - phrase(attribute_goals(Var), Goals), - list_goal(Goals, Goal). - attributes_goals([]) --> []. attributes_goals([propagator(P, State)|As]) --> ( { ground(State) } -> [] From aecbd0eda3adf90c0c5009ef6f7a5dab69a4ac28 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Thu, 25 Feb 2021 21:45:06 +0100 Subject: [PATCH 2/3] omit internal residual goals for global_cardinality/2 --- src/lib/clpz.pl | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index 797aace8..3012af78 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -7580,16 +7580,6 @@ attribute_goals(X) --> attributes_goals(Ps), { del_attr(X, clpz) }. -clpz_aux:attribute_goals(_) --> []. - -clpz_gcc_vs:attribute_goals(_) --> []. - -clpz_gcc_num:attribute_goals(_) --> []. - -clpz_gcc_occurred:attribute_goals(_) --> []. - -clpz_relation:attribute_goals(_) --> []. - attributes_goals([]) --> []. attributes_goals([propagator(P, State)|As]) --> ( { ground(State) } -> [] @@ -7652,7 +7642,9 @@ attribute_goal_(pelement(N,Is,V)) --> [element(N, Is, V)]. attribute_goal_(pgcc(Vs, Pairs, _)) --> [global_cardinality(Vs, Pairs)]. attribute_goal_(pgcc_single(_,_)) --> []. attribute_goal_(pgcc_check_single(_)) --> []. -attribute_goal_(pgcc_check(_)) --> []. +attribute_goal_(pgcc_check(Pairs)) --> + { pairs_values(Pairs, Nums), + maplist(gcc_done, Nums) }. attribute_goal_(pcircuit(Vs)) --> [circuit(Vs)]. attribute_goal_(pserialized(_,_,_,_,O)) --> original_goal(O). attribute_goal_(rel_tuple(R, Tuple)) --> From dd64268bc721f33e03271ddc76862639705208b1 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Thu, 25 Feb 2021 22:40:31 +0100 Subject: [PATCH 3/3] add entry for library(lambda) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2c86d620..c15c6b8b 100644 --- a/README.md +++ b/README.md @@ -447,6 +447,8 @@ The modules that ship with Scryer Prolog are also called file, reading lazily only as much as is needed. Due to the compact internal string representation, also extremely large files can be efficiently processed with Scryer Prolog in this way. +* [`lambda`](src/lib/lambda.pl) + Lambda expressions to simplify higher order programming. * [`charsio`](src/lib/charsio.pl) Various predicates that are useful for parsing and reasoning about characters, notably `char_type/2` to classify characters according to their type, and conversion