Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST6RI-740 Syntax-related issues from SysML v2 FTF Ballot #11 #542

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

seidewitz
Copy link
Member

@seidewitz seidewitz commented Feb 24, 2024

This PR implements resolutions of issues from SysML FTF Ballot 11 that called for updates to the SysML abstract and concrete syntax.

Resolutions of the following issues are implemented in this PR:

  • SYSML2-85 Effective name is not correct for a redefined perform action usage
  • SYSML2-553 checkRequirementUsageObjectiveRedefinition is incorrect
  • SYSML2-631 User-defined keywords are not allowed on metadata
  • SYSML2-637 User-defined keywords are not allowed on enumeration definitions [see note]
  • SYSML2-643 Comment locale not in textual notation
  • SYSML2-783 Parsing KerML Feature elements from SysML textual notation

Note: The resolution to SYSML2-637 updated the SysML grammar so that user-defined keywords can be used on enumeration definitions. However, it did not update the grammar to allow such keywords on the enumerated value declarations within enumeration definitions. Nevertheless, the implementation in this PR does allow this, in the expectation that there will be a future FTF issue resolution to allow it formally. (Enumeration usage declarations other than for enumerated values already allowed user-defined keywords.)

@seidewitz seidewitz requested a review from himi February 24, 2024 19:20
@seidewitz seidewitz self-assigned this Feb 24, 2024
@seidewitz seidewitz added this to the 2024-02 milestone Feb 24, 2024
Copy link
Member

@himi himi left a comment

Choose a reason for hiding this comment

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

I tested this PR by parsing below:

package ST6RI740 {
	package SysML2_85 {
		part p1 {
     	   state s1;
     	   action a1;
    	}
    	part p2 :> p1 {
        	exhibit state :>> s1;
        	perform action :>> a1;
    	}
	}
	
	package SysML2_553 {
		case c1 {
			objective o1 {
				
			}
		}
		case c2 :> c1 {
			objective o2 { // implicit redefinition to c1.o1
				require constraint c1;
			}
		}
	}
	
	package SysML2_631 {
		metadata def MD1;
		metadata def MD2;
		#MD1 #MD2 attribute a1 {
			#MD1 @MD2;
		}
	}
	
	package SysML2_637 {
		metadata def MD1;
		#MD1 enum def ED1 {
			#MD1 a; // ERROR
			b;
		}
	}
	
	package SysML2_643 {
		part p1 {
			doc locale "en_US" /* Test */
			doc locale "ja_JP" /* テスト */
			comment locale "en_US" /* comment test */
			comment locale "ja_JP" /* コメント */
 		}
	}
	
	package SysML2_783 {
		part p1;
		part p2;
		connection c1 connect p1 to p2;
		connection c2 {
			end ::> p1;
			end ::> p2;
		}
	}

	package EXPAssociative {
		attribute exp1 = 2 ^ 2 ^ 3;
		attribute exp2 = (2 ^ 2) ^ 3;
		attribute exp3 = 2 ^ (2 ^ 3);
	}
}

@himi
Copy link
Member

himi commented Feb 26, 2024

I do not know the detailed plan but exhibit state does not have a proper effective name. (SysML2_85).
Note that EXPAssociative does not seem to work, and I guess it will be resolved later.

(Even though this was not actually included in the issue resolution.)
@seidewitz
Copy link
Member Author

  1. SYSML2-85 Since ExhibitStateUsage and IncludeUseCaseUsage specialize PerformActionUsage, they should inherit the behavior of PerformActionUsage::namingFeature. Unfortunately, the Impl classes only singly-inherit from StateUsage and UseCaseUsage, respectively, not PerformActionUsage. So namingFeature needs to be re-implemented for each of them. This has now been done.
  2. SYSML2-637 Unfortunately, adding user-defined keywords to enumerated value declarations was left out of the resolution to this issue. Nevertheless, it has now been implemented for this PR, in expectation of a few issue to update the specification to formally allow it.
  3. KERML-165 Changing the associativity of exponentiation was a KerML issue implemented in PR ST6RI-738 Syntax-related issues from KerML FTF Ballot #5 #540, which is now merged into master. Since the implementation of the expression syntax is common to both KerML and SysML, this change is also already included in the SysML grammar on master.

@himi
Copy link
Member

himi commented Feb 28, 2024

Thank you. I confirmed exhibit state has an effective name as well.
Screenshot 2024-02-28 at 9 40 23 AM

Also I confirmed the user defined keyword can be applied to enum value.

@seidewitz seidewitz merged commit b79928f into master Feb 28, 2024
1 check passed
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.

None yet

2 participants