dodaro / cnl2asp

A tool for converting CNL sentences to ASP rules.
https://dodaro.github.io/cnl2asp/
Apache License 2.0
1 stars 0 forks source link

Apparent compile error(?) with term inequality #13

Closed GregGelfond closed 1 month ago

GregGelfond commented 1 month ago

Consider the following example:

A status is one of "failed", "delayed", "success".

A mission is one of "offensive", "defensive".

A launch is one of "single", "double".

It is prohibited that
    a mission M employs launch "double" and also
    mission M has_state status S and also
    status S is different from status "failed".

The last rule compiles to the following with the online tool:

:- employ(M, "double"),
    launch("double"),
    mission(M),
    has_state(M,S),
    status(S),
    different_from(S, "failed"),
    status("failed").

Shouldn't the literal different_from(S, "failed") be S != "failed" instead?

The same pattern holds if instead of using quoted-strings as object constants I use just elementary symbols (i.e., instead of "failed" I use failed).

simocaruso commented 1 month ago

The syntax to set a condition on a term is a bit different:

It is prohibited that
    a mission M employs launch "double" and also
    mission M has_state status S, where S is different from "failed".