Changeset [aa9d7b026e4d5b6c7d06ca08a849c33b0c680888] by Douglas Creager
November 6th, 2008 @ 09:30 PM
Distinct process names for each application of a function
Before, a process created by a function application would get its name based on the context in which the lambda was defined. This meant that if you called a function many times, each with different values for its parameters, you'd only get a single process definition in the output script. Ideally, we'd add to the process name some representation of the values that the function was called with. Unfortunately, that's not possible with the current design, since the parameters to a function are lazy. We bind the function application (thereby creating its process name) before evaluating the lambda's body, and we cannot evaluate any of the parameters before evaluating the lambda's body. Thus, we cannot use the parameter values to calculate the process name.
We could probably reorganize things to get around this, but for now, we just keep track of a global counter of function applications, and append this counter to the process name created for any application. This means that if we apply a function many times with the same value, we will get distinct processes for each one.
Lighthouse: [#2] http://github.com/dcreager/hst/c...
Committed by Douglas Creager
- M cspm/src/HST/CSPM/Bind.hs
- M cspm/src/HST/CSPM/Evaluate.hs
- M cspm/src/HST/CSPM/Types.hs
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
An open-source refinement checker for the CSP process algebra.