Giter VIP home page Giter VIP logo

dclareformps's People

Contributors

carel avatar dependabot[bot] avatar drobinson4105 avatar enikao avatar gattag avatar rkrijgsheld avatar tombrus avatar wimbast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dclareformps's Issues

How to use the inverse relation operator (~)?

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?

Aspects are sometimes not displayed in Status tool

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

Can Dclare run in a headless MPS / from Ant?

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.)

How to reset Dclare transactions?

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.

output from tracing markers should be sorted anti-chronologically

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.

rules in composite attributes are not always activated

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 :)

There should be a way to disable automatic Model Checking

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.

Temporary target model import not resolved after restart

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).

put extracted at a more logical position

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.

primitive types (e.g. boolean) are implemented by boxed types (Boolean) but NPE's can cause unexpected results

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.

Smart References through menu don't work properly

Versions

  • MPS = 2021.1.3
  • DclareForMPS = 1.6.1 (plugin installed through JetBrains plugin marketplace)

Issue

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.

Reproduce

I made a small language with variable definition statements and variable reference expressions to demonstrate the issue
dclare-smart-ref-test

Other notes

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

improve the rudimentary "Rename Nodes" refactoring

We need a more elaborate way of doing bulk renames:

  • allow multiple changes so that you can try/revert/retry
  • safe/load rename sets to disk
  • give better feedback
  • not only change names of INamedConcepts but also StringLiterals and String typed properties

Identity of struct not recognized

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?

expose various developer settings in the plugin preferences

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!

meth's on Structs do not seem to compile

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

How to show any messages?

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:

  • Writing conflicting rules
  • Getting ConcurrentModificationException
  • Killing the whole engine (see #2)

How can I enable messages?

Switching between branches throws exception

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

No nodes created - bug or stupidity?

Screenshot 2019-10-18 at 12 05 25

I am assuming that this ruleset

  • produces instances of ValidationInspector as roots in the current model, one for each instance of TaxModule in that same model

But nothing happens ... even though the Engine is activated in the preferences.

Commented attribute fails the generator

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)

v2.x for MPS 2021.1?

I'm still using MPS 2021.1 in several projects. Will there be a DclareForMPS v2 release for that MPS version?

contains() relation?

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 FakeOverrides, but add new Overrides if required.

Probably a new operator would be more fitting than contains() / containsAll().

Example of optional details not working

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 IDetails.
This part works.

In a Container, I can add Overrides. 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)

https://github.com/enikao/DclareForMPS-DetailsBack

Generalization of RuleSet [WIP]

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.