Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Sep 6, 2025

This pr adds MultiMethods to the AVM layer.
They are equivalent to Functions in the previous version of AVM.

@janmasrovira janmasrovira self-assigned this Sep 6, 2025
@janmasrovira janmasrovira changed the title Multimethods MultiMethods Sep 6, 2025
@janmasrovira janmasrovira force-pushed the multimethods branch 9 times, most recently from a7dfbc3 to 35b1e06 Compare September 9, 2025 12:01
@lukaszcz lukaszcz marked this pull request as ready for review September 10, 2025 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds MultiMethods to the AVM (Abstract Virtual Machine) layer, implementing functionality equivalent to Functions from the previous AVM version. The changes introduce a new multi-method system that enables method calls across multiple object arguments, expanding beyond single-object method calls.

Key changes include:

  • Introduction of MultiMethod infrastructure with support for multiple object arguments
  • Migration from Functions to MultiMethods with enhanced object argument handling
  • Updates to type system removing unnecessary universe polymorphism

Reviewed Changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lakefile.toml Disables universe printing in Lean options
Prelude/*.lean Adds new utility modules for Vector, ULift, Function, and HBeq
Apps/*.lean Updates applications to use singleton ecosystems instead of custom class enums
AVM/Ecosystem/*.lean Implements MultiMethod infrastructure and member definitions
AVM/Class/*.lean Updates class system to work with new ecosystem structure
AVM/Program.lean Adds multiMethod program constructor and lift functionality
AVM/Tasks.lean Implements task generation for MultiMethods with random value handling
Comments suppressed due to low confidence (1)

AVM/Class/Translation/Tasks.lean:1

  • Commented-out code with sorry should be removed or properly implemented before merging to production.
import Mathlib.Control.Random

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

janmasrovira and others added 20 commits September 19, 2025 09:54
commit 9dc34b2
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 17 09:00:43 2025 +0200

    nonce

commit 2cbbb19
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 17 00:26:15 2025 +0200

    more fixes

commit 737a4bc
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 16 23:39:15 2025 +0200

    merge with sorries

commit f70d3ed
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 16 23:00:39 2025 +0200

    apps

commit abd1d4a
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 16 17:50:37 2025 +0200

    refactor Object

commit bb24aa7
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 16 11:56:56 2025 +0200

    remove unsued logic

commit 72f04ed
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 15:55:02 2025 +0200

    add mutual increment example

commit bca1e30
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 14:40:01 2025 +0200

    remove comment

commit b8355b3
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 12:31:49 2025 +0200

    handle todos

commit e47a034
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 12:25:48 2025 +0200

    ensureUnique nonces

commit d5240ef
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 11:57:34 2025 +0200

    ActionData

commit 2a7e002
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 10:42:48 2025 +0200

    fix

commit 48d3896
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 10:37:16 2025 +0200

    add data

commit c67c3d5
Author: Jan Mas Rovira <[email protected]>
Date:   Wed Sep 10 10:18:23 2025 +0200

    logicfun

commit 8aaf3fc
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 9 18:21:07 2025 +0200

    data

commit 35b1e06
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 9 14:01:35 2025 +0200

    remove TypedObjectId

commit 5dcbe5e
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 9 13:57:17 2025 +0200

    handle randoms

commit e486cd5
Author: Jan Mas Rovira <[email protected]>
Date:   Tue Sep 9 11:18:27 2025 +0200

    logic

commit a383100
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 18:21:09 2025 +0200

    wip task

commit f9a998f
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 17:15:08 2025 +0200

    fetchMany tasks

commit ed46f62
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 17:05:49 2025 +0200

    use List.Vector. Improve HBEq

commit 7498a70
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 16:18:25 2025 +0200

    rebase

commit 0c93fe0
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 15:09:44 2025 +0200

    fix merge

commit b87032c
Author: Jan Mas Rovira <[email protected]>
Date:   Mon Sep 8 15:06:25 2025 +0200

    Squashed commit of the following:

    commit bfc4de9
    Author: Jan Mas Rovira <[email protected]>
    Date:   Mon Sep 8 13:48:40 2025 +0200

        Data

    commit 21fb767
    Author: Jan Mas Rovira <[email protected]>
    Date:   Mon Sep 8 10:59:15 2025 +0200

        Vector and universes

    commit aa8c3f7
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sun Sep 7 13:43:11 2025 +0200

        selvesFromHList

    commit 3be11db
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sun Sep 7 09:53:48 2025 +0200

        Program.lift

    commit 713372f
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 19:12:32 2025 +0200

        proof

    commit de81f2e
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 18:43:39 2025 +0200

        universe pain relief

    commit 6b269ca
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 17:47:22 2025 +0200

        more pain

    commit 42dda04
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 16:07:27 2025 +0200

        pain with types

    commit 29fdba8
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 10:50:24 2025 +0200

        Assembled

    commit 71271bb
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 10:30:11 2025 +0200

        rename Function -> MultiMethod

    commit 4f4ba0a
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 10:03:52 2025 +0200

        wip

    commit c5f07e8
    Author: Jan Mas Rovira <[email protected]>
    Date:   Sat Sep 6 09:27:10 2025 +0200

        message with multiple recipients

    commit c7b3f25
    Author: Jan Mas Rovira <[email protected]>
    Date:   Fri Sep 5 13:14:25 2025 +0200

        add HBeq and Vector instance

    commit 47d90ed
    Author: Jan Mas Rovira <[email protected]>
    Date:   Fri Sep 5 10:47:38 2025 +0200

        add FunctionId to EcosystemLabel
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
@lukaszcz lukaszcz merged commit 282ffbb into main Sep 19, 2025
1 check passed
@lukaszcz lukaszcz deleted the multimethods branch September 19, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants