Skip to content

Conversation

@jra-se
Copy link
Contributor

@jra-se jra-se commented Jun 24, 2025

What:
This pull request revises all JavaLight CoCos in which the validity of JavaModifiers in constructors and methods is checked. A CoCo for checking the validity of JavaModifiers for methods is also added.

Why:
While Java distinguishes between different types of modifiers (such as: ClassModifier, MethodModifier etc), in JavaLight these are combined as JavaModifiers. For this reason, several things must be taken into account.

  • CoCos must exist to prohibit modifiers that are not permitted by language structures
  • JavaModifiers must potentially be adapted more frequently, as they are independent of the modified language construct

Due to this combination, CoCos should be implemented in such a way that they only allow permitted modifiers, while everything else is forbidden. If a modifier is added, this initially has no effect. Only by explicitly adapting CoCos (whitelisting) is its use finally permitted.

jra-se added 2 commits June 24, 2025 16:02
* cocos now work independent of completed symboltable
* cocos now work as a whitelist for allowed modifiers instead of prohibiting the use of some. This way it supports adding new modifiers and require active modifications if those new modifiers are intended to be used.
@github-actions
Copy link

github-actions bot commented Jun 24, 2025

⚠️ Changes might break the MontiVerse

Project Status
artifacts ⚠️
details
Project Status
montiarc
umlp
sd
montifun
fd
automaton
sc
guidsl
artifacts ⚠️
ocl
od
ucd
langexperiments
json
xml
mlc
cd4analysis
monticore_basic
class2mc
secommons

The MontiVerse is a collection of (internal and public) language projects.

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