Open zhangyuanlin opened 6 years ago
In this program, 'top' is not a constant.
% top = top(box)
% top(elevations): movable_points
I think there are some issues.
box in elevations
top = top(box)
% top = t(box)
top(X) in movable_points where instance(X, elevations)
There is a circularity involved in these declarations. This is their likely translation:
is_a(box, elevations) :- instance(top(box), points)
is_a(top(X), movable_points) :- instance(X, elevations).
The rules are satisfied by box not being in elevations.
I think we need to take a step back and ask what we are trying to model. Part of the complication is the name collision between the attribute function 'top' and the attempt at creating object constants 'top'.
If we used different names for things, is there a problem? If so, let's get a minimal program that demonstrates the problem to isolate it from any other concerns.
If the problem is related to name collision, then lets continue that discussion on the namespace issue. I'm beginning to think that even in the ALM program we should be scoping attribute functions to be preceded by the sort names they are available for.
This is thread for testing use, not a bug report. Sorry it confuses. The bug is reported in #10.
Test is waiting for resolvent of using attribute for constants with parameters (#10). There may be more bugs for the alm program. Here is the latest I used in my test. Future test should continue from this one.