move to a predicate-based module system, move to loader.[rs|pl]-based compilation, add support for incremental clause compilation

This commit is contained in:
Mark Thom
2021-01-30 14:32:47 -07:00
parent b33158b92e
commit a4d15bfb88
55 changed files with 10501 additions and 7601 deletions

View File

@@ -8,8 +8,8 @@
put_dif_att(Var, X, Y) :-
( get_atts(Var, +dif(Z)) ->
sort([X \== Y | Z], NewZ),
put_atts(Var, +dif(NewZ))
sort([X \== Y | Z], NewZ),
put_atts(Var, +dif(NewZ))
; put_atts(Var, +dif([X \== Y]))
).
@@ -21,8 +21,8 @@ dif_set_variables([Var|Vars], X, Y) :-
append_goals([], _).
append_goals([Var|Vars], Goals) :-
( get_atts(Var, +dif(VarGoals)) ->
append(Goals, VarGoals, NewGoals0),
sort(NewGoals0, NewGoals)
append(Goals, VarGoals, NewGoals0),
sort(NewGoals0, NewGoals)
; NewGoals = Goals
),
put_atts(Var, +dif(NewGoals)),
@@ -30,8 +30,8 @@ append_goals([Var|Vars], Goals) :-
verify_attributes(Var, Value, Goals) :-
( get_atts(Var, +dif(Goals)) ->
term_variables(Value, ValueVars),
append_goals(ValueVars, Goals)
term_variables(Value, ValueVars),
append_goals(ValueVars, Goals)
; Goals = []
).
@@ -50,7 +50,7 @@ dif(X, Y) :-
gather_dif_goals([]) --> [].
gather_dif_goals([(X \== Y) | Goals]) -->
( { X \= Y } -> []
; [dif(X, Y)]
; [dif:dif(X, Y)]
),
gather_dif_goals(Goals).