Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheme parsing is adding extra parentheses for pattern matching commands #5

Open
mjsduncan opened this issue Oct 12, 2021 · 0 comments

Comments

@mjsduncan
Copy link

mjsduncan commented Oct 12, 2021

for atomspace commit 16790c7005a80eb70a1281cfac85a00512140bb8 (october 7, 2021)
and Habush/atomspace-rpc current master
and current atomspace from mozi.ai
running the annotation service docker locally produces this error:

...
Server listening on 0.0.0.0:50051
Error: Unbalanced parenthesis >>; [5a6822854d80fb0c][1]
    (ListLink
      (GeneNode "BRCA2") ; [1bd83328eeb5d294][1]
      (VariableNode "$name") ; [75727d82789ac7d3][1]
    ) ; [84dd65680014bcb3][1]
  ) ; [d7f6fd7b9a2c82a1][1]
) ; [b4e851f7c5197785][1]<<

accessing from the guile REPL works for find-similar-node but not for exec-pattern:

scheme@(guile-user)> (find-similar-node "prod-atom" "Gene" "BRC")
$27 = ((GeneNode "BRCA3")
 (GeneNode "BRCA2")
 (GeneNode "BRCC3")
 (GeneNode "BRCA1")
 (GeneNode "BRCA2(IV)")
)
scheme@(guile-user)> (exec-pattern "prod-atom" (Meet (Member (Gene "IGF1") (Variable "$pway"))))
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Throw to key `C++-EXCEPTION' with args `("exec-pattern" "Executing pattern failed. Reason: Unbalanced parenthesis >>; [37b917f182563377][1]\n    (VariableNode \"$pway\") ; [6f5de7f213daa0f5][1]\n  ) ; [856d2984e6de3e64][1]\n) ; [834184a90d6d83b9][1]<<\nFunction args:\n(prod-atom (MeetLink\n  (MemberLink\n    (GeneNode \"IGF1\")\n    (VariableNode \"$pway\")))\n)")'.

corresponding error output from atomspace-rpc binary is:

Error: Unbalanced parenthesis >>; [37b917f182563377][1]
    (VariableNode "$pway") ; [6f5de7f213daa0f5][1]
  ) ; [856d2984e6de3e64][1]
) ; [834184a90d6d83b9][1]<<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant