Skip to content

Commit

Permalink
use '$enqueue_attr_var' when adding attributes only
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Dec 24, 2022
1 parent 8200114 commit aa7b8e5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib/atts.pl
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
( L \= Attr ->
nonvar(Ls),
'$get_from_list'(Ls, V, Attr)
; L = Attr,
'$enqueue_attr_var'(V)
; L = Attr
).

'$put_attr'(V, Attr) :-
Expand All @@ -65,8 +64,7 @@
nonvar(Att),
( Att \= Attr ->
'$del_attr_buried'(Ls0, Ls1, V, Attr)
; '$enqueue_attr_var'(V),
'$del_attr_head'(V),
; '$del_attr_head'(V),
'$del_attr'(Ls1, V, Attr)
).

Expand All @@ -84,8 +82,7 @@
; Ls1 = [Att | Ls2] ->
( Att \= Attr ->
'$del_attr_buried'(Ls1, Ls2, V, Attr)
; '$enqueue_attr_var'(V),
'$del_attr_non_head'(Ls0), %% set tail of Ls0 = tail of Ls1. can be undone by backtracking.
; '$del_attr_non_head'(Ls0), %% set tail of Ls0 = tail of Ls1. can be undone by backtracking.
'$del_attr_step'(Ls1, V, Attr)
)
).
Expand Down

0 comments on commit aa7b8e5

Please sign in to comment.