Closed matteolimberto-da closed 2 years ago
The latest commits decompose the acquire'
function in three components:
acquire
' : its job is to acquire the sub-trees and calculate their acquisition timeexpire'
: expires sub-trees that will never be acquiredfixAcquisitionTime'
: fixes the acquisition time for When
nodes with a non-deterministic predicateI think this makes the code easier to read.
I also got rid of expire
as it is no longer needed.
An advantage of the decomposition is that now we can make exercise
use only the non-effectful acquire'
and thus address https://github.com/digital-asset/contingent-claims/issues/73
As discussed in person this seems fine to me. The only thing I would think about is having clear combinators for distinguishing time =< >= and decimal.
at
andupTo
sound fine though.
Thank you. Will open an issue to discuss the names within the team.
Fixes https://github.com/digital-asset/contingent-claims/issues/69
This is the PR where the dynamics of
Until
as well as the american option builder are changed. The problem and proposed solution are described in the related issue.What I am not yet happy with is the fact that
acquire'
is now a very complex functions, as itWhen
andAnytime
predicatesCond
predicatesCond
nodes once they are reachedUntil
nodes when the predicate is TrueWhen
andAnytime
node where the predicate will never be met)This can probably be split in different functions to make it a bit simpler.
lifecycle
would then be a composition of these simpler functions.