conjure-cp / conjure

Conjure: The Automated Constraint Modelling Tool
Other
96 stars 20 forks source link

"parameter-generator" for record types: Undefined reference #479

Closed ndangtt closed 4 years ago

ndangtt commented 4 years ago

Hello,

When I do conjure parameter-generator model.essence --essence-out generator.essence and then conjure modelling -ac generator.essence

I get the following error messages:

Error:
    Undefined reference: at_
    Bindings in context:
        q1: DeclNoRepr (quantified q1: (int(1..200), int(1..300)))
        init: DeclNoRepr (find init: (function (int(1..200), int(1..300)) --> bool,
                                      function (int(1..200), int(1..100)) --> bool,
                                      function int(1..100) --> int(0..100),
                                      function (int(1..300), int(1..300)) --> int(0..100),
                                      function int(1..100) --> int(0..100), function int(1..100) --> int(0..100),
                                      function int(0) --> int(0..100)))

I guess it was because in generator.essence, function names were missing inside find init: (lines 37-40) Could you please help to check it?

Thank you!

generator.essence.txt model.essence.txt

ndangtt commented 4 years ago

Hi Oz,

I created a minimal example, with only 4 params instead. Hopefully it'll be easier for you to look at :)

Please find in attachment the problem Essence spec (model.essence), the created generator spec with bug (gen.essence), and the expected generator spec (gen-correct.essence)

Thank you!

gen.essence.txt gen-correct.essence.txt model.essence.txt