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

Python enumeration with contextual grammar network? #52

Open
CatherineWong opened this issue Jul 9, 2019 · 1 comment
Open

Python enumeration with contextual grammar network? #52

CatherineWong opened this issue Jul 9, 2019 · 1 comment
Assignees

Comments

@CatherineWong
Copy link
Collaborator

Since Python enumeration was resurrected for Puddleworld - I'm hitting an error now that makes me suspect that python enumeration doesn't work for the ContextualGrammarNetwork, given how primitive indices are stored?


Traceback (most recent call last):
File "../ec/dreamcoder/enumeration.py", line 230, in _f
r = f(*a, **k)
File "../ec/dreamcoder/enumeration.py", line 366, in solveForTask_python
lowerBound=lowerBound, upperBound=upperBound)
File "../ec/dreamcoder/enumeration.py", line 409, in enumerateForTasks
lowerBound=previousBudget):
File "../ec/dreamcoder/grammar.py", line 1161, in enumeration
maximumDepth=maximumDepth):
File "../ec/dreamcoder/grammar.py", line 1182, in enumeration
maximumDepth=maximumDepth - 1):
File "../ec/dreamcoder/grammar.py", line 1215, in enumerateApplication
maximumDepth=maximumDepth):
File "../ec/dreamcoder/grammar.py", line 1182, in enumeration
maximumDepth=maximumDepth - 1):
File "../ec/dreamcoder/grammar.py", line 1227, in enumerateApplication
argumentIndex=argumentIndex + 1):
File "../ec/dreamcoder/grammar.py", line 1215, in enumerateApplication
maximumDepth=maximumDepth):
File "../ec/dreamcoder/grammar.py", line 1161, in enumeration
maximumDepth=maximumDepth):
File "../ec/dreamcoder/grammar.py", line 1166, in enumeration
else: g = self.library[parent][parentIndex]
TypeError: list indices must be integers or slices, not Primitive

@ellisk42
Copy link
Owner

Bug should be fixed, but let me know if it doesn't work.

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

2 participants