carneades / carneades-4

Version 4 of Carneades, implemented in Go
https://carneades.github.io/
Other
48 stars 13 forks source link

Error when having a composed statement in the tests key #35

Closed pallix closed 7 years ago

pallix commented 7 years ago

Hi,

I get expected labeling: : not declared to be a statement: coin(b, head) when uncommenting the last line. Am I doing something wrong?


statements:
  coin(a, head): coin(a, head)
  coin(b, head): coin(b, head)
  coin_a: coin_a

assumptions:
  - coin_a
  - coin(b, head)

tests:
  in:
    - coin_a
    # not working:
    # - coin(b, head)
tfgordon commented 7 years ago

You found a bug in the validator. It is not normalizing the assumptions, as it should. If you normalize the assumption by hand, by removing the space in "coin(b, head)", as shown below, it works:

statements:
  coin(a, head): coin(a, head)
  coin(b, head): coin(b, head)
  coin_a: coin_a

assumptions:
  - coin_a
  - coin(b, head)

tests:
  in:
    - coin_a
    - coin(b,head)
tfgordon commented 7 years ago

We just fixed the bug, so I will close this issue. The fix has not yet been pushed to Github, but will be as soon as other problems with the validator have also been fixed, shortly.