Closed Temperz87 closed 1 month ago
Indeed. Here's a shorter example with the same bug:
/opt/homebrew/bin/python3.11 ../../deduce.py --dir ../.. inst1.pf inst2.pf
inst1.pf is valid
inst2.pf:4.13-4.16: undefined variable `Nat` (uniquify)
I actually might have a fix for this in https://github.com/Temperz87/deduce/commit/5c52838b70626357c5e65130d9b18ba5fe479087 already
BTW, thank you for finding this bug!
The bug was in the uniquify method of the Import class. The mapping from old-names to new-names from the imported module needed to get added to the env. I fixed this with the addition of a new method collect_uniquified_name to accomplish this task.
When one is in
tests/
and runs the command:deduce errors out saying
Despite
inst2.pf
containingImport Nat
.Alternatively, doing
PYTHON ./deduce.py somefile.pf somefile.pf
wheresomefile.pf
imports something will always recreate this issue.