modelingvaluegroup / dclareformps Goto Github PK
View Code? Open in Web Editor NEWAdding declarative, reactive and incremental rules to MPS
License: GNU Lesser General Public License v3.0
Adding declarative, reactive and incremental rules to MPS
License: GNU Lesser General Public License v3.0
You showed this operator in the demo. I found the concept, but I cannot instantiate it.
Side note: If I understood the concept correctly, the operator currently only supports multi-valued links. What about single-valued ones?
Some aspects are not configurable/displayed in the Dclare Status tool even though they are defined in project and running when Dclare is enabled
DclareForMPS: 2.1.1EAP221017134639_030549600
MPS: 2021.3
Does Dclare work on a build server?
How to enable it?
When do we know it's done, and can continue the build?
(Please excuse the brevity, I'd like to have a placeholder to learn about / discuss this issue.)
I think I got Dclare into a dead state, and cannot get it back working.
I reverted all my changes to Dclare rules to a state that worked previously, and tried the usual things (rebuild everything, restart, invalidate caches) several times.
You mentioned that Dclare picks up outstanding transactions even between sessions. Where is this stored? I'd like to clear the storage.
Project to demonstrate issue: Gattag/DclareReferenceIssues
The following three methods are problematic because they expect their parent to be a IAttributeOwner
but in a quotation they are not
You can add tracing markers to expressions. These will show up in the Status-tool as info
lines. The hex number is the timestamp. The lines are unordered, although you can mentally sort them of course. It would be more logical to sort the so that you can have a sense of progress. Keep in mind that dclare executes in a hefty parallel way so a chronological ordering does not always give you the proper insight. But if you keep that in mind the ordering might help to find problems and gain insight.
Furthermore to get the latest changes easily accessible it makes more sense to put the latest traces first, hence sort anti-chronologically.
This is a bit vague, but @WimBast and I already looked at this together in an example where I had a statement list inside a quotation that should pick up all statement lists from a list of contained concepts. At random some subconcepts did not get their statements added to the statement list.
@WimBast knows under what conditions this phenomenon surfaces :)
version: current develop branch
TODO
DclareForMPS: 2.1.1EAP221017134639_030549600
After every run of the dclare engine models are checked to update the list of issues automatically. This is not always desirable. Either you do not like the time/performance it takes to do the model checks or there might be checks that unexpectedly throws an exception which will then crash the engine, which is not always desirable.
In my "DetailsBack" example, I create the temporary model details
with Declare.
Then, we have a new dependency: coarse
depends on details
.
After a restart, this dependency cannot be resolved (I presume because details
model id changed).
after "Extract Attribute" the new attribute is placed at the top of the ruleset, this is hardly ever the right spot.
It would be better to insert it after the member it is refactored from.
Furthermore it would be nice to select the place where the new name is entered so that the user can start typing immediately.
I had the following problem:
Module ruleset:
attr list<model> sourceModels := this.models.where({~m => m.generationNeeded; });
Model ruleset:
attr boolean generationNeeded := !this.name.endsWith(".service");
Now when one of the models in this.models
has a null
in generationNeeded
, the whole where
is skipped and sourceModels
always stays the empty list forever.
I guess the handling should be more defensive for example null
values might better be interpreted as false
. But this is only a wild guess.
When selecting a smart reference through the completion menu, the node is created, the reference looks like it is populated for a fraction of a second, but it is instantly removed (I don't know enough about MPS internals to tell you if that is just a rendered placeholder from the completion menu or if the node actually has the link and it is removed momentarily afterward). This happens only when there is at least one ruleset (even if it is blank) and the engine is on.
I made a small language with variable definition statements and variable reference expressions to demonstrate the issue
dclare-smart-ref-test
On a completely unrelated (I think, but maybe they are the same thing) note, undo is impossible after any change is preformed by Dclare. Is this a know issue, am I dumb, or is this not intended? Thanks, G
The functionality does exist in dclareForJava with the @Default
annotation, any reason it can't exist here?
We need a more elaborate way of doing bulk renames:
Example model: https://github.com/enikao/dclare4mps-n-to-m-mapping
I'm trying to implement a n:m mapping.
Scenario: We have a tree structure as source.
We can define several configurations for each tree. A configuration mirrors the source tree structure, and we can add some attributes to each mirrored node.
Dclare should make sure all configurations are in sync with the tree.
I get the following error message:
REFERENCED_ORPHAN Property 'triple' of object 'A config alpha' references orphan 'Triple[A, A config alpha]' in RootTreeConfig#whia2g0jaqe7
Each config refers to its own Triple
, so how can this happen?
DclareForMPS: 2.1.1EAP221017134639_030549600
MPS: 2021.3
We used to change these by adding -D flags to the JVM settings. It is better, and quicker, to have them available in the preferences. The new ones are mainly trace settings. They only log to stdout and are only really valuable for us developers. That's why they are in the developer section of the preferences!
in dclare issue 34 the engine exposes more info. We need to adjust the Messages view to display the info.
This is just an editor feature. Sometimes it is more appropriate to display elements in a vertical row.
I get the following compile error at building:
incompatible types: org.modelingvalue.dclare.mps.SStructClass cannot be converted to org.modelingvalue.dclare.mps.SStructObject (/Users/tom/projects/mvg-dc/cdm/languages/cdm.lang/source_gen/cdm/lang/rules/ModelS_GENERATOR.java:357)
the generated code is:
@Override
public List call(Object[] args) {
return resolveAll_2((SStructClass) args[0], (List) args[1]);
}
....
private static List<SModel> resolveAll_2(final SStructObject context, List<SModelReference> ptrs) {
return ....
}
which obviously is not correct.
version: develop
branch
The Dclare tool window has several entries for error
, warning
, debug
, etc.
However, I never saw any message there, even though I broke it in different ways:
ConcurrentModificationException
How can I enable messages?
In my "DetailsBack" example, I had master
branch checked out. I changed some Dclare rules.
Then I checkout out working
with force checkout option.
Declare didn't like that:
[1832496] ERROR - smanager.tree.FeatureForestMap - Exception on firing featureStateChanged event
java.lang.AssertionError: EventsCollector was already configured to listen for changes in this model descriptor: r:20a227dc-6f8d-4f6b-8124-f964ef8ce2aa(Fine.rules)
at jetbrains.mps.smodel.ModelsEventsCollector.startListeningToModel(ModelsEventsCollector.java:78)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceRegistry$MyEventsCollector.addListener(CurrentDifferenceRegistry.java:231)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceRegistry.addEventCollector(CurrentDifferenceRegistry.java:155)
at jetbrains.mps.vcs.changesmanager.ChangesTracking.<init>(ChangesTracking.java:119)
at jetbrains.mps.vcs.changesmanager.CurrentDifference.<init>(CurrentDifference.java:25)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceRegistry.getCurrentDifference(CurrentDifferenceRegistry.java:136)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter$2.compute(TreeHighlighter.java:211)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter$2.compute(TreeHighlighter.java:201)
at jetbrains.mps.util.AbstractComputeRunnable.run(AbstractComputeRunnable.java:27)
at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:73)
at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:54)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter.rehighlightNode(TreeHighlighter.java:229)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter.rehighlightFeature(TreeHighlighter.java:248)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter.rehighlightFeatureAndDescendants(TreeHighlighter.java:278)
at jetbrains.mps.vcs.changesmanager.tree.TreeHighlighter$MyFeatureForestMapListener.featureStateChanged(TreeHighlighter.java:492)
at jetbrains.mps.vcs.changesmanager.tree.FeatureForestMap.fireFeatureStateChanged(FeatureForestMap.java:127)
at jetbrains.mps.vcs.changesmanager.tree.FeatureForestMap.removeKey(FeatureForestMap.java:79)
at jetbrains.mps.vcs.changesmanager.tree.FeatureForestMapSupport$MyListener$2.visit(FeatureForestMapSupport.java:117)
at jetbrains.mps.vcs.changesmanager.tree.FeatureForestMapSupport$MyListener$2.visit(FeatureForestMapSupport.java:115)
at jetbrains.mps.internal.collections.runtime.IVisitor.invoke(IVisitor.java:12)
at jetbrains.mps.internal.collections.runtime.IterableUtils.visitAll(IterableUtils.java:16)
at jetbrains.mps.internal.collections.runtime.AbstractSequence.visitAll(AbstractSequence.java:80)
at jetbrains.mps.vcs.changesmanager.tree.FeatureForestMapSupport$MyListener.changeRemoved(FeatureForestMapSupport.java:115)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster$2.invoke(CurrentDifferenceBroadcaster.java:54)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster$2.invoke(CurrentDifferenceBroadcaster.java:52)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster.fireEvent(CurrentDifferenceBroadcaster.java:33)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster.changeRemoved(CurrentDifferenceBroadcaster.java:52)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster$2.invoke(CurrentDifferenceBroadcaster.java:54)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster$2.invoke(CurrentDifferenceBroadcaster.java:52)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster.fireEvent(CurrentDifferenceBroadcaster.java:33)
at jetbrains.mps.vcs.changesmanager.CurrentDifferenceBroadcaster.changeRemoved(CurrentDifferenceBroadcaster.java:52)
at jetbrains.mps.vcs.changesmanager.CurrentDifference$1.visit(CurrentDifference.java:48)
at jetbrains.mps.vcs.changesmanager.CurrentDifference$1.visit(CurrentDifference.java:46)
at jetbrains.mps.internal.collections.runtime.IVisitor.invoke(IVisitor.java:12)
at jetbrains.mps.internal.collections.runtime.IterableUtils.visitAll(IterableUtils.java:16)
at jetbrains.mps.internal.collections.runtime.AbstractSequence.visitAll(AbstractSequence.java:80)
at jetbrains.mps.vcs.changesmanager.CurrentDifference.removeChangeSet(CurrentDifference.java:46)
at jetbrains.mps.vcs.changesmanager.ChangesTracking$2.run(ChangesTracking.java:186)
at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:85)
at jetbrains.mps.smodel.WorkbenchModelAccess.lambda$runReadAction$0(WorkbenchModelAccess.java:80)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:907)
at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:77)
at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:54)
at jetbrains.mps.vcs.changesmanager.ChangesTracking.update(ChangesTracking.java:168)
at jetbrains.mps.vcs.changesmanager.CurrentDifference$4.run(CurrentDifference.java:110)
at jetbrains.mps.vcs.changesmanager.SimpleCommandQueue$MyExecutorThread.run(SimpleCommandQueue.java:97)
[1832510] ERROR - jetbrains.mps.smodel.SModel - Model Fine.rules@repository: version for language DclareMPS not found. Using last version instead.
[1832680] INFO - s.plugins.PluginLoaderRegistry - Unloading of 2 plugins took 0,000 s
[1832691] INFO - s.plugins.PluginLoaderRegistry - Loading of 2 plugins took 0,008 s
I commented a rule attribute with the default commenting feature:
/*attr set<struct<Triple>> triples := [];
*/
The generator doesn't like that:
jetbrains.mps.lang.smodel.generator.smodelAdapter.NodeCastException: Can't cast node: 3160209179995890717, concept: jetbrains.mps.lang.core.structure.BaseCommentAttribute to concept: DclareMPS.structure.RuleSet
at jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations.cast(SNodeOperations.java:563)
at DclareMPS.behavior.Attribute__BehaviorDescriptor.getContextType_id29R9$zZWsRH(Attribute__BehaviorDescriptor.java:67)
at DclareMPS.behavior.Attribute__BehaviorDescriptor.invokeSpecial0(Attribute__BehaviorDescriptor.java:106)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeSpecial(BaseBHDescriptor.java:358)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invokeVirtual(BaseBHDescriptor.java:317)
at jetbrains.mps.core.aspects.behaviour.BaseBHDescriptor.invoke(BaseBHDescriptor.java:241)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke0(SMethodImpl.java:151)
at jetbrains.mps.core.aspects.behaviour.SMethodImpl.invoke(SMethodImpl.java:126)
at main.QueriesGenerated.sourceNodeQuery_1_10(QueriesGenerated.java:516)
at main.QueriesGenerated$SNQ.evaluate(QueriesGenerated.java:1269)
at jetbrains.mps.generator.template.DefaultQueryExecutionContext.evaluate(DefaultQueryExecutionContext.java:136)
at jetbrains.mps.generator.impl.TemplateProcessor$MacroWithInput.getNewInputNode(TemplateProcessor.java:291)
at jetbrains.mps.generator.impl.TemplateProcessor$CopySrcMacros.apply(TemplateProcessor.java:401)
at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:112)
at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:137)
at jetbrains.mps.generator.impl.TemplateProcessor$MacroImpl.nextMacro(TemplateProcessor.java:263)
at jetbrains.mps.generator.impl.TemplateProcessor$VarMacro2.apply(TemplateProcessor.java:611)
at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:112)
at jetbrains.mps.generator.impl.TemplateProcessor.apply(TemplateProcessor.java:102)
at jetbrains.mps.generator.impl.TemplateContainer.apply(TemplateContainer.java:77)
at jetbrains.mps.generator.impl.RuleConsequenceProcessor$TemplateConsequence.processRuleConsequence(RuleConsequenceProcessor.java:249)
at jetbrains.mps.generator.impl.interpreted.TemplateReductionRuleInterpreted.apply(TemplateReductionRuleInterpreted.java:74)
at jetbrains.mps.generator.template.DefaultQueryExecutionContext.applyRule(DefaultQueryExecutionContext.java:219)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:412)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:349)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1208)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator.copyNodes(TemplateGenerator.java:696)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.copyNodes(TemplateExecutionEnvironmentImpl.java:151)
at jetbrains.mps.generator.impl.TemplateProcessor$CopySrcMacros.apply(TemplateProcessor.java:407)
at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:112)
at jetbrains.mps.generator.impl.TemplateProcessor.apply(TemplateProcessor.java:102)
at jetbrains.mps.generator.impl.TemplateContainer.apply(TemplateContainer.java:77)
at jetbrains.mps.generator.impl.RuleConsequenceProcessor$TemplateConsequence.processRuleConsequence(RuleConsequenceProcessor.java:249)
at jetbrains.mps.generator.impl.interpreted.TemplateReductionRuleInterpreted.apply(TemplateReductionRuleInterpreted.java:74)
at jetbrains.mps.generator.template.DefaultQueryExecutionContext.applyRule(DefaultQueryExecutionContext.java:219)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:412)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.trySwitch(TemplateExecutionEnvironmentImpl.java:196)
at jetbrains.mps.generator.impl.TemplateProcessor$SwitchMacro.apply(TemplateProcessor.java:756)
at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:112)
at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:137)
at jetbrains.mps.generator.impl.TemplateProcessor.applyTemplate(TemplateProcessor.java:139)
at jetbrains.mps.generator.impl.TemplateProcessor.apply(TemplateProcessor.java:104)
at jetbrains.mps.generator.impl.TemplateContainer.apply(TemplateContainer.java:77)
at jetbrains.mps.generator.impl.RuleConsequenceProcessor$TemplateConsequence.processRuleConsequence(RuleConsequenceProcessor.java:249)
at jetbrains.mps.generator.impl.interpreted.TemplateReductionRuleInterpreted.apply(TemplateReductionRuleInterpreted.java:74)
at jetbrains.mps.generator.template.DefaultQueryExecutionContext.applyRule(DefaultQueryExecutionContext.java:219)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:412)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.trySwitch(TemplateExecutionEnvironmentImpl.java:196)
at jetbrains.mps.generator.impl.TemplateProcessor$SwitchMacro.apply(TemplateProcessor.java:756)
at jetbrains.mps.generator.impl.TemplateProcessor.applyMacro(TemplateProcessor.java:112)
at jetbrains.mps.generator.impl.TemplateProcessor.apply(TemplateProcessor.java:102)
at jetbrains.mps.generator.impl.TemplateContainer.apply(TemplateContainer.java:77)
at jetbrains.mps.generator.impl.RuleConsequenceProcessor$TemplateConsequence.processRuleConsequence(RuleConsequenceProcessor.java:249)
at jetbrains.mps.generator.impl.interpreted.TemplateReductionRuleInterpreted.apply(TemplateReductionRuleInterpreted.java:74)
at jetbrains.mps.generator.template.DefaultQueryExecutionContext.applyRule(DefaultQueryExecutionContext.java:219)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:412)
at jetbrains.mps.generator.impl.TemplateExecutionEnvironmentImpl.tryToReduce(TemplateExecutionEnvironmentImpl.java:349)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1208)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator$FullCopyFacility.copyInputNode(TemplateGenerator.java:1226)
at jetbrains.mps.generator.impl.TemplateGenerator.copyNodeAttributes(TemplateGenerator.java:877)
at jetbrains.mps.generator.impl.TemplateGenerator.createRootNodeByRule(TemplateGenerator.java:408)
at jetbrains.mps.generator.impl.TemplateGenerator.applyRootRule(TemplateGenerator.java:385)
at jetbrains.mps.generator.impl.TemplateGenerator.applyRootRule(TemplateGenerator.java:380)
at jetbrains.mps.generator.impl.TemplateGenerator.applyReductions(TemplateGenerator.java:293)
at jetbrains.mps.generator.impl.TemplateGenerator.apply(TemplateGenerator.java:181)
at jetbrains.mps.generator.impl.GenerationSession.executeMajorStepInternal(GenerationSession.java:461)
at jetbrains.mps.generator.impl.GenerationSession.executeMajorStep(GenerationSession.java:417)
at jetbrains.mps.generator.impl.GenerationSession.processGenPlanBranch(GenerationSession.java:282)
at jetbrains.mps.generator.impl.GenerationSession.generateModel(GenerationSession.java:198)
at jetbrains.mps.generator.impl.GenerationController.generateModel(GenerationController.java:136)
at jetbrains.mps.generator.impl.GenerationController.generate(GenerationController.java:72)
at jetbrains.mps.generator.GenerationFacade.process0(GenerationFacade.java:178)
at jetbrains.mps.generator.GenerationFacade.process(GenerationFacade.java:161)
at jetbrains.mps.lang.core.plugin.Generate_Facet$Target_generate$1$4.run(Generate_Facet.java:460)
at jetbrains.mps.smodel.ActionDispatcher.dispatch(ActionDispatcher.java:88)
at jetbrains.mps.smodel.WorkbenchModelAccess.lambda$runReadAction$0(WorkbenchModelAccess.java:90)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:869)
at jetbrains.mps.smodel.WorkbenchModelAccess.runReadAction(WorkbenchModelAccess.java:87)
at jetbrains.mps.smodel.ModelAccessBase.runReadAction(ModelAccessBase.java:56)
at jetbrains.mps.lang.core.plugin.Generate_Facet$Target_generate$1.execute(Generate_Facet.java:456)
at jetbrains.mps.internal.make.runtime.script.Script$3.invoke(Script.java:311)
at jetbrains.mps.internal.make.runtime.script.Script$3.invoke(Script.java:255)
at jetbrains.mps.ide.make.WorkbenchMakeService$Controller.runJobWithMonitor(WorkbenchMakeService.java:313)
at jetbrains.mps.internal.make.runtime.script.Script.executeTargets(Script.java:255)
at jetbrains.mps.internal.make.runtime.script.Script.execute(Script.java:233)
at jetbrains.mps.make.service.CoreMakeTask$1.invoke(CoreMakeTask.java:103)
at jetbrains.mps.make.service.CoreMakeTask$1.invoke(CoreMakeTask.java:76)
at jetbrains.mps.make.dependencies.MakeSequence.iterate(MakeSequence.java:56)
at jetbrains.mps.make.service.CoreMakeTask.doRun(CoreMakeTask.java:76)
at jetbrains.mps.ide.make.MakeTask$WorkbenchMakeTask.doRun(MakeTask.java:148)
at jetbrains.mps.make.service.CoreMakeTask.run(CoreMakeTask.java:55)
at jetbrains.mps.ide.make.MakeTask$2.run(MakeTask.java:68)
at java.base/java.lang.Thread.run(Thread.java:834)
I'm still using MPS 2021.1 in several projects. Will there be a DclareForMPS v2 release for that MPS version?
I'd like to write a rule that makes sure a node contains my node, i.e. either creates it or refers the existing one.
In the example of #5, assume Container.override
contains, next to Override
, also FakeOverride
(to be added by the user). Currently, I can create my Overrides
only by assignment:
container.override := listOfAllOverrides;
I'd like to write something like:
// variant A
container.overrides.contains(myPotentiallyNewOverride);
// variant B
container.overrides.containsAll(listOfAllOverrides);
This would keep existing FakeOverride
s, but add new Override
s if required.
Probably a new operator would be more fitting than contains()
/ containsAll()
.
I created a simple example:
Language Coarse describes a Container
.
Language Fine describes the same thing, but on a higher detail level: DetailedContainer
.
The Dclare transformation creates from a Container
a DetailedContainer
and adds some IDetail
s.
This part works.
In a Container
, I can add Override
s. They can override any IOverridable
, amongst them IDetail
.
This part doesn't work.
In the rule, I have log messages in both the if and the else branch, but neither is shown.
How to find out what's the issue?
(This example also shows #4)
Proposal to simplify rule sets and increase notational flexibility
final concept RuleSet {
child ruleSetName : RuleSetName [0-1]
child members : IRuleSetMember [0-n]
ref aspect : Aspect [1]
}
concept RuleSetName {
prop name : string
}
interface IRuleSetMember { }
concept Context implements IRuleSetMember, ThisContext {
child contextType : ContextType [1]
child members : IContextMembers [0-n]
}
interface IContextMember { }
interface Feature implements IContextMember { }
TODO
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.