diff options
author | 2024-06-17 00:48:56 +0200 | |
---|---|---|
committer | 2024-06-17 00:48:56 +0200 | |
commit | 20377189894ab40298513441f07080477b1cccfd (patch) | |
tree | 9294708b2a7eebf152e76fdfbf2c1edfd3fa12ec /subprojects/language/src/main/java/tools | |
parent | feat(language): validate quantification in rules (diff) | |
download | refinery-20377189894ab40298513441f07080477b1cccfd.tar.gz refinery-20377189894ab40298513441f07080477b1cccfd.tar.zst refinery-20377189894ab40298513441f07080477b1cccfd.zip |
refactor(language): allow rules without preconditions
Diffstat (limited to 'subprojects/language/src/main/java/tools')
-rw-r--r-- | subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java b/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java index 21dd7218..36a77ac7 100644 --- a/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java +++ b/subprojects/language/src/main/java/tools/refinery/language/validation/ProblemValidator.java | |||
@@ -413,10 +413,6 @@ public class ProblemValidator extends AbstractProblemValidator { | |||
413 | 413 | ||
414 | @Check | 414 | @Check |
415 | public void checkRuleDefinition(RuleDefinition ruleDefinition) { | 415 | public void checkRuleDefinition(RuleDefinition ruleDefinition) { |
416 | if (ruleDefinition.getKind() != RuleKind.REFINEMENT && ruleDefinition.getPreconditions().isEmpty()) { | ||
417 | acceptError("Decision and propagation rules must have at least one precondition.", ruleDefinition, | ||
418 | ProblemPackage.Literals.NAMED_ELEMENT__NAME, 0, INVALID_RULE_ISSUE); | ||
419 | } | ||
420 | if (ruleDefinition.getConsequents().size() != 1) { | 416 | if (ruleDefinition.getConsequents().size() != 1) { |
421 | acceptError("Rules must have exactly one consequent.", ruleDefinition, | 417 | acceptError("Rules must have exactly one consequent.", ruleDefinition, |
422 | ProblemPackage.Literals.NAMED_ELEMENT__NAME, 0, INVALID_RULE_ISSUE); | 418 | ProblemPackage.Literals.NAMED_ELEMENT__NAME, 0, INVALID_RULE_ISSUE); |