jacobdweightman / allium

The Allium Programming Language
MIT License
2 stars 1 forks source link

Allow effects/predicates to require parameters to be ground. #9

Closed jacobdweightman closed 2 years ago

jacobdweightman commented 2 years ago

I previously implemented a keword in which would mark a parameter as "input only" and prevent an existential variable from being declared inside that parameter. The original intention was to ensure that a value is ground, i.e. contains no unbound variables. This isn't actually adequate. I propose two changes:

  1. Change the keword from in to ground for clarity.
  2. Reimplement "groundness" tracking using compile-time abstract interpretation.

The abstract interpretation should work by disregarding specific values and considering only whether they are ground or not. A value is ground if:

jacobdweightman commented 2 years ago

Closed by 178f4552b21cf92d693050a06a86759e459c1b71