Topology / ALM-Compiler

A Java implementation of the ALM language that compiles to the SPARC variant of Answer Set Programming (ASP).
Apache License 2.0
0 stars 1 forks source link

proper treatment of total functions #23

Open Topology opened 6 years ago

Topology commented 6 years ago

total function f requires translation of state constraint (page 21)

 false if -dom_f(...)

all dom_f functions need the closed world assumption:

 -dom_f :- not dom_f

The above is not happening properly.

defined functions are already total.

ALSO:

for total boolean functions that are basic, should the total marker add the closed world assumption?. (Define it as false if it is not defined as positive?)

Part of the issue is in problems like basic_motion where there are a lot of points, does the connected(X,Y) function need to be total? (I think so), which requires manual specification of every pair in the initial state of the history (when it is not a case of everything is connected).

zhangyuanlin commented 6 years ago

The above is not happening properly.

Do you mean the ALM paper is not proper or CALM deal with them in-properly?

for total boolean functions that are basic, should the total marker add the closed world assumption?. (Define it as false if it is not defined as positive?)

My feeling is no. If it is not total, compiler should complain. However, it might be hard to implement without getting the answer set. The state constraint you mentioned may be a good idea (no answer set if a total function is not total).