Skip to content

Conversation

@McModknower
Copy link

Currently when the API wants to serialize a list that contains non-ground values, the list case is not triggered (as X or Xs is not ground), and it falls through to the case for terms. Since a non-empty list is also a term of the form '[|]'(Head, Tail), a call to rosprolog_encode([Head, Tail],Args_json) gets made. Since the Head or the Tail is not ground, the same procedure happens over and over until the stack is full.

To prevent this case, i added the ability to serialize lists that contain non-ground entries.
To make sure that the case for terms never tries to encode lists, i added a check to make sure that the Functor is not '[|]'.

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

Successfully merging this pull request may close these issues.

1 participant