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

unexpected "undefined reference" #576

Open
ott2 opened this issue Jun 25, 2023 · 0 comments
Open

unexpected "undefined reference" #576

ott2 opened this issue Jun 25, 2023 · 0 comments

Comments

@ott2
Copy link
Collaborator

ott2 commented Jun 25, 2023

The following simple spec

given vertices new type enum
find move : function (total) int(1..1) --> tuple(vertices,vertices)
such that
   move(1) = (min(vertices),min(vertices))

works great with conjure solve tmp.essence tmp.param and this parameter file:

letting vertices be new type enum {loc_1_1,loc_2_1}

However, with the same parameter file the following spec (which I would expect to behave identically)

given vertices new type enum
find move : function (total) int(1..1) --> tuple(vertices,vertices)
letting Z be min(vertices)
such that
   move(1) = (Z,Z)

fails with

Error:
    Undefined reference: vertices
    Bindings in context:
        move: declaration of find move: function (total) int(1) --> (vertices, vertices)

This is with current head, but an equivalent error is printed by conjure 2019-11-19.

This looks to me as if the symbol table entry representing min(vertices) is getting messed up, almost as if the letting has stomped over the previous entry. However, this is pure speculation and not informed by the code.

If there is a reason this should not work, then an error message mentioning the letting Z... line would probably be helpful, rather than blaming vertices, the definition of which hasn't changed.

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