AmpersandTarski / Ampersand

Build database applications faster than anyone else, and keep your data pollution free as a bonus.
http://ampersandtarski.github.io/
GNU General Public License v3.0
40 stars 8 forks source link

product operator # malfunctions #1310

Open stefjoosten opened 2 years ago

stefjoosten commented 2 years ago

What happened

I am running the following script:

CONTEXT Script

POPULATION X CONTAINS ["aap", "noot", "mies"]
POPULATION A CONTAINS ["1", "2", "3"]

RELATION r[X*A]
POPULATION r CONTAINS
  [ ("aap", "1")
  , ("noot", "1")
  ]
RULE rule1 : r#r~ |- r;V;r~
RULE rule2 : r;V;r~ |- r#r~

ENDCONTEXT

I got the following result:

% ampersand check Issue1310.adl
/Users/sjo00577/git/ampersand-models/ArchiChecker/ResearchData/Issue1310.adl:13:1 error:
  There are 5 violations of RULE "rule1":
    ("aap", "mies")
    ("mies", "aap")
    ("mies", "mies")
    ("mies", "noot")
    ("noot", "mies")
ExitFailure 10

(Note: the population of r;V;r~ is [("aap", "aap"), ("aap", "noot"), ("noot", "aap"), ("noot", "noot")] )

What I expected

Since the operator # is defined by r#s = r;V;s, both rules should never be violated.

Version of ampersand that was used

I used both the RAP tool (Ampersand-v4.3.0) and Ampersand-v4.6.3