copy terms to global variable blackboard, fix attribute_goals//1

This commit is contained in:
Mark Thom
2019-10-09 14:11:31 -06:00
parent 3409db010f
commit f898b98b06
12 changed files with 113 additions and 76 deletions

View File

@@ -13,8 +13,10 @@
of a particular module, as a list of terms of the form
Module:put_atts(V, ListOfAtts). */
'$default_attr_list'(Module, V) -->
{ Module:get_atts(V, Attributes) },
'$default_attr_list'(Attributes, Module, V).
( { Module:get_atts(V, Attributes) } ->
'$default_attr_list'(Attributes, Module, V)
; []
).
'$default_attr_list'([PG | PGs], Module, AttrVar) -->
( { '$module_of'(Module, PG) } -> [Module:put_atts(AttrVar, PG)]

View File

@@ -12,7 +12,9 @@ forall(Generate, Test) :-
%% (non-)backtrackable global variables.
bb_put(Key, Value) :- atom(Key), !, '$store_global_var'(Key, Value).
bb_put(Key, Value) :- atom(Key),
!,
'$store_global_var'(Key, Value).
bb_put(Key, _) :- throw(error(type_error(atom, Key), bb_put/2)).
bb_b_put(Key, NewValue) :-