bloom-lang / bud

Prototype Bud runtime (Bloom Under Development)
http://bloom-lang.net
Other
854 stars 59 forks source link

Join with match restrictions using shorthand symbols doesn't work when join involves imported module #301

Closed amatsukawa closed 11 years ago

amatsukawa commented 11 years ago

When doing a join with an imported module as shown below, Bud can't find the correct schema names. We have to use full qualified names instead.

module TwoPLTransactionalKVS
  import TwoPhaseLockMgr => :locks
  ...
  state do
    table :waiting_puts, [:xid, :key, :reqid] => [:data]
    ....
  end
   ...
  bloom :perform_gets do
    ## BELOW BREAKS ##
    # lock.lock_status has schema [:xid, :resource] => [:status]
    can_get <= (waiting_gets * locks.lock_status).lefts(:xid => :xid, :key => :resource)
    ...
  end
end

The error is

can_get <= ((waiting_gets * locks.lock_status).lefts(:xid => :xid, :key => :resource))
 ****** attribute :xid not found in any of [:lock_status] 
 ...

You can also download this zip file to reproduce the error. Run xact_kvs_test.rb.

neilconway commented 11 years ago

Repro'd -- thanks for the report. I'll fix this tomorrow.