Skip to content

Define an "update structure" #12

@crei

Description

@crei

After complex routines, we are often left with large expressions of update calls:

 (Function.update
        (Function.update
          (Function.update
            (Function.update
              (Function.update
                (Function.update
                  (Function.update (Function.update tapes 0 ((tapes 0).head?.getD [] :: tapes 0)) 1
                    ((tapes c).head?.getD [] :: tapes 1))
                  t (dya t_val :: (tapes t).tail))
                pc (l_afterFirstRec :: (tapes pc).tail))
              result
              (if Relation.RelatesInSteps r ((tapes 0).head?.getD []) ((tapes c).head?.getD []) (2 ^ t_val) then
                [OneTwo.one] :: tapes result
              else [] :: tapes result))
            0 ((tapes c).head?.getD [] :: tapes 0))
          1 ((tapes 1)[0]?.getD [] :: tapes 1))
        pc (l_funStart :: l_afterSecondRec :: (tapes pc).tail))

Even worse: The simplifier is not able to remove the first update to pc which is invalidated by the last one. This might be due to the fact that it cannot see that they are all distinct, but it is also rather cumbersome to work with.

Come up with tooling to deal with this. In the future, this data structure could also contain the effects on space usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions