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

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Sep 8, 2025

  • Adds the logicRef field to Anoma.Resource
  • Simplifies the Logic.Args type
  • Adds explicit checks for resource logic reference equality, replacing comments which indicated where such checks should be performed.

@lukaszcz lukaszcz self-assigned this Sep 8, 2025
@lukaszcz lukaszcz requested a review from Copilot September 8, 2025 12:48
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 makes Resource Logic references explicit by introducing a LogicRef type and adding it as a field to Anoma.Resource. This change allows for explicit validation of resource logic reference equality instead of relying on comments indicating where such checks should be performed.

Key changes:

  • Introduces LogicRef structure with string-based reference identification
  • Refactors Logic.Args structure to separate data types and move logic definitions to a dedicated module
  • Adds explicit resource logic reference checks throughout the codebase, replacing previous comment placeholders

Reviewed Changes

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

Show a summary per file
File Description
Anoma/Resource.lean Adds LogicRef structure and logicRef field to Resource, removes old logic structures
Anoma/Logic.lean New file containing restructured Logic.Args and Logic definitions
Anoma.lean Adds import for new Logic module
AVM/Object.lean Updates resource conversion methods to handle logicRef field
AVM/Message.lean Adds logicRef field to messages and implements reference validation
AVM/Logic.lean Updates resource validation to use explicit logic reference checks
AVM/Class/Translation/Messages.lean Updates message creation to include logic references
AVM/Class/Translation/Logics.lean Refactors logic definitions to use new Logic structure with references
AVM/Class/Member.lean Minor type annotation update for Constructor
AVM/Class/Label.lean Adds logicRef method to Label structure
AVM/Class.lean Updates Logic.Args type alias
AVM/Action/DummyResource.lean Restructures dummy resource logic to use new Logic structure

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

@janmasrovira janmasrovira merged commit b4b3eb7 into main Sep 8, 2025
2 checks passed
@janmasrovira janmasrovira deleted the logic-ref branch September 8, 2025 12:57
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