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

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Sep 6, 2025

  • Implements tracking of changes to objects resulting from method calls inside programs. This enables correct compilation of programs with multiple method calls on the same object.
  • Introduces an intermediate Tasks type which represents a sequence of tasks with intervening object fetches and random value generations. The Tasks type mimics more closely the structure of AVM programs than a single Task.
  • AVM.Program is compiled to Tasks which are then composed into a single Task. The composition of Tasks collects and lifts out the parameters of all subtasks.

@lukaszcz lukaszcz self-assigned this Sep 6, 2025
@lukaszcz lukaszcz marked this pull request as ready for review September 8, 2025 11:11
@lukaszcz lukaszcz requested a review from Copilot September 8, 2025 11:11
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 implements tracking of changes to objects resulting from method calls inside programs, enabling correct compilation of programs with multiple method calls on the same object. The implementation introduces an intermediate Tasks type that represents a sequence of tasks with intervening object fetches and random value generations, which mimics more closely the structure of AVM programs than a single Task.

  • Introduces the Tasks type as an intermediate representation between AVM.Program and Task
  • Implements object change tracking through adjustment functions that apply modifications from program execution
  • Replaces the previous list-based task composition with a more structured approach that properly handles object state changes

Reviewed Changes

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

Show a summary per file
File Description
Apps/KudosBank.lean Adds Inhabited derivation to data structures
AVM/Tasks.lean Introduces new Tasks type and composition functions
AVM/Task.lean Simplifies Task by removing list composition methods and adding helper functions
AVM/Program/Translation.lean Updates compilation to use new Tasks-based approach
AVM/Program/Parameters.lean Replaces genId with rand, adds Inhabited instance and helper functions
AVM/Program.lean Renames returnValue to value and improves documentation
AVM/Object/Created.lean Adds rand field to CreatedObject and updates constructor
AVM/Object.lean Adds Inhabited instance for ObjectData and Object
AVM/Class/Translation/Tasks.lean Implements task creation with object change tracking
AVM/Class/Translation/Messages.lean Extracts message creation functions
AVM/Class/Translation/Logics.lean Extracts logic creation functions
AVM/Class/Translation.lean Simplifies by importing modularized components
AVM/Class/Label.lean Adds Inhabited constraint for private fields
AVM/Action.lean Adds object conversion methods and updates balance functions

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

@lukaszcz lukaszcz merged commit a744bce into main Sep 8, 2025
2 checks passed
@lukaszcz lukaszcz deleted the task-adjust branch September 8, 2025 12:41
lukaszcz added a commit that referenced this pull request Sep 16, 2025
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