Skip to content

Laziness and Sharing #5

Open
Open
@ejgallego

Description

@ejgallego

This is a general issue to discuss laziness and sharing w.r.t. the seralization of objects.

A motivating example is the following usual Coq snippet:

type a = { foo : bar (* some data *) ; env : Environ.env}

now imagine we have in Python, an object a of type a_class, with methods a.foo and a.env.

It would be great if we could avoid the conversion of a.env until it is actually accessed, as env is actually a huge object. That would mean which a.foo could be done quickly.

A problem we have with the delay in indeed the imperative nature of some code. So that approach, could be only used for objects that we mark as "safe" [that is to say, purely functional so themselves are closed].

Another approach could be actually to use some form of sharing, as done in the OCaml "runtime"; however, this may still be too expensive in some use cases.

Improvements on this pattern are also due in Coq's side.

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