From f3d62dbc9400d9ebea6dae3b93208aa1b3b04732 Mon Sep 17 00:00:00 2001 From: Grigorii Kirgizov Date: Mon, 8 Jun 2020 12:31:30 +0300 Subject: [PATCH] Handle MacroTemplates in principal constraints analysis It's possible to activate constraints in macros, so they must be also handled. Also restrict a bit principal rules analysis: consider only rules with template input. --- .../languageModels/behavior.mps | 109 +++ .../jetbrains.mps.lang.coderules.analysis.mps | 746 ++++++++++++++---- ...ins.mps.coderules.incrementality@tests.mps | 21 +- 3 files changed, 716 insertions(+), 160 deletions(-) diff --git a/coderules/languages/jetbrains.mps.lang.coderules/languageModels/behavior.mps b/coderules/languages/jetbrains.mps.lang.coderules/languageModels/behavior.mps index 84e98b03..ad1d7ede 100644 --- a/coderules/languages/jetbrains.mps.lang.coderules/languageModels/behavior.mps +++ b/coderules/languages/jetbrains.mps.lang.coderules/languageModels/behavior.mps @@ -347,6 +347,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coderules/languages/jetbrains.mps.lang.coderules/languageModels/jetbrains.mps.lang.coderules.analysis.mps b/coderules/languages/jetbrains.mps.lang.coderules/languageModels/jetbrains.mps.lang.coderules.analysis.mps index 8ed0bc16..7af4399b 100644 --- a/coderules/languages/jetbrains.mps.lang.coderules/languageModels/jetbrains.mps.lang.coderules.analysis.mps +++ b/coderules/languages/jetbrains.mps.lang.coderules/languageModels/jetbrains.mps.lang.coderules.analysis.mps @@ -220,12 +220,14 @@ + + @@ -325,6 +327,7 @@ + @@ -333,7 +336,11 @@ + + + + @@ -2347,7 +2354,24 @@ - + + + + + + + + + + + + + + + + + + @@ -2390,6 +2414,9 @@ + + + @@ -2514,36 +2541,83 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2585,34 +2659,40 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + - - - - + + - + @@ -2645,6 +2725,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2657,14 +2785,14 @@ - + - + @@ -2674,14 +2802,14 @@ - + - + @@ -2699,7 +2827,7 @@ - + @@ -2715,33 +2843,47 @@ - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2749,32 +2891,51 @@ - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + - - + + + + + + + + + + + + + - + @@ -2783,15 +2944,7 @@ - - - - - - - - - + @@ -2809,28 +2962,86 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + - + - + + + + + + + + + + + - + @@ -2840,7 +3051,7 @@ - + @@ -3179,9 +3390,9 @@ - + - + @@ -3281,6 +3492,7 @@ + @@ -3351,9 +3563,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -3406,7 +3763,7 @@ - + @@ -3415,6 +3772,14 @@ + + + + + + + + @@ -3534,45 +3899,39 @@ - - - - - - - - - - - + + - + - + - - + + - + - + + + + - + - + - - + + - - + + @@ -3590,8 +3949,8 @@ - - + + @@ -3635,8 +3994,8 @@ - - + + @@ -3662,8 +4021,8 @@ - - + + @@ -3694,34 +4053,11 @@ - - + + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -3759,6 +4095,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3853,9 +4295,7 @@ - - - + diff --git a/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.incrementality@tests.mps b/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.incrementality@tests.mps index 0b449c90..43003a23 100644 --- a/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.incrementality@tests.mps +++ b/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.incrementality@tests.mps @@ -290,6 +290,9 @@ + + + @@ -301,10 +304,8 @@ - - @@ -4415,11 +4416,17 @@ - - - - - + + + + + + + + + + +