-
-// public static val INVALID_NAME = 'invalidName'
-//
-// @Check
-// def checkGreetingStartsWithCapital(Greeting greeting) {
-// if (!Character.isUpperCase(greeting.name.charAt(0))) {
-// warning('Name should start with a capital',
-// MyDslPackage.Literals.GREETING__NAME,
-// INVALID_NAME)
-// }
-// }
-/* @Check
- def checkStoppingExpressionShouldHaveOneBehaviourToCollectColor(Mission mission) {
- var isCollectColorExist = false;
- if (!mission.se.scond.colors.nullOrEmpty) {
- var blist = mission.behaviours;
- for (var j = 0; j < blist.size; j++) {
- if (!blist.get(j).clcColor.nullOrEmpty) {
- isCollectColorExist = true;
- }
+ @Check
+ def checkRobot(Robot r){
+ if(r.acc == 0){
+ warning("Acceleration set to zero, this could lead to non moving robot", null);
+ }
+ if(r.spd == 0){
+ warning("Acceleration set to zero, this could lead to non moving robot", null);
+ }
+ }
+
+ @Check
+ def checkBehavioursl(Mission m) {
+ var List<String> empty = new LinkedList<String>();
+ var List<String> all = new LinkedList<String>();
+ var List<String> warned = new LinkedList<String>();
+ for(Behaviour b : m.behaviours){
+ if(b.tc == null){
+ empty.add(b.name);