Skip to content

feat(feature): Added functions and logic so that to make concerto-rust pass all the conformance tests#2

Open
Anshukumar123975 wants to merge 47 commits intoaccordproject:mainfrom
Anshukumar123975:main
Open

feat(feature): Added functions and logic so that to make concerto-rust pass all the conformance tests#2
Anshukumar123975 wants to merge 47 commits intoaccordproject:mainfrom
Anshukumar123975:main

Conversation

@Anshukumar123975
Copy link
Copy Markdown
Contributor

@Anshukumar123975 Anshukumar123975 commented Nov 3, 2025

Title:

Added functions and logic within ModelFile and ModelManager to make the Rust runtime of Concerto capable of passing all conformance tests.

Description:

  1. This PR introduces the necessary functions, logic, and updates required to ensure that concerto-rust successfully passes all conformance tests.
  2. The primary focus of this update is on strengthening the ModelFile and ModelManager modules of rust runtime. These components now provide full support for key Concerto specifications like Concepts, Enums, Namespaces, Imports, Maps and Scalars.
  3. This update makes the Rust runtime conformant with the Concerto specification to a large extent.

Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
@mttrbrts mttrbrts requested a review from ekarademir November 3, 2025 13:22
Copy link
Copy Markdown

@ekarademir ekarademir left a comment

Choose a reason for hiding this comment

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

First pass

}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Properties {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are these types generated by Concerto?
I'm asking because there is already a Property struct here, is there a need for Properties?

Copy link
Copy Markdown
Contributor Author

@Anshukumar123975 Anshukumar123975 Nov 5, 2025

Choose a reason for hiding this comment

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

I think Property should be replaced with Properties as there were more parameters required for Properties and now in this code Property has become a subset of Properties.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a generated file so we shouldn't modify this here. Property is from the concerto metamodel. I think the problem is lack of inheritance in Rust. So, unified struct is not possible. We would need some other way to achieve this. Possibly an Enum type, defined in a separate file.

rename = "types",
)]
pub types: Vec<String>,
pub types: Option<Vec<String>>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Comparing to the metamodel, name is not part of ImportTypesit's part ofImportType`. For Rust implementation we might need a Rust enum that has different Import flavours.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will be updating this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've completely removed ImportTypes and we are now using only ImportType.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We shouldn't remove any types from this module.

Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
Copy link
Copy Markdown

@ekarademir ekarademir left a comment

Choose a reason for hiding this comment

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

@Anshukumar123975 let me think of a better way to combine metamodel structs together. We shouldn't modify this file as much as possible. We it should be modified, it should be done in the concerto-codegen library.

A possible solution is using enums.

}

#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess the Clone trait is needed here. However, we should add this to the Rust target for concerto-codegen, instead of modifying this file.

}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Properties {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a generated file so we shouldn't modify this here. Property is from the concerto metamodel. I think the problem is lack of inheritance in Rust. So, unified struct is not possible. We would need some other way to achieve this. Possibly an Enum type, defined in a separate file.

)]
pub name: String,

#[serde(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The Declaration type from concerto metamodel doesn't have these extra fields.

rename = "types",
)]
pub types: Vec<String>,
pub types: Option<Vec<String>>,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We shouldn't remove any types from this module.

Signed-off-by: Anshukumar123975 <anshupat2020@gmail.com>
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.

2 participants